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: 40
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: 22
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: 40
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: 76
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: 40
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: 40
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: 22
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: 40
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: 40
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

zakimoto
Posts: 2
Joined: October 11th, 2019, 11:50 pm

Re: Mod : Advanced Wesnoth Wars

Post by zakimoto » October 12th, 2019, 12:08 am

Hello,

I'm trying your mod while playing "The Ravagers" campaign and i get some problems with special weapons (magical and marskman)
They do 1 damages and have -5% base
In the following picture you can see that the magical attack goes from 8x6 to 1x6
image1.PNG
image1.PNG (100.83 KiB) Viewed 466 times
Next is the details of the attack which show the base : -5%. (for reference, the sword attack of the units is base:35%.
image2.PNG
image2.PNG (79.85 KiB) Viewed 466 times
Is it the intended behaviour?
If no, what should i change to correct it.
If yes, could you explain to me what i'm missing about thoses attacks to make them work better?

PS: I'm using the following options
image3.PNG
Zakimoto.

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

Re: Mod : Advanced Wesnoth Wars

Post by Ruvaak » October 12th, 2019, 10:29 am

Hello Zakimoto

Thanks for reporting me, it's clearly a bug. Magickal and Marksman are managed in a special way in my code , they ignore the terrain defenses and always hit at 60-70% : so on No-Random option enabled, with hit ratio is converted in damage reduction, and 12x5 on 60% hit should be 7x5.

Can you see if the damage is really 1 ? maybe it's just a bug on the display informations but not the damages.

Il will take a look, but i'm quite busy theses day, can take some times. I will notify you when it's corrected
In the meanwhile, you can disable the "No Random Combat" option to continue the campaign without :


During a game, type :
```
:debug
```
(except if you launched the game with --debug argument)
2) Then open Lua Console(default : `, but you can see it in Menu > Settings > Shortcuts > Display lua console)
3) Copy/paste/execute one of the following lines related to mod features.
- Change the number in parentheses : 0 (zero) means disabled, 1 enabled.
- When specified, you can replace it by another number. (like in feature 02, 04, 05, 08...)
- Most of the changes will be operational immediately, or next turn, or next scenario. But units already modified will keep theirs changes.
The commands to edit each feature and remove/re-enable changes on units :

aww_status.update_feature_01(0) -- NoRandomCombats


To re-enable it : aww_status.update_feature_01(1)
The modifications will be taken on next scenario.
Creator of Advanced Wesnoth Wars mod

zakimoto
Posts: 2
Joined: October 11th, 2019, 11:50 pm

Re: Mod : Advanced Wesnoth Wars

Post by zakimoto » October 12th, 2019, 1:05 pm

Hello,

Yes the damage was always 1.

Thank you for the fast answer.

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

Re: Mod : Advanced Wesnoth Wars

Post by Ruvaak » October 19th, 2019, 6:13 pm

Hello Zakimoto

After checking things, it appears there is a problem on this Ravager campaign because it uses lot of "chances_to_hit", depending on some conditions (see screenshot)

My code don't interpret the conditions and filters, so it's just basing the damage on the combination of all chances_to_hit (or the terrain if there is no special chance to hit). Actually, all the combination do a -5%.

So I did something more simple and more logic about this "chance to hit" : if the chance to hit with specials is less than the terrain defense, the terrain defence will be used as damage modifier.

It's fixed in the version I just uploaded : 1.14.15.1
Attachments
ravagers.png
Creator of Advanced Wesnoth Wars mod

Soliton
Site Administrator
Posts: 1597
Joined: April 5th, 2005, 3:25 pm
Location: #wesnoth-mp

Re: Mod : Advanced Wesnoth Wars

Post by Soliton » October 29th, 2019, 7:57 pm

Hi Ruvaak,

the icon of your addon seems to be about as big as your addon and takes up a significant amount of the addon list everyone downloads when connecting to the addon server. Please reduce the icon size or use a path to a mainline image instead of a data URI. The image seems to be a mainline portrait anyway.

PS: Nice to see someone put serious effort into a no-randomness mod!
"If gameplay requires it, they can be made to live on Venus." -- scott

gnombat
Posts: 244
Joined: June 10th, 2010, 8:49 pm
Contact:

Re: Mod : Advanced Wesnoth Wars

Post by gnombat » October 30th, 2019, 12:04 pm

Soliton wrote:
October 29th, 2019, 7:57 pm
the icon of your addon seems to be about as big as your addon and takes up a significant amount of the addon list everyone downloads when connecting to the addon server. Please reduce the icon size or use a path to a mainline image instead of a data URI. The image seems to be a mainline portrait anyway.
Shouldn't the add-ons server (and perhaps the client) validate the size of an image in a data URI, when the add-on is uploaded? It should always be exactly 72 x 72 pixels, right?

Post Reply