OpenXcom Forum
Modding => Help => Topic started by: robin on December 11, 2022, 01:13:55 pm
-
I don't understand the logic of the negative id texture.
Positive id is straightforward:
- each id corresponds to a texture, in sequence as they appear in the graphic file.
- each texture is linked to one or more terrains (which make sense).
But in case of negative id:
- each id corresponds to what? Is it arbitrary?
- each "texture" is linked to one or more alienDeployment instead of a terrain. However the deployment can define the terrain itself so: can I skip defining negative id textures altogether?
Likely I'm losing myself in a glass of water.
Thanks.
-
Pretty much yes, that's the thing about negative textures; that they are not bound to a specific global texture. That's because missions using negative textures are never UFO landings or otherwise taking the global texture to determine mission terrain. Instead, you define a specific region for this mission and link it to the texture.
For a simple example, taken from X-Com Files. There's a mission where you must find and arrest/kill one guy. This is a one-time mission, always spawned in a specific place, so no need to involve global textures. Instead, I did this:
globe:
textures:
- id: -458
deployments:
STR_LO_WO_REFUGE: 100 ### this mission's alienDeployment name
regions:
- type: REGION_LO_WO_REFUGE
missionZones:
-
- [108, 108, -13.5, -13.5, -458] ### only one location; you can have many if you want. Note the -458 value
alienMissions:
- type: STR_LO_WO_REFUGE
despawnEvenIfTargeted: true
objective: 3
spawnZone: 0
raceWeights:
0:
STR_BLACK_LOTUS: 100
waves:
- ufo: dummy
count: 1
trajectory: CA_SPAWN
timer: 9000
objective: true
missionScripts:
- type: loWoRefuge
firstMonth: 0
missionWeights:
0:
STR_LO_WO_REFUGE: 100
regionWeights:
0:
REGION_LO_WO_REFUGE: 100 ### the region which specifies texture
useTable: false
maxRuns: 1
varName: LO_WO
researchTriggers:
STR_BLACK_LOTUS: true
STR_DOSSIER_LO_WO: true
startDelay: 20
randomDelay: 43500
-
Now I understand, I was missing that fact the texture was linked to the region.
Thank you!