Posted: Wed Aug 12, 2020 11:37 pm Post subject:
[Solved(kinda)]Ammo Pip Color?
if unit has PipScale=ammo, Pip= should state a colour for this pip at unit, but as i see it's always green for 1 ammo, yellow for 2, red for 3. and there is no way to make unit have only 1 ammo but pip to have yellow colour, right?
hope i'm wrong and there is some way smb can hint me. Last edited by rey on Sat Aug 15, 2020 9:19 am; edited 1 time in total QUICK_EDIT
You know yellow for 2 so just set Ammo=2 for you unit and ReloadAmount=2, also add Ammo=2 for your weapon.
not really a solution as i want a way to paint a pip for units with one charge freely in any colour, and not make unit have 1 charge, while showing them as 2 for colour aesthetics. QUICK_EDIT
The colour of the ammo pip is hardcoded & changes depending on the amount of times the ammo bar gets "wrapped" by the tag PipWrap.
so there is no way to make unit with one charge have it coloured as yellow or blue, 'cause it's only one charge, right? damn, hoped Ares could do smt. QUICK_EDIT
It's a lot of work and has quirks, but there's a way.
Add new ammo pips to the end of pips2.shp, if you require multiple pips to be the same color, add 1 pip of the same color so there's 2 in a row that are the same.
For example, if you want 5 ammo pips to show a new color you made:
Code:
PipWrap=5
PipScale=Ammo
Reload=75
ReloadAmount=30 ; Ammo / PipWrap = Frame after 14 (5 ammo = red, 10 = yellow, 15 = green, 20 = blue, 25 = new color 1 padding, 30 = new color 1)
Ammo=30
EmptyReload=75
TurretCount=1
WeaponCount=10
WeaponStages=5
Stage1=48 ; (RateUp * Weapon's ROF) - RateUp (to make sure it's ready to fire frameperfect)
Stage2=98 ; Increase each stage by weapon's ROF * RateUp
Stage3=148
Stage4=198
Stage5=248
RateUp=2
RateDown=10 ; adjust degrade speed so it degrades faster than reloading
Weapon1 = Ammo=1
Weapon3 = Ammo=1
...
Weapon9 = Ammo=26 ; The rest of the ammo
It can probably be simplified by having only 2 stages, but I haven't modded in awhile. _________________ "Don't beg for things; Do it yourself or you'll never get anything." QUICK_EDIT
@4StarGeneral i kinda feel you misunderstood me, i just want to have a way to specify colour of unit's ammo pips freely, just like one can set colour of loaded infantry pip. but as i understand even Ares can't do it, too bad.
plus gattling logic is not possible for infantry, which is of my interest too. QUICK_EDIT
If you do what cxtian suggested, with the addition of PipWrap=1 then you should get a single yellow ammo pip.
damn, shame on me, i didn't try it as i knew PipWrap as only extending number of Pips -- information on ModEnc totally don't explain it properly!!
thank you everybody for hints, this magic works:
cxtian39 wrote:
You know yellow for 2 so just set Ammo=2 for you unit and ReloadAmount=2, also add Ammo=2 for your weapon.
+PipWrap=1
Mig Eater wrote:
The colour of the ammo pip is hardcoded & changes depending on the amount of times the ammo bar gets "wrapped" by the tag PipWrap.
@Mig Eater and @cxtian39, can you please explain it more in details, for example how to make 2 pips with blue colour while unit really has 2 charges? QUICK_EDIT
@cxtian39 tested your example, made some experiments, it works, thanks.
thought i seem to understand how this magic about colours works, can you please explain what Ammo does/mean in unit code and weapon code, if put aside this Pip colour tricks?
i thought in unit's code Ammo=1 or Ammo=3 just means how many charges unit has, and Ammo=1 in weapon code marks what weapon should correlate to ammo-charges-logic(while second weapon code either marked with Ammo=0 to not interfere, or same Ammo=1 to have them both using charges logic). but after your examples i lost the understanding: why when i give unit PipWrap=1, Ammo=3, ReloadAmount=3 it's works as 1 pip-charge with green colour and not as 1 pip with 3 charges hidden inside changing colour green-yellow-red while used one-by-one?
EDIT: nope, it doesn't work. there is no way to make unit have 2 blue pips and only 2 charges, so after first shot you see 1 blue and 1 empty. only via some editing of that shp frames(which isn't worth it). Last edited by rey on Sat Aug 15, 2020 9:18 am; edited 1 time in total QUICK_EDIT
I tend to release things I create so that assets are never lost to hard drive problems, accidental deletion, or me having to pretend to care about rippers taking things from my project when it is done.
as i said higher, exactly due to this page on ModEnc i totally didn't expect PipWrap to have such abilities(even thinking about extending it with better examples). QUICK_EDIT
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum