Author Topic: Ship Choice Carry through Campaign  (Read 2037 times)

0 Members and 1 Guest are viewing this topic.

Offline eliex

  • 210
Ship Choice Carry through Campaign
Hello all,

For an undercover campaign, the pilot is allowed a choice between 3 different fighters, e.g a Myrmidon, Herc II and a Perseus but will have to keep that specified fighter for the rest of the campaign.
The trouble is a "disallowing" SEXP is non-existant I believe, so although in-mission I can successfully identify what class of fighter the player is flying I can't make the only choice of fighter the fighter the player uses in the first mission.

I tried a hack:


Here I have identified what fighter the player has chosen and recorded it in a variable.


In the campaign editor, I have not allowed any type of ship to be always available initially at the start of the campaign but made the Myrm, Herc II and Perseus available in the first mission's Team Loadout. So depending on the choice, the allow-ship SEXP will always allow the specified fighter to be always available until the end of the campaign and no other.
Alpha 1 in the second mission of the campaign is flies a default Ulysses in-FRED depending on the ship-allowance changes to remove it.

Unfortunately, this seems to cause problems which include only the Myrm available in the ship selection, no weapons and no effect in the next mission. Any ideas?

 

Offline headdie

  • i don't use punctuation lol
  • 212
  • Lawful Neutral with a Chaotic outook
    • Skype
    • Twitter
    • Headdie on Deviant Art
Re: Ship Choice Carry through Campaign
campaign persistent variables combined with 3 sets of missions one set with each fighter but that could cause a nightmare with bug fixing
Minister of Interstellar Affairs Sol Union - Retired
quote General Battuta - "FRED is canon!"
Contact me at [email protected]
My Release Thread, Old Release Thread, Celestial Objects Thread, My rubbish attempts at art

 

Offline The E

  • He's Ebeneezer Goode
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: Ship Choice Carry through Campaign
You can use campaign-persistant variables to set the amount of ships available in each mission. Just check what ship the player is flaying in the first one, and set the amount of allowed ships in the loadout to zero for all other ships.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline eliex

  • 210
Re: Ship Choice Carry through Campaign
That's sounds promising. Do you know which sexp creates that effect?
Also, when FREDding future missions with Alpha 1 set by default as "GTF Ulysses" as a placeholder, will the mission remove the option of flying the Ulysses and replace the fighter with the one the player selects in Mission 1? 

 

Offline The E

  • He's Ebeneezer Goode
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: Ship Choice Carry through Campaign
Okay, first you create three variables. Each of these should be campaign-persistant, and hold an initial value of 1.
Then go to the loadout editor, and set the amount of ships available to use the variables.
Then create an event in the first mission that checks the ship type the player is flying, and adjust the other two variables accordingly.

Check the attached mission for details.

In the subsequent missions, just set the loadout up in the same way.

[attachment deleted by admin]
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Ship Choice Carry through Campaign
Someone's using my advanced team loadout!

*Kara does the happy dance*
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

  

Offline eliex

  • 210
Re: Ship Choice Carry through Campaign
THAT explains why on the 3.6.10 final FRED I didn't understand how the solution worked. Maybe I should update my FRED builds more often.  :P

Okay, I think I understand the concept. So in the mission provided, the Ulysses is a valid choice for ship selection, but if the default choice was, perhaps the Myrmidon the variable system won't have to be changed.
Thanks for your help The E.  :D

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Ship Choice Carry through Campaign
http://www.hard-light.net/wiki/index.php/Improved_Team_Loadout

That might help. It's a little old and the deal-with-ship-loadout has been removed while the Alternate Ship Classes Editor has been greatly improved but that should help you grasp the concepts involved if you haven't already. :)
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline eliex

  • 210
Re: Ship Choice Carry through Campaign
Thanks, I have a read into that.