Staredit Network

Staredit Network -> Concepts -> TRIGGERS OF GOD
Report, edit, etc...Posted by UED77 on 2005-07-27 at 17:36:32
What DK just posted is the memory addresses for the regular death counters. I requested this to facilitate some research of my own. These are not for special effects of any kind.

Carl, there is a one-to-one correspondance, isn't there?


Edit: DK, don't P13 deaths of Marine equal P1's deaths of Ghost? If not, how does it handle extended players, and where does it read addresses from?

UED77
Report, edit, etc...Posted by ShinRa_Soldier on 2005-07-27 at 17:39:12
He explained it about 4 times back in the post just search for it.
Report, edit, etc...Posted by KrAzY on 2005-07-27 at 17:40:39
I know how to get my own battlecruiser rigged up with the fastest speed and with interceptors. It's the same method as the marine from deathknight but it's a battlecruiser. happy.gif
Report, edit, etc...Posted by DT_Battlekruser on 2005-07-27 at 17:58:25
Lol, why is it always my job to parse the words of the programmers into english?

CONVERTING MEMORY OFFSETS TO DEATH/UNIT TRIGGERS:

Each death counter is a 4-byte long as I stated before and looks like this in hex:

00 00 00 00

Each byte corresponds to a setting in Starcraft.

Deaths start at the memory offset 00513874

Offset 00513874 is the orange byte shown here for deaths of P` unit id 0 (marine)
00 00 00 00

Offset 00513875 is the orange in P1 marine: 00
00 00 00

Offset 00513876 is the orange in P1 marine: 00 00
00 00

Offset 00513877 is the orange in P1 marine: 00 00 00
00


Offset 00513878 is the orange byte shown here for P2 deaths of unit id 0 (next long in order) (marine)
00 00 00 00

..and so on..

Each unit id goes through 48 memory offsets 4 bytes * 12 players. 48 is 30 in hexedecimal.

Using the formula, Offset 005138A4 is the first byte in P1 deaths of unit id 1.

Remeber the starting offset is 00513874.

Now, let's take the unit graphic offset for instance. It's offset, found by disciple, is 006b8ec8 (6b673c)

Now do some math. 006b8ec8 - 00513874 = 1A5654 = 1726036 in decimal. Divide by 48 to find how many unit ids until you reach this offset and you get 35959 R4 (35959 4/48) This means unit id 35948, and the first byte in.

Hence, UID 35949, Player 2, byte 1. The starting offset given corresponds to UID 0, the marine.

Therefore, the first byte of P2 deaths of unit 35949 is the Marine Unit Graphic.

When writing the trigger, Starforge generate an overflow, so convert the UID 35949 to a smaller negative number by subtracting 65536. 35949-65536 = -29587.

Our trigger then looks like this:

SetDeaths(P2,Setto,3,-29587);

That's odd, it doesn't work. What went wrong? This formula works for enabling shields...

Are you sure you have the right offsets?

---------------------------------------------------

On closer examination, the values are not as simple as I thought. Try this map on for size:

Report, edit, etc...Posted by DiscipleOfAdun on 2005-07-27 at 18:04:55
Glad to help. That list wasn't to hard to make either. Took about 6 min to find everything, and another 30 to type it up.

Out of curiosity, what is the range of memory we can change?

EDIT

Might have mistyped some, was in a hurry. I pulled them right out of the exe.

EDIT 2
I just check graphic, and it is 6b8ec8. If you want to check me, open up starcraft.exe in a hex editor and go to address 103010. That's where the units.dat structure is. Also, if you have TSearch, load stacraft.exe and start a game. Go to 6b8ec8, and that should be 4e. That's 78 for those who don't convert quickly. It's the marine's flingy entry.

EDIT 3

Exaclty what was the new map supposed to do? All I noticed was a ton of cocoons showing up and killing the sprite limit when the marines attacked.
Report, edit, etc...Posted by Corbo(MM) on 2005-07-27 at 18:42:23
this can be really really useful
omg blizzard is coming to kill us all for revealing that secret omg!
biggrin.gif if they come we'll all say it was you Dk ;D

this can be used for reseting all researches i guess once someone asked
how do i reset upgrades in my rpg? here is the answer biggrin.gif
Report, edit, etc...Posted by DT_Battlekruser on 2005-07-27 at 18:48:29
No, your offsets are correct. What is very strange is I can't find a simple correlation between the value of the byte and the effect it has on the unit.

For example, setting the Gauss Rifle missile sprite to 3 makes a weird cocoon effect, but setting the Burst Laser missile sprite to 3 seems to have no effect.
Report, edit, etc...Posted by DiscipleOfAdun on 2005-07-27 at 18:53:42
Missile Sprite, from Weapons.dat right? Don't forget that the entry is 4 bytes long for each weapon. It's also a pointer to Flingy.dat.

0=0:Scourge
1=1:Broodling
2=2:Infested Terran
3=3:Guardian Cocoon
4=4:Defiler
5=5:Drone
6=6:Zerg Egg
7=7:Guardian

So 3 should give the cocoon. The size of it might be why it didn't work for burst lasers.
Report, edit, etc...Posted by Voyager7456(MM) on 2005-07-27 at 18:54:12
QUOTE(DiscipleOfAdun @ Jul 27 2005, 04:04 PM)
Glad to help.  That list wasn't to hard to make either.  Took about 6 min to find everything, and another 30 to type it up. 

Out of curiosity, what is the range of memory we can change?
[right][snapback]271894[/snapback][/right]


I think DK said that it's between 00500000 and 00800000. That doesn't mean anything to me... (I are n00b. sad.gif ), but I hope it means something to you.
Report, edit, etc...Posted by DiscipleOfAdun on 2005-07-27 at 18:57:49
I thought that was the range to search for values. But that seems like the right size for this. I'm going to go back and put the size on the values that I've given. That should help you guys figure out how to properly edit them.
Report, edit, etc...Posted by Paella on 2005-07-27 at 19:03:23
Can you set the deaths and therebye research the tech for the players?
Report, edit, etc...Posted by scwizard on 2005-07-27 at 19:06:11
Stop typing so mcuh tongue.gif

I went away for a day or so and I had to read 5 pages!

To Doodle77: I wish you luck playing with your new memory searcher!

To DK: Do you think we could change button actions and stuff with triggers?
Report, edit, etc...Posted by DT_Battlekruser on 2005-07-27 at 19:25:49
Ahhh, not everything is 1 byte. That clears a lot up.

The effect on the wraith should be the same, I was editing the 16th byte in the series, thinking teach was 1 byte.
Report, edit, etc...Posted by DiscipleOfAdun on 2005-07-27 at 19:31:23
Even thought I'm not DK, I could answer that. Probably not, because that data is not in the section he's modifying. Actions are part of the code in starcraft. Requirements(like what can build something) are also before the section he's changing in memory. If you could modify that section of data, and knew how to properly do it, then it might be possible. But stuff like requirements are messy hex, ie 02FF6a00...FFFF is an example, shortened of course, of the SCV requirement. It says Current Unit Must Be Terran Command Center, ...(this is where the must not be building addon and must be landed are). Not easy to convert, even if we could change that section. Besides, you'd have to be careful not to overlap onto the next requirement.

Size, plus some other info is on them. I labeled some of the entries that are pointers, so you know what value you're changing to. I'd be glad to clear up any questions on what each entry does.
Report, edit, etc...Posted by JohnnyHazardous on 2005-07-27 at 19:40:58
What do we need to know to understand all of this code anyway?
Report, edit, etc...Posted by DiscipleOfAdun on 2005-07-27 at 19:54:38
Oh, cheats are a dword at 525560. Don't remeber the order, but each bit is a cheat, some aren't used. 0 for off, 1 for on.
Report, edit, etc...Posted by l)ark_13 on 2005-07-27 at 19:59:11
Hex coding. How to convert hex to deciaml and vice versa. You also need to know how the coding changes after something is activated or added/subtracted, etc... Just read all 12 pages and you'll pretty much know enough to understand all of this tongue.gif
Report, edit, etc...Posted by exo6yte on 2005-07-27 at 20:06:43
I just hosted that Marines with Shields thing publicly and a bunch of people called me a hacker! Thanks DK! ^_______________^
Report, edit, etc...Posted by JohnnyHazardous on 2005-07-27 at 20:35:37
QUOTE(l)ark_13 @ Jul 27 2005, 04:59 PM)
Hex coding.  How to convert hex to deciaml and vice versa.  You also need to know how the coding changes after something is activated or added/subtracted, etc...  Just read all 12 pages and you'll pretty much know enough to understand all of this tongue.gif
[right][snapback]272057[/snapback][/right]


Really? You think reading all 12 pages will help me learn? I guess I'll start. Lol...
Report, edit, etc...Posted by SiKawticPaladin on 2005-07-27 at 20:37:59
I just read the thread 1 time through, and I'll be doing so again.

Awesome work guys, I'm glad I haven't started my RPG yet ^_^
Report, edit, etc...Posted by Urmom(U) on 2005-07-27 at 21:05:59
im still confused with this sheild thing...i didnt read the entire amount of posts but i read the useful ones. can i give a hydralisk shields? or is it just terran units. also, im unsure of the bytes thing or w/e it is. finally, does this affect just one unit at a location or would it give them to every unit of that type? sorry im not good with this type of stuff.
Report, edit, etc...Posted by Carlsagan43 on 2005-07-27 at 21:08:21
Can anyone make a quick application to convert between hex and death values?
Report, edit, etc...Posted by scwizard on 2005-07-27 at 21:18:36
QUOTE(JohnnyHazardous @ Jul 27 2005, 06:40 PM)
What do we need to know to understand all of this code anyway?[right][snapback]272039[/snapback][/right]
Becuase that is the only way you'll be able to apply it without a new editor coming out.
Report, edit, etc...Posted by Pauper on 2005-07-27 at 21:20:10
This is dumb, your nto even saying how to do it! What editor or w/e! I tryed SF it crashes and SCXE you cant put that many deaths. Tell me better details how to do it!!
Report, edit, etc...Posted by Devil_O_Duce on 2005-07-27 at 21:30:22
hey can someone post the whole starforge trigg to give a marine burrow and yamato gun? and btw can you make it so a zergling can spawn zerglings?that would be some funny

ADDITION:

hey can someone post the whole starforge trigg to give a marine burrow and yamato gun? and btw can you make it so a zergling can spawn zerglings?that would be some funny

Addition:

i lost the full code for it ;( ;( ;( plz tell me what it was again and show were to put the numbers to make the nits have the upgrades plz i would really appreicate it and it would tell alot of people how to use this
Next Page (10)