Non-Fatal Wounds: Maimed Edition

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

Moderator: Forum Moderators

Post Reply
CookieLord
Posts: 15
Joined: June 22nd, 2022, 8:57 pm

Non-Fatal Wounds: Maimed Edition

Post by CookieLord »

This is an extension of the Non-Fatal Wounds add-on by Octalot and Armagedonus that adds lasting injuries to your units whom nearly escaped death.
current injuries
amnesia (resets exp)
broken arm (-20% non-magical damage)
broken leg (-20% mp)
broken rib (-10% impact resistance)
burned (-10% fire resistance)
concussion (-20% magical damage)
coward (-10% accuracy)
frostbite (-10% cold resistance)
gash (-10% blade resistance)
infection (chance to be poisoned)
insanity (berserk on melee attacks)
maimed (-15% hp)
short-term memory loss (lose 1 xp/round)
wild magic (magical attacks now are 50% chance)
injuries that can be toggled off
death (they are dead)
paper cut (the second worst thing to ever happen)
stepping on a lego (the worst thing to ever happen)
turning into an undead (they become a ghost or walking corpse version of themselves)
injuries I plan on adding if I can make them work
fear of unit/class/weapon (reduced accuracy againts what wounded them)
fear of terrain (increased move cost for the terrain they were wounded on)
scared of the dark/light (reduced strikes during the time they were wounded)
captured (increased recall cost based on level untill you recall them)
Eventually i want to add a system for healing injuries, with some having specific healing methods and others using a general healing method.
CookieLord
Posts: 15
Joined: June 22nd, 2022, 8:57 pm

Re: Non-Fatal Wounds: Maimed Edition

Post by CookieLord »

Apparently the dependencies are set wrong and I don't know how to fix it.
User avatar
Atreides
Posts: 651
Joined: March 30th, 2019, 10:38 pm
Location: On the 2nd story of the centre village of Merwuerdigliebe turning the lights on and off
Contact:

Re: Non-Fatal Wounds: Maimed Edition

Post by Atreides »

Nice idea! I kind of wished for something like this.

However I've tried it and while it shows messages for maiming when units (incl. enemy) are killed when I recall mine next scenario they don't seem to have any maimage. I lost a bowman in one scenario at the end and saw he was amnesiad but in the next when I recalled all my bowmen none had 0 xp.
CookieLord
Posts: 15
Joined: June 22nd, 2022, 8:57 pm

Re: Non-Fatal Wounds: Maimed Edition

Post by CookieLord »

Do you have both Non-Fatal Wounds and my mod installed and activated?

The original Non-fatal wounds is needed to add your dead unit to the recall list.
Last edited by CookieLord on July 29th, 2022, 5:17 pm, edited 1 time in total.
CookieLord
Posts: 15
Joined: June 22nd, 2022, 8:57 pm

Re: Non-Fatal Wounds: Maimed Edition

Post by CookieLord »

The messages for enemy deaths is a side affect of allowing the player to see the messages when it is not their turn.

Eventually I would like to change that, but I felt knowing what happened to your own units was more important than the increased number of messages on screen.
User avatar
Atreides
Posts: 651
Joined: March 30th, 2019, 10:38 pm
Location: On the 2nd story of the centre village of Merwuerdigliebe turning the lights on and off
Contact:

Re: Non-Fatal Wounds: Maimed Edition

Post by Atreides »

CookieLord wrote: July 29th, 2022, 5:00 pm Do you have both Non-Fatal Wounds and my mod installed and activated?

The original Non-fatal wounds is needed to add your dead unit to the recall list.
Of course. The problem isn't that they're not on the recall list. They are. But they're not maimed. The original is working but the maiming isn't. I've updated to 1.03 also and tried it again and still none of the wounded units show any maiming in the next scenario.

Oh and don't worry about that the msg appears on enemy units, I think that's just fine. I was merely amused to think that the ai can't recall those maimees. ; ) In fact it's quite a bit of fun to see the enemy being maimed. Muahaha! <evil grin>
CookieLord
Posts: 15
Joined: June 22nd, 2022, 8:57 pm

Re: Non-Fatal Wounds: Maimed Edition

Post by CookieLord »

My guess is that wesnoth is loading Non-Fatal before it loads Maimed Edition, causing it to copy units to the recall list before the maimed effects are applied.

Assuming this is the problem ive updated the add-on to force the load order, but this means that Non-Fatal needs to be disabled (but still installed).
User avatar
Atreides
Posts: 651
Joined: March 30th, 2019, 10:38 pm
Location: On the 2nd story of the centre village of Merwuerdigliebe turning the lights on and off
Contact:

Re: Non-Fatal Wounds: Maimed Edition

Post by Atreides »

CookieLord wrote: August 1st, 2022, 5:57 pm My guess is that wesnoth is loading Non-Fatal before it loads Maimed Edition, causing it to copy units to the recall list before the maimed effects are applied.

Assuming this is the problem ive updated the add-on to force the load order, but this means that Non-Fatal needs to be disabled (but still installed).
Hi, I had a peek into your add-on's code and it appears you are using traits for the maiming. Alas, as I found out the hard way, you can't add traits to units. I believe you could do it using abilities. Sorry about the bad news. : (
dwarftough
Posts: 269
Joined: August 4th, 2019, 5:27 pm

Re: Non-Fatal Wounds: Maimed Edition

Post by dwarftough »

Atreides wrote: August 1st, 2022, 6:42 pm Alas, as I found out the hard way, you can't add traits to units.
Not true, you can add traits. In LotI GEARED trait is added/removed when you equip an item/unequip all items. In World Conquest the "trained" trait is randomly added for trained units
Co-founder and current maintainer of IsarFoundation, Afterlife Rated and overall Wesnoth Autohost Project
User avatar
Atreides
Posts: 651
Joined: March 30th, 2019, 10:38 pm
Location: On the 2nd story of the centre village of Merwuerdigliebe turning the lights on and off
Contact:

Re: Non-Fatal Wounds: Maimed Edition

Post by Atreides »

dwarftough wrote: August 2nd, 2022, 12:41 am
Atreides wrote: August 1st, 2022, 6:42 pm Alas, as I found out the hard way, you can't add traits to units.
Not true, you can add traits. In LotI GEARED trait is added/removed when you equip an item/unequip all items. In World Conquest the "trained" trait is randomly added for trained units
Interesting, I just looked into WC and it appears to use lua to do it. Can it also be done via wml as Cookielord is trying to? (I don't have Lotl so I couldn't see how it did it)
CookieLord
Posts: 15
Joined: June 22nd, 2022, 8:57 pm

Re: Non-Fatal Wounds: Maimed Edition

Post by CookieLord »

in my own testing it was working. A quick way to test if the traits are working is to change the last_breath event to a recruit event in the randomizer file.

health modifications and the dead trait wont trigger until the following scenario.
CookieLord
Posts: 15
Joined: June 22nd, 2022, 8:57 pm

Re: Non-Fatal Wounds: Maimed Edition

Post by CookieLord »

Also originally I was going to use objects, but i wanted there to be a way for players to see what is modifying their units at a glance.

the only way i can think of for objects to display themselves would be a custom overlay for each wound.
dwarftough
Posts: 269
Joined: August 4th, 2019, 5:27 pm

Re: Non-Fatal Wounds: Maimed Edition

Post by dwarftough »

Atreides wrote: August 2nd, 2022, 3:33 pm Interesting, I just looked into WC and it appears to use lua to do it. Can it also be done via wml as Cookielord is trying to? (I don't have Lotl so I couldn't see how it did it)
This code from Hejnevar's PYR adds a trait to 7 moves leaders with pure wml

Code: Select all

    [event]
        name = prestart
        [modify_unit]
            [filter]
                canrecruit = yes

                [filter_wml]
                    max_moves = 7
                [/filter_wml]
                [not]
                    trait = lazy
                [/not]
            [/filter]

            {TRAIT_LAZY}
            [effect]
                apply_to = hitpoints
                heal_full = yes
            [/effect]
        [/modify_unit]
    [/event]
Co-founder and current maintainer of IsarFoundation, Afterlife Rated and overall Wesnoth Autohost Project
Post Reply