Staredit Network

Staredit Network -> Concepts -> TRIGGERS OF GOD
Report, edit, etc...Posted by Deathknight on 2005-07-28 at 10:56:38
Ok everyone, use http://homework.f2o.org/memcalc.py with http://www.staredit.net/gf/New%20Text%20Document.txt and http://www.staredit.net/gf/UNIT%20SECTION.txt
Report, edit, etc...Posted by hynk on 2005-07-28 at 11:09:01
I don't get it, what do I do with thise links you gave us?
Report, edit, etc...Posted by Blu on 2005-07-28 at 11:13:13
*bows down to god triggers*
Holy Crap! This is preety damn cool. Although took me 3 minutes to look everywhere to see what people have done, i like it! But, wonder if its possible to control the terrain?
Report, edit, etc...Posted by Voyager7456(MM) on 2005-07-28 at 11:15:40
"To achieve this offset, use Unit ID -66483 with player 1 on byte no 1"

Yeah... but -66483 crashes StarForge. ermm.gif

So do I add 65536 to that?
Report, edit, etc...Posted by Carlsagan43 on 2005-07-28 at 11:16:49
Here. The wraith gains max life every 5 seconds, as well as a new attack. The refinery gets a new portrait as well.

The refinery is for you to test the attacks of the wirath on it. SOme are pretty funny, but some will crash (higher values)

Report, edit, etc...Posted by JohnnyHazardous on 2005-07-28 at 11:23:44
This is like turning SC mapping into Wc3 mapping.
Report, edit, etc...Posted by KrAzY on 2005-07-28 at 11:27:23
Okay, here's another pack of mines:

Ghost with Stim Pack
Specials Ops Marine
Terran SCM (Space Construction Marine)
Report, edit, etc...Posted by Cole on 2005-07-28 at 11:30:18
QUOTE
The refinery is for you to test the attacks of the wirath on it. SOme are pretty funny, but some will crash (higher values)

My wraith was attacking the refinary...all of the sudden it goes up and moves closer and nukes it smile.gif.
Report, edit, etc...Posted by Voyager7456(MM) on 2005-07-28 at 11:38:22
Hey carlsagan, how'd you find what to change to alter the Wraith's weapon? I tried looking through DKs lists but I didn't see anything.
Report, edit, etc...Posted by DiscipleOfAdun on 2005-07-28 at 12:29:51
Hey, DK, I just noticed some problems with your unit section file. So, I've take the liberty of changing what I know. Hope this helps. It helps identify some things.

CODE
First unit starts at 5bc688(I think)  Each next unit is 148(h) in memory

From there, add the following.

0x000 – dword – previous unit pointer
0x004 – dword – next unit pointer
0x008 – dword – Hit Points(divide by 256 to get in game hit points, the first is an internal counter)
0x00C – dword – GFX table pointer
0x010 – word – travel destination, x axis
0x012 – word – travel destination, y axis
0x014 – dword – unit offset target
0x018 – word – target location, x axis?
0x01a – word – target location, y axis?
0x01c – word – target location attack?  x axis
0x01e – word – target location attack?  y axis
0x020 – word
0x022 – byte – turn radius – from flingy.dat
0x023 - byte
0x024 – word – flingy.dat entry
0x026 – word
0x028 – word –
0x02a – word -
0x02c – byte
0x02d – word –
0x02f – word
0x031 – word –
0x033 – byte
0x034 – dword – flingy speed
0x038 - dword
0x03c – byte
0x03d – word
0x03f – word
0x041 – word
0x043 – word
0x045 – word
0x047 – byte –
0x048 – word – turn style – from flingy.dat
0x04a - byte
0x04b – byte
0x04c – byte – player number
0x04d – byte – current order – from orders.dat
0x04e – word – var with order, 0=self, 1=target(unit/location)
0x050 – dword –
0x054 – byte - ?
0x055 – byte – ?
0x056 – byte - ?
0x057 – byte - ?
0x058 – word –
0x05a – word -
0x05c – dword – target from some orders
0x060 – dword – shields(divide by 256, uses internal counter)
0x064 – dword – current unit number – used for status area
0x068 – dword –
0x06c – dword –
0x070 – dword
0x074 – dword
0x078 – dword
0x07c – dword
0x080 – dword
0x084 – byte
0x085 - byte
0x088 – dword
0x08c – word
0x08e – byte – used in finding unit rank for terran
0x08f – byte – kill count
0x090 – byte
0x091 – byte
0x092 – byte
0x093 – byte –
0x094 – byte – currently displayed button set
0x095 – byte – something to do with displayed buttons
0x096 – byte -
0x097 – byte -
0x098 – word – unit in queue spot
0x09a – word – spot
0x09c – word – spot
0x09e – word – spot
0x0a0 – word – spot
0x0a2 – word – mana counter.  A2 is internal, a3 is shown in display
0x0a4 – word
0x0a6 – byte
0x0a7 - byte
0x0a8 – byte –
0x0a9 - byte
0x0aa – word
0x0ac – word – time remaining to be built(dc = 00)
0x0ae – word
0x0b0 – word – transport unit pointer
0x0b2 – word – transport unit pointer
0x0b4 – word – transport unit pointer
0x0b6 – word – transport unit pointer
0x0b8 – word – transport unit pointer
0x0ba – word – transport unit pointer
0x0bc – word – transport unit pointer
0x0be – word – transport unit pointer
0x0c0 – word – spider mine count
0x0c2 – dword
0x0c4 – dword – hanger unit offset?
0x0c6 – word – upgrade/tech time remaining
0x0c8 – byte – tech number
0x0c9 – byte – upgrade number
0x0c9 – byte - number of units in hanger for display
0x0ca – byte
0x0cb – word
0x0cd – byte
0x0ce – byte
0x0cf – byte – resources carried
0x0d0 – dword – address of nuke in silo
0x0d4 – dword – nuke available, don’t edit
0x0d8 – dword
0x0dc – dword – status.
0x0dc – byte –
0x0dd – byte – status 04h,05h is disabled, 00 is normal
0x0de – byte
0x0df – byte – set to 04 when in stasis field, 10 for speed upgrade iscript only, 40(something to do with energy?)
0x0e0 – word
0x0e2 – byte
0x0e3 – byte – 00 is hallucination
0x0e4 – dword
0x0e8 – word
0x0ea – word
0x0ec – dword – address of unit being built
0x0f0 – word – rally point x
0x0f2 – word – rally point y
0x0f4 – dword
0x0f8 – dword
0x0fc – word
0x0fe – word
0x100 – byte
0x101
0x102
0x103
0x104
0x105
0x106
0x107
0x108 – word – hallucination energy
0x10a – byte – damage left for Defensive Matrix
0x10c – byte – Defensive Matrix time
0x10d – byte – Stim time
0x10e – byte – Ensnare time
0x10f – byte – Lockdown time
0x110 – byte – Irradiate time
0x111 – byte – Stasis time
0x112 – byte – Plague time
0x113 –
0x114 – dword
0x119 – parasite – 1 bit per player 1=p1, 2=p2 3=p1 and p2 goes to p8
0x11a – byte -
0x11b – blind
0x11c – byte – Maelstrom time
0x11e – byte - Number of Acid Spores
0x11f – byte – Remaining Acid Spore Time
0x120 –
0x124 –
0x128
0x12c
0x130
0x134
0x138
0x13c
0x140
0x144


The fact that flingy speed is here makes me wonder, if you changed the value ingame(from my first list), then it should only apply to new units of that type, the old ones still have the other value. Of course, upgrades would most likely reset this to the upgraded value.

BTW, great job on the sc memory locations. Thats a lot of memory to modify. Hehe.

Oh, and here's a quick thing for everyone to remeber about the .dat files. If it would crash in a mod, it will crash this way.
Report, edit, etc...Posted by Carlsagan43 on 2005-07-28 at 12:58:08
QUOTE
Hey carlsagan, how'd you find what to change to alter the Wraith's weapon? I tried looking through DKs lists but I didn't see anything.


it was in that list a few pages back. Let me find the link


http://www.staredit.net/index.php?showtopic=18147&st=200#
Report, edit, etc...Posted by Urmom(U) on 2005-07-28 at 13:16:20
QUOTE(pimpinelephant @ Jul 28 2005, 12:02 AM)
place a unit in SF, then highlight it, then press enter and a box shows up, it tells u its id where it says Unit Type i think it is.

QUOTE(urmom)
i tried using 6B674C - deaths of unit 35748 for player 7 to make my marine have sheilds but it gave me an error. my sf trigger was

Always();
-------------
SetDeaths(P7,SetTo,6B674C,35748);
PreserveTrigger();

What am i doing wrong? i need to figure this out so i can implement it into my map.


SetDeaths(P3, SetTo, 1, -29788);
thats for a marine
35748 - 65536 = -29788
you should read back a few pages, Legacy and DTBK explained a lot of this stuff
[right][snapback]272266[/snapback][/right]


yea ive read all those and i still cant understand any of this :poo:. why did you use 1 in the trigger? and how are people doing all of this other crazy stuff like giving wraith stimpack and stuff like that? is there a way to make this understandable for the average mapper that doesnt understand any hexing/coding stuff?
Report, edit, etc...Posted by Doodle77(MM) on 2005-07-28 at 13:19:33
Starforge crashes when i put in something like -65284(which i needed to do for zerg flyer carpace and attack) how do i get around this. i could use a hex editor but i dont like them.

ADDITION:
OMG IST THE MOST READ TOPIC OF ALL TIME!!!
18 User(s) are reading this topic (9 Guests and 1 Anonymous Users)
8 Members: Doodle77, sarami, DiscipleOfAdun, SubZero, blizter, urmom, Steveman01, JohnnyHazardous!!!!!!!!!!!!!!!!!!!!!!!!!
Report, edit, etc...Posted by The_Shattered_moose on 2005-07-28 at 13:24:25
This thread has never had fewer than 6 users reading it while I have been reading it, the sticky and name seem to draw people to it.
But doodle, did you download the updated actions/conditoins files back on page 3?
Report, edit, etc...Posted by DiscipleOfAdun on 2005-07-28 at 13:29:36
It's all just a bunch of graphic changes. Anyone who knows about how the actions are coded...oh better not go there. Simply, a lot of things are tied to unit ID. Meaning only those units that originally have it can do it. Only those that have cloak already(Ghost, Wraith, Heroes with cloak) can cloak, unless you hex edit. It's no different if you're making a mod, just that now it happens in game. The other stuff that he found, upgrades and tech and such, are only changed this way, or by inserting ASM code to do it for you.

To explain my list better: If I wanted to make the damage of a weapon change in-game, you'd take the address 6bc93c. Find the ID of the weapon you want to change. In my example, the C-10 canister rifle for Sarah Kerrigan, which is ID 3. Take the size of the entry, in this case 2 bytes, multiply by the hex of the id , 3, and you get 6H. So, the value is a word(2 bytes) at 6bc942. Then, just convert and make a trigger. This works for all the entires on that table(pg 11, or in DK text file)
Report, edit, etc...Posted by Doodle77(MM) on 2005-07-28 at 13:31:07
yes i did, i later put in a positive one (251) and SF didnt crash
Report, edit, etc...Posted by Carlsagan43 on 2005-07-28 at 13:38:17
Since P9-12 Deaths cannot be moddified, i think I know a way to get around this.

Simply subtract 2 from the unit id that is to be edited, and add 24 to the player number.


So, if I had the Action

SetDeaths(P9,SetTo,12,-23456);

It would become

SetDeaths(P33,SetTo,12,-23458);

I tired this out and it work for me. I think this helps us out a lot
Report, edit, etc...Posted by UED77 on 2005-07-28 at 13:46:01
You always post the same thing I want to say moments before I have a chance to, Carl... *sigh*

Anyway, to make this post worth it, [EDIT] I was trying to say something, and it was a wrong. Meh... [/EDIT]

UED77
Report, edit, etc...Posted by Deathknight on 2005-07-28 at 14:05:00
It doesn't work that way...

The range is from 00513874 to 00813C44. We have 3146704 bytes to work with(3.15MB ?).

Thanks again DiscipleOfAdun. I'm pretty sure the unit graphic is also in there somewhere, because when you change the graphic from units.dat, only new units will have the new graphic.
Report, edit, etc...Posted by Voyager7456(MM) on 2005-07-28 at 14:17:05
What do we do with a huge negative number, like, for example: -66222

Does that mean it's out of range, or should we convert it somehow... and if we need to convert it, how?
Report, edit, etc...Posted by Deathknight on 2005-07-28 at 14:18:51
How the hell can you get that number anyway? You only subtract 65536 if the number is above 32767.

carlsagan43, that doesn't work for me...
Report, edit, etc...Posted by scwizard on 2005-07-28 at 14:22:28
QUOTE(RexyRex @ Jul 28 2005, 02:03 AM)
...God damnit. I feel so useless while I'm not at home.
Anyways, (I've only read page 1, 7, and this) someone wanna tell me which editor you use for the triggers? SF crashes. dry.gif[right][snapback]272402[/snapback][/right]
Same :>_>:
Report, edit, etc...Posted by Voyager7456(MM) on 2005-07-28 at 14:23:03
From the memory offset converter thing. Never mind, I figured it out.

Except... SF has the ability to set deaths for P29, but not P28, which is what I need to do... ermm.gif
Report, edit, etc...Posted by Deathknight on 2005-07-28 at 14:30:03
For those with the crashing SF, I posted this on like, page 4 or something...
Attached File Data.zip ( 1.9k ) Number of downloads: 84


Put those in your Starforge data folder.

p13-28 are reserved in triggers.
Report, edit, etc...Posted by UED77 on 2005-07-28 at 14:31:05
DK, don't P13's deaths of Unit 0 equal P1's deaths of Unit 1? It just keeps on going, doesn't it? So even though we can't set deaths of P9-P12, we can just set it a higher player and a lower unit...

[EDIT] Okay, big deal, P13-28 are reserved. But you can still use this for players above, can't you? P2737 is sure above 28. [/EDIT]

Let me elaborate.

P1's deaths of Unit 228 (one above Vespene Tank 2) would theoretically equal P2737's deaths of Unit 0 (Marine), would it not? (2737 = 1+(228·12)). And therefore, to set P9's deaths of Unit 228, which you could not, you could just set P2745's deaths of Unit 0... the two values coincide, do they not?

Also, that memory range you posted... where does that come from?

UED77
Next Page (13)