Official 1C Company forum

Official 1C Company forum (
-   Star Wolves (
-   -   Jump to mission script (

Kami-sama 03-13-2018 09:34 PM

Jump to mission script
So after coming back to Star Wolves 3 and playing all the story paths I've decided to create a script that allows me to jump right before the final battle from any story path. The script already changes motherships, adds a lot of each equipment and faction colored fighter in the game and changes pilots (modded with all perks), but now comes the hard part that I can't figure out. How do I set it to start the storyline right before the final mission (when you're allowed to take anything from the faction's warehouse for free)?

nocalora29 03-14-2018 12:01 PM

What do you mean by "start the storyline"? what exactly are you trying to start?

Kami-sama 03-14-2018 01:55 PM

The prelude to the final mission. For example the InoCo CEO path option changes mothership to the grey Lion Mk.2, gives me all equipment and InoCo colored fighters of generations 4-5, removes Ternie and adds Kalem, Natalie, Cleric and Alex. And I want it to start the mission where you're told to get to Eridan and proceed with the story from there (i.e. reaching Eridan starts the conference where you choose which strategy to pursue for the final battle).

nocalora29 03-14-2018 02:58 PM

Thats a good question indeed on how to do this...

I just looked inside the Eridan System respectively and you would need to set the QuestLabel "CurrentQuest" to "16e" and you also need to start the "StartMission" of Quest 16e (Scripts\Quests\mission_16e), but I think there are more than one Quests involving the Eridan System, so you'd need to know what exact quest you want to start, if it matters atleast. I think you can solve this with just SetQuestLabels.

I wish I could be a bit more help with the quest System of the game, but even after all this time modding SW I never could figure out how the game handles the quest system really, and how it exactly works.

Kami-sama 03-15-2018 12:45 PM

Eridan was too complex for now because of the multiple missions there as well as the permit to enter the system so I decided to try with Viper's final mission for a start. Here's what I tried:


No matter the order nothing happens after I jump to Earth. There must be more to it.

nocalora29 03-15-2018 01:41 PM

You somehow need to execute the "StartMission" function of the quest 18a in (Scripts/Quests/...) itself to get this going.
I'll look a bit into the QuestSystem and will try to gain the knowledge on how one would go on about this.

In theory you could just "dofile" the quest file and then Execute StartMission(), but Im sure if that would break the QuestSystem, could be worth a try.

Kami-sama 03-15-2018 06:48 PM

My latest failed attempt:

SetQuestState("quest_16a", QUEST_DONE);
AddQuest("quest_18a", QUEST_PROCESS);

I try adding anything fitting I can see in the quest scripts. At least I know that the function is not executed by having the previous quest marked as complete.

nocalora29 03-15-2018 07:09 PM

Try to brute force maybe.
This should start the script no matter what:


This is just example code, replace the Mission_16e to the mission you want to start, including the proper script.

Keep in mind: You have got to have proper SetQuestLabels and proper variables for this to work, afterall the script is expecting the player to actually be that far into the story.

Kami-sama 03-16-2018 06:34 PM

This might be problematic. Triggering the mission script itself shouldn't work if you're in another system. And I'm pretty sure it won't trigger after the jump if I just write it below it. I was looking for what causes the script to trigger when you enter or jump into the system.

nocalora29 03-17-2018 11:25 AM

Then I'd recommend you to look for any references which may "Change" the current Mission to another one, but I guess you have already done that. Try to check for references to the Quests.xml "mission name" entries in the scripts/Quests folder, maybe you can find enough code to change the mission that way.

All times are GMT. The time now is 11:15 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Copyright © 2007 1C Company. All rights reserved.