Mod : Advanced Wesnoth Wars

Discussion of all aspects of multiplayer development: unit balancing, map development, server development, and so forth.

Moderators: Forum Moderators, Developers

User avatar
Ruvaak
Posts: 36
Joined: February 3rd, 2019, 2:53 pm

Re: Mod : Advanced Wesnoth Wars

Post by Ruvaak » April 4th, 2019, 6:30 pm

Hello Hammerfritz !

I just checked the code, and it was because the attacks special was cumulative = true.

I changed it with cumulative = false, and it seems to works. Check the 13.0 I just released. Tell me if still have the issue (or you spot others)


I don't really understand why, but with "No Random Combats" enabled, it works well, that why I didn't see the issue (lot of combinations of options to test...)
I will figure a way to deal with a multiplier instead of an absolute value and keep the effect cumulative (to combine properly with others special attacks), but wesnoth round down strikes, and I want a rounding on 0.5 (that why I used an absolute value instead of multiplier) to not get the same problem as "swarm" where an unit lose a strikes if it miss a single HP.


About how it was designed :

The code is in mods\01_02_duel.cfg and lua\aww_duel.lua - search for "get_new_strikes_number(" and special_strikes_value("


The "squad mode" is about reducing the "strikes" of units, related to its own HP.
In "swarm" mode, I just apply "swarm mode" on each unit so the game deal with that native feature (I just put a minimum of 1 strikes)

For the "custom" mode, I just put a temporary weapon effect to change the numbers of strikes, the time of the attack, and then when attack end I delete the weapon special.
HOWEVER, to balance a little more the things, if an unit have only 1 base strike (ex : dwarf gunners), I reduce the damage related to HP ratio, instead (only in Custom mode for now).

The "attack damage" are reduced also if the 1st feature is enabled "No Random Combats" (attack don't miss, so terrain / specials bonus related to miss ratio is instead of applied has damage ratio).


To help understanding the calculations, you can enabled my "developer mode"
By creating an empty file named aww.dev in the data/addons (of you user directory where there is the downloaded addon, not the core wesnoth).
Then when you create a game, you will see a last "Verbosity" option in Advanced Wesnoth Wars option. Enable it. It will display messages when you attack.

If you don't delete the aww.dev file, the lua scripts will be loaded externally. It's nice for tests (you can change a lua file, and just reload a save to see the changes, instead of having to recreate a game), but don't do that for playing a real campaign or multiplayer against humans, it also can create issues on your saved game when you update the addon. delete the aww.dev file once you finished your tests.
Last edited by Ruvaak on April 4th, 2019, 7:37 pm, edited 2 times in total.
Creator of Advanced Wesnoth Wars mod

User avatar
Hammerfritz
Posts: 21
Joined: September 1st, 2016, 10:09 pm

Re: Mod : Advanced Wesnoth Wars

Post by Hammerfritz » April 4th, 2019, 7:11 pm

Hi again!
I changed it with cumulative = false, and it seems to works. Check the 13.0 I just released. Tell me if still have the issue (or you spot others)
I tried it, works smoothly and doesn't even have the issue I thought it had at 12.4 =)
HOWEVER, to balance a little more the things, if an unit have only 1 base strike (ex : dwarf gunners), I reduce the damage related to HP ratio, instead (only in Custom mode for now)
Have you seen the snippet I edited into my last post? Maybe that could help with adding that feature to the swarm version. Also applies to units that have more than 1 base strike, but were reduced to having just one. Hope it's not way too bloaty though xD

Also, thanks for explaining, I'll try to look behind the scenes a bit more later.
Byes!
In general, speaking is a free action that you can perform even when it isn’t your turn.

(Wizards of the Coast: Dungeons and Dragons Player's Handbook)

User avatar
Ruvaak
Posts: 36
Joined: February 3rd, 2019, 2:53 pm

Re: Mod : Advanced Wesnoth Wars

Post by Ruvaak » April 4th, 2019, 7:41 pm

Hammerfritz wrote:
April 4th, 2019, 7:11 pm
Have you seen the snippet I edited into my last post? Maybe that could help with adding that feature to the swarm version. Also applies to units that have more than 1 base strike, but were reduced to having just one. Hope it's not way too bloaty though xD
Yep, it's a good idea. I wil check that this weekend if I find time ^^ . I didn't know how to get the base weapon strikes (And i didn't wanted to reduce damage didn't had initially 1 strike).
Creator of Advanced Wesnoth Wars mod

Spirit_of_Currents
Posts: 75
Joined: April 26th, 2014, 4:44 pm

Re: Mod : Advanced Wesnoth Wars

Post by Spirit_of_Currents » April 6th, 2019, 2:38 pm

Feature suggestion: you can choose your units' traits. Good with No Random Combat!
There are very much electrical currents in my brain.

User avatar
Ruvaak
Posts: 36
Joined: February 3rd, 2019, 2:53 pm

Re: Mod : Advanced Wesnoth Wars

Post by Ruvaak » April 7th, 2019, 2:42 pm

Yep, it's a good suggestion. I already thought about that, and then, first it's boring to code (interactive menu in wml or lua... uff), it can also be boring and break the rythm to always have to choose on every recruit. And in the end, keeping some randomness for minor things (things that you will know before a combats) it's not that bad. One of my features in fact use randomness : Level-up AMLA random bonus, and I find this more fun than having to choose it.
Creator of Advanced Wesnoth Wars mod

User avatar
Ruvaak
Posts: 36
Joined: February 3rd, 2019, 2:53 pm

Re: Mod : Advanced Wesnoth Wars

Post by Ruvaak » April 13th, 2019, 12:17 pm

@Hammerfritz I quickly tried you WML code and did a 0 damage on all units :(
in the end I did the reduced damage for single-strikes on swarm mode the same way I did it in Custom mode, in LUA scripts. Because making a loop on each attack in WML in incredibely slow ^^
Creator of Advanced Wesnoth Wars mod

User avatar
Hammerfritz
Posts: 21
Joined: September 1st, 2016, 10:09 pm

Re: Mod : Advanced Wesnoth Wars

Post by Hammerfritz » April 15th, 2019, 2:23 pm

did a 0 damage on all units :(
Oh my...It still works for me, but since you found a better solution anyway, there's probably no purpose to exploring that :D I just quickly tested your latest version it and it works great. However....I'm somehow back to "No Random Combats" being always enabled in both custom and swarm mode (despite not being indicated as turned on by lua message at game start).

Greez,
Hammerfritz
In general, speaking is a free action that you can perform even when it isn’t your turn.

(Wizards of the Coast: Dungeons and Dragons Player's Handbook)

User avatar
Ruvaak
Posts: 36
Joined: February 3rd, 2019, 2:53 pm

Re: Mod : Advanced Wesnoth Wars

Post by Ruvaak » April 15th, 2019, 3:04 pm

Thanks, I will look at this ^^
Creator of Advanced Wesnoth Wars mod

User avatar
Ruvaak
Posts: 36
Joined: February 3rd, 2019, 2:53 pm

Re: Mod : Advanced Wesnoth Wars

Post by Ruvaak » April 15th, 2019, 10:42 pm

Hammerfritz wrote:
April 15th, 2019, 2:23 pm
However....I'm somehow back to "No Random Combats" being always enabled in both custom and swarm mode (despite not being indicated as turned on by lua message at game start).

Greez,
Hammerfritz

I saw the issue, just uploaded the 1.14.14.3 who fix it. But tell me if you still see problems. thanks again for taking time reporting it !
Creator of Advanced Wesnoth Wars mod

Post Reply