Search found 21 matches

by Nyanyanyan
April 16th, 2019, 9:59 pm
Forum: WML Workshop
Topic: Instructing AI
Replies: 1
Views: 155

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: 4
Views: 214

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: 4
Views: 214

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: 4
Views: 214

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: 226

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: 226

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: 250

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: 250

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?
by Nyanyanyan
April 13th, 2019, 12:44 pm
Forum: WML Workshop
Topic: Creating a side using Era or Modification
Replies: 6
Views: 250

Creating a side using Era or Modification

Hello there, I'd like to write a rebellion system to either implement in my Era or as a standalone modification. When a leader is killed, instead of losing it's win condition, I intent to make two units of that faction into leaders, put one of them in a different (ai controlled) side and randomly as...
by Nyanyanyan
January 18th, 2019, 4:52 pm
Forum: WML Workshop
Topic: Make AI not prioritize certain unit for attacks
Replies: 8
Views: 766

Re: Make AI not prioritize certain unit for attacks

Upon reading and trying a lot of what you guys wrote I tried setting the unit parameters in a way that units couldn't possibly want to attack my unit, with a huge healthpool and no useful abilities whatsoever, but they still attacked it like mad. I did some trial and error and found out that the rea...
by Nyanyanyan
January 17th, 2019, 2:05 pm
Forum: WML Workshop
Topic: Make AI not prioritize certain unit for attacks
Replies: 8
Views: 766

Make AI not prioritize certain unit for attacks

Hi, I made an ability that lets a unit respawn at the location of one of the other units of it's faction upon death. I worked out most of the kinks, but one problem I still have is that the AI seems to 100% prioritize the unit with this ability. This leads to the AI basically being locked into attac...
by Nyanyanyan
November 4th, 2018, 7:47 pm
Forum: WML Workshop
Topic: Slow Experimental AI with custom Era, likely caused by WML abilities
Replies: 3
Views: 3962

Re: Slow Experimental AI with custom Era, likely caused by WML abilities

Instead, the consequences are not looked at all, any event basically means that AI calculation is quite inaccurate. Exception would be if you used those 500 lines within predefined weapon special filters. I guess I'll do some tests to see if the experimental AI is also very slow on a clean installa...
by Nyanyanyan
October 29th, 2018, 4:21 pm
Forum: WML Workshop
Topic: Slow Experimental AI with custom Era, likely caused by WML abilities
Replies: 3
Views: 3962

Slow Experimental AI with custom Era, likely caused by WML abilities

Hallo everyone, I've made a multiplayer Era and whenever I use Experimental AI with that Era (particularly with a certain unit which has an ability that calls for an event on every attacker hit in every fight with a unit of it's faction as attacker which contains over 500 lines of WML code) the AI t...
by Nyanyanyan
October 25th, 2018, 5:33 pm
Forum: WML Workshop
Topic: Problem with FOREACH and/or [unit] tag in event.
Replies: 3
Views: 1224

Re: Problem with FOREACH and/or [unit] tag in event.

Thanks, that did the trick.
by Nyanyanyan
October 25th, 2018, 3:39 am
Forum: WML Workshop
Topic: Problem with FOREACH and/or [unit] tag in event.
Replies: 3
Views: 1224

Problem with FOREACH and/or [unit] tag in event.

Hi again. I'm trying to make an ability that spawns a goblin every time a turn starts while the unit with the ability is standing next to another goblin. It works fine as long as there is only one unit with said ability, but if there are multiple units with that ability, all the goblins will spawn f...