From b981a8fcc90a8ce5f3e774eb77f9a6ecc8022532 Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Sat, 26 Apr 2025 20:12:03 +0200 Subject: [PATCH 1/3] only pick sortie nodes from sortieTilesets --- src/services/worldStateService.ts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/services/worldStateService.ts b/src/services/worldStateService.ts index db251d41..9184d494 100644 --- a/src/services/worldStateService.ts +++ b/src/services/worldStateService.ts @@ -273,14 +273,7 @@ const pushSortieIfRelevant = (worldState: IWorldState, day: number): void => { if ( sortieFactionToSystemIndexes[sortieBossToFaction[boss]].includes(value.systemIndex) && sortieFactionToFactionIndexes[sortieBossToFaction[boss]].includes(value.factionIndex!) && - !isArchwingMission(value) && - value.missionIndex != 0 && // Exclude MT_ASSASSINATION - value.missionIndex != 10 && // Exclude MT_PVP (for relays) - value.missionIndex != 21 && // Exclude MT_PURIFY - value.missionIndex != 22 && // Exclude MT_ARENA - value.missionIndex != 23 && // Exclude MT_JUNCTION - (value.missionIndex != 28 || value.systemIndex == 2) && // MT_LANDSCAPE only on Earth - value.missionIndex < 29 + key in sortieTilesets ) { if (!availableMissionIndexes.includes(value.missionIndex)) { availableMissionIndexes.push(value.missionIndex); -- 2.47.2 From adcd090a5412a440556894f00c3b46d14f4dae70 Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Sat, 26 Apr 2025 20:12:51 +0200 Subject: [PATCH 2/3] ensure FC_OROKIN sortie does not pick a bad mission type --- src/services/worldStateService.ts | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/src/services/worldStateService.ts b/src/services/worldStateService.ts index 9184d494..f3da8c92 100644 --- a/src/services/worldStateService.ts +++ b/src/services/worldStateService.ts @@ -50,21 +50,21 @@ const sortieBossToFaction: Record = { SORTIE_BOSS_PHORID: "FC_INFESTATION", SORTIE_BOSS_LEPHANTIS: "FC_INFESTATION", SORTIE_BOSS_INFALAD: "FC_INFESTATION", - SORTIE_BOSS_CORRUPTED_VOR: "FC_CORRUPTED" + SORTIE_BOSS_CORRUPTED_VOR: "FC_OROKIN" }; const sortieFactionToSystemIndexes: Record = { FC_GRINEER: [0, 2, 3, 5, 6, 9, 11, 18], FC_CORPUS: [1, 4, 7, 8, 12, 15], FC_INFESTATION: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 15], - FC_CORRUPTED: [14] + FC_OROKIN: [14] }; const sortieFactionToFactionIndexes: Record = { FC_GRINEER: [0], FC_CORPUS: [1], FC_INFESTATION: [0, 1, 2], - FC_CORRUPTED: [3] + FC_OROKIN: [3] }; const sortieBossNode: Record = { @@ -282,6 +282,16 @@ const pushSortieIfRelevant = (worldState: IWorldState, day: number): void => { } } + if (sortieBossToFaction[boss] == "FC_OROKIN") { + const orokinDisallowedMissionTypes = [1, 2, 5, 9]; + for (const missionType of orokinDisallowedMissionTypes) { + const i = availableMissionIndexes.indexOf(missionType); + if (i != -1) { + availableMissionIndexes.splice(i, 1); + } + } + } + const selectedNodes: ISortieMission[] = []; const missionTypes = new Set(); @@ -290,11 +300,7 @@ const pushSortieIfRelevant = (worldState: IWorldState, day: number): void => { const node = nodes[randomIndex]; let missionIndex = ExportRegions[node].missionIndex; - if ( - !["SolNode404", "SolNode411"].includes(node) && // for some reason the game doesn't like missionType changes for these missions - missionIndex != 28 && - rng.randomInt(0, 2) == 2 - ) { + if (missionIndex != 28) { missionIndex = rng.randomElement(availableMissionIndexes); } -- 2.47.2 From 1abc74cab3adc9bee4eba509b35c33da485b18d2 Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Sat, 26 Apr 2025 20:41:10 +0200 Subject: [PATCH 3/3] fix an issue with seed 41449 (SORTIE_BOSS_KRIL) --- src/services/worldStateService.ts | 33 ++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/src/services/worldStateService.ts b/src/services/worldStateService.ts index f3da8c92..757f809f 100644 --- a/src/services/worldStateService.ts +++ b/src/services/worldStateService.ts @@ -67,6 +67,12 @@ const sortieFactionToFactionIndexes: Record = { FC_OROKIN: [3] }; +const sortieFactionToSpecialMissionTileset: Record = { + FC_GRINEER: "GrineerGalleonTileset", + FC_CORPUS: "CorpusShipTileset", + FC_INFESTATION: "CorpusShipTileset" +}; + const sortieBossNode: Record = { SORTIE_BOSS_HYENA: "SolNode127", SORTIE_BOSS_KELA: "SolNode193", @@ -282,9 +288,9 @@ const pushSortieIfRelevant = (worldState: IWorldState, day: number): void => { } } - if (sortieBossToFaction[boss] == "FC_OROKIN") { - const orokinDisallowedMissionTypes = [1, 2, 5, 9]; - for (const missionType of orokinDisallowedMissionTypes) { + const specialMissionTypes = [1, 3, 5, 9]; + if (!(sortieBossToFaction[boss] in sortieFactionToSpecialMissionTileset)) { + for (const missionType of specialMissionTypes) { const i = availableMissionIndexes.indexOf(missionType); if (i != -1) { availableMissionIndexes.splice(i, 1); @@ -296,13 +302,22 @@ const pushSortieIfRelevant = (worldState: IWorldState, day: number): void => { const missionTypes = new Set(); for (let i = 0; i < 3; i++) { - const randomIndex = rng.randomInt(0, nodes.length - 1); - const node = nodes[randomIndex]; - let missionIndex = ExportRegions[node].missionIndex; + let randomIndex; + let node; + let missionIndex; + do { + randomIndex = rng.randomInt(0, nodes.length - 1); + node = nodes[randomIndex]; - if (missionIndex != 28) { - missionIndex = rng.randomElement(availableMissionIndexes); - } + missionIndex = ExportRegions[node].missionIndex; + if (missionIndex != 28) { + missionIndex = rng.randomElement(availableMissionIndexes); + } + } while ( + specialMissionTypes.indexOf(missionIndex) != -1 && + sortieTilesets[node as keyof typeof sortieTilesets] != + sortieFactionToSpecialMissionTileset[sortieBossToFaction[boss]] + ); if (i == 2 && rng.randomInt(0, 2) == 2) { const filteredModifiers = modifiers.filter(mod => mod !== "SORTIE_MODIFIER_MELEE_ONLY"); -- 2.47.2