Author Topic: Request: Automated Weapon Change script  (Read 1553 times)

0 Members and 1 Guest are viewing this topic.

Offline Mobius

  • Back where he started
  • 213
  • Porto l'azzurro Dolce Stil Novo nella fantascienza
    • Skype
    • Twitter
    • The Lightblue Ribbon | Cultural Project
Request: Automated Weapon Change script
I was preparing myself to make much needed changes to all INFASA missions when I came out with an idea that would also help the FSCRP, FSU and many campaign designers.

Let me introduce the subject, without going too much into INF-related details. Basically, thanks to technological advancements, certain fighter and bomber classes can use weapons more efficiently. Both primary and secondary banks have been designed to make weapons more effective, and while features like autoaiming can be easily added via table editing others require the creation of new entries in weapons tbl. Here's an example:

GTB Medusa = GW Era  ---> Tsunami
GTB Callisto = Post GW Era  ---> Tsunami#Adv

Universe-wise, the weapon is exactly the same but the missile bays of the GTB Callisto can give extra speed (about 10m/s, but the value may change), the bomber's targeting system makes locking easier and also prevents the warhead from detonating too close to the bomber that launched it (dinky shockwave). I would normally edit all missions in FRED, replacing weapons when necessary and adding events that check wheter or not the player and/or any of his wingmen are using advanced craft like the Callisto and change weapons accordingly via SEXPs.

I was going to keep this for myself and add all necessary events in FRED, until I realized that a script doing that automatically would have its good uses. For example, it could replace all GTVA weapons used by Shivan spacecraft with Shivan-specific weaponry without the need of making changes in FRED. The main FS2 campaign has been taken care of by the FSU Team, and many recently released campaigns are making use of Shivan weapons, but it'd be nice to apply such changes to all campaigns with minimal efforts. Tbms released with the Media VPs change default loadouts and therefore don't work if a given mission features Shivan spacecraft whose loadouts differ from default ones (and it happens very often).

When I edit Shivan loadouts manually for the FSCRP, I kind of force people to play campaigns with Media VPs (Shivan weapons aren't in vanilla FS2) and wonder wheter or not it's 100% necessary. The script, supposed to work with MVPs, would solve the problem.

Practically, the script I'm requesting should, for example, do this:

If ship class is "SF Mara", "Harpoon" ---> "Harpoon#Shivan", "Hornet" ---> "Hornet#Shivan", etc. etc.
If ship class is "GTB Callisto", "Tsunami" ---> "Tsunami#Adv", "Banshee" ---> "Banshee#Adv", etc. etc.

Changes should be made when the mission loads, thus a) preventing FSO from loading weapon effects it won't use and b) making additional changes via SEXP ("Tsunami#Adv" ---> "Tsunami#Adv2") easier. The script should also be user-friendly so that any modder could understand how it works and create separate versions of the script, when necessary.  :)
The Lightblue Ribbon

Inferno: Nostos - Alliance
Series Resurrecta: {{FS Wiki Portal}} -  Gehenna's Gate - The Spirit of Ptah - Serendipity (WIP) - <REDACTED> (WIP)
FreeSpace Campaign Restoration Project
A tribute to FreeSpace in my book: Riflessioni dall'Infinito
My interviews: [ 1 ] - [ 2 ] - [ 3 ]

 

Offline Aardwolf

  • 211
  • Posts: 16,384
    • Minecraft
Re: Request: Automated Weapon Change script
Sounds like a good idea.

It could also have some other useful features/options/possibilities, such as making player weapons work differently depending on what craft you mount them on. Additionally, it could possibly be set to use campaign variables, or to check what weapons have been unlocked in a campaign. That way, you could have it so that blahblah#heavy didn't show up in the loadout screen, but if you unlocked the weapon through some action it would auto-replace it on some ships.

If I weren't as busy as I am right now, I'd do it myself... let's hope someone less busy rolls along soon to help you out.

 

Offline Mobius

  • Back where he started
  • 213
  • Porto l'azzurro Dolce Stil Novo nella fantascienza
    • Skype
    • Twitter
    • The Lightblue Ribbon | Cultural Project
Re: Request: Automated Weapon Change script
Hey, that's interesting! I did not take into account that such script may be used to represent technological development during a campaign by automatically upgrade weapons. Very nice idea, indeed. :)
The Lightblue Ribbon

Inferno: Nostos - Alliance
Series Resurrecta: {{FS Wiki Portal}} -  Gehenna's Gate - The Spirit of Ptah - Serendipity (WIP) - <REDACTED> (WIP)
FreeSpace Campaign Restoration Project
A tribute to FreeSpace in my book: Riflessioni dall'Infinito
My interviews: [ 1 ] - [ 2 ] - [ 3 ]