I was referring to Ares Documentation and the note said:
Note that WeaponX is 1-based while IFVMode is 0-based. For example IFVMode=4 activates Weapon5 and uses the turret index set as WeaponTurretIndex5.
https://ares-developers.github.io/Ares-docs/new/gunner.html#index-0
Because if Weapon1=HoverMissile, then it should use fvtur, right?.
The output was that it used fvtur1 which was the machinegun for WeaponTurretIndex1 when no infantry is inside.
Also, the IFV only uses fvtur1(gun) and fvtur2(repair arm), but not fvtur(rocket) and fvtur3(hightech).
Here is the code I only change the original IFV, so this isn't a custom unit:
;Infantry Fighting Vehicle - IFV
[FV]
UIName=Name:FV
Name=IFV
Prerequisite=GAWEAP
Primary=120mm
Strength=200
Category=Transport
Armor=light
DeployTime=.022
TechLevel=3
Sight=8
PipScale=Passengers
Speed=10
CrateGoodie=no
Owner=British,French,Germans,Americans,Alliance
AllowedToStartInMultiplayer=no
Cost=600
Soylent=600
Points=20
ROT=5
Crusher=no
TooBigToFitUnderBridge=true
Turret=yes ;GEF should be no for ifv???
Passengers=1
Gunner=yes
AirRangeBonus=4 ;GEF this should always be less than or equal to the range of the primary weapon. Otherwise targeting issues could arise
;GEF If you change TurretCount, find this line in objtype.h and change it to reflect the new number of turrets
;#define OBJTYPE_DIM_TurretMax 15
;Or Weapon Count.
;TurretCount=15
HasTurretTooltips=yes
TurretCount=4
WeaponCount=17
Looks like you got WeaponCount & TurretCount confused with each other, X in the list is the weapon numbers 1-17 & the = is the turret index for that weapon. You put the numbers the other way round though.
The turret index's are 0 based too so WeaponTurretIndexX=0 will give you fvtur & WeaponTurretIndexX=1 will have fvtur1 etc.
Note that if the game finds the same code multiple times within a section it will only use the last one it finds. So in your case the game would only use WeaponTurretIndex4=17 & all the other WeaponTurretIndex4= code would be ignored etc. _________________
Tested it, and yup, it worked, and its actually more organized and less convoluted then what I made!
The Ares Documentation is still confusing though. Comparing it to Phobos, Phobos does have code examples which makes it easier to understand and put in the .ini.
And your explanation is much clearer and understandable as well!
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