Author Topic: Weapon templates  (Read 1779 times)

0 Members and 1 Guest are viewing this topic.

Offline Fury

  • The Curmudgeon
  • 213
For 3.7.0, perhaps someone would be kind enough to implement this for weapons? http://www.hard-light.net/wiki/index.php/Ship_Templates

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
ditto

this would actually be even more useful that ship templates, especially in mods that use lots of weapon variants. such as versions of weapons used on specific ships that differ from the standard issue.

could this also include a feature to make such variants of the same weapons appear as the same weapon in the loadout screen. for example if a ship uses Cyclops#short and another ship uses Cyclops, only one cyclops is shown in the loadout (instead of showing icons for both Cyclops and Cyclops#short). possibly by addind an $alias: ("Cyclops", "Cyclops#short"). so if you try to arm a ship that can only take Cyclops#short with a cyclops, it will check the alias list and if a string in it matches the current banks loadout options, will arm that ship with that particular weapon. if a weapon appears in the aliased list it need not be in the mission's loadout option, it would be assumed to be a Cyclops and and the number of cyclops available will be decreased. if alternate versions appear in the team loadout then they would appear in the loadout list, so that current mods wont be broken.
« Last Edit: February 17, 2010, 01:01:46 pm by Nuke »
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline Zacam

  • Magnificent Bastard
  • Administrator
  • 211
  • I go Sledge-O-Matic on Spammers
    • Steam
    • Twitter
    • ModDB Feature
I like that aliasing option.

Though, if something can take the Cyclops#short, it can take a regular Cyclops. The differences in the two is so frikken stupid somebody should be shot for it.
Report MediaVP issues, now on the MediaVP Mantis! Read all about it Here!
Talk with the community on Discord
"If you can keep a level head in all this confusion, you just don't understand the situation"

¤[D+¬>

[08/01 16:53:11] <sigtau> EveningTea: I have decided that I am a 32-bit registerkin.  Pronouns are eax, ebx, ecx, edx.
[08/01 16:53:31] <EveningTea> dhauidahh
[08/01 16:53:32] <EveningTea> sak
[08/01 16:53:40] * EveningTea froths at the mouth
[08/01 16:53:40] <sigtau> i broke him, boys

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
i just used it as an example. a more realistic scenario would be a variant of a swarm missile (called "bob" for lack of a better name) that fires more missiles than the regular version, which is used on assault fighters. to set something up youd have these in your weapon tables:

template for weapon with alias flags
standard version of that weapon (named "bob")
enanced version of that version of that weapon with swarm count increased (named "bob#enhanced"

then in the mission you add the standard version to the loadout list (tick "bob")

it the ship tables:
normal fighters get the standard version of the weapon ($Allowed SBanks: ("bob" ...)
assault fighters get the enhanced version ($Allowed SBanks: ("bob#enhanced" ...)

in mission loadout only "bob" is available, assigning bob to normal fighter will add "bob" to it, but if its an assault fighter and you try to equip "bob", it apears that it has happened however "bob#enhanced is the weapon you actually get.
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline Wanderer

  • Wiki Warrior
  • 211
  • Mostly harmless
If some one can resolve the ship template issues then there might be chance for this to be used as well.
Do not meddle in the affairs of coders for they are soggy and hard to light

 

Offline asyikarea51

  • 210
  • -__-||
If some one can resolve the ship template issues then there might be chance for this to be used as well.

I find with ship templates things have to be set up in a really strict way (i.e. not flexible at all) or weird stuff occurs.

Something I noticed only last week, haven't got around to Mantis, depending on how the table was done up you can have "Heavy Bomber" appear on the loadout screen from out of nowhere... on the GTB Artemis (and/or DH depending on what lines were added/removed/edited in the table).

And the Artemis is nowhere near heavy. :wtf:

 

Offline Wanderer

  • Wiki Warrior
  • 211
  • Mostly harmless
Take some malloc, bit of memcpy, add some STL vectors, and a half bowl of string pointers, mix well and serve, and you get the issues like currently with the ship templates

Or that is how at least the issue seems to be caused ATM.
Do not meddle in the affairs of coders for they are soggy and hard to light