Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: headdie on May 05, 2011, 07:18:27 am
-
I have been thinking on a problem, I have several fighters of different sizes and role, which use show model for banks of external missiles which is causing me problems. The external mounts on any one fighter are supposed to have the same number of projectiles regardless of weapon size ( $cargo: ) due to them being mounted on fixed points but they need to vary in number for the internal banks like in retail so setting a uniform size wont work.
The fix I was thinking was for an entry to be created in the ships table so that a maximum number of projectiles could be set, something like $Max sbank projectiles: ( 0, 0, 4 ) in this examples the 0 would denote retail behaviour for the first 2 banks and the 4 would limit the 3rd bank to 4 missiles max, though allow for less.
This then lead me to another problem :rolleyes: said feature would then cause issues using rocket pods similar to this (http://en.wikipedia.org/wiki/Mk_4/Mk_40_Folding-Fin_Aerial_Rocket) which would be fixable if there was a counterpart entry in the weapons table that works with the ship table. Ideally in the case that both are set, the $Max sbank projectiles: would specify the number of launchers and the weapons table entry would specify the number of projectiles per launcher which the game then adds together to form the bank ammo count.
What are everyone’s thoughts?
-
Yes, that could be usefull.
-
i usually do external and internal variants of the same weapons. usually along the lines of "someweapon#external" and "someweapon#internal" (i usually just omit the #internal part from the standard varient, so it would just be "someweapon"). i give all external weapons a cargo size of 1. so if a weapon bank is external then i make the capacity of the bank equal to the number of firing points in the model for that bank. of course im not sure how this setup will work when i start doing rocket pods. i think i will just set the cargo size to 1/number of rockets in a pod so that the cargo size for the contents of the pod will be 1. internal weapons just behave in the typical freespace way.
now what i would like to see is some code that works at the loadout level. i would add a list of one or more equivalent weapons to each weapon that needs them. so that when you try to load a weapon into your ship, it does the usual check for weapon compatibility. if the weapon fails to be compatible with that bank then it will look at the equivalent weapon list and find a weapon that is compatible, and load that weapon instead. i would also make it so that it doesn't matter if the equivalent weapon is in the team loadout, because that would add clutter to the weapon list, it would just treat it as if the original weapon was used. so if you try to load someweapon#internal into a bank that supports someweapon#external, but not someweapon#internal, then it will load someweapon#external, and reduce the number of someweapon#internal available in the loadout.
id also point out that this would have other uses, such as allowing you to load weak (or better) munitions on certain ships to meet balance requirements.