2 leaders, 1 side
Moderator: Forum Moderators
Forum rules
- Please use [code] BBCode tags in your posts for embedding WML snippets.
- To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
2 leaders, 1 side
Hello Forum,
I had a full description post written along some solutions; got disturbed; came back; submitted and lost all since I got logged out.
So, to briefly resume...
I can have an AI side with 2 leaders on 2 different keep/castle, The problem is: the second leader don't recruit until the first leader dies.
Any *elegant* way to circumvent this so both "leaders" recruit on their respective keep? (imagine a 8p coop game with only 1 slot left for AI)
So far, I have imagined an "[event] recruit" switching leaders so they can each recruit, but if a leader gets his castle full, the other wont be switched to recruit. An other ugly solution would be to take the AI by the hand, scripting manually it's recruits within WML.
Another more basic occurrence of the problem appears when AI don't fully recruit even with a single leader.
I hope I made my problem clear enough so WML and AI experts can either bring suggestions or points toward some working code.
Have a nice day,
Natasiel.
I had a full description post written along some solutions; got disturbed; came back; submitted and lost all since I got logged out.
So, to briefly resume...
I can have an AI side with 2 leaders on 2 different keep/castle, The problem is: the second leader don't recruit until the first leader dies.
Any *elegant* way to circumvent this so both "leaders" recruit on their respective keep? (imagine a 8p coop game with only 1 slot left for AI)
So far, I have imagined an "[event] recruit" switching leaders so they can each recruit, but if a leader gets his castle full, the other wont be switched to recruit. An other ugly solution would be to take the AI by the hand, scripting manually it's recruits within WML.
Another more basic occurrence of the problem appears when AI don't fully recruit even with a single leader.
I hope I made my problem clear enough so WML and AI experts can either bring suggestions or points toward some working code.
Have a nice day,
Natasiel.
-
- Posts: 1549
- Joined: June 18th, 2009, 1:45 am
Re: 2 leaders, 1 side
The wiki says it's not possible at the moment, but it probably can be done somehow through some Lua I guess.
For now just use two sides.
For now just use two sides.
Last edited by monochromatic on January 7th, 2011, 3:12 pm, edited 1 time in total.
Re: 2 leaders, 1 side
@elvish_sovereign:
The problem is that he has 8 human controlled sides, so there's only one slot left for an AI side...
Crend
The problem is that he has 8 human controlled sides, so there's only one slot left for an AI side...
Crend
UMC Story Images — Story images for your campaign!
Re: 2 leaders, 1 side
The last time I checked you can have more than 9 sides just fine, you just can't have more than 9 starting locations on the map.Crendgrim wrote:@elvish_sovereign:
The problem is that he has 8 human controlled sides, so there's only one slot left for an AI side...
Re: 2 leaders, 1 side
Which could be undone with some .map file modification (IIRC).zookeeper wrote:The last time I checked you can have more than 9 sides just fine, you just can't have more than 9 starting locations on the map.Crendgrim wrote:@elvish_sovereign:
The problem is that he has 8 human controlled sides, so there's only one slot left for an AI side...
Formerly known as the creator of Era of Chaos and maintainer of The Aragwaithi and the Era of Myths.
Re: 2 leaders, 1 side
If it's a multiplayer add-on this won't work. The 1.8 server doesn't allow more than nine sides no matter how many are AI. Not sure if this has been "fixed" in trunk.zookeeper wrote:The last time I checked you can have more than 9 sides just fine, you just can't have more than 9 starting locations on the map.Crendgrim wrote:@elvish_sovereign:
The problem is that he has 8 human controlled sides, so there's only one slot left for an AI side...
Re: 2 leaders, 1 side
No problems dealing within the 9 starting locations boundary if more than 9 sides are available. Though, multiplayer is required. If 1.8 isn't enough, I'll try to get 1.9 and use it as test bed; anyway 1.10 should be out before the scenario is completed.
Thank you for your suggestions, this is already something interesting to try.
[edit after testing]
It works when playing locally, but as mentioned by Gambit, 1.8 MP server complains:
"<Server> This server does not support games with more than 9 sides."
I'll try later with trunk and post the results.
Thank you for your suggestions, this is already something interesting to try.
[edit after testing]
It works when playing locally, but as mentioned by Gambit, 1.8 MP server complains:
"<Server> This server does not support games with more than 9 sides."
I'll try later with trunk and post the results.
Last edited by Natasiel on January 7th, 2011, 4:45 pm, edited 1 time in total.
Re: 2 leaders, 1 side
If this is really the case, then the Wiki should be updated... there it's said that MP scenarios with more than 9 sides won't start: SideWMLzookeeper wrote:The last time I checked you can have more than 9 sides just fine, you just can't have more than 9 starting locations on the map.Crendgrim wrote:@elvish_sovereign:
The problem is that he has 8 human controlled sides, so there's only one slot left for an AI side...
Crend
UMC Story Images — Story images for your campaign!
Re: 2 leaders, 1 side
Wiki is outdated, check out the code in the Legend of Wesmere campaign(singleplayer) - two leaders, same side, tried it on 1.8 and it's there working, but note that it concerns the player side, no idea how it would work for ai..hmm..*runs off to LoW to droid side 1*
edit: experiment result - AI gets confused and doesn't recruit on the other keep
I'm thinking of a little cheaty way of an event that fires off when the ai finishes its turn..that switches the leaders and somehow cancels the turn ending/gives it back to the same AI
edit: experiment result - AI gets confused and doesn't recruit on the other keep
I'm thinking of a little cheaty way of an event that fires off when the ai finishes its turn..that switches the leaders and somehow cancels the turn ending/gives it back to the same AI
Like cats? I've made a whole faction of them to kick ass with!
Don't like cats? I've made a whole faction of them to kick their asses! So everyone's happy :)
Felinian faction is part of the Beyond Southern Hells era
kitties need sprites! art topic here
Don't like cats? I've made a whole faction of them to kick their asses! So everyone's happy :)
Felinian faction is part of the Beyond Southern Hells era
kitties need sprites! art topic here
Re: 2 leaders, 1 side
Right, I didn't realize it was different in MP.Natasiel wrote:[edit after testing]
It works when playing locally, but as mentioned by Gambit, 1.8 MP server complains:
"<Server> This server does not support games with more than 9 sides."
I'll try later with trunk and post the results.
A workaround you could try is to switch the leader, instead of having two at a time during the recruiting phase. For starters you could try switching the leader between every recruit: when leader 1 recruits a unit, set canrecruit=no for it and set canrecruit=yes for leader 2, and when leader 2 recruits a unit, do the same the other way around. Or only switch when the currently recruiting leader's castle is full and the other leader's castle still has room.
Re: 2 leaders, 1 side
Have a look at Galuldurs journey. In the last scenario side 1 has two leaders. It is the user made campaign I am recommending in my signiture.
My Temple Project: http://forums.wesnoth.org/viewtopic.php?f=23&t=29800
This is "must-play" campaign! Don´t read the thread, unless you need help. http://forums.wesnoth.org/viewtopic.php?f=8&t=31895
This is "must-play" campaign! Don´t read the thread, unless you need help. http://forums.wesnoth.org/viewtopic.php?f=8&t=31895
-
- Posts: 1549
- Joined: June 18th, 2009, 1:45 am
Re: 2 leaders, 1 side
Sure, look at LoW as well, but the AI can't handle two leaders properly.Tet wrote:Have a look at Galuldurs journey. In the last scenario side 1 has two leaders. It is the user made campaign I am recommending in my signiture.
Re: 2 leaders, 1 side
Ups it is for a computer player?
I would consider an event thing after the first leader is disposed. Like a second leader appears. It is more a work around. You could have a leader in waiting with an overlay. But I think having a leader replaced whern he died maybe even at a diffrent location would be quit a surprise.
I would consider an event thing after the first leader is disposed. Like a second leader appears. It is more a work around. You could have a leader in waiting with an overlay. But I think having a leader replaced whern he died maybe even at a diffrent location would be quit a surprise.
My Temple Project: http://forums.wesnoth.org/viewtopic.php?f=23&t=29800
This is "must-play" campaign! Don´t read the thread, unless you need help. http://forums.wesnoth.org/viewtopic.php?f=8&t=31895
This is "must-play" campaign! Don´t read the thread, unless you need help. http://forums.wesnoth.org/viewtopic.php?f=8&t=31895
Re: 2 leaders, 1 side
I'll try to fix this for 1.9/trunk; for earlier versions, use the already mentioned workarounds.
Re: 2 leaders, 1 side
Weekend investigations showed that 9 sides is still the maximum on trunk's server.
For a starter, switching between recruits works funnily, as predicted, when you block castle's hex to prevent an AI from recruiting, the other AI keeps his castle empty too. Maybe an additional "leader switch" on "[event] moveto" could further skirmish the problem.
Allowing 2 leaders that way was harder than seems on first sight. To keep the swapping around endless leaders, role and canrecruit has been used. But then, everybody has to get back to his canrecruit status and get back his golden crown to act as leaders on player's turn.
On an other approach (of course I tried many =) I've been perusing through the mechanism of the AI. My poor RCA AI attempt has been a failure on 1.8 and it has been wiped out before I realized that 1.9 would have been a better candidate to try on. I have also met the archaic fai, but that's an other story.
Let's hope to loose side ceiling before players discover and exploit the glitch. Anyway, swapping on recruit just works. While players might have been pissed off by such a behavior, AI can live with it just fine.
For a starter, switching between recruits works funnily, as predicted, when you block castle's hex to prevent an AI from recruiting, the other AI keeps his castle empty too. Maybe an additional "leader switch" on "[event] moveto" could further skirmish the problem.
Allowing 2 leaders that way was harder than seems on first sight. To keep the swapping around endless leaders, role and canrecruit has been used. But then, everybody has to get back to his canrecruit status and get back his golden crown to act as leaders on player's turn.
On an other approach (of course I tried many =) I've been perusing through the mechanism of the AI. My poor RCA AI attempt has been a failure on 1.8 and it has been wiped out before I realized that 1.9 would have been a better candidate to try on. I have also met the archaic fai, but that's an other story.
Let's hope to loose side ceiling before players discover and exploit the glitch. Anyway, swapping on recruit just works. While players might have been pissed off by such a behavior, AI can live with it just fine.