Posted October 23, 2016 Is there a mod or maybe a setting I missed where I can set the maximum amount of spirit templars? I thought I had seen something like that but I guess due to old age I can not seem to remember where or exactly what I was read about it. Share this post Link to post Share on other sites
Posted October 25, 2016 You might have seen my mod (fix guards) that un-borks a database error that leads to infinitely spawning spirit templars/shadows. It doesn't affect the normal game limits, and i don't think there's a mod for that right now. What do you want to limit and how? Share this post Link to post Share on other sites
Posted October 25, 2016 Ah sorry, what I mean is to set the maximum limit a settlement may hire. Right now with current settings. It is 20 templars and they really are not needed. I would like to set it to a lower max limit for the whole server. 3 Share this post Link to post Share on other sites
Posted February 2, 2017 (edited) A solution to limit the templars would be very awesome. Each week i jump from deed to deed to look how much templars are hired on the new deeds. I have a limit in the rules (max 10) but as we all know, not all players are reading rules and thats why i find often deeds with 30,40 templars. Its very hard than for my team to look for the mayors to reduce the templars. Eject Edited February 2, 2017 by Eject Share this post Link to post Share on other sites
Posted February 3, 2017 You can set max value in com/wurmonline/server/villages/GuardPlan.class - maxGuards = 1; But only new deeds will not be able to set the number of guards more than max. Fix for old deeds: int maxguards = 1; Village[] villages = Villages.getVillages(); for (int i = 0; i < villages.length; i++) { int gnumber = villages[i].plan.getNumHiredGuards(); if (gnumber > maxguards) { villages[i].plan.updateGuardPlan(villages[i].plan.type, villages[i].plan.moneyLeft, maxguards); Guard[] guards = villages[i].getGuards(); if(guards.length > maxguards) for (int i2 = 0; i2 < guards.length - maxguards; i2++) { if (guards[i2].getCreature() != null) guards[i2].getCreature().destroy(); } } } 2 Share this post Link to post Share on other sites
Posted April 6, 2017 (edited) On 2/3/2017 at 6:00 AM, Scadouge said: You can set max value in com/wurmonline/server/villages/GuardPlan.class - maxGuards = 1; But only new deeds will not be able to set the number of guards more than max. Fix for old deeds: int maxguards = 1; Village[] villages = Villages.getVillages(); for (int i = 0; i < villages.length; i++) { int gnumber = villages[i].plan.getNumHiredGuards(); if (gnumber > maxguards) { villages[i].plan.updateGuardPlan(villages[i].plan.type, villages[i].plan.moneyLeft, maxguards); Guard[] guards = villages[i].getGuards(); if(guards.length > maxguards) for (int i2 = 0; i2 < guards.length - maxguards; i2++) { if (guards[i2].getCreature() != null) guards[i2].getCreature().destroy(); } } } Where would I add this in the class file? I was able to easily change the number of guards for new deeds(tested fine) but the old deed fix I cannot get to compile. Edit: Got it to compile, but, It still does not properly work in game to remove the templars. I am guessing I did not place it in the code correctly still Edited April 7, 2017 by Governor Share this post Link to post Share on other sites
Posted April 13, 2017 have you tested it with a new deed? Share this post Link to post Share on other sites
Posted April 13, 2017 (edited) 15 hours ago, Eject said: have you tested it with a new deed? yes The new limit works fine, it just will not get rid of the excess templar's from existing deeds with more than the set amount Edited April 13, 2017 by Governor Share this post Link to post Share on other sites
Posted April 16, 2017 (edited) In wurmzones.db / Guardplan are the spirit templars stored, maybe you can fix that manual Edited April 16, 2017 by Eject Share this post Link to post Share on other sites
Posted March 2, 2018 I dont have any village file in the folder.. Share this post Link to post Share on other sites
Posted July 25, 2018 @GovernorAny chance you can share this as a mod? I'd love to be able to configure a limit too. Share this post Link to post Share on other sites