Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: larvae, distances, and new challenges
larvae, distances, and new challenges
Nov 27 2010, 5:42 pm
By: DrZygote214
Pages: 1 2 3 >
 

Nov 27 2010, 5:42 pm DrZygote214 Post #1



Now that my Airport/Dropship engine is nearly complete, some new challanges have arisen in my map.

1. How do you keep larva alive when they're not on the creep?
2. How can you calculate the distance between 2 locations?
3. Nydus Canals only work for Zerg units. That's Xtreme gayness, is there a way to make them work with terran and protoss too?
4. I've seen advanced interfaces where just selecting a unit triggers an action. How do you do this?
5. Is it possible to center a location at the center of the screen/view?



None.

Nov 27 2010, 6:07 pm UnholyUrine Post #2



1. I think it has something to do with creating a larva or moving a larva into areas w/o creep. Not too sure, unfortunately.

2. Again, not to sure if that's possible. Might be achievable with Location grids

3. Not that I know of.

4. EUD's... AKA Extended Unit Deaths. I have no idea how it works, and I can't even find the wiki for you because of all the shuffling that happened with the old articles.

5. Short ans, No. Long ans, maybe with euds? I'm sure someone with better knowledge can help you with these (to me) overly challenging UMS problems



None.

Nov 27 2010, 6:18 pm Apos Post #3

I order you to forgive yourself!

1) There is a map somewhere in the database that has it all explained. If I find it, I'll tell you where it is.

2) You can sent a flying unit from point A to point B and calculate the time it takes to get to point B using a death counter.

3) You can just use triggers. (When unit enters location 01, move it to location 02)

4) http://www.staredit.net/topic/7729/#157910 (If you need any help, I could probably help you fully understand EUDs and how to find your own if it's not already in the EUD database.

5) http://www.staredit.net/topic/11925/ Works in your case?




Nov 27 2010, 6:38 pm DrZygote214 Post #4



EUDs, as I understand, only work if all the players on a map have the EUD program. So it's not suitable for public bnet playing. But I've been in maps (e.g. Chess by telecontor) where u select a unit and that causes a trigger, and I don't have any EUD program, so it must be possible somehow.



None.

Nov 27 2010, 6:44 pm Apos Post #5

I order you to forgive yourself!

Quote from DrZygote214
EUDs, as I understand, only work if all the players on a map have the EUD program. So it's not suitable for public bnet playing. But I've been in maps (e.g. Chess by telecontor) where u select a unit and that causes a trigger, and I don't have any EUD program, so it must be possible somehow.
It's only EUD actions that won't work without an external EUD program such as Farty's EUD enabler. Conditions will work just fine multiplayer or not. The only problem you may encounter is if your EUD condition reads a local variable that is not shared among all the starcraft clients.

(Someone correct if I explained it wrong.)




Nov 27 2010, 7:50 pm Roy Post #6

An artist's depiction of an Extended Unit Death

Quote from Apos
Quote from DrZygote214
EUDs, as I understand, only work if all the players on a map have the EUD program. So it's not suitable for public bnet playing. But I've been in maps (e.g. Chess by telecontor) where u select a unit and that causes a trigger, and I don't have any EUD program, so it must be possible somehow.
It's only EUD actions that won't work without an external EUD program such as Farty's EUD enabler. Conditions will work just fine multiplayer or not. The only problem you may encounter is if your EUD condition reads a local variable that is not shared among all the starcraft clients.

(Someone correct if I explained it wrong.)
Nope, you are completely right. Also, if the read is local and you only have local actions run, there will be no problem (i.e. screen position causing a display text).

The only question nobody really seemed to answer was #1.

1. Move a larva that was created from a hatchery/lair/hive. It will want to travel back to the building, but you can control it with the AI Scripts "Set Generic Target" and "Make These Units Patrol." Set Generic Target is the point you want the unit to travel, and Make These Units Patrol is the actual action that makes them change their course. You cannot specify a specific unit with this script, just the location.

#2-#5 have already been sufficiently answered, unless you need elaboration.




Nov 27 2010, 8:22 pm DrZygote214 Post #7



Thanx Roy, the larva thing worked like a charm. NOW MY AIRPORT ENGINE IS COMPLETE, AND IT DOESN"T EVEN HAVE TO CYCLE THROUGH BEACONS OR DROPSHIPS.

However, now I need a tutorial or wiki for this EUD thingy. I wanna be able to like read grid coordinates of 2 locations, then calculate the distance between them. I also wanna move a location to the center of the screen.

BTW, why in the world do my units attack a unit owned by player 9? Aren't P9 - P12 neutral?

Post has been edited 2 time(s), last time on Nov 27 2010, 8:46 pm by DrZygote214.



None.

Nov 27 2010, 8:57 pm Apos Post #8

I order you to forgive yourself!

Quote from DrZygote214
BTW, why in the world do my units attack a unit owned by player 9? Aren't P9 - P12 neutral?
Just set the alliance status to ally using the trigger.

Edit: Or you can make them invincible.

Post has been edited 1 time(s), last time on Nov 27 2010, 9:04 pm by Apos.




Nov 27 2010, 10:37 pm DrZygote214 Post #9



Quote from Apos
Just set the alliance status to ally using the trigger.

Yea I guess, but I was under the impression that P9, P10, P11, and P12 were all neutral to begin with.

Okay I get EUDs now. I am a Computer Science major and know what buffer overrun is, and I get that EUDs are just normal triggers with a death condition, using larger than usual numbers for player and/or unit id.

So I found this: http://farty1billion.dyndns.org/EUDDB/?pg=entry&addr=6456472 and this: http://farty1billion.dyndns.org/EUDDB/?pg=entry&addr=6456492

But that seems to be incomplete info. It lists the player ID, but not the unit ID, so idk how to complete my trigger. Also, are those screen coordinates in pixels or grid cells?



None.

Nov 28 2010, 12:25 am Apos Post #10

I order you to forgive yourself!

Quote from DrZygote214
So I found this: http://farty1billion.dyndns.org/EUDDB/?pg=entry&addr=6456472 and this: http://farty1billion.dyndns.org/EUDDB/?pg=entry&addr=6456492

But that seems to be incomplete info. It lists the player ID, but not the unit ID, so idk how to complete my trigger. Also, are those screen coordinates in pixels or grid cells?
It's been a while since I did any EUDs, but I'll try to remember everything from the top of my head. (I'll check later if everything is right.)

1) Download Farty's EUDTrig
2) Start EUDTrig and in the Memory Offset, input the address you found in the database.
3) Uncheck the "Use Extended Player Deaths".
4) Press the press the arrows that are pointing downward. The player number and the Unit ID fields will be filled.
5) Check how much bytes are in red. Each "00" means 1 bytes. This means that for each unit you want to detect, you will have to multiply it by 2^4: 1 = 16, 2 = 32, etc.
6) Make your trigger and your done.




Nov 28 2010, 1:36 am Roy Post #11

An artist's depiction of an Extended Unit Death

You can find unit IDs by selecting the unit in SCMDraft 2, right-clicking and viewing properties (if you have the latest version). You can also calculate the ID if you know what order you placed the unit on the map. This thread has several unit-specific EUD conditions recorded: http://www.staredit.net/topic/10471/

Also, there are EUDs and EPDs. EPDs (Extended Player Deaths) work just the same way, and it always uses the unit ID of Terran Marine, so the address is only represented by the player ID, rather than a combination of player ID and unit ID. SCMDraft 2 has a "Memory" condition that is used only for EPD conditions.

But yeah, Apos' directions pretty much explain how to get the value(s) you need from a specified memory address.

I am also a Computer Science major :awesome:




Nov 28 2010, 1:46 am Apos Post #12

I order you to forgive yourself!

The only difference between an EUD and an EPD is that with the player number is only 4 bytes meaning that you can read any address.

Reminder:
EUD = Extended Unit Deaths
EPD = Extended Player Deaths




Nov 28 2010, 3:09 am DrZygote214 Post #13



Quote from Apos
5) Check how much bytes are in red. Each "00" means 1 bytes. This means that for each unit you want to detect, you will have to multiply it by 2^4: 1 = 16, 2 = 32, etc.

I think I get everything, except this. For Screen coordinates, i believe that is unit independent, but are u saying that if i wanna read, say, a unit's hp, i have to use an offset based on what order that unit was created?

Also, when u said 2^4: 1 = 16, 2 = 32, did u mean n*16, where n is the nth unit created?

Quote from Roy
You can find unit IDs by selecting the unit in SCMDraft 2, right-clicking and viewing properties (if you have the latest version).

Finally, 1 new request: how do you detect when a reaver builds a scarab, like in storm the fort 2010 v17 ?
wait, i already know that terran marine = 0, terran ghost = 1, etc. And is the latest edition 2.0.8.0?

Quote from Roy
I am also a Computer Science major :awesome:

Can u get me a job? :-(



None.

Nov 28 2010, 6:34 am Roy Post #14

An artist's depiction of an Extended Unit Death

Quote from DrZygote214
Quote from Apos
5) Check how much bytes are in red. Each "00" means 1 bytes. This means that for each unit you want to detect, you will have to multiply it by 2^4: 1 = 16, 2 = 32, etc.

I think I get everything, except this. For Screen coordinates, i believe that is unit independent, but are u saying that if i wanna read, say, a unit's hp, i have to use an offset based on what order that unit was created?

Also, when u said 2^4: 1 = 16, 2 = 32, did u mean n*16, where n is the nth unit created?
Maybe Apos didn't explain that part very well, and that's because it's kind of difficult to explain. Basically, if the first two 00's are red, you're in good shape. If the second two are red, you need to multiply the value of the address (the at least/at most/exactly info) by 256. If the third 00's are red, you need to multiply the value by 65536. It's basically an offset based on the ending number of the address. Farty posted a visual representation, but since I cannot find the link, I'll recreate it.


0 1 2 3
4 5 6 7
8 9 A B
C D E F

00 00 00 00


Basically, if the address ends in 0, 4, 8, or C, you don't need to multiply the value in your trigger. If it ends in 1, 5, 9, or D, you need to multiply it by 256, etc.

Quote from DrZygote214
Finally, 1 new request: how do you detect when a reaver builds a scarab, like in storm the fort 2010 v17 ?
wait, i already know that terran marine = 0, terran ghost = 1, etc. And is the latest edition 2.0.8.0?
You may not have the latest version. SI decided to release several versions of 0.8.0 with minute modifications, and they trade off stability for usefulness. I would recommend you keep your current version in addition to the latest, which is linked in this topic.

As for the reaver, the easiest way is to detect when the player spends the minerals and/or gas to create a scarab. The downside to this method is that one resource must be in a perfect monitoring state (i.e. they can't spend it on anything else).

Quote from DrZygote214
Quote from Roy
I am also a Computer Science major :awesome:

Can u get me a job? :-(
I'm actually still in college; I have a year until my BA, but I'm probably going to go for my Master's.




Nov 28 2010, 2:07 pm DrZygote214 Post #15



Quote from Roy
As for the reaver, the easiest way is to detect when the player spends the minerals and/or gas to create a scarab. The downside to this method is that one resource must be in a perfect monitoring state (i.e. they can't spend it on anything else).

Are you saying that, if I make a scarab cost 15 minerals, I must make sure that nothing else costs 15 minerals? I don't think this is gonna work for me because there can be multiple reavers (several normal reavers and several hero reavers). I'm gonna hafta know which one made the scarab, and then take an action.

Also, that offset stuff went over my head. Does it only matter for unit data? because right now I'm just trying to read the screen coordinates, so i think i'll ignore all that.

Anyway, so here are the 2 new "challenges"

6. How do detect when a reaver builds a scarab? Must allow for multiple reavers per player.
7. How do you toggle cloak for any unit? I wanna create a carrier and then cloak it.

Quote from Roy
I'm actually still in college; I have a year until my BA, but I'm probably going to go for my Master's.

Same but I graduating in 2/3 weeks. Also want to get a master's but no luck getting into grad school yet. IDK what I'm doing wrong, if anything...



None.

Nov 28 2010, 4:59 pm Apos Post #16

I order you to forgive yourself!

Quote from DrZygote214
6. How do detect when a reaver builds a scarab? Must allow for multiple reavers per player.
Have the reaver attack something and center location 01 on the scarab when it enters your field. Remove the scarab and center location 01 over the scarab in location 01. Now you know which reaver build the scarab and where.

Quote from DrZygote214
7. How do you toggle cloak for any unit? I wanna create a carrier and then cloak it.
Check out http://www.staredit.net/files/1336/ and you will become a master in unit cloaking. Only problem will be to uncloak.




Nov 28 2010, 6:30 pm Roy Post #17

An artist's depiction of an Extended Unit Death

Quote from DrZygote214
Quote from Roy
As for the reaver, the easiest way is to detect when the player spends the minerals and/or gas to create a scarab. The downside to this method is that one resource must be in a perfect monitoring state (i.e. they can't spend it on anything else).

Are you saying that, if I make a scarab cost 15 minerals, I must make sure that nothing else costs 15 minerals? I don't think this is gonna work for me because there can be multiple reavers (several normal reavers and several hero reavers). I'm gonna hafta know which one made the scarab, and then take an action.
Well, it's more like nothing else costing minerals in general. This won't retrieve the specific Reaver, so it's not the solution you want.

Quote from DrZygote214
Also, that offset stuff went over my head. Does it only matter for unit data? because right now I'm just trying to read the screen coordinates, so i think i'll ignore all that.
No, you need it for any memory address. I believe X positioning doesn't have an offset, but Y does. So, to check a specific (X, Y) point, you would need to check values (X, Y*65536). To check the point (12, 15), for example, the conditions would look like:

Memory at 192342 is exactly 12.
Memory at 192343 is exactly 983040. (15*65536)

Or:

Player 9 has suffered exactly 12 deaths of UnitID:2184
Player 10 has suffered exactly 983040 deaths of UnitID:2184

*The address values aren't actually for X and Y positioning in these examples, so ignore the address values such as the UnitID; I made them up.

Quote from DrZygote214
6. How do detect when a reaver builds a scarab? Must allow for multiple reavers per player.
What Apos suggested is one option, if attacking is not a problem.

Again, EUDs are a viable option. There is a memory address for each unit's hangar count. Problems with this method:
1. Reavers must be pre-placed or otherwise have a predetermined unit index.
2. The condition will fire, but you'll have no actual point of reference to the actual Reaver that built the scarab. This is not a problem if you have them in confined areas, as you can tell based on ID which one built a scarab.

Quote from DrZygote214
7. How do you toggle cloak for any unit? I wanna create a carrier and then cloak it.
Disable doodad state (More specifically, D-E-E, or Disable-Enable-Enable), like Apos said, is your best option; it doesn't work for all units, and I don't remember if the Carrier is one of the successful ones. Once the unit is cloaked, it is impossible to uncloak, so you'll need to replace the unit entirely if you want it to become visible again.

You could also use invincible Arbiters that do nothing but follow the unit, but that's not a very good option.




Nov 28 2010, 7:29 pm DrZygote214 Post #18



Quote from Apos
Have the reaver attack something and center location 01 on the scarab when it enters your field. Remove the scarab and center location 01 over the scarab in location 01. Now you know which reaver build the scarab and where.

Nah, this won't work, can't let it attack anything. Now that I think about it, however, there might be a nearby enemy when u build a scarab, so it's proly not the best control method.

Quote from Apos
Check out http://www.staredit.net/files/1336/ and you will become a master in unit cloaking. Only problem will be to uncloak.

I checked it out and it crashed twice. Is it for an older ver of SC?

Quote from Roy
1. Reavers must be pre-placed or otherwise have a predetermined unit index.

What do you mean "have a predetermined unit index"? Do you mean I hafta know what order the reavers were created in?



I think I have a new method that will allow me to 4get about screen coordinates. Use a scanner sweep instead. Is it possible to detect a scanner sweep, like condition: player x brings 1 scanner sweep to anywhere; action: center location Y on all scanner sweep owned by player x at anywhere.



None.

Nov 28 2010, 7:35 pm Roy Post #19

An artist's depiction of an Extended Unit Death

Quote from DrZygote214
What do you mean "have a predetermined unit index"? Do you mean I hafta know what order the reavers were created in?
Yeah, basically. Memory addresses for units are based on the unit's index, and since there are 1700 indexes, I'm willing to bet you don't want to have to calculate all those possible unit slots.

Quote from DrZygote214
I think I have a new method that will allow me to 4get about screen coordinates. Use a scanner sweep instead. Is it possible to detect a scanner sweep, like condition: player x brings 1 scanner sweep to anywhere; action: center location Y on all scanner sweep owned by player x at anywhere.
Unfortunately, I don't believe scanner sweep can be detected with triggers. Dark Swarm and Disruption Web can be.

Are you looking for a way where a player can click anywhere on the map and a location would be moved there?




Nov 28 2010, 7:38 pm Apos Post #20

I order you to forgive yourself!

Quote from DrZygote214
Quote from Apos
Check out http://www.staredit.net/files/1336/ and you will become a master in unit cloaking. Only problem will be to uncloak.

I checked it out and it crashed twice. Is it for an older ver of SC?
Don't move your screen when the units are still loading. In your map, it shouldn't crash since your units are going to be instantly cloaked. This map works on the latest version.

Quote from DrZygote214
I think I have a new method that will allow me to 4get about screen coordinates. Use a scanner sweep instead. Is it possible to detect a scanner sweep, like condition: player x brings 1 scanner sweep to anywhere; action: center location Y on all scanner sweep owned by player x at anywhere.
There is no way you can center a location on a scanner sweep. You can detect it, but you can't do anything else.




Options
Pages: 1 2 3 >
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[10:50 pm]
Vrael -- Ultraviolet
Ultraviolet shouted: How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
hey cut it out I'm getting all the minerals
[10:11 pm]
Ultraviolet -- :P
[10:11 pm]
Ultraviolet -- How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
[2024-4-17. : 11:50 pm]
O)FaRTy1billion[MM] -- nice, now i have more than enough
[2024-4-17. : 11:49 pm]
O)FaRTy1billion[MM] -- if i don't gamble them away first
[2024-4-17. : 11:49 pm]
O)FaRTy1billion[MM] -- o, due to a donation i now have enough minerals to send you minerals
[2024-4-17. : 3:26 am]
O)FaRTy1billion[MM] -- i have to ask for minerals first tho cuz i don't have enough to send
[2024-4-17. : 1:53 am]
Vrael -- bet u'll ask for my minerals first and then just send me some lousy vespene gas instead
[2024-4-17. : 1:52 am]
Vrael -- hah do you think I was born yesterday?
[2024-4-17. : 1:08 am]
O)FaRTy1billion[MM] -- i'll trade you mineral counts
Please log in to shout.


Members Online: Roy