Staredit Network > Forums > Modding Assistance > Topic: [solved] adjust move speed of walking units (using iscript)
[solved] adjust move speed of walking units (using iscript)
Aug 25 2019, 6:39 pm
By: Lagi  

Aug 25 2019, 6:39 pm Lagi Post #1



if unit is flying i can simply adjust speed with:

unit->flingyTopSpeed = 1707;
unit->flingyAcceleration = 107;
unit->flingyTurnSpeed = 40;


but how to change speed if unit using Iscript (modify "walk" parameter)?

Post has been edited 1 time(s), last time on Aug 26 2019, 7:22 am by Lagi.



None.

Aug 25 2019, 7:24 pm MTiger156 Post #2

Veteran Mapper

Allow me to give you a better understanding of Flingy and Iscript.

Virtually all air units use Flingy control. The "top speed", "acceleration", "halt distance", and "turn radius" properties are what give them smooth/realistic flight movement. Most ground units use Iscript, which ignores the 4 properties mentioned earlier.

The stuff in Iscript is more "hardcoded" than Flingy data. As a mapper, messing with Iscript is not an option, so to change movement speed of ground units, I switch their control to Flingy. It is wise to give such units very low Turn Radius and Halt Distance, otherwise they will behave oddly (unless you like them to moonwalk or spin at ridiculous speeds).




Aug 25 2019, 7:36 pm Pr0nogo Post #3



It's much simpler to change the movement speed of units using iscript. Open PyICE, load your iscript.bin, and change the value of the 'move' commands in the unit's walking animation.




Aug 25 2019, 7:36 pm Pr0nogo Post #4



phoneposting in 2019

Post has been edited 1 time(s), last time on Aug 25 2019, 8:29 pm by Pr0nogo.




Aug 25 2019, 7:55 pm MTiger156 Post #5

Veteran Mapper

Ohhh, this was posted in the "Modding Assistance" category, so Pr0nogo is correct on this one. :unsure:




Aug 25 2019, 8:00 pm Lagi Post #6



thanks,

I make a bug: I make morph zergling into infested terran, and now he has upgraded speed with Metabolic boost researched.
thing is I need to change unit speed with upgrade. When upgrade research, unit need to has speed X.

Can i somehow replace Iscprit using GTPT?



None.

Aug 25 2019, 8:29 pm Pr0nogo Post #7



Unit speed through upgrades can be controlled through GPTP, go to apply_upgrade_flags and edit the code there.




Aug 26 2019, 7:03 am Lagi Post #8



thanks it solves my issue

==============

when have mod of morph from zergling into infested terran and scourge. the infested terran and scourge gain speed upgrade with Metabolic boost.

to prevent scourge from gaining speed boost i add in game hook.cpp :

//stop Scourge upgr speed when zergling speed research
if(unit->id == UnitId::scourge &&
scbw::getUpgradeLevel(unit->playerId, UpgradeId::MetabolicBoost) > 0){

unit->flingyTopSpeed = 1707;
unit->flingyAcceleration = 107;
unit->flingyTurnSpeed = 40;

}
//stop Scourge upgr speed when zergling speed research



to prevent infested terran from gaining speed boost i add in apply_upgrade_flags.cpp:

bSpeedUpgrade = UpgradesSc->currentLevel[unit->playerId][ScUpgrade::PneumatizedCarapace];
else
if(unit->id == UnitId::ZergZergling) {
bSpeedUpgrade = UpgradesSc->currentLevel[unit->playerId][ScUpgrade::MetabolicBoost];
bCooldownUpgrade = UpgradesSc->currentLevel[unit->playerId][ScUpgrade::AdrenalGlands];
}
else
if(unit->id == UnitId::Hero_DevouringOne) {
bSpeedUpgrade = 1;
bCooldownUpgrade = 1;
}
else
if(unit->id == UnitId::ZergInfestedTerran) {
bSpeedUpgrade = 1;
}

else
if(unit->id == UnitId::ZergHydralisk)
bSpeedUpgrade = UpgradesSc->currentLevel[unit->playerId][ScUpgrade::MuscularAugments];
else
if(unit->id == Uni


this make infested terran be constant speed upgraded (then i decrease walk time in Iscript from 6 to 4), cause setting bSpeedUpgrade = 0; value didnt prevent speed increase.

Post has been edited 1 time(s), last time on Aug 26 2019, 7:21 am by Lagi.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[06:39 pm]
Vrael -- 6000 apm near perfect focus fire is yikes
[06:38 pm]
Vrael -- paralyze was metaphorically speaking, paralyzed
[06:38 pm]
Vrael -- wasnt even that really, they 6000 apm just made the terran army so much more value/$ that the extra economy didnt matter
[01:58 pm]
NudeRaider -- NudeRaider
NudeRaider shouted: Oh_Man nothing too special tbh. the human player wasn't ready to combat the push that stretched almost the whole map. So this game means nothing. We'll have to see how it goes once the humans have adjusted for its unorthodox strategies.
they basically lost most of their army in one big battle and didn't have the time and production to leverage the economic advantage and come back from that blow.
[01:55 pm]
NudeRaider -- Oh_Man
Oh_Man shouted: https://youtu.be/1vsTqNwHquE omg guys it's happening. ITS HAPPENING. EVERONY STAY CALM. STAY F:wob::wob:CKING CALM!
not sure why you are so hyped, when basically the same happened 7 years ago with AlphaStar on SC2.
[01:53 pm]
NudeRaider -- Oh_Man
Oh_Man shouted: 6000 apm XD, i dont even understand how it culd came back wen it was 5 base vs 2
nothing too special tbh. the human player wasn't ready to combat the push that stretched almost the whole map. So this game means nothing. We'll have to see how it goes once the humans have adjusted for its unorthodox strategies.
[10:59 am]
NimoStar -- "Sick" is the appropriate word for the disease that AI is foisting upon our society. Repent, ye sinners!
[06:32 am]
Ultraviolet -- that was pretty sick lol
[02:55 am]
Oh_Man -- 6000 apm XD, i dont even understand how it culd came back wen it was 5 base vs 2
[02:42 am]
Symmetry -- 'twas only a matter of time
Please log in to shout.


Members Online: Vrael