How to add zombie variants to recruit list

The place to post your WML questions and answers.

Moderators: Forum Moderators, Developers

Forum rules
  • Please use [code] BBCode tags in your posts for embedding WML snippets.
  • To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Post Reply
Exemnptier
Posts: 5
Joined: July 3rd, 2020, 3:34 pm

How to add zombie variants to recruit list

Post by Exemnptier »

I have checked every (at least I hope is it was every) forum post with the word "zombie" in it to see if this question has ever been asked before, but was not able to find an answer. For a new map I would like to have a zombie leader who can recruit every type of zombie, but I can't get it to work. Under the [side] section in the map file I added "Walking Corpse" into the "recruit=" section, which allowed me to recruit walking corpses. I tried adding variants, but I can't figure out how. I though it would be as simple as adding "Walking Corpse Drake", etc... but that seems to be an unkown ID (which makes sense as all walking corpse variants use the same ID, as they are just variants, not individul units. Still thought it was worth a try). I tried a couple of other wordings, but nothing worked (which is not surprising, considering I have no experience in this at all).

User avatar
Pentarctagon
Project Manager
Posts: 4422
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: How to add zombie variants to recruit list

Post by Pentarctagon »

Moved to the WML Workshop.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code

gfgtdf
General Code Maintainer
Posts: 1331
Joined: February 10th, 2013, 2:25 pm

Re: How to add zombie variants to recruit list

Post by gfgtdf »

if you are writing a campaign i think the easiest way is to add custom unti types for each variation and just add them to the recruit list.
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.

Exemnptier
Posts: 5
Joined: July 3rd, 2020, 3:34 pm

Re: How to add zombie variants to recruit list

Post by Exemnptier »

Pentarctagon wrote:
July 4th, 2020, 5:32 pm
Moved to the WML Workshop.
Sorry if I posted this in the wrong place, I am new to this forum.

Exemnptier
Posts: 5
Joined: July 3rd, 2020, 3:34 pm

Re: How to add zombie variants to recruit list

Post by Exemnptier »

gfgtdf wrote:
July 4th, 2020, 5:35 pm
if you are writing a campaign i think the easiest way is to add custom unti types for each variation and just add them to the recruit list.
I'm not making a campaign, only a map. I am nowhere near experienced enough to know how to make a campaign.

User avatar
beetlenaut
Developer
Posts: 2475
Joined: December 8th, 2007, 3:21 am
Location: Washington State
Contact:

Re: How to add zombie variants to recruit list

Post by beetlenaut »

gfgtdf wrote:
July 4th, 2020, 5:35 pm
if you are writing a campaign i think the easiest way is to add custom unit types for each variation and just add them to the recruit list.
It's even easier than that because I already did it!

If you download BfW 1.15, you will see an updated version of SotA which has custom unit types for each WC and soulless. It even includes a special dialog box for recruiting them. You can see it in action by going into the first scenario and using debug to kill a wolf, a rat, and a bat, then get to a keep. You can skip to the third scenario with :cl to do that immediately.

There are two files you need in the units folder (SotA_Corpses.cfg & SotA_Soulless.cfg), and two in the utils folder as well (zombie-utils.cfg & zombie_recruit_dialog.cfg). The custom zombies are activated with the macro {ZOMBIE_INIT} at the beginning of the first scenario file, and everything else is included by {ZOMBIES} at the end of every scenario file. You will also have to go into zombie-utils and change the macro {ZOMBIE_INIT} to include the ones you want the player to have at the start. They are currently all set to "no", but you could make them all "yes" if you want. You could also just use the unit files and not the dialog, but you might need to do a bit of modification to make sure the unit files don't reference the custom code. I'm not sure what at the moment; it's been a while since I wrote this.

I assume this will work the same in multiplayer file as in a scenario.
Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide

User avatar
Aldarisvet
Translator
Posts: 800
Joined: February 23rd, 2015, 2:39 pm
Location: Moscow, Russia

Re: How to add zombie variants to recruit list

Post by Aldarisvet »

Zombie bats really would have blade attacks in 1.15???

http://units.wesnoth.org/1.15/mainline/ ... ients.html

Looking on core files it is not true.
So it is strange you use attributes different compared with mainline.
I just decided to use your unit files.
I have mine for Zombies:Introduction, but they are outdated, no portraits, some files causes lags for Wesnoth units database, so easier would be to take yours.

I really do not like the idea zombies would have any attack types except the impact. I just finished creating a campaign (extending greatly current version of Z:I) about fighting using only different type of zombies and it is balanced for impact attacks for all zombie types.
facebook.com/wesnothian/ - everyday something new about Wesnoth
My campaign:A Whim of Fate, also see Zombies:Introduction single map campaign
Art thread:Mostly frankenstains

User avatar
beetlenaut
Developer
Posts: 2475
Joined: December 8th, 2007, 3:21 am
Location: Washington State
Contact:

Re: How to add zombie variants to recruit list

Post by beetlenaut »

Aldarisvet wrote:
July 17th, 2020, 9:23 pm
it is strange you use attributes different compared with mainline.
Consider this: Real flying foxes have a 1.6-meter wingspan, so they are probably similar in size to Wesnoth bats. And they weigh one kilogram. I couldn't imagine that a creature that insubstantial colliding with you would do as much damage as an elvish captain with a sword. The bats would still have their nasty, big, pointy teeth though, so I figured that's what they would use. Since I had to split the types anyway, I decided to make that change. Also, I have 14 different types of zombies, so I wanted to distinguish them from one another a bit and made a couple other changes as well.
Aldarisvet wrote:
July 17th, 2020, 9:23 pm
it is balanced for impact attacks for all zombie types.
Well, sure, balance overrules all other considerations. I wouldn't be offended if you took mine and changed the attack type.
Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide

User avatar
Aldarisvet
Translator
Posts: 800
Joined: February 23rd, 2015, 2:39 pm
Location: Moscow, Russia

Re: How to add zombie variants to recruit list

Post by Aldarisvet »

beetlenaut wrote:
July 18th, 2020, 6:35 am
Aldarisvet wrote:
July 17th, 2020, 9:23 pm
it is strange you use attributes different compared with mainline.
Consider this: Real flying foxes have a 1.6-meter wingspan, so they are probably similar in size to Wesnoth bats. And they weigh one kilogram. I couldn't imagine that a creature that insubstantial colliding with you would do as much damage as an elvish captain with a sword. The bats would still have their nasty, big, pointy teeth though, so I figured that's what they would use. Since I had to split the types anyway, I decided to make that change. Also, I have 14 different types of zombies, so I wanted to distinguish them from one another a bit and made a couple other changes as well.
Aldarisvet wrote:
July 17th, 2020, 9:23 pm
it is balanced for impact attacks for all zombie types.
Well, sure, balance overrules all other considerations. I wouldn't be offended if you took mine and changed the attack type.
I agree that some zombies could have attacks other than impact. Given even zombie still can retain claws and tooths. But there is tradition that zombie is too stupid to attack other than by direct imact attacks. And about a weight problem there is a WINR principle.

And what you done with blade attacks does not seem good because of that: you recruit your custom bats with blade attacks, then you attack alive bats and in the result you would get zombie bats of mainline type with impact attack. So two different types of same zombie bats in one scenario - very confusing. Oh, I see that you fixed that with WEAPON_SPECIAL_SOTA_PLAGUE. So never mind, I just going to get rid of that custom special attack.

In the beginning I myself was not happy that zombies restricted only with impact attacks, but for now I know that they are VERY different. They have different trerrain defence rates, movement costs for different terrain, different resistances, different HP and movement points. So every zombie can be useful in appropriate circumstances for their common price of 8 gp. And my campaign shows it. Coudnt finish it for many months but now very close to that.

I am speaking only about bat, saurian, wose, swimmer, dwarf and troll variations. Goblin variation is too weak for 8 gp compared to others and gryphon/drake variation is too overpowered (many HP and they can fly). Wolf variation is overpowered too.

P.S. Also I found that there exists a zombie spider portrait but it is not used in your files.
Also I see that this portrait included in 1.15 but not in 1.14, despite there was a recent 1.14 release. So it is a note for devs to fix it.
Last edited by Aldarisvet on July 18th, 2020, 1:04 pm, edited 2 times in total.
facebook.com/wesnothian/ - everyday something new about Wesnoth
My campaign:A Whim of Fate, also see Zombies:Introduction single map campaign
Art thread:Mostly frankenstains

User avatar
Iris
Site Administrator
Posts: 6687
Joined: November 14th, 2006, 5:54 pm
Location: Chile
Contact:

Re: How to add zombie variants to recruit list

Post by Iris »

Aldarisvet wrote:
July 18th, 2020, 12:13 pm
P.S. Also I found that there exists a zombie spider portrait but it is not used in your files.
Also I see that this portrait included in 1.15 but not in 1.14, despite there was a recent 1.14 release. So it is a note for devs to fix it.
1.14 is a stable branch and adding new unit type variations to Default Era units is not possible. A change along those lines had to be backed out previously.
Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm (now available for Wesnoth 1.14).

User avatar
Aldarisvet
Translator
Posts: 800
Joined: February 23rd, 2015, 2:39 pm
Location: Moscow, Russia

Re: How to add zombie variants to recruit list

Post by Aldarisvet »

From the other side, current implementation of mainline zombies (other than human/elvish/orcish) is awful.
Imagine you kills a bat, you get a zombie bat, you click into the description and you see the sprite of the human zombie and a portrait of a human zombie.
It was not that awful before zombie portraits appeared, but when you see so unsuitable portrait - it is awful.
So I decided to use that WEAPON_SPECIAL_SOTA_PLAGUE. For my main hero with plague staff and for all custom zombies.

So what is needed (aside of two unit cfg files): WEAPON_SPECIAL_SOTA_PLAGUE code, Z_CASE RACE ZOMBIE_TYPE code and a code of event that "recreates the plague special for SotA corpses". That is all (other stuff is about adding new types of zombies inside the scenario after killing corresponding type of zombie, I needn't it).
I used it and it is working.

Thank you beetlenaut!
facebook.com/wesnothian/ - everyday something new about Wesnoth
My campaign:A Whim of Fate, also see Zombies:Introduction single map campaign
Art thread:Mostly frankenstains

Post Reply