The battlemaster is simple coz it already has a gun on its model (although its not very convicing) You do need to modify the model though. Import the model into RenX, and detach the gun from the turret model, calling it something like MACHINEGUN01. Then, link the gun to the turret. Make a bone at the muzzle of the machinegun (call it something like MGUNMUZZLE01 [the name can NOT excede 15 characters]). Then, copy the muzzleflash from the barrel (making sure you re-apply the texture correctly) and call it MGUNMUZZLEFX01. moze this to the muzzle of the machinegun, and link both it and the bone to the machinegun. Ensure all of the textures have been re-applied correctly (you will need to convert them to tga format), and that you know the names of all the new parts, and export as NVBtMstr.w3d. Now simply replace these lines in the battlemaster code:
Code:
Draw = W3DTankDraw ModuleTag_01
OkToChangeModelColor = Yes
DefaultConditionState
Model = NVBtMstr
Turret = Turret01
WeaponFireFXBone = PRIMARY Muzzle
WeaponRecoilBone = PRIMARY Barrel
WeaponMuzzleFlash = PRIMARY MuzzleFX
WeaponLaunchBone = PRIMARY Muzzle
End
ConditionState = REALLYDAMAGED
Model = NVBtMstr_D
Turret = Turret01
WeaponFireFXBone = PRIMARY Muzzle
WeaponRecoilBone = PRIMARY Barrel
WeaponMuzzleFlash = PRIMARY MuzzleFX
WeaponLaunchBone = PRIMARY Muzzle
End
ConditionState = RUBBLE
Model = NVBtMstr_D
Turret = Turret01
End
with these
Code:
Draw = W3DTankDraw ModuleTag_01
OkToChangeModelColor = Yes
DefaultConditionState
Model = NVBtMstr
Turret = Turret01
;HideSubObject = MUZZLEFX01
WeaponFireFXBone = PRIMARY Muzzle
WeaponRecoilBone = PRIMARY Barrel
WeaponMuzzleFlash = PRIMARY MuzzleFX
WeaponLaunchBone = PRIMARY Muzzle
HideSubObject = MACHINEGUN
;WeaponFireFXBone = SECONDARY MUZZLE02
HideSubObject = MachinegunFX
;WeaponLaunchBone = SECONDARY MUZZLE02
End
ConditionState = REALLYDAMAGED
Model = NVBtMstr_D
Turret = Turret01
;HideSubObject = MUZZLEFX01
WeaponFireFXBone = PRIMARY Muzzle
WeaponRecoilBone = PRIMARY Barrel
WeaponMuzzleFlash = PRIMARY MuzzleFX
WeaponLaunchBone = PRIMARY Muzzle
HideSubObject = MACHINEGUN
;WeaponFireFXBone = SECONDARY MUZZLE02
HideSubObject = MachinegunFX
;WeaponLaunchBone = SECONDARY MUZZLE02
End
ConditionState = WEAPONSET_PLAYER_UPGRADE
Model = NVBtMstr
Turret = Turret01
;HideSubObject = MUZZLEFX01
WeaponFireFXBone = PRIMARY Muzzle
WeaponRecoilBone = PRIMARY Barrel
WeaponMuzzleFlash = PRIMARY MuzzleFX
WeaponLaunchBone = PRIMARY Muzzle
ShowSubObject = MACHINEGUN
WeaponFireFXBone = SECONDARY MachMuzzle
WeaponMuzzleFlash = SECONDARY MachinegunFX
WeaponLaunchBone = SECONDARY MachMuzzle
End
ConditionState = REALLYDAMAGED WEAPONSET_PLAYER_UPGRADE
Model = NVBtMstr_D
Turret = Turret01
;HideSubObject = MUZZLEFX01
WeaponFireFXBone = PRIMARY Muzzle
WeaponRecoilBone = PRIMARY Barrel
WeaponMuzzleFlash = PRIMARY MuzzleFX
WeaponLaunchBone = PRIMARY Muzzle
ShowSubObject = MACHINEGUN
WeaponFireFXBone = SECONDARY MachMuzzle
WeaponMuzzleFlash = SECONDARY MachinegunFX
WeaponLaunchBone = SECONDARY MachMuzzle
End
ConditionState = RUBBLE WEAPONSET_PLAYER_UPGRADE
Model = NVBtMstr_D
Turret = Turret01
End
ConditionState = RUBBLE
Model = NVBtMstr_D
Turret = Turret01
End
Now add these lines:
Code:
WeaponSet
Conditions = PLAYER_UPGRADE
Weapon = PRIMARY BattleMasterTankGun
Weapon = SECONDARY TechnicalMachineGunWeapon
End
Code:
Behavior = WeaponSetUpgrade ModuleTag_06
TriggeredBy = Upgrade_ChinaBattlemasterMachinegun
End
Now add the upgrade:
Code:
Upgrade Upgrade_ChinaBattlemasterMachinegun
DisplayName = WHATEVER
BuildTime = WHATEVER
BuildCost = WHATEVER
ButtonImage = WHATEVER
End
and a button
Code:
CommandButton Command_Upgrade_ChinaBattlemasterMachinegun
Command = PLAYER_UPGRADE
Upgrade = Upgrade_ChinaBattlemasterMachinegun
TextLabel = WHATEVER
ButtonImage = WHATEVER
ButtonBorderType = UPGRADE ; Identifier for the User as to what kind of button this is
DescriptLabel = WHATEVER
End
Then just add this button to the warfactory(or whatever) commandset
If you want this upgrade on the unit itself, replace the upgrade with this:
Code:
CommandButton Command_Upgrade_ChinaBattlemasterMachinegun
Command = OBJECT_UPGRADE
Upgrade = Upgrade_ChinaBattlemasterMachinegun
Options = OK_FOR_MULTI_SELECT
TextLabel = WHATEVER
ButtonImage = WHATEVER
ButtonBorderType = UPGRADE ; Identifier for the User as to what kind of button this is
DescriptLabel = WHATEVER
End
And add this to the battlemaster code:
Code:
Behavior = ProductionUpdate ModuleTag_XX
MaxQueueEntries = 1; So you can't build multiple upgrades in the same frame
End
You can do the same for the Crusader, but you need to design and model your own gun.