Staredit Network > Forums > SC1 Mapping Tools > Topic: [EUD] EUPCalc
[EUD] EUPCalc
Aug 12 2012, 3:48 am
By: Roy  

Aug 12 2012, 3:48 am Roy Post #1

An artist's depiction of an Extended Unit Death


EUPCalc
A convenience tool for the EUD enthusiast

Description

EUPCalc, or Extended Unit Placement Calculator, is exactly what it sounds like: a calculator for all possible Player/UnitId combinations for writing to a specific address (as discussed in this topic). There are many different combinations of players and unit ids that are possible to write to a specific address, and this program conveniently provides all of them for you.
Screenshots

Collapsable Box
Quick How-To

First, you need to pick the address you want to write to. A great place to look would be in the EUD Database and the Useful EUD Reference topic. If you are unfamiliar with EUDs, it is recommended that you read A Mapmaker's Guide for Creating EUDs and get some practice with them before going into more advanced/unstable EUD work.

After you have your address, simply put it in the text box at the top of the program and click "Go!" to start calculating. Note that the program is expecting a hexadecimal address, and you should prepend "0x" to signify that you are indeed giving it a hexidecimal value (otherwise, it will attempt to convert to hex and prepend "0x" for you).

As for reading the output, you'll note that each row has three columns. The first column is the player number, which will be the owner of the unit to place. The second and third columns are both Unit IDs. The "DeathId" column is the Unit ID that will write to the address when that unit dies, and the "PlaceId1" and "PlaceId2" columns are the Unit ID that will write to the address when that unit is placed (at the very beginning of the map). PlaceId1 is writing the All Unit Count for the unit, and PlaceId2 is writing the Completed Unit Count for the unit (both of which are written for a preplaced unit at map initialization). Keep in mind that all units will write to these addresses when they are placed and when they die (and other addresses as well), so when using an extended unit, you may be unintentionally writing to several different areas, which can cause stability issues and crazy side-effects.

Some extended units will crash when they die, and some will crash when they are being placed (or when the map initializes, which for the purposes of this phenomenon is the same thing). Which ones work? Well, unfortunately, we don't know. Extended units are highly unstable and unpredictable, and we only have a few documented cases of Player/Unit ID combinations that won't crash the game immediately, and even fewer that are safe to kill. Even though there are 21-22 different combinations for a given address, chances are good that none of them will be ideal for use.
Download

This is the second public release of EUPCalc. The current version is Version 3.
This program requires the .NET Framework 4 to run.

Download from Sen's DLDB


Post has been edited 4 time(s), last time on Jan 5 2018, 6:59 pm by Roy.




Aug 12 2012, 3:59 am jjf28 Post #2

Cartography Artisan

your minimum ID's seem to be off a Ceiling (player can't be higher than 256)
Code
Min ID = Ceiling[ ( Address - 5810016 ) / 48 ]


Otherwise, great work! :D



Rs_yes-im4real - Clan Aura - jjf28.net84.net

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

Aug 12 2012, 4:05 am Roy Post #3

An artist's depiction of an Extended Unit Death

Does it give an output for P257? I haven't seen an issue there. The player values calculated are the actual player number, which start at 1. The actual value in SC for P256 is 255.

Or am I misunderstanding you?

Edit: I see the error. Fixing it now.

Edit: Fixed.

Post has been edited 2 time(s), last time on Aug 12 2012, 4:13 am by Roy.




Aug 12 2012, 4:07 am staxx Post #4



Awesome, i get to be lazy again! :inlove:



None.

Aug 13 2012, 12:25 pm Roy Post #5

An artist's depiction of an Extended Unit Death

Updated to include Unit IDs for the Completed Unit Count table.

I also changed the name to EUPCalc. It's becoming more and more apparent that this discovery extends beyond unit deaths, and so the name Extended Unit Placement seems more appropriate. From now on, I will be using EUPs when referring to what was formerly known as Neo-EUDs.




Aug 26 2013, 10:03 am RexyRex Post #6



Roy is amazing.

Can we get some examples of what you can do with this in-game?

I remember being able to modify unit HP with EUDs years ago....



None.

Aug 26 2013, 2:12 pm Roy Post #7

An artist's depiction of an Extended Unit Death

People have attached a few examples in this topic: http://www.staredit.net/topic/15356/

Leeroy_Jenkins has also included EUPs in his completed map, http://www.staredit.net/topic/15499/ where you can play as a Ghost with the ability to cast Dark Swarm.

Modifying unit HP using this method is, unfortunately, impractical, because HP doesn't fall on the first byte.




Apr 17 2014, 7:13 am RexyRex Post #8



hi sorry for bumping an old thread but just wanted to say thanks Roy your post was very informative as always :)

just saw it lol

EDIT: A ghost with Dark swarm would be amazing for so many reasons



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[03:48 am]
Vrael -- fallacy avoided
[03:48 am]
Vrael -- ur not a true scotsman because you're not even a scotsman
[03:26 am]
sraw531 -- Lanthanide
Lanthanide shouted: it is a bit fiddly to get it working, especially as text triggers use quotes around unit names like "Terran Marrine" and so you have to double-escape them in excel like ""Terran Marine"" which can get annoying
You also could use special characters or something that excel doesn't normally use (nor function based off of), and then do a replace all once you turn it back into text form. Though im sure thats nothing new.
[03:25 am]
sraw531 -- Lanthanide
Lanthanide shouted: use ='text here ' & A1 & ' finishing text' to get excel to reference the content of another cell (in this case A1) as plain text within another fragment of plain text
thanks Lanthanide, I never thought to use excel. It will probably still be difficult since its not just the conditions changing, but also the actions in a non-standard way (picture-based). Still, it will probably save some time.
[02:59 am]
Jack -- You can't say I'm not a true scotsman or you'd be committing the no true scotsman fallacy ;)
[02:59 am]
Jack -- Also, can I use the no true scotsman fallacy to claim that I actually am a scotsman, even though I am neither scots nor lived there ever?
[02:58 am]
Jack -- How many true welshmen are actually true scotsmen though
[02:12 am]
jjf28 -- Lanthanide
Lanthanide shouted: we're all true scotsman now
anyone who says they're a true scotsman is no true scotsman
[01:23 am]
O)FaRTy1billion[MM] -- DarkenedFantasies
DarkenedFantasies shouted: FREEDOM!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
https://youtu.be/Xk2uObQDKtw?t=4m51s
[01:10 am]
DarkenedFantasies -- FREEDOM!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Please log in to shout.


Members Online: Roy