Hard Light Productions Forums

Hosted Projects - Standalone => Wing Commander Saga => Topic started by: Mancubus on July 12, 2007, 07:23:18 am

Title: Losing Paths
Post by: Mancubus on July 12, 2007, 07:23:18 am
For a long time you've all been saying, that making a losing path missions with possibilty to get back to winning path is impossible in fs2.

However i thought wait... if i recall one specific part of the freddocs....

but then i thought c'mon man these guys know much more than you about FRED

but then i thought...
.
.
.
.
.
.
.
and i thought....
.
.
.
.
.
.
.
.
And i thought well why not give it a shot...
so I ran fred...
.
.
.
.
and tried...
.
.
.
.
.
And here I am to say - making losing path IS POSSIBLE.
the elaborate structure like wc1 is a no-no but adding short single loosing paths of one or two missions is definetly possible

Ive created a short demo campaign (note - it is not meant to be played by public, but to ONLY demonstrate the loosing paths)

Witch i'll be happy to send to you whenever you want :D

EDIT - corrected spelling mistakes
Title: Re: Losing Paths
Post by: Tolwyn on July 12, 2007, 07:36:11 am
If you are refering to a following structure, then it has already been implemented into the script :)


                                  mission x
                              /                    \
                             /                      \
                            /                        \
                           /                          \
                          /                            \
             objective failed          objective accomplished
                        |                               |
                        |                               |
                        |                               |
                        |                               |
                        |                               |
              mission y A                 mission y B

And then, at some point, these paths will link, and you will continue with the story.

However, a true losing path, like seen in WC3 is not really possible at the moment.
Title: Re: Losing Paths
Post by: Mancubus on July 12, 2007, 07:41:41 am
OK, i am referring to it.
It was some time ago that, im sure, someone from the team said it is not possible.
as for a wc3 like why it cant be done??
 why not just:

                        mission a
                 /                      \
                /                        \
               /                           \
losing mission             wining mission
       |                                      |
       |                                      |
       |                                      |
loosing credits 'mission'   winning credits 'mission'

??

edit: to the loosing mission in the schematics you link few missions during campaign not just one...
Title: Re: Losing Paths
Post by: nowd on July 12, 2007, 07:58:32 am
Quote
as for a wc3 like why it cant be done??
The real problem (if i didn't misunderstood Tolwyn)  is that as soon as you are on the loosing path (like Proxima) you have no way to reload and play the winning path like in WC3.
In WC3 you can simply load a mission before you got on the loosing path and suceed. Voila! You are on the winning path again.
In FS2 you have no way to reload a previous mission and take another path. If you srew too many missions and confirm than you would be stuck on the loosing path and the only way to see the winning end would be to restart the campaign.
Title: Re: Losing Paths
Post by: Colonol Dekker on July 12, 2007, 08:01:12 am
May have to add something to the mission simulator, a regression button or something, or to the campaign room perhaps.

Maybe even copy th eloop cpde and add a retry button after a failing mission which retry's the loop from the branch point....
Title: Re: Losing Paths
Post by: Shade on July 12, 2007, 08:05:24 am
Actually, it is quite possible to create fully fledged pathed campaigns, not just a few missions on a single path :)

The next mission in a campaign can be set to vary based on events that took place during the mission, which means that you can theoretically branch into any number of different missions based on how well the player did. And similarly, you can also branch back to the main path at a point of your choosing.

A campaign file for doing that would look something like this (note, not using the exact syntax, as I can't be arsed to look it up):

$Mission: Start.fs2
+Formula:
  (- true
   next-mission "Branch.fs2")

$Mission: Branch.fs2
+Formula:
  (- is-previous-event-true
       "Brach.fs2"
       "RTB_Win"
   next-mission "WinPath1.fs2")

  (- is-previous-event-true
       "Branch.fs2"
       "RTB_Lose"
   next-mission "LosePath1.fs2")

$Mission: WinPath1.fs2
+Formula:
  (- true
   next-mission "WinPath2.fs2")

$Mission: WinPath2.fs2
+Formula:
  (- true
   next-mission "WinPath3.fs2")

$Mission: WinPath3.fs2
+Formula:
  (- is-previous-event-true
      "WinPath3.fs2"
      "Did_Well_Enough_To_Continue_On_Winpath"
   next-mission "WinPath4.fs2")

   (- is-previous-event-true
      "WinPath3.fs2"
      "Did_Badly_Enough_To_Get_Booted_To_LosePath"
   next-mission "LosePath4Path4.fs2")

$Mission: LosePath1.fs2
+Formula:
  (- true
   next-mission "LosePath2.fs2")

$Mission: LosePath2.fs2
+Formula:
  (- true
   next-mission "LosePath3.fs2")

$Mission: LosePath3.fs2
+Formula:
  (- is-previous-event-true
      "LosePath3.fs2"
      "Did_Well_Enough_To_Be_Moved_Back_To_Winpath"
   next-mission "WinPath4.fs2")

   (- is-previous-event-true
      "LosePath3.fs2"
      "Did_Badly_Enough_To_Stay_On_LosePath"
   next-mission "LosePath4Path4.fs2")


The campaign editor will probably throw a fit if you feed it something like this, but that's just FRED being weird. In game, this would give exactly the same sort of mission branching found in the original WC games, where you get multiple chances to redeem yourself even if you end up on the losing path - Up to a point, anyway, which is where you get to see the nifty "Earth getting nuked" cutscene :p

The problem with not having a true way to save the game is a problem though, but that's a different matter and doesn't take away from the fact that there are no real branching limitations in FS2.
Title: Re: Losing Paths
Post by: Tolwyn on July 12, 2007, 08:21:23 am
There is one limitation: in WC3, like nowd said, there is no way back once you are on the losing track. Proxima is a dead end, the Confed fleet will be smashed and the Earth will be conquered. Losing cutscene - credits - game over. Now, you can go back by reloading the game. That won't work in FS2.
Title: Re: Losing Paths
Post by: Mancubus on July 12, 2007, 08:31:51 am
Damn, havent thought of that...  heh you ar right no savegames is a HUGE pain i the ass
Title: Re: Losing Paths
Post by: Tolwyn on July 12, 2007, 08:49:00 am
but, essentially, you are right. Losing path, with some restrictions (more like WC4) is possible. And we try to build missions with multiple objectives. Depending on how well the player performs the course of the mission may or may not change.

For example: you are to escort a transport to a starbase. If the transport is destroyed before you reach your destination you will be ordered to the star base. Depending where this happens, you will miss at least one nav point. And the debriefing you will receive is not exactly friendly :)
Title: Re: Losing Paths
Post by: Shade on July 12, 2007, 09:04:45 am
I gave this a bit of thought after my first post, and it might be possible to fudge a reloading function in the game through careful SEXPing and campaign file hacking. It gets quite complicated, but I'll try to explain my idea (note, I have no idea if this would actually work. To my knowledge it has never been tried).

Into each mission, you could add events triggered by a combination of keypresses (using the "key-pressed" training SEXP), which upon triggering will instantly end the mission and send the player back to a certain point in the campaign. I haven't quite worked out all the kinks yet, but it would go something like this:

In mission:

* TriggerReload
   -op every-time
      -op key-pressed
         # L
      -op modify-variable
         # ReloadCheck(0)
         # 1
      -op key-reset
         # L
      op modify-variable
         # MissionTime(0)
         -op mission-time
      -op training-msg
         # "Press A to return to the first mission branch, B to return to the second mission branch, or X to abort. Automatic abort after 5 seconds"

* TriggerReset
   -op every-time
      -op or
         -op and
            -op key-pressed
               # X
             -op =
                # ReloadCheck(0)
                # 1
         -op and
            -op <
               -op +
                  # MissionTime(0)
                  # 5
               -op mission-time
            -op =
               # ReloadCheck(0)
               # 1
      -op modify-variable
         # ReloadCheck(0)
         # 1
      -op key-reset
         # X

* ReloadBranchA
   -op when
      -op and
         -op =
            # ReloadCheck(0)
            # 1
         -op key-pressed
            # A
      -op end-mission

* ReloadBranchB
   -op when
      -op and
         -op =
            # ReloadCheck(0)
            # 1
         -op key-pressed
            # B
      -op end-mission

First event triggers the reload sequence, second one cancels it due to player choice or a 5 second timeout. The last two events simply end the mission on a given keystroke, if the reload sequence is active. If campaign persistent variables are used, those would also have to be reset to appropriate values in the event that ends the mission. With this in-mission event wrangling taken care of, one can then hack the campaign file in notepad to set the next mission to be the first one in Branch A or B, according to which event was triggered. Would work sorta like savepoints in console games. In theory. Maybe. With a lot of luck. And probably faith too, if you're into that.

One major drawback I can think of is that, at the moment, there's no way to force the game to skip debriefing through SEXPs once you're in the mission, which would make it kinda ugly even though it would still work.
Title: Re: Losing Paths
Post by: Colonol Dekker on July 12, 2007, 10:34:03 am
What about an

If true
>
Mission-end?
Title: Re: Losing Paths
Post by: Shade on July 12, 2007, 11:57:43 am
That'll just end the mission as soon as it starts. Won't affect the debriefing. Of course, knowing about that flaw, it would be straightforward enough to plan for it and include a debriefing stage specifically for that, saying something like "Mission terminated. Returning you to the selected savepoint when you click ok. If you chose to reload by mistake, you can restart the current mission by clicking cancel and going to the ready room".
Title: Re: Losing Paths
Post by: Tolwyn on July 12, 2007, 12:11:03 pm
I thought, that you can disable briefing/debriefing in the mission specs :)
Title: Re: Losing Paths
Post by: Shade on July 12, 2007, 12:14:55 pm
You can, but you'd only want to skip it if the guy chooses to reload to a previous savepoint mid-mission, and there's no way currently to disable debriefings with a SEXP. Hence the problem. But it's not that big of a problem - Considering how experiemental the rest it, then frankly, if it turned out to actually work then slipping in an extra couple of debriefing stages to deal with it is a minor issue :)
Title: Re: Losing Paths
Post by: karajorma on July 13, 2007, 03:28:57 am
Shade, don't add that into every mission. Simply make a no brief, no debrief mission which asks the question and then ends. Slot it in between the real missions.

Although I suppose that way round only allows you to reload when you succeed in a mission.
Title: Re: Losing Paths
Post by: Colonol Dekker on July 13, 2007, 03:40:08 am
That'll just end the mission as soon as it starts.


Not the literal "when-true" you can replace that with whatever you want, IE "objective-failed" and use it as a reference in subsequent missions or the campaign editor as a cue/key event i meant :beamz:  :P



Title: Re: Losing Paths
Post by: Shade on July 13, 2007, 08:50:32 am
Quote
Shade, don't add that into every mission. Simply make a no brief, no debrief mission which asks the question and then ends. Slot it in between the real missions.

Although I suppose that way round only allows you to reload when you succeed in a mission.
Not a bad idea. Would work except for the final mission of the losing path, as long as the player is competent enough to win at some difficulty setting. Downside to that would be a lot of extra loading, so I guess it's a tradeoff. Now, for more important issues: Since you didn't tear the events apart and point out the mistakes, does that mean you think this might actually work? :p

CD: Sorry, my mistake, I guess I tend to read SEXPs/events rather literally. Environmental damage from spending too much time with them, I suspect, since they tend to act up if you just assume they know what you want them to do :)
Title: Re: Losing Paths
Post by: karajorma on July 14, 2007, 03:26:37 am
The loading time for a mission with nothing much in it is fairly small and you can disguise it with a screen that says "Saving mission progress" :D Players are used to seeing screens like that. Very few will figure out what's actually going on.

As for your events I didn't look in huge detail at them (only enough to get the gist of what you were doing) but the overall idea seems sound to me.
Title: Re: Losing Paths
Post by: Tolwyn on July 14, 2007, 04:32:28 am
Hmm... yes, this does sound like a good idea. Maybe a custom background for the mission loading screen with an explanation that the player has lost the game and will now return to the key mission.