Staredit Network > Forums > SC1 UMS Theory and Ideas > Topic: Advanced EUD - Regen rate?
Advanced EUD - Regen rate?
Feb 5 2019, 10:53 pm
By: MTiger156  

Feb 5 2019, 10:53 pm MTiger156 Post #1



For several months, I've been watching Korean maps being played on youtube in order to learn and replicate their EUD techniques (Koreans are WAY ahead on EUD knowledge, if you didn't know).

One thing I haven't solved is how they push regen/recharge rates as high as 40/sec. Maybe I'm just not looking hard enough at the available memory addresses?
(All of this is being done on Remastered multiplayer, so very unlikely it was modded)




Feb 5 2019, 10:57 pm Lanthanide Post #2



There's no memory address for it, beyond turning the standard protoss shield or zerg HP regen on or off.

They'll simply be running a loop that adds shields / HP every execution to each unit via the cUnit struct. Simple. I did it in the last version of my DS Night Remastered map 3.21 for the Roach , Immortal and Void Ray units.



None.

Feb 6 2019, 12:44 am MTiger156 Post #3



Ohhh ok.
I'd like to employ this is a current project, but the necessary unit indexes would not be known ahead of time. Considering that you did regen EUDs in a DS map (involving tons of units killing eachother constantly), there's a way to "get" unit indexes by unit type and player ownership, right?
In my case, each player would own 1 of a unique unit type, so that already narrows it down. The problem then lies in how to handle respawning it and getting the new index.




Feb 6 2019, 11:35 pm Lanthanide Post #4



I just loop over all 1700 units and check if the unit type == Roach, if it does, add some HP.

You can loop over units owned by only particular players, to reduce the CPU load of the loop operation.

In the EUD Channel in SEN Discord, Armo gave an explanation a week or two ago for how you can use variables to track specific units. If a player only has a fixed number of units at a time and you only have to deal with respawning of them occasionally, then using variables to track specific units is a tenable approach.



None.

Feb 10 2019, 8:11 pm Ultraviolet Post #5



Quote from Lanthanide
I just loop over all 1700 units and check if the unit type == Roach, if it does, add some HP.

You can loop over units owned by only particular players, to reduce the CPU load of the loop operation.

In the EUD Channel in SEN Discord, Armo gave an explanation a week or two ago for how you can use variables to track specific units. If a player only has a fixed number of units at a time and you only have to deal with respawning of them occasionally, then using variables to track specific units is a tenable approach.




Like this?




Feb 10 2019, 11:11 pm Lanthanide Post #6



Yes.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[09:10 am]
Suicidal Insanity -- :P
[09:10 am]
Suicidal Insanity -- Not that I think that is a good idea
[09:10 am]
Suicidal Insanity -- then it is a real index
[09:10 am]
Suicidal Insanity -- jjf28
jjf28 shouted: Suicidal Insanity I can't have code saying xIndex for something that's 1-based, to me xIndex is always a 0-based array index specifically, anything else is an identifier ("Id", usually sequential) or key (hash or a fixed-byte abbreviation or something), those are my cues so I don't need to constantly refer to some documentation so I know what to code
I'm just saying have your function 'GetMapTitleStringIndex' return realValue - 1
[2019-3-18. : 1:45 am]
CaptainWill -- If anyone was considering Hypnospace Outlaw, I recommend it
[2019-3-18. : 1:41 am]
jjf28 -- I think the reason I had it so wrong was cause I could treat it as a 0-based index from section start (offsets actually start after first two bytes of numStrings) so I had my access simplified like that :P
[2019-3-18. : 1:08 am]
jjf28 -- Suicidal Insanity
Suicidal Insanity shouted: No you don't. you can just change all the getters that give you a stringID instead
I can't have code saying xIndex for something that's 1-based, to me xIndex is always a 0-based array index specifically, anything else is an identifier ("Id", usually sequential) or key (hash or a fixed-byte abbreviation or something), those are my cues so I don't need to constantly refer to some documentation so I know what to code
[2019-3-18. : 12:52 am]
O)FaRTy1billion[MM] -- 0 usually means no string or default string
[2019-3-17. : 9:58 pm]
Ultraviolet -- :wob:
[2019-3-17. : 9:51 pm]
Corbo -- hi
Please log in to shout.


Members Online: Roy