Hey all,
this is gonna be own little log of trial and error troubleshooting how to make events in 3k, eventually I may use all this to turn it into a tutorial, right now its serves as a pseudo tutorial for those wishing to jump in. Please feel free to help out along the way.
So far I am here
start_historical_mission_listener( "3k_main_faction_dong_zhuo", -- faction key
"3k_main_objective_dong_zhuo_01", -- mission key
"DESTROY_FACTION", -- objective type
{
"faction 3k_main_faction_sun_jian",
"faction 3k_main_faction_yuan_shu",
"faction 3k_main_faction_yuan_shao"
}, -- conditions (single string or table of strings)
{
"effect_bundle{bundle_key 3k_main_historical_mission_payload_03;turns 5;}"
}, -- mission rewards (table of strings)
"ScriptEventDongZhuoHistoricalMission01Trigger", -- trigger event
"ScriptEventDongZhuoHistoricalMission01Complete", -- completion event
function()
if not cm:query_faction("3k_main_faction_sun_jian"):is_dead() and not cm:query_faction("3k_main_faction_yuan_shu"):is_dead() and not cm:query_faction("3k_main_faction_yuan_shao"):is_dead() then
return true
end
end, -- precondition (nil, or a function that returns a boolean)
"ScriptEventDongZhuoHistoricalMission01Failure" -- failure event
)
However the stuff in red is what I can not for the life of me track down, its the bread and butter whats going on.
Ive looked around in the scripts and db files I cant find anything that would contain this..
my only guess is the :
event_feed_targeted_events_table
in the database.pack
however it appears PFM can not currently access it. So heres where Im stuck.
If anyone knows anything- please reach out.
----------------------------------------------
________________________________________
----------------------------------------------
looking at whats going on though from a coding standpoint it appears that
start_historical_mission_listener is a function that takes in :
(FactionKey,MissionKey,ObjectiveType, Conditions(string or table), EffectBundle, TriggerEvent, CompletionEvent, boolean, FailureEvent)
That makes perfect sense, except for Where this "start_historical_mission_listener " function/method is written? Probably we cant see it.
AND
Where exactly these "Trigger/Completion/Failure events" are
----------------------------------------------
________________________________________
----------------------------------------------
This led me to the local_en pack to see if I can find the text associated with the events,
so far
scripted_objectives.loc appears to only be for historical/tutorial battles
cdir_events_categories__.loc appears to just be random game text
cdir_events_dilemma_choice_details__.loc might be right, only seems to contain some intermediate flavor text, as in the text presented on the buttons you can select, and the text shown AFTER selecting your choices (outcome). Does not seem to contain the info presented in the initial event pop up itself, nor the "as it was told" bubbles, and other values such as outcomes associated with them, I.E char-killed Dong Zhou, or faction relations +20. etc etc
dilemmas__.loc contains the initial text such as the event name itself, and the flavor text explaining whats happening.
This leads me back to
database.pack to the dilemmas_table
----------------------------------------------
________________________________________
----------------------------------------------
dilemmas_table
the keys match the .loc entries, and i remember things be associated this way. For some reason the same text is present here despite being totally dependent on whats in the .loc not this table. The generate column seems to matter, but not sure exactly how.
Localized title appears to be the name of the Event pop up? another thing I cud dig for back in local_en, might once again be redundant info here.
Ui image, and prioritized make perfect sense, then the column of event category is interesting, The historical option vs the others intrigues me. Dont know how this is used by the game.
----------------------------------------------
________________________________________
----------------------------------------------
remembered that cdir_ is a prefece used by CA alot,
going there in database.pack leads to alot of events.
cdir_events_mission_payloads_tables
Odd that this doesnt contain the payload used from
"effect_bundle{bundle_key 3k_main_historical_mission_payload_03;turns 5;}"
there is no
3k_main_historical_mission_payload_03
maybe because its not a bundle?
cdir_events_incident_post_generation_condition_junctions_tables
has some very interesting relationships values i want to come back to
cdir_events_incident_payloads_tables
appears to have all the values associated with rewards and results of missions, the columns are greyed out, I cant edit them. im worried this is more redundant data like with the .locs and the actual rewards are calculated elsewhere.
Still no sign of the payload im searching for but is referenced here similarly.
cdir_events_incident_option_junctions_tables
Seems to actually control conditions,
has vals associates with the indecent, and option types,
for example:
no idea why giant space is here
1284171317
0
3k_main_historical_liu_xu_shu_joins_incident
CND_FIRST_ROUND
76
default
141041133
0
3k_main_historical_liu_xu_shu_joins_incident
GEN_TARGET_NONE
default
1648310753
0
3k_main_historical_liu_xu_shu_joins_incident
VAR_CHANCE
500
default
2068123040
0
3k_main_historical_liu_xu_shu_joins_incident
CND_CATEGORY_ROUNDS_TILL_NEXT
0
default
29970221
0
3k_main_historical_liu_xu_shu_joins_incident
CND_FACTION
3k_main_faction_liu_bei
default
86128377
0
3k_main_historical_liu_xu_shu_joins_incident
CND_LAST_ROUND
86
default
878746180
0
3k_main_historical_liu_xu_shu_joins_incident
CND_UNIQUE
default
997638339
0
3k_main_historical_liu_xu_shu_joins_incident
CND_INCIDENT_GENERATED
3k_main_historical_liu_water_mirror_pc_incident
default
Looks like XuShu event can occur between turn 76 and 86,
the chance is 500? out of what IDK. the last line 3k_main_historical_liu_water_mirror_pc_incident
seems to indicate it triggering another event, might be the name of the .loc stuff. OR it just generates another incident.? doesnt appear to be in this table.
for dong zhous its turn 7-9 and is linked to
3k_main_template_historical_dong_zhuo_hero_fire
this option key is of type
GEN_CND_CHARACTER_TEMPLATE
(?)
some sketchy tables in here,
cdir_events_dilemma_post_generation_condition_juntions_tables
is red, but I can view it, seems to be about char relation events.
cdir_events_dilemma_payloads_tables
cant be accessed, PFM gets an error, seems like a very important table.
cdir_events_dilemma_option_junctions_tables
seems to be missing alot of historical events, for example cant find the dongzhou plot one as discovered above, but has other.
cdir_events_dilemma_followup_dilemmas_tables
seems to be able to follow up other events, might be easier to chain things if u want them to happen 100%. only used for a few things currently IG.
cdir_events_dilemma_choice_details_tables
seems to have links to the choices, and the traits required to access, however! its all greyed out, directly related to .loc
So its odd that some historicals are missing from certain tables?
such as
3k_main_historical_dong_chain_plot_npc_01_incident
a full list of these events appears to be seen under the database.pack/incidents.
having assembly kit would make tracking the dependencies down so much easier from here