Stellaris

Stellaris

Vanilla Fixes
 此主题已被置顶,因此可能具有重要性
Harain  [开发者] 2023 年 7 月 31 日 下午 2:13
List of Fixes
Vanilla Fixes v3.11.1

I like my error log empty and usually fix these errors in our mods every time i catch one.
Got tired of fixing the same errors in every mod and decided to make a mod just for this.

Safe to use with any mod as long as this mod is the first in the playlist

All changes from vanilla are marked with "# vfix"
some line numbers in the list below might not match vanilla, because I had to add lines for most fixes, and because of files changing through vanilla updates

# v3.11.1
Stellaris 3.11.1 compatibility
most of these fixes have been added to vanilla (go Paradox!)
FIXED in 3.11.1: 1.2, 1.3, 1.4, 1.5, 1.6, 1.11, 1.12, 1.13, 1.15, 1.17, 1.19, 1.22 (2 of them since i messed up the count...), 1.24, 1.25, 1.26, 3.1, 3.4, 3.5, 4.2, 6.2
Maybe fixed: 10.5
Removed duplicate 1.14

# v3.10.4
Stellaris 3.10.4 compatibility
FIXED in 3.10.3: 4.4

# v3.10.3
Stellaris 3.10.3 compatibility
1.1.6 - Fix for "Script Error: Invalid context switch [owner] from [leader], file: gfx/portraits/asset_selectors/human_female_01_hair.txt line: 312" (plus 374 and 418)
1.27 - Fix for "Error in create_message effect file: events/on_action_events_2.txt line: 3712 (and 3724), target scope is invalid" - missing trigger = { exists = from } in case target has been destroyed in the meantime

# v3.10.2b
fixed my own error -.-

# v3.10.2a
4.4 - Fix CTD caused by vanilla 3.10 bug when a country is destroyed while involved in multiple wars

# v3.10.2
Stellaris 3.10.2 compatibility

# v3.10.1
Stellaris 3.10.1 compatibility

# v3.10.0b
1.26 - Fix for "Script Error: Invalid context switch [owner] from Aradian [planet], file: common/deposits/01_blocker_deposits.txt line: 1327, Scope: type=planet"
3.5 - Fix for "Script Error: Invalid context switch [leader] from Banshee [fleet], file: events/ancient_relics_site_spawn_event.txt line: 81, Scope: type=fleet"

# v3.10.0a
1.25 - Fix for "Unknown promotion `global_event_country` in text: global_event_country.GetCommunityOrImperium(or GetGalCommunityOrGalImperium)..."

# v3.10.0
Stellaris 3.10.0 compatibility
FIXED in 3.10.0: 1.3

# v3.9.3a
1.24 - Fix for "Script Error, Checking trigger against an unsupported scope! Event: necroids.25 Location: file: events/necroids_events_1.txt line: 793 Trigger Type: is_archetype "

# v3.9.3 update
Stellaris 3.9.3 compatibility

# v3.9.2 update
Stellaris 3.9.2 compatibility

# v3.9.1 update
Stellaris 3.9.1 compatibility
Changed mod version to match vanilla
FIXED in 3.9: 1.10, 3.3, 4.1 and 4.3

# v1.0.5 update
1.21 - Fix for "Failed to pick an event sound from among the available options for event first_contact.15 (defaulting to first on list)"
this shouldn't be needed with vanilla, but with mods that add species where if none match these, you get this error in log
not sure how this fix will behave though:
- it can either pick the 1st valid sound and ignore the rest (as it should)
- or it can behave like an event option that picks a random valid option...
either way, error will be gone and at worst you get a wrong sound in an event
1.22 - Fix for "Undefined event target: dimensional_horror_country" - events\leviathans_events_2.txt (line 4022)

#####
1. Minor errors that don't break anything but throw an error in log (most just needed an exists):
1.1 - portraits error log fixes (most files in this folder need a few exists = owner, but I'm only adding those I actually get errors from):
1.1.1 - \gfx\portraits\asset_selectors\new_human_female_01_hair.txt (lines 224, 266 and 308)
1.1.2 - \gfx\portraits\asset_selectors\new_human_female_clothes_01.txt (lines 35 to 41 and 51)
1.1.3 - \gfx\portraits\asset_selectors\new_human_male_01_hair.txt (lines 585, 699 and 812)
1.1.4 - \gfx\portraits\asset_selectors\new_human_male_clothes_01.txt (lines 45 to 51)
1.1.5 - \gfx\portraits\asset_selectors\test.txt (lines 35 to 40)
1.1.6 - Fix for "Script Error: Invalid context switch [owner] from [leader], file: gfx/portraits/asset_selectors/human_female_01_hair.txt line: 312" (plus 374 and 418)
1.2 FIXED in 3.11.1 - Fix for "Unknown promotion `Owner` in text: Owner.GetCrimeDeviancy" - \common\colony_automation_categories\00_categories.txt (line 21)
1.3 FIXED in 3.10.0 - Fix for "Invalid context switch [planet] from Pop on [pop]" - \common\pop_jobs\02_specialist_jobs.txt (line 99)
1.4 FIXED in 3.11.1 - Fix for "Script error, is_same_empire: 'event_target:ratling_country' is invalid at" - \common\diplo_phrases\00_diplo_phrases_01.txt (lines 8653, 8663, 8673, 8762, 8773, 8783 and 8793)
1.5 FIXED in 3.11.1 - Fix for "Script Error: Invalid context switch [mining_station] from Trapped Asteroid [planet]" - \events\anomaly_events_4.txt (lines 2945 and 2968)
1.6 FIXED in 3.11.1 - Fix for "Invalid context switch [solar_system] from [fleet]" - most common vanilla error fyi - \events\pre_ftl_awareness_events.txt (line 41)
1.7 - Fix for "Invalid context switch [leader]" in standard_archaeological_site_on_roll_failed - \events\archaeology_event_effects.txt (line 88)
1.8 - removed log for: "country1 has encountered country2 (country type: whatever) but has neither communications with them nor an active First Contact site to do so" - \events\on_action_events_2.txt (line 2035)
1.9 - Fix for "Invalid context switch [solar_system] from CNS Emissary [ship], file: events/country_events_1.txt line: 3773"
1.10 FIXED in 3.9 - Fix for "Invalid context switch [leader] from [fleet], file: events/overlord_enclaves_events.txt line: 4542" (lines 4514 and 4537)
1.11 FIXED in 3.11.1 - Fix for "Empty adjective form for country """ - also added the country name, which is not really needed, but doesn't hurt (lines 425 and 426)
1.12 FIXED in 3.11.1 - Fix for "Invalid context switch [owner] from [planet], file: common/districts/04_ringworld_districts.txt line: 589"
1.13 FIXED in 3.11.1 - Fix for "Invalid context switch [planet] from Pop on [pop], file: common/pop_jobs/03_worker_jobs.txt line: 26" (lines 26, 45 and 73)
1.14 - removed - duplicate of 1.1.6
1.15 FIXED in 3.11.1 - Fix for "Invalid context switch [solar_system] from [fleet], file: in scripted trigger is_merc_enclave_founding_allowed" - common\scripted_triggers\00_scripted_triggers_overlord.txt (lines 157 and 170)
1.16 - Fix for error from adding opinion modifier to self - events\on_action_events_1.txt (line 7317)
1.17 FIXED in 3.11.1 - Fix for "Triggered Event leviathans.594 has no valid options!" - events\leviathans_events_1.txt (lines 6774 to 6780) - commented part of the 2nd options' trigger, since it only runs for AI and isn't really needed (and was throwing this error)
1.18 - Fix for several "join_war_on_side: Country 'x' [65] is already at war against war participant 'y' [251658271]: file: scripted effect declare_crisis_war_effect at file: common/resolutions/01_resolutions_nemesis.txt line: 156 line: 1" - common\scripted_effects\00_scripted_effects.txt (line 4612) - happening cause of vassals not having to be added to war
1.19 FIXED in 3.11.1 - Fix for several errors for missing "location = event_target:marauder_system" in marauder.5 in events/marauder_events.txt (line 298)
1.20 - Fix for "Unknown promotion `system` in text: system.GetName star." - localisation\english\situations_l_english.yml (line 809)
1.21 - Fix for "Failed to pick an event sound from among the available options for event first_contact.15 (defaulting to first on list)"
this shouldn't be needed with vanilla, but with mods that add species where if none match these, you get this error in log
not sure how this fix will behave though:
- it can either pick the 1st valid sound and ignore the rest (as it should)
- or it can behave like an event option that picks a random valid option...
either way, error will be gone and at worst you get a wrong sound in an event
1.22 FIXED in 3.11.1 - Fix for "Undefined event target: dimensional_horror_country" - events\leviathans_events_2.txt (line 4022)
1.22 FIXED in 3.11.1 - Fix for "Script Error: Invalid context switch [owner] from Pop on [pop], file: common/pop_jobs/03_worker_jobs.txt line: 141" (also 148)
1.23 - Fix for "set_fleet_stance effect is trying to set a stance that is not supported by this fleet. file: events/colony_events_1.txt line: 4122" - added correct code 5 lines before this
1.24 FIXED in 3.11.1 - Fix for "Script Error, Checking trigger against an unsupported scope! Event: necroids.25 Location: file: events/necroids_events_1.txt line: 793 Trigger Type: is_archetype "
1.25 FIXED in 3.11.1 - Fix for "Unknown promotion `global_event_country` in text: global_event_country.GetCommunityOrImperium(or GetGalCommunityOrGalImperium)..." - 112 occurrences in 9 localization files, too many to list, but a simple search for "[event_target:global_event_country" will return all of them. Had to add the event_target: part to remove the error, even though an event target shouldn't need it in a localization, but since it's been known to happen more often than not, I got in the habit of always adding the event_target: part in my mods. PDS might want to investigate WHY this is happening, since it should work without.
1.26 FIXED in 3.11.1 - Fix for "Script Error: Invalid context switch [owner] from Aradian [planet], file: common/deposits/01_blocker_deposits.txt line: 1327, Scope: type=planet" - missing "exists = owner" in the second if block
1.27 - Fix for "Error in create_message effect file: events/on_action_events_2.txt line: 3712 (and 3724), target scope is invalid" - missing trigger = { exists = from } in case target has been destroyed in the meantime
####

2. Minor errors that break localizations and throw an error in log (the changes in loc files need to be done in other languages also):
2.1 - GetPreFTLLowerPlural called in wrong scope - \localisation\english\observation_events_l_english.yml (might need to double check them since I'm not 100% sure the new scope is the one intended)
2.2 - Fix for "Unknown promotion `event_envoy` in text: event_envoy.GetName]! is removed from our leader pool." - events\envoy_events.txt (line 3618)
2.3 - Fix for envoy killed (envoy_events.230) still triggering espionage.1 - events\nemesis_espionage_events.txt (line 25)
2.4 - Fix for "Unknown property `GetPlanetMoon` in text: GetPlanetMoon]'s native civilization." - localisation\english\projects_l_english.yml (line 216) - probably an oversight - also, 'From' seems to be the wrong scope, should be event_target:pre_ftl_planet, but I'll leave that to Paradox, since actually fixing content is beyond the scope of this mod, just fixing errors in log
####

3. More serious errors that might cause things to not run correctly. I just removed the cause of the error (missing exists), but Paradox should check WHY it's happening (why it doesn't exist):
3.1 FIXED in 3.11.1 - Fix for "Invalid context switch [solar_system] from [ship], file: events/precursor_events.txt line: 2051"
3.2 - Fix for "create_half_species effect at file: events/caravaneer_events.txt line: 4842 failed to create species" - (lines 4842 and 4882)
3.3 FIXED in 3.9 - Fix for "Trying to remove undefined event target: spawn_point_legendary_leader" (events\paragon_events_3.txt lines 1768 and 1806)
3.4 FIXED in 3.11.1 - Fix for missing event_target:exercise_neighbor in diplomatic.1000 event in events\diplomatic_events_2.txt - was causing a cascade of errors in log - Fix in line 48 'might' fix it, but since not 100% sure, added a trigger for option a (line 111) - also commented out an unneeded AND just because...
3.5 FIXED in 3.11.1 - Fix for "Script Error: Invalid context switch [leader] from Banshee [fleet], file: events/ancient_relics_site_spawn_event.txt line: 81, Scope: type=fleet" - missing "exists = leader", leader was dead at this point somehow, leading to a massive cascade of errors, and causing the deposit not to spawn properly (still won't with fix)
####

4. Errors that break things:
4.1 FIXED in 3.9 - events called in wrong scope - events\marauder_events.txt (lines 3974 and 4004)
4.2 FIXED in 3.11.1 - site clues added in wrong scope - events\arcsite_random_events.txt (lines 111 and 144)
4.3 FIXED in 3.9 - was preventing a pre_ftl situation from starting - events\first_contact_dlc_situation_events.txt (lines 79 and 83)
4.4 FIXED in 3.10.3 - Fix CTD caused by vanilla 3.10 bug when a country is destroyed while involved in multiple wars
####

5. GUI errors - missing elements that throw errors - added them as hidden, PDX should check where they should actually appear, and if they aren't needed, make sure they don't throw an error:
5.1 - Fix for "interface/diplomacy_view.gui: Could not find icon "ai_acceptance_icon" in window "diplomacy_tab"." - \interface\diplomacy_view.gui
####

6. Minor changes that aren't actually fixes, but fix something that wasn't working as intended:
6.1 - events\megastructure_events_1.txt: changed the target of MEGASTRUCTURE_BUILT and MESSAGE_MEGASTRUCTURE_UPGRADED to the system (fromfrom) because the megastructure itself (from) wasn't doing anything
6.2 FIXED in 3.11.1 - events\on_action_events_2.txt: changed the target of ALIEN_MEGASTRUCTURE_BUILT to the system (fromfrom) because the megastructure itself (from) wasn't doing anything

10. Errors I can't fix without changing vanilla functionalities (or just don't know how):
10.1 - "Conflicting of Possible/Allowed triggers with Destroy trigger for buildable `Gene Clinics` during AI evaluation" - started happening in 3.8 - can't be fixed without changing functionality of destroy_trigger
10.2 - "Conflicting of Possible/Allowed triggers with Destroy trigger for buildable `Precinct Houses` during AI evaluation" - started happening in 3.8 - this can't be fixed without removing the special AI trigger for destroy_trigger
10.3 - "[22:56:08][effect_impl_country.cpp:471]: Script error, restore_country_backup_data effect at file: common/specialist_subject_perks/00_specialist_subject_perks.txt line: 511: Cannot restore country data of Ikaanan Trade Association [12] because no such data has been stored!." - somewhere the backup data is not being saved, this is the 2nd most common error atm
10.4- set of 3 errors that appear often and always together - valid_curators_intel_trade_target seems perfectly coded and I don't understand why these errors are thrown...
- Undefined event target: curator_customer_1, location: file: in scripted trigger valid_curators_intel_trade_target at file: events/leviathans_events_1.txt line: 4576 line: 1
- Undefined event target: curator_customer_2, location: file: in scripted trigger valid_curators_intel_trade_target at file: events/leviathans_events_1.txt line: 4576 line: 1
- Undefined event target: curator_customer_3, location: file: in scripted trigger valid_curators_intel_trade_target at file: events/leviathans_events_1.txt line: 4576 line: 1
10.5 - "Invalid context switch [branch_office_owner] from [planet], file: common/buildings/07_amenity_buildings.txt line: 907" - line will always throw an error if there's no branch office in the planet
10.6 - "Conflicting of Possible/Allowed triggers with Destroy trigger for buildable `Gaia Seeders - Final Phase` during AI evaluation"
10.7 - "Unknown promotion `Owner` in text: Owner.GetAlloyProducerPlural] working in these foundries produce high-quality alloys." - don't know how to fix this one since it's inside a localization and doesn't actually get called from somewhere I could add an exists. Only solution would be to change the scripted loc to include the exists and call it without the owner reference, checking it inside the scripted loc
最后由 Harain 编辑于; 2024 年 2 月 27 日 上午 4:11
< >
正在显示第 1 - 2 条,共 2 条留言
Cephalon Sithalo 2023 年 8 月 1 日 下午 1:45 
I dont understand why Paradox and other developers dont use things like this.

Sure sometimes the thing might be a little complex like Skyrims Vanilla Fixes but this looks rather simple.

It should take one developer just a single day (maybe 2) of comparing mistakes in code to the fixed codes and making sure that the code is just correct and then just use it to fix them by default.

I fixed some misplaced turrets early on and idk when they fixed them but they did. But not all of them. The Arthropoid Battleship Broadside Bow still has a misplaced small turret. They fixed the Fungoid and the Mammalian turret placements but for some reason they hadnt fixed this one still.

My code is still up, I think I offered it on the forum years ago. It would be a simple copy paste and it would be fixed. But no.
Harain  [开发者] 2023 年 8 月 1 日 下午 2:53 
i know the feel, and half of these fixes have been reported on forums, but well.

My ultimate goal is for this to be used by Paradox, but until then, at least the error log is cleaner =)
< >
正在显示第 1 - 2 条,共 2 条留言
每页显示数: 1530 50