Posted: Sun Sep 23, 2018 6:55 am Post subject:
Assistance needed with unit-to-unit promotions
Subject description: Wall-of-text ini code under spoiler
Is this a good working example of promotion-based unit-to-unit conversion? I'm probably doing it wrong here but I've encountered a couple problems.
1.) When SNIPE is promoted to Veteran and switches to SNIPE1, it's an Elite unit (that is, it has the abilities listed under EliteAbilities= and uses the ElitePrimary weapon, as well as displays the Elite insignia and the veterancy-select key shows it as an Elite unit)
2.) When a Spy infiltrates an enemy barracks to make my own produce Veteran infantry, this logic doesn't take effect until the unit is promoted through combat (maybe crates as well but I haven't managed to test that yet).
Using vanilla YR w/ Ares unstable alex20.18.254.1162
Spoiler (click here to read it):
Code:
[InfantryTypes]
;...vanilla yr infantry here
66=SNIPE1
67=SNIPE2
[SNIPE]
Promote.VeteranExperience=1.0
Promote.VeteranType=SNIPE1
Promote.EliteExperience=2.0
Promote.EliteType=SNIPE2
GroupAs=SNIPE
Ammo=1
PipScale=Ammo
Reload=150
Image=SNIPE; just to keep the game from freaking out over un-set flags
RadarInvisible=no
Cloakable=no
CloakStop=no
CloakingSpeed=10
Cloakable.Stages=9
CloakSound=NavalUnitEmerge
DecloakSound=NavalUnitEmerge
SensorArray.Warn=yes
UIName=Name:SNIPE
Name=Sniper
Category=Soldier
Primary=AWP
Prerequisite=GAPILE,RADAR
CrushSound=InfantrySquish
Strength=125
Pip=red
Armor=none
TechLevel=1
Sight=8
Speed=4
Owner=British,French,Germans,Americans,Alliance
RequiredHouses=British
Cost=600
Soylent=300
Points=10
IsSelectableCombatant=yes
VoiceSelect=SniperSelect
VoiceMove=SniperMove
VoiceAttack=SniperAttackCommand
VoiceFeedback=SniperFear
VoiceSpecialAttack=SniperMove
DieSound=SniperDie
Locomotor={4A582744-9839-11d1-B709-00A024DDAFD1}
PhysicalSize=1
MovementZone=Infantry
ThreatPosed=10
ImmuneToVeins=yes
ImmuneToPsionics=no
Bombable=yes
VeteranAbilities=STRONGER,FIREPOWER,SIGHT,FASTER
EliteAbilities=SELF_HEAL,STRONGER,FIREPOWER,ROF
Size=1
AllowedToStartInMultiplayer=no
ElitePrimary=VirusgunE
PreventAttackMove=no
IFVMode=5
UseOwnName=true
[SNIPE1]
Promote.VeteranExperience=1.0
Promote.VeteranType=SNIPE1
Promote.EliteExperience=2.0
Promote.EliteType=SNIPE2
GroupAs=SNIPE
Ammo=2
PipScale=Ammo
Reload=90
Image=VIRUS; just to show that it's reached a different stage
RadarInvisible=yes
Cloakable=no; just to keep the game from freaking out over un-set flags
CloakStop=no
CloakingSpeed=10
Cloakable.Stages=9
CloakSound=NavalUnitEmerge
DecloakSound=NavalUnitEmerge
SensorArray.Warn=yes
UIName=Name:SNIPE
Name=Sniper
Category=Soldier
Primary=AWP
CrushSound=InfantrySquish
Strength=125
Pip=red
Armor=none
TechLevel=11
Sight=8
Speed=5
Owner=British,French,Germans,Americans,Alliance
RequiredHouses=British
Cost=600
Soylent=300
Points=10
IsSelectableCombatant=yes
VoiceSelect=SniperSelect
VoiceMove=SniperMove
VoiceAttack=SniperAttackCommand
VoiceFeedback=SniperFear
VoiceSpecialAttack=SniperMove
DieSound=SniperDie
Locomotor={4A582744-9839-11d1-B709-00A024DDAFD1}
PhysicalSize=1
MovementZone=Infantry
ThreatPosed=10
ImmuneToVeins=yes
ImmuneToPsionics=no
Bombable=yes
VeteranAbilities=STRONGER,FIREPOWER,SIGHT,FASTER
EliteAbilities=SELF_HEAL,STRONGER,FIREPOWER,ROF
Size=1
AllowedToStartInMultiplayer=no
ElitePrimary=VirusgunE
PreventAttackMove=no
IFVMode=5
UseOwnName=true
1. What I understand is Promote.VeteranExperience=1.0 on SNIPE will promote SNIPE1 from veteran to elite. Promote.VeteranExperience=0.0 will keep it veteran and Promote.VeteranExperience=-1.0 will make it rookie.
And you shouldn't be adding the same promotion stuff to SNIPE1 and SNIPE2. Those are independent units and can convert to something else if needed. QUICK_EDIT
2. Conversion on promotion doesnt work with veterancy gained from infiltration or academies, IIRC AlexB has said something that before. I guess the way spy effect and academie working is promoting things before they are created, not creating them and then promote, thus no conversion. 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