Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Fri Apr 19, 2024 10:58 am
All times are UTC + 0
[Solved(kinda)]Ammo Pip Color?
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [15 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
rey
Cyborg Soldier


Joined: 15 Jul 2019

PostPosted: Wed Aug 12, 2020 11:37 pm    Post subject:  [Solved(kinda)]Ammo Pip Color? Reply with quote  Mark this post and the followings unread

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

Back to top
View user's profile Send private message
TAK02
General


Joined: 28 Jun 2015
Location: It was Damascus.

PostPosted: Thu Aug 13, 2020 5:12 am    Post subject: Reply with quote  Mark this post and the followings unread

Do you have PipWrap set somewhere in the unit?

Back to top
View user's profile Send private message Send e-mail Visit poster's website ModDB Profile ID YouTube User URL Twitter Channel URL Skype Account
cxtian39
Commander


Joined: 11 Feb 2016

PostPosted: Thu Aug 13, 2020 5:20 am    Post subject: Reply with quote  Mark this post and the followings unread

You know yellow for 2 so just set Ammo=2 for you unit and ReloadAmount=2, also add Ammo=2 for your weapon.

_________________

Back to top
View user's profile Send private message Skype Account
rey
Cyborg Soldier


Joined: 15 Jul 2019

PostPosted: Thu Aug 13, 2020 10:35 am    Post subject: Reply with quote  Mark this post and the followings unread

TAK02 wrote:
Do you have PipWrap set somewhere in the unit?
nope, unit has only one charge so one pip.


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.
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.

Back to top
View user's profile Send private message
Mig Eater
Defense Minister


Joined: 13 Nov 2003
Location: Eindhoven

PostPosted: Thu Aug 13, 2020 12:35 pm    Post subject: Reply with quote  Mark this post and the followings unread

The Pip= tag is only used to changed the colour of infantry loaded into transports/buildings.

The colour of the ammo pip is hardcoded & changes depending on the amount of times the ammo bar gets "wrapped" by the tag PipWrap.

_________________



Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID YouTube User URL Facebook Profile URL Twitter Channel URL
rey
Cyborg Soldier


Joined: 15 Jul 2019

PostPosted: Thu Aug 13, 2020 1:05 pm    Post subject: Reply with quote  Mark this post and the followings unread

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.
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.

Back to top
View user's profile Send private message
4StarGeneral
General


Joined: 14 Sep 2006
Location: Limbo

PostPosted: Thu Aug 13, 2020 5:39 pm    Post subject: Reply with quote  Mark this post and the followings unread

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."

Back to top
View user's profile Send private message Send e-mail YouTube User URL
rey
Cyborg Soldier


Joined: 15 Jul 2019

PostPosted: Thu Aug 13, 2020 6:25 pm    Post subject: Reply with quote  Mark this post and the followings unread

@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.

Back to top
View user's profile Send private message
Mig Eater
Defense Minister


Joined: 13 Nov 2003
Location: Eindhoven

PostPosted: Thu Aug 13, 2020 8:45 pm    Post subject: Reply with quote  Mark this post and the followings unread

If you do what cxtian suggested, with the addition of PipWrap=1 then you should get a single yellow ammo pip.

_________________



Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID YouTube User URL Facebook Profile URL Twitter Channel URL
rey
Cyborg Soldier


Joined: 15 Jul 2019

PostPosted: Thu Aug 13, 2020 9:43 pm    Post subject: Reply with quote  Mark this post and the followings unread

Mig Eater wrote:
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?

Back to top
View user's profile Send private message
cxtian39
Commander


Joined: 11 Feb 2016

PostPosted: Thu Aug 13, 2020 10:03 pm    Post subject: Reply with quote  Mark this post and the followings unread

2 blue pips not tested

[Unit]
Primary=Wepaon1
Secondary=Weapon2
Ammo=8
PipWrap=2
ReloadAmount=7 ; or 8 for full reload
NoAmmoWeapon=1
NoAmmoAmount=7

[Weapon1]
Ammo=1

[Weapon2]
Ammo=7 ; not work for aircraft weapon

_________________

Back to top
View user's profile Send private message Skype Account
rey
Cyborg Soldier


Joined: 15 Jul 2019

PostPosted: Fri Aug 14, 2020 2:35 pm    Post subject: Reply with quote  Mark this post and the followings unread

@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

Back to top
View user's profile Send private message
TAK02
General


Joined: 28 Jun 2015
Location: It was Damascus.

PostPosted: Fri Aug 14, 2020 3:25 pm    Post subject: Reply with quote  Mark this post and the followings unread


_________________
One and only developer of the Command & Conquer Dune "C&C D" mod.
m7 wrote:
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. #Tongue

Back to top
View user's profile Send private message Send e-mail Visit poster's website ModDB Profile ID YouTube User URL Twitter Channel URL Skype Account
rey
Cyborg Soldier


Joined: 15 Jul 2019

PostPosted: Fri Aug 14, 2020 8:28 pm    Post subject: Reply with quote  Mark this post and the followings unread

TAK02 wrote:
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).

Back to top
View user's profile Send private message
cxtian39
Commander


Joined: 11 Feb 2016

PostPosted: Fri Aug 14, 2020 11:17 pm    Post subject: Reply with quote  Mark this post and the followings unread

It's kinda convoluted donno how to explain
btw you can modify the pips2.shp like adding more pip frames to make more magic

_________________

Back to top
View user's profile Send private message Skype Account
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [15 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
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


Powered by phpBB © phpBB Group

[ Time: 0.1600s ][ Queries: 11 (0.0086s) ][ Debug on ]