Staredit Network > Forums > Modding Assistance > Topic: Dereferencing actions
Dereferencing actions
Feb 2 2009, 6:11 pm
By: Biophysicist  

Feb 2 2009, 6:11 pm Biophysicist Post #1



I'm trying to make my mod cycle through all the units in the map and do stuff depending on the unit's kills. A_of-s_t said I'd need to dereference an action and make it use my code instead. How would I do this?

Also, how would I cycle through all the units? I know ASM, but I don't know how I'd do that. (I know how to do everything else I want to do, though.)

EDIT: That's actions as in trigger actions, he said I would have to "dereference" some trigger action and put that action in a preserved trigger with Always as the condition.

Post has been edited 1 time(s), last time on Feb 2 2009, 7:47 pm by TassadarZeratul.



None.

Feb 2 2009, 10:00 pm O)FaRTy1billion[MM] Post #2

👻 👾 👽 💪

Find the Action function pointer table and replace the pointer you want with the pointer to your code.
Find the unit node array. There is 1700 entries, each being 336 bytes.
I believe "+0x8F - BYTE bKillCount" is what you want.

Unit Table + 0x8F
Read it, do whatever, add 336.
Either keep a counter or check if it is >= unit table + 0x8F + 336*1700.



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!

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[11:38 pm]
Symmetry -- :wob:
[2026-6-21. : 4:56 am]
Ultraviolet -- I suppose we'll likely never know, but my guess would be that they already saw it operating successfully and there was no monetary incentive to finish the original work. And the dev cycle in old school Blizzard was so hectic, it's possible it just got forgotten about after the original game got released. Plus there's an element of existing MPQ files that were packaged with the original discs becoming outdated if they updated it. And it's not like they remade the original MPQs, they just made new ones for BW specifically
[2026-6-21. : 4:26 am]
Oh_Man -- so that makes me think maybe the theory they are unfinished is not true and its a deliberate design decision, coz why not finish them wen ur making brood war?
[2026-6-21. : 4:25 am]
Oh_Man -- the thing is thos buildings are from classic. that means they went ahead and made brood war without ever finishing the 'unfinished' buildings
[2026-6-20. : 6:15 pm]
Ultraviolet -- Yeah he's talked about a lot of that stuff in his casts before. It seems plausible. Especially knowing how Blizzard of yesteryear operated.
[2026-6-20. : 3:47 pm]
NudeRaider -- to clarify: couldn't recall the behavior for every single Protoss building but I was aware the disparity exists.
[2026-6-20. : 3:43 pm]
NudeRaider -- Contained nothing new for me. Didn't know all building's behavior, but very much all unit's. Also Terran balance whine - also nothing new :lol:
[2026-6-19. : 9:57 am]
Oh_Man -- makes me wonder if SEN knows anything about the topic
[2026-6-19. : 9:57 am]
Oh_Man -- artosis dropped pretty interesting vid: https://youtu.be/EqZHB8Blra4
[2026-6-18. : 5:01 pm]
Ultraviolet -- :wob:
Please log in to shout.


Members Online: Zoan