How to disable recruitment of faction units
Moderator: Forum Moderators
-
- Posts: 5
- Joined: July 3rd, 2020, 3:34 pm
How to disable recruitment of faction units
I've been playing this game for a long time and recently got into making my own maps. One of my maps was intended to be a survival challenge where you are surrounded by enemy leaders with way more resources than you. One of the leaders was a giant spider. In the scenario creator, I allowed the giant spider to recruit spiders ( and did the same for a couple other creatures, like slimes being able to recruit slimes). When I decided to try it out, I noticed that all of the creatures also recruited other units, units from the faction they were assigned at the start of the match. I have no idea how to disable this, but I am sure there is a way. In the map "the wilderlands" the black faction can not recruit any units, despite having a faction assigned to them. The only other way I can think of how this would be possible is if you use an addon that adds a faction that only contains an unaffordable unit (for example 20 000 gold), leading to the AI being forced to only recruit what you allowed it to recruit because it wouldn't be able to afford anything else (I hope I did not express myself in a too complicated manner here). Unfortunately, I have no idea how to code and will therefore not be able to create an addon with an unaffordable unit, which means the only option I have is hoping that someone knows how to prevent the recruiting of unwanted units and is willing to share this knowledge.
Sorry if this question has been asked before, but I searched for hours and did not find anything.
Sorry if this question has been asked before, but I searched for hours and did not find anything.
Re: How to disable recruitment of faction units
In
I don't know how to make the documentation easier to find, I can only answer so quickly because I had the same problem.
[side]
, specify faction=Custom
.I don't know how to make the documentation easier to find, I can only answer so quickly because I had the same problem.
Re: How to disable recruitment of faction units
In Wilderlands it is done by setting the recruit list to empty in a prestart event:
https://github.com/wesnoth/wesnoth/blob ... #L149-L152
https://github.com/wesnoth/wesnoth/blob ... #L149-L152
"If gameplay requires it, they can be made to live on Venus." -- scott
-
- Posts: 5
- Joined: July 3rd, 2020, 3:34 pm
Re: How to disable recruitment of faction units
Thanks a lot! Still going to take me a bit to figure out where exactly to change the lines and where the file is, but now I at least know what to do.
Re: How to disable recruitment of faction units
It helped me, thanks.
I used the code like that:
[event]
name=prestart
[set_recruit]
side=3
recruit=""
[/set_recruit]
[/event]
So i just needed to put the list i wanted later and boom, done. !
I used the code like that:
[event]
name=prestart
[set_recruit]
side=3
recruit=""
[/set_recruit]
[/event]
So i just needed to put the list i wanted later and boom, done. !