aliens

Author Topic: Save editing: missions  (Read 5381 times)

Offline hvnlysoldr

  • Squaddie
  • *
  • Posts: 7
    • View Profile
Save editing: missions
« on: November 28, 2017, 07:11:46 pm »
There's a serious bug afflicting me. It triggers when I load any save with a modded alien race UFO. Upon loading saves they switch to Chtonite. Such as the Diplomatic golden Envy ship.
Or this Reptoid Base influx. Load Geo 9 save and two or more scouts spawn, and then either still in the air or crashed saves afterwards will turn the alien race to Chtonite.
This vanilla Sectoid Battleship loads just fine.

It's hard to notice unless like the Golden ship I wanted to see all the bonus weapons and when multiple UFOs attack at once like during bases. Currently only marathon beating all the UFOs all in a row without reloading or manually editing the save after engaging the Battlescape changing each individual alien.

During the last two months I've edited some extra exciting missions over ones I've done already so that might be confusing which race should be the one for which UFO; but that doesn't explain the Diplomatic Golden ship that should only have the Ethereal Order crew unlike for base and terror missions.

Thank you for this great mod and all the effort and hard work to improve it.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • ***
  • Posts: 11722
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Save editing: missions
« Reply #1 on: November 28, 2017, 08:32:24 pm »
I have no idea how you did that, but it sounds like a fun feature!



No, seriously, man. This is the first time I've heard about it, and I certainly would over the years. It's probably your local problem.
Can anyone confirm this behaviour?

Offline hvnlysoldr

  • Squaddie
  • *
  • Posts: 7
    • View Profile
Re: Save editing: missions
« Reply #2 on: November 30, 2017, 08:42:50 am »
I have come back with some more details, I've been playing since version .6 or so after seeing a video on reddit on your mod. I'd download the update, paste xcom assets, run X-Files mod, and copy over the saves and the options config from the last version-- keeping track of advanced options and opening at a certain aspect size and what all.

At version .7 the research to reveal all agents PSI strength before PSI Lab training had changed. Looking at the research tree I discovered Alpha Werecat and the Black Moon mission. Just changing a Monsters Hunt mission into Black Moon kept crashing as a Region variable was too large (even -1 or 1) and even Blood Moon edits; I then changed strategy and kept a save minutes before midnight of the next month. And then I manually copied missions such as Underwater City, Golden Diplomatic Envoy, and a few more terror and alien base missions into the main save to continue from.

Looking at the new AlienMissions in the save file I found that they displayed a uniqueID, and having copied from the "same month" several times the uniqueID duplicated among  a few of them. So I manually edited them sequentially.
Spoiler:
Quote
  - type: STR_ALIEN_BASE
    region: STR_CENTRAL_ASIA
    race: STR_CHTONITE
    nextWave: 1
    nextUfoCounter: 0
    spawnCountdown: 11550
    liveUfos: 4294967292
    uniqueID: 348
    missionSiteZone: -1
  - type: STR_ALIEN_BASE
    region: STR_SOUTHERN_AFRICA
    race: STR_MUTON
    nextWave: 1
    nextUfoCounter: 0
    spawnCountdown: 3660
    liveUfos: 0
    uniqueID: 349
    missionSiteZone: 8
I thought it strange though that the Mission ID was so behind what the Diary was saying. i.e.
Spoiler:
Quote
  - id: 423
    markerName: STR_UFO_
    markerId: 102
    time:
      second: 10
      minute: 38
      hour: 13
      weekday: 2
      day: 25
      month: 10
      year: 1999
    region: STR_ARCTIC
    country: STR_UNKNOWN
    type: STR_UFO_CRASH_RECOVERY
    ufo: STR_SENTRY_SHIP
    success: true
    score: 154
    rating: STR_MS_RATING_150
    alienRace: STR_CHTONITE
    daylight: 8
    injuryList:
      43: 0
      45: 0
      46: 0
      47: 0
      51: 0
      52: 0
      53: 0
      55: 0
      56: 0
      58: 0
      59: 0
      60: 0
    lootValue: -500
  - id: 424
    markerName: STR_UFO_
    markerId: 101
    time:
      second: 55
      minute: 42
      hour: 17
      weekday: 2
      day: 25
      month: 10
      year: 1999
    region: STR_NORTH_AMERICA
    country: STR_USA
    type: STR_UFO_CRASH_RECOVERY
    ufo: STR_MEDIUM_SCOUT
    success: true
    score: 275
    rating: STR_MS_RATING_150
    alienRace: STR_CHTONITE
    daylight: 0
    injuryList:
      72: 0
      74: 0
      82: 0
      83: 0
      86: 0
      88: 0
      98: 0
      100: 0
      115: 0
      120: 0
      143: 0
      149: 0
    lootValue: -500

I don't how this affects behavior changing the alien race after reloading, but I figure since
Spoiler:
ufos:
  - lon: 2.6293354408316367
    lat: 0.10111441823046506
    dest:
      lon: 2.5736578834906032
      lat: -0.022610059357954515
      type: STR_WAYPOINT
      id: 0
    speedLon: -0
    speedLat: -0
    speedRadian: 0
    speed: 0
    type: STR_TERROR_SHIP
    id: 104
    crashId: 59
    damage: 664
    shield: 0
    shieldRechargeHandle: 0
    altitude: STR_GROUND
    direction: STR_NONE_UC
    status: 2
    detected: true
    hyperDetected: true
    secondsRemaining: 104400
    inBattlescape: true
    mission: 335
    trajectory: P0
    trajectoryPoint: 1
    fireCountdown: 18
    escapeCountdown: 6137
doesn't record the alien race but issues ID about itself (and I have to stress I'm speculating and theorizing) mission that when reloading it looks for what it should be on what is available in the save and that a UFO thread may have issued the same ID. So when playing it correctly (detect, attack UFO, engage mission) registers which race was just crashed. (The glitch switching to Chtonite Base even on a Snakeman Terror UFO)

So for now I'll use the Save Scum option to keep single UFOs to quickly engage without worrying about too many Chtonites and then delete most of them before next month so the game will properly reset/spawn the UFO missions.

Manipulating the save file like that is the limits on my programming knowledge so I hope I have given enough information to replicate this unintended behavior. Thanks for crafting this excellent mod for a great game we all love.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • ***
  • Posts: 11722
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Save editing: missions
« Reply #3 on: November 30, 2017, 07:41:53 pm »
Since this is not technically a bug, I'm taking these posts out to a new thread.

The truth is, missions editing is tricky. I've never done it to any great extent, so I can't tell you what is wrong without examining it in details. There are so many things that can be mismatched - races, trajectories, map points... I don't think it would be worth the effort.

Offline tkzv

  • Commander
  • *****
  • Posts: 583
    • View Profile
Re: Save editing: missions
« Reply #4 on: November 30, 2017, 08:42:50 pm »
If you want a mission that no longer appears, you can make the game generate it for you.
Save the game at the end of the month,
remove the invention that makes the mission impossible,
load,
wait until midnight,
save,
check the file if the mission you want was generated.
Repeat until you get the desired mission. Then add the invention back :)
« Last Edit: November 30, 2017, 10:28:14 pm by tkzv »