Hi everyone, new CK2 modder here, working on a quite ambitious project. Hope I'll be able to tell you more about it later.
For now I have two questions:
1. I have an event that I want to happen when a character has looted (as in Viking raider looting) a settlement. I've tried "on_settlement_looted", but it doesn't fire. I've also tried "on_loot_settlement", both declaring it as a single event ={ } or inside the random_event = { }, replacing the default 250 = 0 with 250 = [my_event_id], neither work. But when I use "on_navy_returns_with_loot" or the one when a revolt happens, it does fire. Since the event sends a letter_event to the player character, I should see it fire no matter in which scope it does...
Since I don't have the DLC, I'm wondering if it's possible that some on_actions will only trigger they are present? "on_loot_settlement" is only used for ToG events, so maybe there's a lock in the game code? What else could it be?
2. I have some very powerful special units that are supposed to be present in very small groups and controlled by the AI. But from my tests, it looks like the AI keeps retreating them when enemy units approach, even when they could normally win the fight easily. Does the AI only compare levy sizes? I've tried giving the AI player a trait with a very bad ai_rationality, but I never got it to use these units to attack anything, unless there were some allies with them. Is there a way to influence the way they'll behave? I haven't seen any command that would allow me to move them manually either. I guess I could destroy them, move the leader to a neighboring province then spawn a new unit to simulate the movement, but I'd rather have them behave as any other unit...
I'll probably have many other questions as I progress in my mod, the modding seems extremely easy and powerful at first, but when you try to get things done, the lack of documentation quickly shows... By the way, bonus question: do I really have to restart the whole game everytime I want to change one value in one of my txt files?
Thanks in advance!