Staredit Network > Forums > Modding Assistance > Topic: Various Modding Questions
Various Modding Questions
Jan 23 2017, 4:11 pm
By: DirectShift  

Jan 23 2017, 4:11 pm DirectShift Post #1



Hello fellow modders, I'm going to need your help to solve a couple problems I'm having.

1) Is there any way to change the position and size of the green square when you want to build something with protoss?? I tried with unit dimensions but... well... that's the unit dimensions for the finished building. I also though about modifying the staredit values but... there's no way I can change the position. SOLVED





2) When a Solar Bird dies (when a dragoon dies), a remnant appears. BUT, that remnant is assigned to player 1. So if my Solar Bird is from player 7 (white) and dies... it's remnant is going to be from player 1 (red)... any way to make remnant the same color as the unit??



3) This is a Pulse Cannon... it's basically a Siege Tank, it contains a turret. I found it's possible to change the position of the projectile: Make the bullet appear from whenever you want.

But in DatEdit I'm not able to enter negative numbers... I want the bullet to appear from the back of my Pulse Cannon... because that's where the turret is located!



4) The Pulse Cannon has a minimal range of 4... like the Siege Tank Siege Mode. However, if an unit gets closer to him... the Pulse Cannon instead of ignoring the unit and attacking another that is further, is going to get even closer trying to attack!



5) Is it possible to change the position of the rubbles?? I tried modifying the Iscript overlays but... nothing. SOLVED



6) The Stargate is now capable of making Scouts and Shuttles.

How do I tell the AI (in scaiedit) to use it properly? I mean, how do I tell the AI to make Shuttles using the Stargate?
SOLVED



7) Final question!! Can I change the hotkeys? Because the Probe (P) is now called Worker (W).... I want to create Workers when I press the "P" on my Nexus. SOLVED



THANK YOU EVERYONE!!!

Post has been edited 2 time(s), last time on Jan 29 2017, 1:21 am by DirectShift.



None.

Jan 24 2017, 1:58 am O)FaRTy1billion[MM] Post #2

👻 👾 👽 💪

I'm not at home so I can't answer in much detail, but #1 I think is the staredit value, or some other dimension. The only way to change the position is to move it in the grp so the center of the image is in the center of the frame.

#2 I'm not sure without plugins since sprites generally aren't owned.

#3 you could try spawning it 180° from where you want and hope it doesn't follow a crazy trajectory xD

#4 that probably has something to do with the tank normally not being able to move... There could be a hardcoded AI thing or a certain order for it?

#6 There might be ai conditions in FG or somewhere, but I've never actually used scaiedit

#7 is in stat_txt.tbl. search for the string that says to build it, and I believe it is either prefixed by or contains the small letter of the hotkey.

I might have answers for some of the other questions, but I have to do a bit of looking that I can't do on my phone.



TinyMap2 - Latest in map compression! ( 7/09/14 - New build! )
EUD Action Enabler - Lightweight EUD/EPD support! (ChaosLauncher/MPQDraft support!)
EUDDB - topic - Help out by adding your EUDs! Or Submit reference files in the References tab!
MapSketch - New image->map generator!
EUDTrig - topic - Quickly and easily convert offsets to EUDs! (extended players supported)
SC2 Map Texture Mask Importer/Exporter - Edit texture placement in an image editor!
\:farty\: This page has been viewed [img]http://farty1billion.dyndns.org/Clicky.php?img.gif[/img] times!

Jan 26 2017, 11:27 pm DirectShift Post #3



Thanks Farty, I solved #6 by discovering that the AI is smart enough to make the shuttles without doing anything... hehe.

About the others:

1) I modified the height and width from staredit but didn't affect anything, know why? maybe it's bugged?

2) any other way?

3) How do I spawn it 180°?? I only have X,Y offsets!!

4) I checked and modified the orders but couldn't accomplish it...

5) what about this?

6) Solved =)

7) Already did it! but hotkey is not affected... look at the image in the first post... you can see that I already modified the text.


Thanks farty.



None.

Jan 27 2017, 1:31 pm Corbo Post #4

ALL PRAISE YOUR SUPREME LORD CORBO

#1 I think it is determined just like the selection circle is. You need to set the unit value to "small", "large" or whatever. I think there's also flags in dat edit for building size, I'm not sure if I remember this properly or if this is SC2, though.

#2 How is your remnant created? Is it controllable or it is just a replacement for the dragoon? Shouldn't spawn the remnant as any player but 12 maybe, that's why I am asking how is the remnant created.

#3 I think you'll have to edit the missile's iscript fo spawp negatively offseted I'm not sure if you can do this one, though. But you could probably find a hacky way like making the .lo file be displaced so 0,0 is far back from the actual unit.

#4 I'm not sure why it's doing this since it's not normal siege tank behaviour...

#5 I think rubbles just spawn at 0,0 from where the building was. Whatt is the main issue here? Do they show up elsewhere, do you just want them to be somewhere else or what?

#6 Solved. k.

#7 you probably just have your string messed up. you use something like TBL PAD or PyTBL to edit stat_txt.tbl. The way string works is that the VERY FIRST letter of your string is the hotkey. The things in brackets are just color codes or formatting codes. So if you want your worker unit to be hotkey'd to w you'll have to do something like w[01]w[00]orker if I remember correctly. You'll have to excuse the fact that I am not using the proper brackets as I don't have them assigned to my keyboard atm.




Jan 27 2017, 5:14 pm Neiv Post #5



You might be able to make weapon spawn behind the attacker by having iscript turn the unit around before attacking, e.g.
Quote
turncwise 16
attack
turncwise 16

And then setting the weapon's launch spin in weapons.dat to 128.



None.

Jan 27 2017, 5:24 pm Zoko-TkZ Post #6



For #5, you can change the position of the rubble in the .grp, if your rubble sprite has different dimensions from your building sprite it will appear to be offset even though it is appearing at the exact same x,y coordinates. So if your building is a 128x128 size image and your rubble is a 128x64 size image, you would add 64 pixels of blank space in the y dimension to move it down that much and match the position of the building.



None.

Jan 27 2017, 6:23 pm O)FaRTy1billion[MM] Post #7

👻 👾 👽 💪

Quote from Corbo
#1 I think it is determined just like the selection circle is. You need to set the unit value to "small", "large" or whatever. I think there's also flags in dat edit for building size, I'm not sure if I remember this properly or if this is SC2, though.
Selection circle is determined in sprites.dat ...

In the StarEdit tab there is Placement Box, this should be the building placement dimensions. I'm not sure why it wouldn't work though.
DatEdit's hint seems to imply it is only in StarEdit. Maybe the building sizes are determined by the unit dimensions somehow?

Also for the hotkey, you would change the string "p<1>Build <3>P<1>robe<0>" to "w<1>Build <3>W<1>orker<0>", ensuring the prefixed "p" is a "w". I think they must also be lowercase.

EDIT: No, StarEdit's Placement Box is the correct setting:


Post has been edited 1 time(s), last time on Jan 27 2017, 6:31 pm by FaRTy1billion.



TinyMap2 - Latest in map compression! ( 7/09/14 - New build! )
EUD Action Enabler - Lightweight EUD/EPD support! (ChaosLauncher/MPQDraft support!)
EUDDB - topic - Help out by adding your EUDs! Or Submit reference files in the References tab!
MapSketch - New image->map generator!
EUDTrig - topic - Quickly and easily convert offsets to EUDs! (extended players supported)
SC2 Map Texture Mask Importer/Exporter - Edit texture placement in an image editor!
\:farty\: This page has been viewed [img]http://farty1billion.dyndns.org/Clicky.php?img.gif[/img] times!

Jan 27 2017, 6:32 pm Corbo Post #8

ALL PRAISE YOUR SUPREME LORD CORBO

Quote from O)FaRTy1billion[MM]

EDIT: No, StarEdit's Placement Box is the correct setting:
Cool.

Quote from O)FaRTy1billion[MM]
I think they must also be lowercase.
This is true.




Jan 29 2017, 1:38 am DirectShift Post #9



Thanks guys!! only need to solve 2,3,4 and we are done!!

Quote from Corbo

#2 How is your remnant created? Is it controllable or it is just a replacement for the dragoon? Shouldn't spawn the remnant as any player but 12 maybe, that's why I am asking how is the remnant created.

I didn't modify anything... it's created by iscript:

lowsprul 192 0 0 # DragoonDeath (protoss\pdrDeath.grp)

Quote from Neiv
You might be able to make weapon spawn behind the attacker by having iscript turn the unit around before attacking, e.g.
Quote
turncwise 16
attack
turncwise 16

And then setting the weapon's launch spin in weapons.dat to 128.

That works well for normal units Neiv, I think we almost solve this... there's a small problem, it's a tank and it has a turret... the problem now is this:

[see image attached]

When the turret is pointing at four (like the tank) everything goes well... the bullet appears at four...

BUT, if the tank is not pointing exactly as the turret... then it doesn't work...

I marked with numbers where the bullet appears if the tank is facing in that direction and the turret rotates correctly.

(if turret is aiming 2, the bullet will appear 2)

It's like the bullet is following the position of the tank and not of the turret.

I pasted your code in the iscript of the turret.

Any ideas?

Attachments:
asdasd.png
Hits: 0 Size: 40.65kb



None.

Feb 15 2017, 10:40 pm DirectShift Post #10



Hey, I think I have a solution for #3!!
I'm going to test it RIGHT NOW and tell you!



None.

Feb 15 2017, 10:55 pm DirectShift Post #11



Nevermind, doesn't look possible =(.

I'm going to change the dynamics of the shoot so it looks good.

If anyone has an idea of how to make it work, tell me...



None.

Feb 15 2017, 10:59 pm Corbo Post #12

ALL PRAISE YOUR SUPREME LORD CORBO

I'm still not completely clear on what you're attempting to do...

Care to explain a bit more?




Feb 15 2017, 11:23 pm DirectShift Post #13



Sure, look:

I'm attaching an image of my tank...

What I want do is to be able to spawn a bullet from the turret! and the turret is located on the back of the tank...

A guy over here offered a solution but it didn't work: in RED you can see what happened when I implemented that solution.

I want to make it work like it appears on GREEN.

Is it possible?

Thanks

Attachments:
tanks.png
Hits: 3 Size: 210.34kb



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[06:25 pm]
m.0.n.3.y -- Here's another question. I'm using switch randomization for powerups. There are 9 powerups, and I only want any of the powerups to appear only about 30% of the time. So I was just going to use 5 switches for a total of 32 options and have the other 23 results restart the randomization process. Is there a better way to do this?
[06:04 pm]
m.0.n.3.y -- NudeRaider
NudeRaider shouted: m.0.n.3.y Pro and Demon already gave correct answers, but let me add a pretty elegant way: Have the detection trigger owned by whoever is convenient for you. A single computer player, a force, all players - it doesn't matter. Now detect for the arbiter in conditions - also doesn't really matter how. In actions just set a dc to 1 for all players or the force that should have the text displayed. It will set the dc for each player to 1 individually. Because of this you can make a 2nd trigger that checks for the dc for current player and remove the dc for current player afterwards.
Ok that makes perfect sense NudeRaider
NudeRaider shouted: This method also has a bonus use: If you detect the arbiter in conditions for current player (set trigger owned accordingly!) then you can do the following: Add 1 to dc for current player AND add 1 to dc for all players. And in your 2nd trigger you can distinguish between players that just are informed and the player that actually had it, because their dc will be 2 instead of 1. So you can give them an additional reward or something dynamically.
Wow that's awesome! I'll definitely be doing this. Thanks for the tip, that's really cool
[05:29 pm]
NudeRaider -- This method also has a bonus use: If you detect the arbiter in conditions for current player (set trigger owned accordingly!) then you can do the following: Add 1 to dc for current player AND add 1 to dc for all players. And in your 2nd trigger you can distinguish between players that just are informed and the player that actually had it, because their dc will be 2 instead of 1. So you can give them an additional reward or something dynamically.
[05:27 pm]
NudeRaider -- m.0.n.3.y
m.0.n.3.y shouted: NEW QUESTION: How is it possible to show text to all players when something occurs? EX: Player 1 builds an Arbiter. Trigger says, When player 1 builds an Arbiter, do something, then remove the Arbiter. Now, I'd like text to show for all other players when P1 builds an Arbiter that says "P1 built an arbiter!". But how is this possible when the the original trigger that detects if P1 built an Arbiter then removes the Arbiter in it's actions? Like, the Arbiter is detected as built, then Action occurs for P1, then Arbiter is removed. So how can you detect if the Arbiter is built to show text to the other plays saying "P1 built an Arbiter" if the other trigger quickly removes the Arbiter? Does that make sense?
Pro and Demon already gave correct answers, but let me add a pretty elegant way: Have the detection trigger owned by whoever is convenient for you. A single computer player, a force, all players - it doesn't matter. Now detect for the arbiter in conditions - also doesn't really matter how. In actions just set a dc to 1 for all players or the force that should have the text displayed. It will set the dc for each player to 1 individually. Because of this you can make a 2nd trigger that checks for the dc for current player and remove the dc for current player afterwards.
[05:22 pm]
NudeRaider -- that's why the All Players thing is neat: When one player runs a wait, their copy of hypers will actually be blocked. But the hyper effect will not be disrupted because the hypers of all the other players are still running.
[05:21 pm]
NudeRaider -- *running at the same time for the same player.
[05:20 pm]
NudeRaider -- m.0.n.3.y
m.0.n.3.y shouted: Mini Moose 2707 Shit. Ok what are the exact circumstances where using wait triggers causes wait blocks and messes things up? EX: If player 8 is a computer and has hyper triggers at the bottom of his list, can I use a few of triggers on each human player 1-6 with a few waits each lasting 50 - 1000ms? I've read the articles in SEN Wiki but still not super clear on it :/
simple: 2 waits running at the same time. Hyper triggers constantly block each other, but they have no other purpose than to force another trigger loop, and stay in that "blocking each other" state as long as possible (=NEO)
[05:17 pm]
NudeRaider -- Dem0n
Dem0n shouted: It's recommended to never use waits if you have hyper triggers.
yes and no. If you have to ask: yes. If you know what you're doing, you can use them in a non-disruptive manner.
[05:15 pm]
NudeRaider -- m.0.n.3.y
m.0.n.3.y shouted: ALSO: @NudeRaider for your "other setup" you mean give the hypers to the "All Players" player checkbox, not to each player individually, right?
That's equivalent. At the start of a game sc parses triggers and creates copies of triggers owned by player groups (forces and all players) to each player that is part of that group. During runtime there's only individual trigger owners.
[04:04 pm]
m.0.n.3.y -- Dem0n
Dem0n shouted: That won't work. And it's one extra trigger with 2 actions. Hardly extra work.
You're right. Thank you!
Please log in to shout.


Members Online: Roy