-
Okay. I am surrendering.
missionScripts:
- type: GameStartHunt
firstMonth: 0
executionOdds: 100
targetBaseOdds: 100
missionWeights:
0:
STR_HUNT_1: 100
useTable: false
startDelay: 20
randomDelay: 100
alienMissions:
- type: STR_HUNT_1
despawnEvenIfTargeted: true
objective: 3
points: 0
spawnZone: 0
raceWeights:
0:
STR_STALKERS: 100
waves:
- ufo: dummy
count: 1
trajectory: P_SPAWN
timer: 9000
objective: true
alienDeployments:
- type: STR_HUNT_1
width: 60
length: 60
height: 5
civilians: 3
alert: STR_MONSTER_HUNT
alertBackground: BACK03.SCR
alertDescription: STR_MONSTERS_HUNT_DESCRIPTION
briefing:
palette: 2
background: BACK03.SCR
desc: STR_MONSTERS_HUNT_BRIEFING
markerName: STR_MONSTER_HUNT
duration: [72, 144]
despawnPenalty: 150
data:
- alienRank: 5
lowQty: 2
highQty: 4
dQty: 1
percentageOutsideUfo: 100
itemSets:
-
[]
-
[]
-
[]
-
[]
-
[]
-
[]
-
[]
-
[]
ufoTrajectories:
- id: P_SPAWN
groundTimer: 0
waypoints:
- [0, 0, 0]
What do i do wrong? Because nothing happens, nothing spawns. :'(
-
I have the same question was you some time ago, the answer is... the globe ruleset need to be used to create site missions
-
Globe ruleset defines possible deployements, for that missions which use specific zones. Like "only in this exact point", or "only in cities of asia".
-
Okay. I am surrendering.
missionScripts:
- type: GameStartHunt
firstMonth: 0
executionOdds: 100
targetBaseOdds: 100
missionWeights:
0:
STR_HUNT_1: 100
useTable: false
startDelay: 20
randomDelay: 100
alienMissions:
- type: STR_HUNT_1
despawnEvenIfTargeted: true
objective: 3
points: 0
spawnZone: 0
raceWeights:
0:
STR_STALKERS: 100
waves:
- ufo: dummy
count: 1
trajectory: P_SPAWN
timer: 9000
objective: true
alienDeployments:
- type: STR_HUNT_1
width: 60
length: 60
height: 5
civilians: 3
alert: STR_MONSTER_HUNT
alertBackground: BACK03.SCR
alertDescription: STR_MONSTERS_HUNT_DESCRIPTION
briefing:
palette: 2
background: BACK03.SCR
desc: STR_MONSTERS_HUNT_BRIEFING
markerName: STR_MONSTER_HUNT
duration: [72, 144]
despawnPenalty: 150
data:
- alienRank: 5
lowQty: 2
highQty: 4
dQty: 1
percentageOutsideUfo: 100
itemSets:
-
[]
-
[]
-
[]
-
[]
-
[]
-
[]
-
[]
-
[]
ufoTrajectories:
- id: P_SPAWN
groundTimer: 0
waypoints:
- [0, 0, 0]
What do i do wrong? Because nothing happens, nothing spawns. :'(
1) There's no region defined that contains a valid missionZone for the mission to spawn.
AlienMissions with objective: 3 require a spawnZone that contains only single locations such as cities, eg. [91, 91, -22.366, -22.366]. On the vanilla regions, missionZone 3 is set specifically for this propose.
Thus, your mission is assigned to spawnZone 0 of the vanilla regions, and since those define large areas like [60, 83, -70, -67] and not single locations, will never spawn.
2) But if you assign spawnZone: 3, it will use the vanilla alienDeployment instead of your STR_HUNT.
For the game to use your modded alienDeployment, it needs to be assigned a texture in globe.rul, and then the texture needs to be assigned to a region on regions.rul.
-
As Hobbes says, you need zone with just "points"/cities.
alienMissions:
- type: STR_HUNT_1
spawnZone: 3
And your mission script is also missing a race:
missionScripts:
- type: GameStartHunt
raceWeights:
0:
STR_AQUATOID: 100
After that a mission like this is generated:
alienMissions:
- type: STR_HUNT_1
region: STR_CARRIBEAN
race: STR_AQUATOID
nextWave: 0
nextUfoCounter: 0
spawnCountdown: 91
liveUfos: 0
uniqueID: 4
missionSiteZone: 2
And after a moment a mission site like this is generated:
missionSites:
- lon: 4.8607419668042082
lat: -0.47123889803846897
id: 1
type: STR_HUNT_1
deployment: STR_PORT_TERROR
texture: -1
secondsRemaining: 30600
race: STR_AQUATOID
detected: true
As for the deployment... I think there is an easier way than bulletdesigner/Hobbes are saying, but maybe I'm wrong, let me check.
-
1) There's no region defined that contains a valid missionZone for the mission to spawn.
AlienMissions with objective: 3 require a spawnZone that contains only single locations such as cities, eg. [91, 91, -22.366, -22.366]. On the vanilla regions, missionZone 3 is set specifically for this propose.
Thus, your mission is assigned to spawnZone 0 of the vanilla regions, and since those define large areas like [60, 83, -70, -67] and not single locations, will never spawn.
2) But if you assign spawnZone: 3, it will use the vanilla alienDeployment instead of your STR_HUNT.
For the game to use your modded alienDeployment, it needs to be assigned a texture in globe.rul, and then the texture needs to be assigned to a region on regions.rul.
Great! In that case i can use missionZone 0 as well as spawnZone 0, and then use deployement name instead of "dummy".
Thanks!
At the same moment. :)
About race in missionscripts - i think it is overriding of alienmissions race?
Upd: not missionZone: 0, but objective: 0 !
-
Yeah, there is an easier way to define the deployment than to mess with the globe.
You can just define siteType directly on alienMission ruleset like this:
alienMissions:
- type: STR_HUNT_1
spawnZone: 3
siteType: STR_HUNT_1
And here's the full corrected ruleset:
missionScripts:
- type: GameStartHunt
firstMonth: 0
executionOdds: 100
targetBaseOdds: 100
missionWeights:
0:
STR_HUNT_1: 100
useTable: false
startDelay: 20
randomDelay: 100
raceWeights:
0:
STR_AQUATOID: 100
alienMissions:
- type: STR_HUNT_1
despawnEvenIfTargeted: true
objective: 3
points: 0
spawnZone: 3
siteType: STR_HUNT_1
raceWeights:
0:
STR_STALKERS: 100
waves:
- ufo: dummy
count: 1
trajectory: P_SPAWN
timer: 9000
objective: true
alienDeployments:
- type: STR_HUNT_1
width: 60
length: 60
height: 5
civilians: 3
alert: STR_MONSTER_HUNT
alertBackground: BACK03.SCR
alertDescription: STR_MONSTERS_HUNT_DESCRIPTION
briefing:
palette: 2
background: BACK03.SCR
desc: STR_MONSTERS_HUNT_BRIEFING
markerName: STR_MONSTER_HUNT
duration: [72, 144]
despawnPenalty: 150
data:
- alienRank: 5
lowQty: 2
highQty: 4
dQty: 1
percentageOutsideUfo: 100
itemSets:
-
[]
-
[]
-
[]
-
[]
-
[]
-
[]
-
[]
-
[]
ufoTrajectories:
- id: P_SPAWN
groundTimer: 0
waypoints:
- [0, 0, 0]
PS: and I guess, you don't need to add STR_AQUATOID to the mission script... I just didn't have the STR_STALKERS race, so it crashed for me.
-
Great! In that case i can use missionZone 0 as well as spawnZone 0, and then use deployement name instead of "dummy".
Thanks!
No.
MissionZone and spawnZone are the same, they just have different names. If you keep using missionZone 0 of the vanilla regions, it will not spawn
And changing ufo: 'dummy' won't do anything either, if you don't assign your alienDeployment to a texture and then assign that texture to a region. Or use siteType, as Meridian has described on the previous post.
-
not missionZone: 0, but objective: 0.
And it is working now. :)
- type: STR_HUNT_1
despawnEvenIfTargeted: true
objective: 0
points: 0
spawnZone: 0
raceWeights:
0:
STR_STALKERS: 100
waves:
- ufo: STR_HUNT_1 #dummy
count: 1
trajectory: P_SPAWN
timer: 1000
objective: true
-
Yeah, that's a third way to do it.
-
Thanks to all of you.
Stalker preview:
-
not missionZone: 0, but objective: 0.
And it is working now. :)
Yeah, but it's not working as you wanted on your original post, because it wont generate the alert or the mission site, just a ufo and it will likely crash if you send a craft after it.
If you want to understand how mission generation works and its requirements, read this: https://www.ufopaedia.org/index.php/Alien_Missions_in_Enemy_Unknown_(OpenXcom)
-
Yeah, but it's not working as you wanted on your original post, because it wont generate the alert or the mission site, just a ufo and it will likely crash if you send a craft after it.
If you want to understand how mission generation works and its requirements, read this: https://www.ufopaedia.org/index.php/Alien_Missions_in_Enemy_Unknown_(OpenXcom)
Nah, it works just fine.
https://github.com/SupSuper/OpenXcom/blob/master/src/Savegame/AlienMission.cpp#L180
Line 180: is for objective 0 (or any other objective for that matter)
Line 181: is for objective 3
-
Nah, it works just fine.
on Geoscape? I have my doubts it's working as intended, specially when the sites start being generated on the water land (since it's for TFTD)
-
on Geoscape? I have my doubts it's working as intended, specially when the sites start being generated on the water
It's a tftd mod, he wants them on the water :)
But yeah, jokes aside, this will consider the whole region area and you may get mission sites on land too... which looks weird.
It shouldn't crash though (to be confirmed).
-
Well, it is not TFTD anymore, so i'll think once more. Thanks.
Upd.:
Ok, and if i will to make mission, appearing in any point of starting base region, what should i do?
Defining as available mission in regions helps not. Should i create new polygon and place a mission in it? But what if player choose another part of the globe to build a new base?
-
Well, it is not TFTD anymore, so i'll think once more. Thanks.
Upd.:
Ok, and if i will to make mission, appearing in any point of starting base region, what should i do?
Defining as available mission in regions helps not. Should i create new polygon and place a mission in it? But what if player choose another part of the globe to build a new base?
What you are trying to do can be made to work, but you need to understand how the mission generation system works, and that means no shortcuts as you were previously trying to do, because there's a lot of requirements involved.
I can get the original ruleset that you posted to work, but you'll have to do some work afterwards to determine the locations here the mission can take place. Just post all the rulesets you have done so far.
-
Ok, now it looks like that:
alienDeployments:
- type: STR_HUNT_1
width: 60
length: 60
height: 5
civilians: 3
alert: STR_MONSTER_HUNT
alertBackground: BACK03.SCR
alertDescription: STR_MONSTERS_HUNT_DESCRIPTION
briefing:
palette: 2
background: BACK03.SCR
desc: STR_MONSTERS_HUNT_SINGLE_BRIEFING
markerName: STR_MONSTER_HUNT
duration: [72, 144]
despawnPenalty: 150
data:
- alienRank: 5
lowQty: 12
highQty: 14
dQty: 1
percentageOutsideUfo: 100
itemSets:
-
[]
-
[]
-
[]
-
[]
-
[]
-
[]
-
[]
-
[]
-
[]
-
[]
alienMissions:
- type: STR_HUNT_1
despawnEvenIfTargeted: true
points: 0
raceWeights:
0:
STR_STALKERS: 100
waves:
- ufo: STR_HUNT_1
count: 1
trajectory: P_SPAWN
timer: 1000
objective: true
missionScripts:
- type: GameStartHunt
firstMonth: 0
lastMonth: 0
executionOdds: 100
targetBaseOdds: 100
missionWeights:
0:
STR_HUNT_1: 100
useTable: false
startDelay: 20
randomDelay: 100
But this way we can acquire land mission over water.
If i add
]alienMissions:
- type: STR_HUNT_1
region: STR_NEW_REGION
regions:
- type: STR_NEW_REGION
...
then missions will take place only in this region. But i need mission to spawn near player base.
-
Have fun :)
Notes:
* You'll need to replace STR_SECTOID with STR_STALKER (I had to substitute for testing)
* There's only 1 location on each region for the mission to take place. But you can add as many additional locations as you like and the actual location will be selected randomly from them
-
So it will provide us not random locations over region, but an array of pseudo-random places. Palliative, but will work. Thank you very much.
-
So it will provide us not random locations over region, but an array of pseudo-random places. Palliative, but will work. Thank you very much.
If you change objective: 3 to objective: 0, then you'll be able to add rectangular areas on regions instead of single locations. And then copy the already existing areas defined on missionZones 1, 2 and 4 (those 3 zones are always on land) for each region and paste them on missionZone 6.
-
I've done it using the random points method and over a few years, nobody noticed. :P
-
Ok, done and works.
But now i have a struggle: this mission do not want to take globe texture to define terrain. I can write proper id for each mission zone from my new region, but this blows my brain.
So, a question:
Can i persuade this AlienMission to use globe textures,
or
Do someone know simple metode to vizualise missionZones? (Falco tools are great, but there are no coordinates visible, so i can not define which missionzone is what.)
Thanks.
Upd.: It looks like that now:
- type: STR_HUNT_1
despawnEvenIfTargeted: true
objective: 0
points: 0
spawnZone: 6
raceWeights:
0:
STR_STALKERS: 100
waves:
- ufo: STR_HUNT_1 #dummy
count: 1
trajectory: P_SPAWN
timer: 1000
objective: true
-
No, I don't think it's possible.
I simply created 4 "biomes" (separate deployments): temperature, jungle, cold and desert. And put matching terrains in each one.
-
Do someone know simple metode to vizualise missionZones?
Ctrl+D in geoscape (several times)... but it shows all of them, so you need to temporarily remove the ones you don't want to see from the ruleset.
-
Ctrl+D in geoscape (several times)... but it shows all of them, so you need to temporarily remove the ones you don't want to see from the ruleset.
Thanks. This is it. By clicking i can see coordinates. Also it helped to find some bugs in region rules.