OpenXcom Forum
Modding => Work In Progress => Topic started by: Nord on January 17, 2017, 11:05:19 am
-
Please explain me a thing about missions:
When we use missionscript to spawn an alien probe mission, in first month (script gameStart), this kind of missions can be spawned also separately, by globe, regions, and so on? And if yes, how can i define "firstMonth" for all UFO missions?
And if no, so why there is no missionscripts for all other UFO missions?
-
Please explain me a thing about missions:
When we use missionscript to spawn an alien probe mission, in first month (script gameStart), this kind of missions can be spawned also separately, by globe, regions, and so on? And if yes, how can i define "firstMonth" for all UFO missions?
And if no, so why there is no missionscripts for all other UFO missions?
Man, this is EXTREMELY hard to read and understand.
I'll try to answer... but I have no idea if I'm even answering the correct questions.
- You can spawn missions "separately" (whatever what means); by mission type, by region, by race, etc.
- I don't have a slightest clue what you mean by "by globe", so I'll skip that
- You can define first month by the "firstMonth" attribute (at the top of the vanilla mission script file, there is a documentation of all available ruleset attributes... read that, if you haven't already)
- There is no (complicated) mission script for other missions, because they are using a different approach (which was there before mission scripting), using alien strategy table, as described here:
* https://openxcom.org/forum/index.php/topic,3287.msg77582.html#msg77582
* https://openxcom.org/forum/index.php/topic,3287.msg77736.html#msg77736
* https://www.ufopaedia.org/index.php/Alien_Missions_in_Enemy_Unknown_(OpenXcom)
- type: recon
firstMonth: 1
- type: invasion
firstMonth: 6
This code covers all 5 standard missions (probe, interdiction, resource raid, infiltration and alien base).
-
Man, this is EXTREMELY hard to read and understand.
I'll try to answer... but I have no idea if I'm even answering the correct questions.
Sorry for that. I am ashamed constantly with my por english.
- There is no (complicated) mission script for other missions, because they are using a different approach
Exactly what i mean when writing "by regions", just wasnt know a " mission table" term. By the way, ufopedia link is empty or broken.
So you mean that this code in missionScripts:
- type: recon
firstMonth: 1
- type: invasion
firstMonth: 6
Will take effect on vanilla missions?
That's what i wanted to hear, thank you once more.
-
By the way, ufopedia link is empty or broken.
The link is fine, it's just the forum ignores the last character for some reason... copy-paste the URL directly to your browser and it should work.
So you mean that this code in missionScripts:
- type: recon
firstMonth: 1
- type: invasion
firstMonth: 6
Will take effect on vanilla missions?
Yes, this code is executing those 5 vanilla missions, which I mentioned before.
-
Ok, i understand. Thank you.
But if i want to define firstmonth for each type of vanilla mission separately?(Do i place this word right? :-) )
-
But if i want to define firstmonth for each type of vanilla mission separately?(Do i place this word right? :-) )
Then you would need to stop using the "mission table" and define all missions separately using mission script.
-
Aaaaand... I got it. Thank you again.
-
But if i want to define firstmonth for each type of vanilla mission separately?(Do i place this word right? :-) )
If I'm understanding you correctly you want to be able to determine the month of appearance of the 5 missions? So that Probe missions would appear from month 0 onwards, then Resource Raid from month 1, etc.?
-
Something like this, yes. But "recon" and "invasion" is good enough too.
-
Something like this, yes. But "recon" and "invasion" is good enough too.
Fair enough. I asked because at a certain point I considered something similar to my Area 51 mod, and although it's feasible I dropped the idea due to other reasons. And if you were interested I'd be willing to have a try, although I'd need more specific info about what your goals for this feature.
-
Well... First of all, i work on TFTD mod. And idea was simple - move USOs to the second-third month, because other types of missions must take place before them.
-
Well... First of all, i work on TFTD mod.
UFO, TFTD, Apoc, Dune, Terminator... names change but how missionScript works stays the same :)
And idea was simple - move USOs to the second-third month, because other types of missions must take place before them.
Do you literally mean no USOs during the first-second months?
-
Yes.
-
Yes.
The issue would be which non-UFO missions would replace the vanilla ones during the first months. And, while not related to the missionScripts, I can't help thinking about the effect this will have on research, since you're creating a bottleneck by restricting the recover of Aquaplastics, Zrbite and other USO components after the initial months.
-
The issue would be which non-UFO missions would replace the vanilla ones during the first months. And, while not related to the missionScripts, I can't help thinking about the effect this will have on research, since you're creating a bottleneck by restricting the recover of Aquaplastics, Zrbite and other USO components after the initial months.
New missions are allready implemented(all, except first one... one more sprite needed). And research tree are reworked too. I need to draw some more ufopedia pages and two or three spritesheets for units, and release version will be done. Just have not much free time now.
-
One more question: how to force missions to stop spawn only if it was successful? So if you lose - you can try again next month, but if you reach objective (kill all enemys) this mission will not appear anymore.
-
Exactly as described cannot be done atm.
But you can get near-ish by placing a unique object on the map, which will be recovered when mission is successful.
Afterwards player would research this object, which would stop the mission.
-
Afterwards player would research this object, which would stop the mission.
And this research can not be finished automatically, i guess.
-
And this research can not be finished automatically, i guess.
Unfortunately, no... I would welcome this feature myself, I had to work around this issue so many times.
-
@both: write a feature request that has at least 10 lines and doesn't contain word 'automagically' and we'll see...
-
@both: write a feature request that has at least 10 lines and doesn't contain word 'automagically' and we'll see...
Lol, I just wrote a PM to Nord with exactly the same suggestion... :) I'll comment when/if it's ready.
-
Though i am not using OXCE, it might be useful for others.
About "automagical" (nice word, should be remembered) research: Dont know exactly how research code works, but presume each hour check of research status. Easiest way as i see is to check inactive, but available researches, searching zero cost. And if zero cost found - mark research as completed. But if it will slow down system, check can be performed once a day or after tactical mission ends.
And if not use research - i dont know code, we need some global variable, which will change by winning mission. And command in missionscripts to check it. Maybe "objectivesRequired" from alienDeployements will fit.
Sorry, i just dont know exactly what we have in gamecode, and what we do not have. :-[
-
Maybe this could be done by having a definition in alienDeployments to grant a specific research at the end of a mission containing that deployment? In ruleset, this could look like
alienDeployments:
- type: STR_SOME_DEPLOYMENT
...
unlockedResearch: STR_SOME_RESEARCH
...
where the research item defined is treated like it was unlocked by another research item completed the next time midnight rolls around?
Another option that I could see is to add a tag (stopMissionRepeat: true?) to alienDeployments that on completing a mission, it would cause the engine to look for the running mission script/mission table entry that spawned that particular mission and had a second tag on that mission script (stopAfterMissionComplete: true?), and remove it from the table/mark that mission script to stop running.
-
I like the alienDeployment option (the former) best. It's clear and in-line with how things work in OXC.
-
Implemented: https://openxcom.org/forum/index.php/topic,4187.msg79243.html#msg79243
EDIT:
Gives:
- topic itself (regardless of any prerequisites/dependencies)
- score
- all unlocked zero-cost research (and their score)
Doesn't give:
- get-one-free bonuses
Does NOT trigger:
- ufopedia
- cutscenes
- we can now research popup
- we can now manufacture popup
- we can now buy popup
-
One question: if the research has prerequisites (dependencies) which are not met yet, will it also be unlocked? (It should.)
-
Yes
-
Thank you!