Spawn Refugee's when village raided.

Users who are viewing this thread


I've seen this done on other mods. I'd like to add a feature like this to my own personal mod.. Did the forum search for code just hadn't tracked it down yet.. Any help on the code or a link to similar code would be of help. :smile:

Ideally I'd like to as a rebel noblemen take advantage of other kingdoms village raiding and offer fleeing villagers and refugee a place in my party. As an entry point into a player faction only troop tree. I would probably code some sort of limit to stop me or my forces from being able to deliberately spawn more fleeing villager/refugee from places I choice to raid.  :mrgreen:


Master Knight
I'm just messing with the script "process_village_raids" atm. I think you can add a script calling (and a script) or just a few lines of code when raid process get to 100% (village is raided). Have some condition check to rule out raider is player or raiding party it main_party. Then , just spawn refugees round the village.
Start from:
              (gt, ":village_raid_progress", 100),
              (str_store_party_name_link, s1, ":village_no"),
              (party_stack_get_troop_id, ":raid_leader", ":looter_party", 0),
              (ge, ":raid_leader", 0),
              (str_store_party_name, s2, ":looter_party"),
              (display_log_message, "@The village of {s1} has been looted by {s2}."),
Top Bottom