There are currently two ideas floating around in my head:
- Change turrets of the craft vehicle depending on a specific craftweapon slot (battleScape maptile, spawner grenade, createUnit script with setSpawnUnit, etc.)
- Some kind of battleScape auto-resolve item/craft ammo (for example something like a tactical nuke, singularity bomb)
The latter can probably be resolved differently with an item in the craft inventory that when primed before the battle starts a script will do some magic or with a unit like the orbital beacon. So I am going to focus on the first one.
Essentially my suggestion is to add
BattleGame.getCraft [ptr/ptre Craft]
Craft.getCraftWeapon [int (slot)] [ptr/ptre CraftWeapon]
CraftWeapon.getType [text]
CraftWeapon.getAmmoQuantity [int]
CraftWeapon.setAmmoQuantity [int] # optional
Side possibilities for ptre are missions that
- cost craftWeapon ammo and therefore money to deploy specific turrets/close air support.
The ammo would be reduced by a script and it wouldn't matter whether the battleScape ammo is used up on battleScape or not.
... Thinking about it some more, this will probably also create an edge case that in a dogfight the craft will try to expend ammo for the battleScape related craftWeapon.
Could a craftWeapon with range: 0 and ammoMax: 1 create strange behaviour?
- damage/repair hull, etc. (Craft.getFuel/setFuel/getHull/etc.)
for modifying the craft's fuel etc, there are concerns that fuel is modified in such a way that the craft could technically not return to base. This might already be covered with a sanity check forcing the craft to return to base. Also hull should not be set-able to zero or above the total health.
For this suggestion it's completely sufficient if the type of equipped craftWeapon can be obtained and maybe that the ammo count can be set between 0 and ammoMax.
Thanks for all possible considerations.