Staredit Network > Forums > SC1 UMS Theory and Ideas > Topic: Writing to SC's memory with extended units!
Writing to SC's memory with extended units!
Aug 7 2012, 3:17 am
By: Biophysicist
Pages: < 1 2 3 410 >
 

Aug 8 2012, 1:11 am Kaias Post #21



Quote from Biophysicist
For example, Dark Archons have animations for attacking both land and air. Someone should try turning a Dark Archon into a regular Archon and seeing what happens. Also, there may be a way to give units the spells of their new type. Try adding the same number to the unit ID and also to the offset +0x94. I'd try this myself, but I don't have time at present.
The problem is actually a matter of interface. The units probably have the ability to cast the spells, except the player can't do it because the buttons don't change when the unit does. This means your dragoon turned high templar still doesn't have a psi storm button, so a player can't cast it (hotkeys don't work either). I turned a Dark Archon into a probe and couldn't force it to attack my own units because it doesn't have an A-attack button, but I could attack enemies by right clicking them. A Barracks turned Academy still has training and liftoff buttons, but can't use any of them.

Edit:
Quote from Roy
Done, but the command card doesn't update. See attached map, go over to the other Dark Archon to watch your DA attack it as a Dragoon.
Well that was a simpler way to say it.



None.

Aug 8 2012, 1:15 am Biophysicist Post #22



Quote
The problem is actually a matter of interface. The units probably have the ability to cast the spells, except the player can't do it because the buttons don't change when the unit does. This means your dragoon turned high templar still doesn't have a psi storm button, so a player can't cast it (hotkeys don't work either). I turned a Dark Archon into a probe and couldn't force it to attack my own units because it doesn't have an A-attack button, but I could attack enemies by right clicking them. A Barracks turned Academy still has training and liftoff buttons, but can't use any of them.
Erm, perhaps I should have said what that offset does. It's the current button set of the unit. Each unit type has a default button set, and the current button set offset tells the unit which unit's default set to use, for some reason. So, if it's set to 0, then it uses the default button set of unit 0, the Marine. Anyway, if the unit's current button set and it's unit ID are the same, it should use the correct buttons for its type.

Post has been edited 1 time(s), last time on Aug 8 2012, 1:24 am by Biophysicist. Reason: Bad typo



None.

Aug 8 2012, 1:17 am staxx Post #23



Weird, i downloaded wraith shot. Workjed fine when i was in the game alone, but as soon as i went to show someone in the game with me it just acted as a normal SCV

EDIT
I think i know what the issue was, i was on Broodwar when i played alone. Changed to non expansion when i went to show someone.



None.

Aug 8 2012, 1:31 am Roy Post #24

An artist's depiction of an Extended Unit Death

Quote from staxx
I think i know what the issue was, i was on Broodwar when i played alone. Changed to non expansion when i went to show someone.
Some addresses are located differently in vanilla SC and Brood War.

Turns out an Arbiter's cloaking field gets smaller and smaller with each Unit Type change. I'm wrong about stuff.

On that note, want to see what Tassadar/Zeratul would have done if they became an Arbiter?

(The Archon attack without the sprite from the attack animation actually looks pretty cool.)

Edit: Also, if you make a unit turn into an Interceptor, you can't give them an order (or, more specifically, they won't obey it). If you tell them to stop, they DIE. Odd.

Attachments:
Tassarbiter.scx
Hits: 30 Size: 56.61kb

Post has been edited 1 time(s), last time on Aug 8 2012, 1:37 am by Roy.




Aug 8 2012, 1:33 am Biophysicist Post #25



Quote
Turns out an Arbiter's cloaking field gets smaller and smaller with each Unit Type change.
Not true. It's the range of the unit's air weapon that determines the range of the cloaking field. Hercanic, I think, found that a while ago.

Post has been edited 2 time(s), last time on Aug 8 2012, 1:39 am by Biophysicist.



None.

Aug 8 2012, 1:52 am Pr0nogo Post #26



Really cool stuff. This could be extremely beneficial for RPGs and maybe even RP-related maps if it's possible to create a trigger system that swaps out attacks and abilities in-game (move Marine to X location and it turns into a Marine with a Ghost rifle or something).

Doesn't trump modding, but it's got promise for multiplayer maps.




Aug 8 2012, 4:42 am jjf28 Post #27

Cartography Artisan

Here's a crash course on how the math works for this:

The death of the extended (or regular) unit causes this address to increase by 1:
Code
48*UnitID + 4*Player + 5808992


If the UnitID is somewhere between 1585 - 13478, you'll be editing unit data, so it's useful to calculate the range of unit indexes you can edit:

Code
Low Bound Index = (161570 - 12*UnitID) / 84
High Bound Index = (161825 - 12*UnitID) / 84





How WraithShot works:

The range of indexes you can edit with unit#3900, found in the WraithShot SCV.scm map, is 1366.31 (the low bound index) through 1369.35 (the high bound index), meaning that you can add to all values in the unit table for units index's 1367 and 1368 - which is why the WraithShot map modifies a scv that is at index 1367.

This address - 0x0059CD0C - is the unitID (for index 0). Changing this changes many things, like the unit's weapon, it's ability to load units, and so fourth to the new ID; while leaving the original unit looks, movement speed, and so on as they were.

WraithShot changes 0x005B821C, which is the address for the UnitID for index 1367.

It uses unitID 3900 (which is an assimilator wall) and player 223 to do so.

^ Which if you plug those into the first equation you get the decimal number 5997084, covert this to hex and you get 0x005B821C: which, as stated, is the address of the unit ID for index 1367.

When the 'assimilator wall' dies, it adds 1 to the address 0x005B821C, changing the unitID from 7 to 8 (from scv, to wraith).

You can do this to any unit ID, and can change it by multiple ID's by killing multiple 'assimilator walls', each death will add 1 to the address.




As for usable extended units, I only found the following thus far: (considering these recent discoveries, we may want to search for more, especially in the 12000 to 13500 area so we don't have to use such unit high indexes to make these cool hybrids)

ID:227 (Vespene Tank Type 2)
ID:3851 (Cacoon Wall)
ID:3851 (Cacoon wall (can't be selected))
ID:3858 (Larva wall)
ID:3859 (Muta wall)
ID:3860 (Overlord wall)
ID:3861 (Queen wall)
ID:3863 (Zergling wall)
ID:3865 (Burning Infested CC wall)
ID:3872 (Lair wall)
ID:3876 (Defiler Mound wall)
ID:3878 (Overmind w/ Shell wall (normal overmind death animation))
ID:3885 (Arbiter wall)
ID:3886 (Archon wall)
ID:3887 (Carrier wall)
ID:3888 (Dragoon wall)
ID:3889 (Interceptor wall)
ID:3896 (Scarab wall)
ID:3898 (Observer wall)
ID:3900 (Assimilator wall)
ID:3902 (Observatory (burning) wall)
ID:3904 (Gateway (sprite-like, can be walked on, attacked/destroyed))

HF with the neo-EUD actions! :)

Post has been edited 2 time(s), last time on Aug 8 2012, 4:49 am by jjf28.



TheNitesWhoSay - Clan Aura - github

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

Aug 8 2012, 3:12 pm Biophysicist Post #28



ID:2099 through ID:2102 work.

We should also look into some really high unit IDs, which would allow modification of units.dat entries in memory and so on. See pages three through six of the EUDDB.

EDIT: Also fun: With lower IDs we could write to the location table.

Also, the modding tool Firegraft can change the unit ID summoned by Scanner Sweep. If I can figure out the address it writes to, we could /possibly/ write to the same address to summon, say, a Medic (which iirc would just require adding once) and then use that for centering on Sweeps. Alternatively (or additionally), we could write to the location that holds the unit IDs summoned by Disruption Web, Dark Swarm, Spider Mines, Spawn Broodlings, or Scanner Sweep to create normally uncreatable units, like Floor Missile Traps or doors or Lurker Eggs.

Post has been edited 2 time(s), last time on Aug 8 2012, 4:01 pm by Biophysicist.



None.

Aug 8 2012, 5:24 pm LoveLess Post #29

Let me show you how to hump without making love.

Quote from Biophysicist
ID:2099 through ID:2102 work.

We should also look into some really high unit IDs, which would allow modification of units.dat entries in memory and so on. See pages three through six of the EUDDB.

EDIT: Also fun: With lower IDs we could write to the location table.

Also, the modding tool Firegraft can change the unit ID summoned by Scanner Sweep. If I can figure out the address it writes to, we could /possibly/ write to the same address to summon, say, a Medic (which iirc would just require adding once) and then use that for centering on Sweeps. Alternatively (or additionally), we could write to the location that holds the unit IDs summoned by Disruption Web, Dark Swarm, Spider Mines, Spawn Broodlings, or Scanner Sweep to create normally uncreatable units, like Floor Missile Traps or doors or Lurker Eggs.
Are they created by the controlling player? I am assuming so, just wondering with how Web and Swarm do their poo.



None.

Aug 8 2012, 5:33 pm Biophysicist Post #30



Quote
Are they created by the controlling player? I am assuming so, just wondering with how Web and Swarm do their poo.
Web and Swarm would create for P12 as normal. Other spells would create for the casting player as normal.



None.

Aug 8 2012, 6:20 pm qPirateKing Post #31



Quote
The range of indexes you can edit with unit#3900, found in the WraithShot SCV.scm map, is 1366.31 (the low bound index) through 1369.35 (the high bound index), meaning that you can add to all values in the unit table for units index's 1367 and 1368 - which is why the WraithShot map modifies a scv that is at index 1367.

What player/extended unit would I kill to modify unit 1368?



None.

Aug 8 2012, 6:37 pm jjf28 Post #32

Cartography Artisan

There are several combinations of extended units/players that would probably work, ID:3900 works, so we'll go with that.

Find an address you want to modify for index 1368 and set the first equation equal to it, plug in 3900 for the UnitID, then solve for the player.

Code
48*UnitID + 4*Player + 5808992 = Address
48*3900 + 4*Player + 5808992 = Address
187200 + 4*Player + 5808992 = Address
4*Player + 5996192 = Address
4*Player = Address - 5996192

Player = Address/4 - 1499048


You can solve for the player used to modify any address for a unit @ index 1368 using Unit#3900 with that equation



TheNitesWhoSay - Clan Aura - github

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

Aug 8 2012, 7:40 pm O)FaRTy1billion[MM] Post #33

👻 👾 👽 💪

Reading through and surprised nobody's said this... If you want an attack button for your attacking Dark Archon, select it with any other unit (even an observer). Same little trick is useful for telling workers to hold position.



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!

Aug 9 2012, 12:13 am Biophysicist Post #34



New findings:

Turned Infested Duran into a Command Center and updated command card to match. Could move, but would not path through areas a 4x3-tile building could not fit. Could not act as a resource return. Could not build addons. Could land, but crashed upon doing so due to lacking a landing animation. Did not display SCV button, but it would have crashed anyway.

Turned a Devourer into a Probe and updated command card. Moved as a flier. Could build. Displayed gather button, but crashed when ordered to mine.



None.

Aug 9 2012, 1:24 am Oh_Man Post #35

Find Me On Discord (Brood War UMS Community & Staredit Network)

Bio you should make a sticky thread in ums theory or ums map making assistance with a wiki type thing showing all the things that work and all the things that don't (obviously you are still adding to that list).

Give this guy a medal!




Aug 9 2012, 4:00 am Biophysicist Post #36



I've begun setting up a wiki, but I need to get to sleep soon. You can find it at http://neoeud.wikia.com but it has no content yet. If anyone wants to upload any while I'm asleep, that would be appreciated! I'll check it over tomorrow.



None.

Aug 9 2012, 4:02 am Jack Post #37

>be faceless void >mfw I have no face

We actually have a wiki >.> http://www.staredit.net/starcraft/Main_Page



Red classic.

"In short, their absurdities are so extreme that it is painful even to quote them."

Aug 9 2012, 4:05 am Biophysicist Post #38



Thanks. I didn't quite realize that, but yah, having it on SEN is nice. I'll start writing articles there tomorrow. Possibly tonight depending on how late I stay up.

Post has been edited 1 time(s), last time on Aug 9 2012, 6:17 am by Biophysicist.



None.

Aug 9 2012, 11:50 pm Biophysicist Post #39



Oops, I have a wiki to set up. >.>

Also, a Hive turned into a Nydus Canal still spawns Larvae; this would hold true for any Larva-spawning structure turned into any other structure. Also, it turns out that a unit turned into a structure that can't lift loses the ability to move.



None.

Aug 10 2012, 12:50 am O)FaRTy1billion[MM] Post #40

👻 👾 👽 💪

Spawning larva is a secondary order, as is arbiter's cloaking field (though that one might just be initiated by the order ...).



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
Pages: < 1 2 3 410 >
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[09:38 pm]
NudeRaider -- Ultraviolet
Ultraviolet shouted: NudeRaider sing it brother
trust me, you don't wanna hear that. I defer that to the pros.
[2024-4-27. : 7:56 pm]
Ultraviolet -- NudeRaider
NudeRaider shouted: "War nie wirklich weg" 🎵
sing it brother
[2024-4-27. : 6:24 pm]
NudeRaider -- "War nie wirklich weg" 🎵
[2024-4-27. : 3:33 pm]
O)FaRTy1billion[MM] -- o sen is back
[2024-4-27. : 1:53 am]
Ultraviolet -- :lol:
[2024-4-26. : 6:51 pm]
Vrael -- It is, and I could definitely use a company with a commitment to flexibility, quality, and customer satisfaction to provide effective solutions to dampness and humidity in my urban environment.
[2024-4-26. : 6:50 pm]
NudeRaider -- Vrael
Vrael shouted: Idk, I was looking more for a dehumidifer company which maybe stands out as a beacon of relief amidst damp and unpredictable climates of bustling metropolises. Not sure Amazon qualifies
sounds like moisture control is often a pressing concern in your city
[2024-4-26. : 6:50 pm]
Vrael -- Maybe here on the StarEdit Network I could look through the Forums for some Introductions to people who care about the Topics of Dehumidifiers and Carpet Cleaning?
[2024-4-26. : 6:49 pm]
Vrael -- Perhaps even here I on the StarEdit Network I could look for some Introductions.
[2024-4-26. : 6:48 pm]
Vrael -- On this Topic, I could definitely use some Introductions.
Please log in to shout.


Members Online: Roy