Racial resistance

Discussion among members of the development team.

Moderator: Forum Moderators

Post Reply
Loriel
Posts: 66
Joined: March 27th, 2004, 12:41 pm
Location: London UK

Racial resistance

Post by Loriel »

Whilst browsing through the unit config files, I noticed that all the dwarf units include the following code :

Code: Select all

	[resistance]
	blade=70
	pierce=80
	impact=80
	fire=90
	cold=80
	[/resistance]
For ease of writing new dwarf units, and adjusting/rebalancing existing ones in the future, I think this code should be moved to a central point from which it is inherited into all dwarves.

For example, I assume it could be put into a file called dwarf_racial.cfg, then each dwarf unit could use the line {dwarf_racial.cfg} to inherit it.

If it is (or can be) supported, adding racial adjustments for resistance at the end of the game.cfg file (in similar manner to the setting of resistances based on movetype) would be even better.

Thus for example trolls could easily be adjusted to make them more susceptible to fire, but less susceptible to other forms of damage.

Another alternative, within the existing system, would be to change their move types to dwarffoot (and trollfoot) and add suitable settings for those types in game.cfg.
fmunoz
Founding Artist
Posts: 1469
Joined: August 17th, 2003, 10:04 am
Location: Spain
Contact:

Post by fmunoz »

Not all dwarven units have the same exact resistance, Steelclad and Lord are better.
Loriel
Posts: 66
Joined: March 27th, 2004, 12:41 pm
Location: London UK

Post by Loriel »

fmunoz wrote:Not all dwarven units have the same exact resistance, Steelclad and Lord are better.
Those cases could still overload the default, if desired.
Loriel
Posts: 66
Joined: March 27th, 2004, 12:41 pm
Location: London UK

Potentially misleading ?

Post by Loriel »

I find the use of the term "resistance" or "resistance modifier" here to be awkward, and potentially misleading.

The term is used in the unit config files, and is displayed in the movetype table at http://wesnoth.slack.it/movetypes.cgi

The problem is the way it features in the damage calculation - a value of 100 is "normal", with higher values increasing the damage suffered, and lower values decreasing it. Reminiscent of "high AC = bad" in certain RPG systems.

The in-game display is much better, with these values being subtracted from 100 and shown as % (thus the undead resistance to holy damage shows as -100%, rather than as +200).

I realise that it will be difficult to make significant changes, without breaking backward compatibility, but renaming the "resistance" as "vulnerability" (or "damage modifier") would be helpful.

Could a new term along those lines be used instead (in WML, hence in config files), but "resistance" retained as an alias for legacy files ?

Alternatively better documentation of how "resistance" works from the developer viewpoint.

From the player viewpoint it's not so bad, with the general picture being fairly clear, though the actual calculation/effect could perhaps be explained - eg that a "-100%" resistance means "double damage".
Dave
Founding Developer
Posts: 7071
Joined: August 17th, 2003, 5:07 am
Location: Seattle
Contact:

Post by Dave »

Since what's seen from the player's perspective makes sense, I don't see this as too much of a problem. It's inverted for developers, but I think that developers can get used to that easily enough. The problem with changing to a name like 'vulnerability' is that then people would have to get used to 'vulnerability' in the config files translating to 'resistance' in the game which imo is just as difficult to get used to.
Loriel wrote: Those cases could still overload the default, if desired.
There is no real way to 'overload the default' of a macro in this way, in this context I'm afraid.

David
“At Gambling, the deadly sin is to mistake bad play for bad luck.” -- Ian Fleming
Eponymous-Archon
Posts: 558
Joined: February 1st, 2004, 6:17 pm
Location: New Jersey, USA

Post by Eponymous-Archon »

Dave wrote:There is no real way to 'overload the default' of a macro in this way, in this context I'm afraid.
This also is related to the ability of designers to override leveling for units within a scenario.

Would it not be possible to change the code so that variables just take on whatever value is last assigned to them?

No doubt I'm missing something really large or grossly over simplifying.
The Eponymous Archon
User avatar
turin
Lord of the East
Posts: 11662
Joined: January 11th, 2004, 7:17 pm
Location: Texas
Contact:

Post by turin »

to return to the original question: why not just create a new movement type? there is no reason to make a 'racial' feature, just make the dwarves have a different movement type that better fits with what they are supposed to have resistancewise.
For I am Turin Turambar - Master of Doom, by doom mastered. On permanent Wesbreak. Will not respond to private messages. Sorry!
And I hate stupid people.
The World of Orbivm
Post Reply