Search found 28 matches

by Nyanyanyan
October 5th, 2019, 8:50 pm
Forum: WML Workshop
Topic: Change control over side to AI and back mid turn
Replies: 9
Views: 217

Re: Change control over side to AI and back mid turn

gfgtdf wrote:
October 5th, 2019, 3:38 pm
the bugfix is pushed to master
Does that mean it's fixed in 1.15.x ?

And I'm not big on lua or AI parameters, so I don't think I can implement that workaround @celtic.
by Nyanyanyan
October 5th, 2019, 10:05 am
Forum: WML Workshop
Topic: Change control over side to AI and back mid turn
Replies: 9
Views: 217

Re: Change control over side to AI and back mid turn

Could this reverse feature possibly get you the result you're looking for? It wouldn't be ideal but I'd apprciate if you'd tell me how to do that. can you run (c++) source patches to test if we give you them? I don't think I have a compiler for c++ installed if that's needed but if you give me inst...
by Nyanyanyan
October 4th, 2019, 4:38 pm
Forum: WML Workshop
Topic: Change control over side to AI and back mid turn
Replies: 9
Views: 217

Change control over side to AI and back mid turn

For a mod I'd like to change the control over a player's side to the ai for the movement of some units and then back to the player. The first thing I thought of was simply switch the control of the side to controller=ai at the beginning of the turn and then give it over to the player once the AI is ...
by Nyanyanyan
August 3rd, 2019, 4:45 pm
Forum: WML Workshop
Topic: Default AI not attacking leaders if they're too strong.
Replies: 2
Views: 179

Re: Default AI not attacking leaders if they're too strong.

In order not to have the AI go berserk all the time while still attacking strong enemy leaders, I've made a small event which determines the aggression and caution variables of AI sides on every turn based on their vision of enemy leaders. It's very rudimentary but it does the job and I'm kind of li...
by Nyanyanyan
August 3rd, 2019, 8:46 am
Forum: WML Workshop
Topic: Default AI not attacking leaders if they're too strong.
Replies: 2
Views: 179

Default AI not attacking leaders if they're too strong.

Hi, I've encountered a problem in that AI units do not attack leaders if those leaders have too high resistances or attacks. I've tried reading into the AI wml, but I don't really see where I could change the evaluation criteria for leaders specifically. The simple solution would be to set aggressio...
by Nyanyanyan
August 3rd, 2019, 8:38 am
Forum: WML Workshop
Topic: Giving arrays variable names and values that are also variables
Replies: 5
Views: 424

Re: Giving arrays variable names and values that are also variables

There's a slider for the side number the rebels use during game setup (as you probably saw). The mod will kill all units of that side at the start of the match, so it's set to 99 to prevent killing an actual player. To fix your problem you can simply set this to a side number that actually exists (e...
by Nyanyanyan
April 16th, 2019, 9:59 pm
Forum: WML Workshop
Topic: Instructing AI
Replies: 1
Views: 247

Re: Instructing AI

This wiki page should give you all the information you need to start with: https://wiki.wesnoth.org/AiWML I'm not a big expert with ai, I only got into it because some of my units made it go haywire, but this was enough to troubleshoot the error. If you have anything concrete you want to do then I t...
by Nyanyanyan
April 16th, 2019, 9:39 pm
Forum: WML Workshop
Topic: Giving arrays variable names and values that are also variables
Replies: 5
Views: 424

Re: Giving arrays variable names and values that are also variables

You could do [value] x=$leaderdeadsidevillages[$i].x y=$leaderdeadsidevillages[$i].y leader=$newrebelleader [/value] Thanks a lot, after a lot of debugging I got it to work as intended. I uploaded the finished mod to the add-on server under "Revolution and Civil War" for anyone interested.
by Nyanyanyan
April 16th, 2019, 12:22 pm
Forum: WML Workshop
Topic: Giving arrays variable names and values that are also variables
Replies: 5
Views: 424

Re: Giving arrays variable names and values that are also variables

Upon further testing I found out that the values of the id variables themselves are the problem.
A generic id would be something like 'Drake Blademaster-5'. Neither the space nor the - are compatible with the syntax from what I'm seeing.
Does anyone know of a way to circumvent this?
by Nyanyanyan
April 16th, 2019, 12:01 pm
Forum: WML Workshop
Topic: Giving arrays variable names and values that are also variables
Replies: 5
Views: 424

Giving arrays variable names and values that are also variables

What I'm trying to do is making an array out of multiple variables, though for some reason using a variable as the name for the value in the array doesn't work and the game just saves the array as empty. What I did and which isn't working: {VARIABLE $newrebelleader "Id of the rebel leader"} [set_var...
by Nyanyanyan
April 16th, 2019, 9:27 am
Forum: WML Workshop
Topic: Way to match a group of units to a dying unit
Replies: 4
Views: 394

Re: Way to match a group of units to a dying unit

Thank you guys, that helped a lot. I wasn't aware of unit variables at all. I gave the rebel leader a variable corresponding to his previous side, gave the units for that leader a variable with a value that is his id and upon the death of any rebel leader I just filter all units with his id as a val...
by Nyanyanyan
April 14th, 2019, 10:33 pm
Forum: WML Workshop
Topic: Way to match a group of units to a dying unit
Replies: 4
Views: 394

Way to match a group of units to a dying unit

Hi, I'm trying to match a group of units to a specific leader, to switch them all over to another side once that specific leader dies. I tried this by giving every unit of that "batch" and their leader a status that's just a running number ($rebellionnumber, starting from 1001). Now I'm trying to ma...
by Nyanyanyan
April 13th, 2019, 1:29 pm
Forum: WML Workshop
Topic: Creating a side using Era or Modification
Replies: 6
Views: 444

Re: Creating a side using Era or Modification

Alright, thanks a lot for the quick response.
by Nyanyanyan
April 13th, 2019, 1:24 pm
Forum: WML Workshop
Topic: Creating a side using Era or Modification
Replies: 6
Views: 444

Re: Creating a side using Era or Modification

So pretty much the only way to make this work is putting the sides in a multiplayer scenario to begin with?