Staredit Network > Forums > SC1 UMS Theory and Ideas > Topic: Memory Editing Expansions
Memory Editing Expansions
May 6 2014, 7:03 am
By: jjf28  

May 6 2014, 7:03 am jjf28 Post #1

Cartography Artisan

So Loop EUPs (link) have given us light memory editing ability, though restrictions such as execution time and map size still prevent us from...

A) Venturing far from the death/unit tables
B) Editing all addresses around the death/unit tables (due to restrictions on the give trigger)
C) Editing an address by more than a few thousand

https://code.google.com/p/bwapi/source/browse/trunk/bwapi/BWAPI/Source/BW/CUnit.h#40

In the carrier struct, there is a pointer, BW::CUnit *pInHanger, this can potentially be changed with loop EUPs, the carrier can then be operated on changing values where starcraft believes an interceptor is located (i'll refer to this as "interceptor"), then changed back with loop EUPs, I have thought of a number of ways this could be harassed...

- Move carrier, with every value for x and every value for y potentially reachable on the map, moving the carrier may set the coordinates of the "interceptor" giving us a full 4-byte set operation (does not work, interceptors do not change coordinates immediately)
- Move carrier to change target coordinates of "interceptor" (doesn't work in same cycle, iffy usage)
- Give carrier
    - Variation 0: gives the unit inside carrier regardless of its unitID/player (confirmed)
    - Variation 1: set interceptor pointer to death table, modify player and unitID freely (confirmed)
    - Variation 2: set interceptor pointer to a byte you want to clear, by giving the carrier the player value in the "interceptor" changes changing the targeted byte to a value 0-11
    - Variation 3: increment the number of interceptors contained in the carrier and make the interceptor list circularly linked, allowing fast changes (does not work, verifies player change for each individual give)

Combining these operations we can do interesting things.

Getting the value of the string table pointer: determine the value of the highest byte (256 triggers), set it to 0 using variation 2, determine the next highest byte... and so on
Putting the value of the string table pointer in an input function pointer: move the carrier to a position representative of the value determined in the previous sentence, using location sliding from original EUP thread if necessary
Executing code from string section (executes after user clicks or key presses or something)


For quick ref, with 1-based players:

All Unit Counts Table:
48*UnitID + 4*Player + 5776160 (Placed/Given Unit)

Completed Unit Counts Table:
48*UnitID + 4*Player + 5787104 (Placed/Given Unit)

Killed Unit Counts Table:
48*UnitID + 4*KillingPlayer + 5798052 (Adds After Kill)

Death Counts Table:
48*UnitID + 4*Player + 5808992 (Adds After Death)

Other avenues to explore (in order of promise): held powerups, subunits, scarabs, addons

Post has been edited 11 time(s), last time on May 7 2014, 7:57 am by jjf28.



TheNitesWhoSay - Clan Aura - github

Reached the top of StarCraft theory crafting 2:12 AM CST, August 2nd, 2014.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[07:46 am]
RIVE -- :wob:
[2024-4-22. : 6:48 pm]
Ultraviolet -- :wob:
[2024-4-21. : 1:32 pm]
Oh_Man -- I will
[2024-4-20. : 11:29 pm]
Zoan -- Oh_Man
Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
You should do my Delirus map too; it's a little cocky to say but I still think it's actually just a good game lol
[2024-4-20. : 8:20 pm]
Ultraviolet -- Goons were functioning like stalkers, I think a valk was made into a banshee, all sorts of cool shit
[2024-4-20. : 8:20 pm]
Ultraviolet -- Oh wait, no I saw something else. It was more melee style, and guys were doing warpgate shit and morphing lings into banelings (Infested terran graphics)
[2024-4-20. : 8:18 pm]
Ultraviolet -- Oh_Man
Oh_Man shouted: lol SC2 in SC1: https://youtu.be/pChWu_eRQZI
oh ya I saw that when Armo posted it on Discord, pretty crazy
[2024-4-20. : 8:09 pm]
Vrael -- thats less than half of what I thought I'd need, better figure out how to open SCMDraft on windows 11
[2024-4-20. : 8:09 pm]
Vrael -- woo baby talk about a time crunch
[2024-4-20. : 8:08 pm]
Vrael -- Oh_Man
Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
so that gives me approximately 27 more years to finish tenebrous before you get to it?
Please log in to shout.


Members Online: Roy, RIVE, IlyaSnopchenko