Good afternoon.
I am attempting to write and publish a Mod that fixes a significantly annoying bug in the "Game of Thrones" Mod, and after spending two days and many hours trying to fix it, I have finally given up and will be presenting the code here in hopes that someone has the time to aid me.
The code referenced is as follows:
I cannot upload the full Error Logs because it keeps saying my Compressed Zipped Folder is empty. Instead, you can find them at this link. It expires in thirty days.
Thank you for any assistance you may render.
Deus Vult,
-TURTLESHROOM
I am attempting to write and publish a Mod that fixes a significantly annoying bug in the "Game of Thrones" Mod, and after spending two days and many hours trying to fix it, I have finally given up and will be presenting the code here in hopes that someone has the time to aid me.
The code referenced is as follows:
After my attempt at an On-Action failed, I decided to enact the bug fix through a Decision. For testing purposes, I can fire it at any time, but this will be removed in the end.
Code:
decisions = {
TSP_aztec_stark_bug_fix_decision = {
potential = {
OR = {
AND = {
has_landed_title = e_mexikha
dynasty = 59 # House Stark
}
primary_title = e_mexikha
ai = no # So TS can see it as he performs debugging
has_character_flag = descendant_of_brandon_the_shipwright
}
has_global_flag = aztec_arrival
NOT = {
has_global_flag = the_authors_should_have_fixed_the_aztec_bug_themselves
has_global_flag = it_is_more_likely_than_you_think
has_global_flag = aztec_stark_bug_fix_forced
}
}
allow = {
custom_tooltip = { text = TSP_IS_AZTEC_STARK }
OR = {
has_character_flag = descendant_of_brandon_the_shipwright
AND = {
has_landed_title = e_mexikha
dynasty = 59 # House Stark
}
}
war = no
}
effect = {
set_global_flag = aztec_stark_bug_fix_forced
custom_tooltip = { text = TSP_X_IN_MY_Y }
e_mexikha = {
holder_scope = {
character_event = {
id = TSPaztecfix.1
}
}
}
}
ai_will_do = {
factor = 1
}
}
}
Below is the Event chain. Events two and three are supposed to Ping the newly generated wife of the Aztec Stark, but when I click the Option in the first Event, the game immediately crashes.
Code:
#####################################################
# TURTLESHROOM PRODUCTIONS PROUDLY PRESENTS #
# STARK-LED AZTECS?! IN _MY_ WESTOROS?! #
#####################################################
namespace = TSPaztecfix
character_event = {
# Basic event information
id = TSPaztecfix.1
desc = TSP_X_IN_MY_Y
# hide_window = yes
is_triggered_only = yes # Called by Decision
# trigger = {
# Event eligibility condition block
#
# primary_title = e_mexikha
# has_character_flag = descendant_of_brandon_the_shipwright
# is_married = no
# NOT = { has_global_flag = it_is_more_likely_than_you_think } # Beginning global flag
# NOT = { has_global_flag = wenches_love_starks } # Fired once wife is spawned
# NOT = { has_global_flag = the_authors_should_have_fixed_the_aztec_bug_themselves } # Ending global flag, fail safe in case the first is screwed up
# }
option = { # Fix bug by forcing union
name = TSP_X_IN_MY_Y_2
#Option A command block
set_global_flag = it_is_more_likely_than_you_think
create_random_soldier = {
age = 23
name = "Georgina"
health = 20
fertility = 999
female = yes
culture = nahuatl
race = nahuatl
dynasty = culture
historical = yes
trait = zealous
flag = i_should_get_the_wench_a_stark
}
new_character = {
add_spouse = ROOT
add_lover = ROOT
add_friend = ROOT
remove_trait = weak
remove_trait = inbred
remove_trait = honorable
remove_trait = feeble
remove_trait = ugly
remove_trait = hunchback
remove_trait = craven
add_trait = strong
add_trait = fair
add_trait = lustful
# save_event_target_as = aztec_momma
}
PREV = { save_event_target_as = aztec_momma }
ROOT = { spouse = { save_event_target_as = aztec_momma } }
fertility = 999
health = 20
add_trait = lustful
remove_trait = weak
remove_trait = inbred
remove_trait = honorable
remove_trait = feeble
remove_trait = ugly
remove_trait = hunchback
remove_trait = craven
set_global_flag = wenches_love_starks # Marks this event as finished, for debugging purposes when I go back and look to see what I screwed up
set_character_flag = aztec_stark
aztec = { set_men_can_take_consorts = yes }
ROOT = { character_event = { id = TSPaztecfix.2 } } # Start the Ping process to call the mother
}
}
# Initial event that fires for character A
# ROOT is character A
character_event = {
id = TSPaztecfix.2
desc = TSP_X_IN_MY_Y
hide_window = yes
is_triggered_only = yes
immediate = {
spouse = { # must always have an option
# Character B
character_event = { id = TSPaztecfix.3 } # This is the Ping event
}
}
option = {
name = TSP_X_IN_MY_Y
}
}
# Ping event
# ROOT is character B
# FROM is character A
character_event = {
id = TSPaztecfix.3
desc = TSP_X_IN_MY_Y
hide_window = yes # description and portrait don't matter if it's hidden!
is_triggered_only = yes
immediate = {
FROM = { # Back to Character A
character_event = { id = TSPaztecfix.3 } # Mother has been called as FROM, father is ready as FROMFROM or ROOT
}
}
option = { # must always have an option
name = TSP_X_IN_MY_Y
}
}
# ROOT is character A
# FROM is character B
# Note: FROMFROM is character A
# To call the Aztec Emperor, use ROOT or FROMFROM
# To call the Aztec Empress, use FROM
character_event = {
id = TSPaztecfix.4
desc = TSP_X_IN_MY_Y
hide_window = yes
is_triggered_only = yes # Spawned from first Event
option = { # Spawn child, attempt to set mother
name = TSP_X_IN_MY_Y
# Option A command block
set_global_flag = it_is_more_likely_than_you_think
create_character = {
age = 6 # Don't think too much about it
name = "Brandon"
health = 10
female = no
culture = nahuatl
race = nahuatl
genetic_father = ROOT
genetic_mother = ROOT # Not because he's the mother, but to make his face look like his father despite being Nahua
dynasty = 59 # House Stark
historical = yes
}
new_character = {
set_father = ROOT
set_real_father = ROOT
set_mother = FROM
health = 10
fertility = 20
}
# First child down
# Begin second child
create_character = {
age = 5 # Don't think too much about it
health = 10
female = no
culture = nahuatl
race = nahuatl
genetic_father = ROOT
genetic_mother = FROM
dynasty = 59 # House Stark
historical = yes
}
new_character = {
set_father = ROOT
set_real_father = ROOT
set_mother = FROM
health = 10
fertility = 20
}
# Second child down
# Begin third child
create_character = {
age = 4 # Don't think too much about it
health = 10
female = no
culture = nahuatl
race = nahuatl
genetic_father = ROOT
genetic_mother = FROM
dynasty = 59 # House Stark
historical = yes
}
new_character = {
set_father = ROOT
set_real_father = ROOT
set_mother = FROM
health = 10
fertility = 20
}
# Third child down
# Begin fourth child
create_character = {
age = 4 # Don't think too much about it
health = 10
female = random
culture = nahuatl
race = nahuatl
genetic_father = ROOT
genetic_mother = FROM
dynasty = 59 # House Stark
historical = yes
}
new_character = {
set_father = ROOT
set_real_father = ROOT
set_mother = FROM
health = 10
fertility = 20
}
# Fourth child down
# Begin fifth child
create_character = {
age = 3 # Don't think too much about it
health = 10
female = yes
culture = nahuatl
race = nahuatl
genetic_father = ROOT
genetic_mother = FROM
dynasty = 59 # House Stark
historical = yes
}
new_character = {
set_father = ROOT
set_real_father = ROOT
set_mother = FROM
health = 10
fertility = 20
}
# Fifth child down
# Begin sixth child
create_character = {
age = 2 # Don't think too much about it
health = 10
female = random
culture = nahuatl
race = nahuatl
genetic_father = ROOT
genetic_mother = FROM
dynasty = 59 # House Stark
historical = yes
}
new_character = {
set_father = ROOT
set_real_father = ROOT
set_mother = FROM
health = 10
fertility = 20
}
# Sixth child down
# Begin final child
create_character = {
age = 4 # Don't think too much about it
health = 10
female = random
culture = nahuatl
race = nahuatl
genetic_father = ROOT
genetic_mother = FROM
dynasty = 59 # House Stark
historical = yes
}
new_character = {
set_father = ROOT
set_real_father = ROOT
set_mother = FROM
health = 10
fertility = 20
}
# End child spawning
set_global_flag = the_authors_should_have_fixed_the_aztec_bug_themselves # Ending global flag, fail safe in case the first is screwed up
# FIN
}
}
character_event = { # Removes global flags, this Event should never fire unless invoked by cheat codes
id = TSPaztecfix.5
desc = TSP_X_IN_MY_Y
# hide_window = yes
is_triggered_only = yes
option = {
name = TSP_X_IN_MY_Y_2
clr_global_flag = it_is_more_likely_than_you_think
clr_global_flag = the_authors_should_have_fixed_the_aztec_bug_themselves
clr_global_flag = wenches_love_starks
clr_global_flag = aztec_stark_bug_fix_forced
}
}
Below are issues the game found with my Mod.
Code:
[eventmanager.cpp:255]: Event #1600001 has no picture scripted in events/TSP_aztec_stark_fix.txt
[eventmanager.cpp:255]: Event #1600005 has no picture scripted in events/TSP_aztec_stark_fix.txt
[trigger.cpp:2123]: Unknown trigger-type: "allow" at file: decisions/TSP_aztec_stark_bug_fix_decisions.txt line: 20
[trigger.cpp:2123]: Unknown trigger-type: "effect" at file: decisions/TSP_aztec_stark_bug_fix_decisions.txt line: 31
[trigger.cpp:2123]: Unknown trigger-type: "ai_will_do" at file: decisions/TSP_aztec_stark_bug_fix_decisions.txt line: 42
I cannot upload the full Error Logs because it keeps saying my Compressed Zipped Folder is empty. Instead, you can find them at this link. It expires in thirty days.
Thank you for any assistance you may render.
Deus Vult,
-TURTLESHROOM