Dead faction bug (cannot make alliances)
I'm modifying some files of Tsardoms Total War (Fall of Constantinople 1.5) and solving some bugs and adding some features, I also translated the mod to spanish.
The thing is that I was trying to solve this know bug, but I had tried everything, and cannot solve it. So I will really apreciate some help with this, cause in Tsardoms the diplomacy it's quite important.
I'm looking for a script that allow me to have neutral relations with dead factions, basically.
here's one of the many codes that I have tried:
Code:
monitor_event FactionTurnEnd FactionType slave
;21. Ferrara
if I_CompareCounter ferrara_killed = 1
console_command diplomatic_stance ferrara croatia neutral
console_command diplomatic_stance ferrara hungary neutral
console_command diplomatic_stance ferrara bosnia neutral
console_command diplomatic_stance ferrara ragusa neutral
console_command diplomatic_stance ferrara serbia neutral
console_command diplomatic_stance ferrara albania neutral
console_command diplomatic_stance ferrara wallachia neutral
console_command diplomatic_stance ferrara moldova neutral
console_command diplomatic_stance ferrara kiev neutral
console_command diplomatic_stance ferrara tatars neutral
console_command diplomatic_stance ferrara byzantium neutral
console_command diplomatic_stance ferrara athens neutral
console_command diplomatic_stance ferrara rhodes neutral
console_command diplomatic_stance ferrara ottoman neutral
console_command diplomatic_stance ferrara aydin neutral
console_command diplomatic_stance ferrara karaman neutral
console_command diplomatic_stance ferrara poland neutral
console_command diplomatic_stance ferrara genoa neutral
console_command diplomatic_stance ferrara milan neutral
console_command diplomatic_stance ferrara venice neutral
console_command diplomatic_stance ferrara florence neutral
console_command diplomatic_stance ferrara trinacria neutral
console_command diplomatic_stance ferrara bohemia neutral
console_command diplomatic_stance ferrara austria neutral
console_command diplomatic_stance ferrara bavaria neutral
console_command diplomatic_stance ferrara switzerland neutral
console_command diplomatic_stance ferrara wurttemberg neutral
console_command diplomatic_stance ferrara papal_states neutral
console_command diplomatic_stance ferrara france neutral
end_if
end_monitor
...
declare_counter ferrara_killed
monitor_event FactionTurnStart FactionType slave
if I_NumberOfSettlements ferrara < 1 and I_CompareCounter ferrara_killed = 0
set_counter ferrara_killed 1
end_if
end_monitor
Also tried this:
Code:
monitor_event FactionTurnEnd FactionType slave
;21. Ferrara
if I_NumberOfSettlements ferrara < 1
console_command diplomatic_stance ferrara croatia Neutral
console_command diplomatic_stance ferrara hungary Neutral
console_command diplomatic_stance ferrara bosnia Neutral
console_command diplomatic_stance ferrara ragusa Neutral
console_command diplomatic_stance ferrara serbia Neutral
console_command diplomatic_stance ferrara albania Neutral
console_command diplomatic_stance ferrara wallachia Neutral
console_command diplomatic_stance ferrara moldova Neutral
console_command diplomatic_stance ferrara kiev Neutral
console_command diplomatic_stance ferrara tatars Neutral
console_command diplomatic_stance ferrara byzantium Neutral
console_command diplomatic_stance ferrara athens Neutral
console_command diplomatic_stance ferrara rhodes Neutral
console_command diplomatic_stance ferrara ottoman Neutral
console_command diplomatic_stance ferrara aydin Neutral
console_command diplomatic_stance ferrara karaman Neutral
console_command diplomatic_stance ferrara poland Neutral
console_command diplomatic_stance ferrara genoa Neutral
console_command diplomatic_stance ferrara milan Neutral
console_command diplomatic_stance ferrara venice Neutral
console_command diplomatic_stance ferrara florence Neutral
console_command diplomatic_stance ferrara trinacria Neutral
console_command diplomatic_stance ferrara bohemia Neutral
console_command diplomatic_stance ferrara austria Neutral
console_command diplomatic_stance ferrara bavaria Neutral
console_command diplomatic_stance ferrara switzerland Neutral
console_command diplomatic_stance ferrara wurttemberg Neutral
console_command diplomatic_stance ferrara papal_states Neutral
console_command diplomatic_stance ferrara france Neutral
end_if
end_monitor
aaand this (this one should work particulary if i'm with a specific faction):
Code:
monitor_event FactionTurnEnd FactionType slave
;20. Milan
if I_LocalFaction milan
if I_NumberOfSettlements croatia < 1
console_command diplomatic_stance milan croatia Neutral
end_if
if I_NumberOfSettlements poland < 1
console_command diplomatic_stance milan poland Neutral
end_if
if I_NumberOfSettlements bosnia < 1
console_command diplomatic_stance milan bosnia Neutral
end_if
if I_NumberOfSettlements ragusa < 1
console_command diplomatic_stance milan ragusa Neutral
end_if
if I_NumberOfSettlements serbia < 1
console_command diplomatic_stance milan serbia Neutral
end_if
if I_NumberOfSettlements albania < 1
console_command diplomatic_stance milan albania Neutral
end_if
if I_NumberOfSettlements wallachia < 1
console_command diplomatic_stance milan wallachia Neutral
end_if
if I_NumberOfSettlements moldova < 1
console_command diplomatic_stance milan moldova Neutral
end_if
if I_NumberOfSettlements kiev < 1
console_command diplomatic_stance milan kiev Neutral
end_if
if I_NumberOfSettlements tatars < 1
console_command diplomatic_stance milan tatars Neutral
end_if
if I_NumberOfSettlements byzantium < 1
console_command diplomatic_stance milan byzantium Neutral
end_if
if I_NumberOfSettlements athens < 1
console_command diplomatic_stance milan athens Neutral
end_if
if I_NumberOfSettlements rhodes < 1
console_command diplomatic_stance milan rhodes Neutral
end_if
if I_NumberOfSettlements ottoman < 1
console_command diplomatic_stance milan ottoman Neutral
end_if
if I_NumberOfSettlements aydin < 1
console_command diplomatic_stance milan aydin Neutral
end_if
if I_NumberOfSettlements karaman < 1
console_command diplomatic_stance milan karaman Neutral
end_if
if I_NumberOfSettlements venice < 1
console_command diplomatic_stance milan venice Neutral
end_if
if I_NumberOfSettlements genoa < 1
console_command diplomatic_stance milan genoa Neutral
end_if
if I_NumberOfSettlements hungary < 1
console_command diplomatic_stance milan hungary Neutral
end_if
if I_NumberOfSettlements ferrara < 1
console_command diplomatic_stance milan ferrara Neutral
end_if
if I_NumberOfSettlements florence < 1
console_command diplomatic_stance milan florence Neutral
end_if
if I_NumberOfSettlements trinacria < 1
console_command diplomatic_stance milan trinacria Neutral
end_if
if I_NumberOfSettlements bohemia < 1
console_command diplomatic_stance milan bohemia Neutral
end_if
if I_NumberOfSettlements austria < 1
console_command diplomatic_stance milan austria Neutral
end_if
if I_NumberOfSettlements bavaria < 1
console_command diplomatic_stance milan bavaria Neutral
end_if
if I_NumberOfSettlements switzerland < 1
console_command diplomatic_stance milan switzerland Neutral
end_if
if I_NumberOfSettlements wurttemberg < 1
console_command diplomatic_stance milan wurttemberg Neutral
end_if
if I_NumberOfSettlements papal_states < 1
console_command diplomatic_stance milan papal_states Neutral
end_if
if I_NumberOfSettlements france < 1
console_command diplomatic_stance milan france Neutral
end_if
end_if
monitor_end
The game don't crash, but when I try to make alliance with Austria (one of his allies), the option doesn't apear. I'm quite frustrated. Please help
Re: Dead faction bug (cannot make alliances)
The second monitor will work best in general provided the dead faction cannot horde. It's however 'neutral' in lower caps.
And it will require a new campaign to be applied.
Re: Dead faction bug (cannot make alliances)
I will try again, but again, it doesn't work. I use the command surrender_regions ferrara for delete the faction quickly, but I don't that that is the problem.
Anyway, it's important where the code lines are?
Oh, I have to say that France in this mod it's a horde Faction, maybe that's the reason?
Re: Dead faction bug (cannot make alliances)
France - that might cause an issue as they obliviously can have zero settlements. It can however be circumvented by creating a hidden faction leader trait for the faction leader (BecomesFactionLeader event and as descr_strat character trait) and then check if that trait exists, it does however require an additional monitor:
Code:
; --- dead horde faction (france)
monitor_event FactionTurnEnd FactionType france
and FactionLeaderTrait HordeLeader < 1
;20. Milan
if I_LocalFaction milan
if I_NumberOfSettlements france < 1
console_command diplomatic_stance milan france Neutral
end_if
end_if
end_monitor
To test if any monitor works I would suggest to add a valid historic_event line underneath the console command.
Re: Dead faction bug (cannot make alliances)
I didn't try this with France, cause the main problem is that normal factions doesn't work.
Re: Dead faction bug (cannot make alliances)
Oh, I meant to test the second monitor of yours with a historic_event line to see if it actually works. Or use this monitor:
Code:
monitor_event FactionTurnEnd FactionType slave
and I_NumberOfSettlements ferrera < 1
console_command diplomatic_stance milan ferrera Neutral
historic_event [insert event name from text\historic_events]
terminate_monitor
end_monitor
All you have to do is to play as Milan and then kill the ferrera faction. After that you should get the historic event displayed and the relations are neutral.
Re: Dead faction bug (cannot make alliances)
Oh boy, maybe it's because I deleted by mistake the and? When I arrive home I will test your lines. Thanks for awnser.
Re: Dead faction bug (cannot make alliances)
If this magically works, it's posible to use just one monitor_event or I will have to do one for each faction?
Re: Dead faction bug (cannot make alliances)
Sorry for the multi post, I can't edit the messages for some reason (maybe because the account is new).
The code that you provided doesn't work. I attacked ferrara to enter war, then, used surrender regions and make peace with venice (because we were at war), and waited to the next turn. But nothing happened. I still can't form an alliance. :(
Re: Dead faction bug (cannot make alliances)
I am starting to wonder if you can change relation ships with dead factions..
I'll have to test myself it seems.
Re: Dead faction bug (cannot make alliances)
YOU ARE NOT GIGANTUS, YOU'RE OUR PROMETEUS, GIGACHAD. I found the mistake. I was using my translation campaing_script file, which has the same file structure as the mod. So I copy-pasted the code to the mod and it worked!!!! Thank you very much!! It's a shame that this bug doesn't have its own thread created by you, cause there are a lot of mods that doesnt have this bug fix.