Author Topic: Carry over without red-alert (sorta)  (Read 3405 times)

0 Members and 1 Guest are viewing this topic.

Offline Lucika

  • Victim of trolling-related humor
  • 211
  • Modding is l'art pour l'art
    • Syrk: The Unification Wars
Carry over without red-alert (sorta)
I remember something like that being done in FS1 where either the Hope or the Pinnacle would show up, depending if the former survived an earlier engagement or not. However, if I am not mistaken, that mission was neither the follow-up one nor the red alert.

The situation is this: depending if a cruiser survived an engagement in a mission or not, it will show up three or four missions later. Is that possible? Am I supposed to set this up in the campaign editor later on or what is the correct method of doing this?
HLP member 2008-2012 and Syrk:TUW project leader ~2010-2012

 

Offline TopAce

  • Stalwart contributor
  • 212
  • FREDder, FSWiki editor, and tester
Re: Carry over without red-alert (sorta)
You don't need the campaign editor for this.

Just go to Ship Editor --> Arrival Cues and use is-previous-goal-true or -is-previous-event-true (or *-false). Say, you have a "GTC Polaski destroyed" event in mission 1. If you want the Polaski to appear in mission 3, then the GTC Polaski's arrival cue in mission 3 should look like this:

is-previous-event-false
-mission 1.fs2
-GTC Polaski destroyed

Plus add No Warp Effect and No Arrival Music.
My community contributions - Get my campaigns from here.

I already announced my retirement twice, yet here I am. If I bring up that topic again, don't believe a word.

 

Offline CommanderDJ

  • Software engineer
  • 210
Re: Carry over without red-alert (sorta)
Campaign persistent variables. Create a variable called "cruiser_died" or whatever you want, and set it's default value to 0. Make sure the variable is marked as campaign persistent. Create an event that, if the cruiser is destroyed, sets the variable to 1. For example
Code: [Select]
Cruiser Check
-when
--is-destroyed-delay
---0
---*cruiser name*
--modify-variable
---cruiser_died(0)
---1

Now, in the later mission where you want the cruiser to reappear, create a variable with the same name as the first and mark it as campaign persistent also. Default value can be anything, doesnt matter, because the value will carry over from whatever it was set to in the first mission, but just set default value to 0 anyway to be safe. Then, create the cruiser, and in its arrival cue, add
Code: [Select]
-=
--cruiser_died(0)
--0

That way, the ship will only arrive if the variable is equal to zero (plus whatever additional conditions you have set for it). You can use additional variables if you want to store hull integrity and such. Hope this helps.
[16:57] <CommanderDJ> What prompted the decision to split WiH into acts?
[16:58] <battuta> it was long, we wanted to release something
[16:58] <battuta> it felt good to have a target to hit
[17:00] <RangerKarl> not sure if talking about strike mission, or jerking off
[17:00] <CommanderDJ> WUT
[17:00] <CommanderDJ> hahahahaha
[17:00] <battuta> hahahaha
[17:00] <RangerKarl> same thing really, if you think about it

 

Offline Droid803

  • Trusted poster of legit stuff
  • 213
  • /人 ◕ ‿‿ ◕ 人\ Do you want to be a Magical Girl?
    • Skype
    • Steam
Re: Carry over without red-alert (sorta)
A waste of campaign persistent variable slots if you're not going to store the HP or something. Don't bother.

Just use is-previous-event-true/false. Much quicker to set up and less prone to **** up.
(´・ω・`)
=============================================================

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Carry over without red-alert (sorta)
Yep. DJ's solution is worth it if you want to actually pass some information over using the variable. But if you're only passing a true/false then it's a waste of a variable (and you only have 100 to play with for each mission remember!).
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline headdie

  • i don't use punctuation lol
  • 212
  • Lawful Neutral with a Chaotic outook
    • Skype
    • Twitter
    • Headdie on Deviant Art
Re: Carry over without red-alert (sorta)
but then it easy to use a HP variable in this manner and it would allow you to carry over any hull damage as well, not only that but if it is an optional ship you can set the arrival que to say that if this value is below say 30%then the cruiser still don't arrive
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 karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Carry over without red-alert (sorta)
Yes, if you're actually passing info over, it's worth it.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Lucika

  • Victim of trolling-related humor
  • 211
  • Modding is l'art pour l'art
    • Syrk: The Unification Wars
Re: Carry over without red-alert (sorta)
:yes: Thank you all.

While we're at it:

Mission 1 -> red-alert -> Mission 2 -> normal -> Mission 3 (which carries over variables)
is it possible to allow the player to replay the previous mission despite this one not being a red-alert one?
HLP member 2008-2012 and Syrk:TUW project leader ~2010-2012

 

Offline Lucika

  • Victim of trolling-related humor
  • 211
  • Modding is l'art pour l'art
    • Syrk: The Unification Wars
Re: Carry over without red-alert (sorta)
Mission 1 -> red-alert -> Mission 2 -> normal -> Mission 3 (which carries over variables)
is it possible to allow the player to replay the previous mission despite this one not being a red-alert one?

:bump:
HLP member 2008-2012 and Syrk:TUW project leader ~2010-2012

 

Offline The E

  • He's Ebeneezer Goode
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: Carry over without red-alert (sorta)
With a properly set up campaign file, yes. Note that you'll have to set up the campaign file manually, as the campaign editor UI isn't set up to support links going backwards.
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 Lucika

  • Victim of trolling-related humor
  • 211
  • Modding is l'art pour l'art
    • Syrk: The Unification Wars
Re: Carry over without red-alert (sorta)
...and how would the player see that? I presume there is no special pop-up saying "You can replay the mission before the last mission".
HLP member 2008-2012 and Syrk:TUW project leader ~2010-2012

 

Offline The E

  • He's Ebeneezer Goode
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: Carry over without red-alert (sorta)
If I understand you correctly, you want the player to have the option of replaying the mission labeled "2", right?

Basically, what you do is this. If the player is restarting Mission 3 (which you can track through clever use of campaign-persistant variables), you can pop up a training message saying something like "Do you want to replay the mission leading up to this?" If the player answers in the affirmative, you can then set a hidden goal to true, and end-mission right there. Write a debrief saying "To play mission 2, hit the accept button".

Behind the scenes, what you do is to set up the campaign file so that you have one of mission 3's branches go to mission 2 if said hidden goal is true.

(Be aware that this is just something I _think_ should work, not something I have tested. Implement at your own risk)
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 Lucika

  • Victim of trolling-related humor
  • 211
  • Modding is l'art pour l'art
    • Syrk: The Unification Wars
Re: Carry over without red-alert (sorta)
I see. Thank you, I will test it soon.
HLP member 2008-2012 and Syrk:TUW project leader ~2010-2012

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Carry over without red-alert (sorta)
You could also use the loop option in the campaign editor to do it. I think that one is probably a little more professional looking.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Lucika

  • Victim of trolling-related humor
  • 211
  • Modding is l'art pour l'art
    • Syrk: The Unification Wars
Re: Carry over without red-alert (sorta)
Can I use that without the missions actually being part of a loop?
HLP member 2008-2012 and Syrk:TUW project leader ~2010-2012

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Carry over without red-alert (sorta)
You should be able to. Not 100% certain. It's something you'd have to look into.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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