OpenXcom Forum
Modding => Work In Progress => Topic started by: Solarius Scorch on November 13, 2016, 01:08:51 pm
-
One way to make the mission only run once is to use the same value on firstMonth and lastMonth. But is it possible to have a unique, one-time mission that is unlocked by research rather than a set month?
-
How about:
lastMonth: 0
researchTriggers: STR_SECRET_MISSION_RESEARCH
?
-
# maxRuns: 12 # this mission type can only execute this number of times, -1 for infinite (default -1)
-
# maxRuns: 12 # this mission type can only execute this number of times, -1 for infinite (default -1)
Great, thanks!
(I feel silly now)
-
From Area 51 missionScripts:
- type: bluebookD
label: 7
firstMonth: 1
maxRuns: 1
missionWeights:
0:
STR_COUNCIL_MISSION: 100
researchTriggers:
STR_DATA_DISK_2: true
regionWeights:
0:
BLUEBOOKD: 100
varName: bluebookd
useTable: false
-
From Area 51 missionScripts:
- type: bluebookD
label: 7
firstMonth: 1
maxRuns: 1
missionWeights:
0:
STR_COUNCIL_MISSION: 100
researchTriggers:
STR_DATA_DISK_2: true
regionWeights:
0:
BLUEBOOKD: 100
varName: bluebookd
useTable: false
What would happen if you don't discover STR_DATA_DISK_2 within the first few months?
-
...Wait, wut? Research-dependent missions? How, wut? D_D
-
What would happen if you don't discover STR_DATA_DISK_2 within the first few months?
It's irrelevant when you discover STR_DATA_DISK_2. The 'firstMonth: 1' means that the mission can only be generated from February onwards and there isn't a limit set to when the mission can take place.
...Wait, wut? Research-dependent missions? How, wut? D_D
They were already present on the original game regarding alien retaliations. The missionScript adds a monthly Retaliation once the game reaches a certain month (depending on the difficulty level) or The Martian Solution is researched, in addition to the retaliations caused by UFO shoot downs.
-
It's irrelevant when you discover STR_DATA_DISK_2. The 'firstMonth: 1' means that the mission can only be generated from February onwards and there isn't a limit set to when the mission can take place.
OK, I'm in a really bad shape. I meant if it was lastMonth, not first:
- type: bluebookD
label: 7
lastMonth: 1
maxRuns: 1
missionWeights:
0:
STR_COUNCIL_MISSION: 100
researchTriggers:
STR_DATA_DISK_2: true
regionWeights:
0:
BLUEBOOKD: 100
varName: bluebookd
useTable: false
-
How i understand description, lastmonth 1 means "no missions after january", lastmonth 0 means " only one time."
-
OK, I'm in a really bad shape. I meant if it was lastMonth, not first:
- type: bluebookD
label: 7
lastMonth: 1
maxRuns: 1
missionWeights:
0:
STR_COUNCIL_MISSION: 100
researchTriggers:
STR_DATA_DISK_2: true
On this case the mission can never take place in January if the player starts the game with STR_DATA_DISK_2 already researched. And for the mission to take place in February, the player needs to recover and research STR_DATA_DISK_2 before January ends. The important thing to remember is that the missionScript is only run at the beginning of a new month, so if the conditions aren't met, then no mission is generated.
How i understand description, lastmonth 1 means "no missions after january", lastmonth 0 means " only one time."
Everytime you see on a ruleset the value 0 associated with a list (of months, damageType, etc.) it means the first entry of the list, on this case January. maxRuns: 1 is used to run the mission 'only one time'
-
OK, I thought so. Thanks!
-
I'm having trouble trying to work out the opposite of this.
How do you stop a mission script (with no lastmonth variable) from continuing? I tried to put in research trigger: STR_SABOTAGE to false. So that would mean that if I researched SABOTAGE, then the mission script would finally stop? Seems to keep going for me..
Or is it that the mission will keep repeating each month and I have to research it every single month to prevent it from executing? How is that possible..lol I'm so confused.
EDIT: Strangely I can't seem to stop missions from repeating at all. Setting lastmonth to 0, maxruns to 1...nothing seems to prevent it from coming back month after month. Is there some kind of bug?
-
I'm having trouble trying to work out the opposite of this.
How do you stop a mission script (with no lastmonth variable) from continuing? I tried to put in research trigger: STR_SABOTAGE to false. So that would mean that if I researched SABOTAGE, then the mission script would finally stop? Seems to keep going for me..
Or is it that the mission will keep repeating each month and I have to research it every single month to prevent it from executing? How is that possible..lol I'm so confused.
EDIT: Strangely I can't seem to stop missions from repeating at all. Setting lastmonth to 0, maxruns to 1...nothing seems to prevent it from coming back month after month. Is there some kind of bug?
This is a mission script that definitely works for me:
- type: CultActivityEXALT
firstMonth: 0
executionOdds: 8
missionWeights:
0:
STR_CULT_INVESTIGATION_EXALT: 100
regionWeights:
0:
REGION_EXALT: 100
useTable: false
researchTriggers:
STR_EXALT: true
STR_EXALT_OPERATIONS: false
startDelay: 1200
It is enabled by STR_EXALT and disabled by STR_EXALT_OPERATIONS. And it works! (Of course, starting next month.)
-
Thanks Solarius! Actually I figured out after many hours of hair pulling that the problem was I was using the wrong IDs for global locations :-\ funny how just a few numbers can make or break a game!