Special Abilities
Moderator: Forum Moderators
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.
Special Abilities
Okay... in the older versions of the game, there was a file I could open and create unit special abilities (special abilities being like cure or nightstalk). Now I can't find the file.
So first, is there a file? And if not, is it still possible to create unit traits? And how would I do that?
Thanks!
So first, is there a file? And if not, is it still possible to create unit traits? And how would I do that?
Thanks!
I am your best nightmare...
- Ken_Oh
- Moderator Emeritus
- Posts: 2178
- Joined: February 6th, 2006, 4:03 am
- Location: Baltimore, Maryland, USA
First, a trait is not an ability. You will piss some people off if you refer to it like that.
.\Wesnoth\data\core\macros\abilities.cfg is the file where the abilities are stored. Just remember if you alter them directly, you will get errors if you play online.
You can create your own abilities by creating your own era (or, more likely, just altering or adding onto default era and calling it something else). The documentation on that is all in the wiki. And, download Extended Era to see an example of how new abilities are made.
.\Wesnoth\data\core\macros\abilities.cfg is the file where the abilities are stored. Just remember if you alter them directly, you will get errors if you play online.
You can create your own abilities by creating your own era (or, more likely, just altering or adding onto default era and calling it something else). The documentation on that is all in the wiki. And, download Extended Era to see an example of how new abilities are made.
Right, right, ability.
Okay, thanks.
In v. 1.2.5 (I think) the filepaths seem to be different though... so I'm having trouble finding eras. I checked themes, factions, and basically everything else...
I'll download Extended Era and see what I can do. Thanks for the advice.
Okay, thanks.
In v. 1.2.5 (I think) the filepaths seem to be different though... so I'm having trouble finding eras. I checked themes, factions, and basically everything else...
I'll download Extended Era and see what I can do. Thanks for the advice.
I am your best nightmare...
Okay, abilities have been found.
After about... say, three hours, I discovered there's a difference between abilities and weapon specials. It's not excessively hard to create abilities, but I can't figure out weapon specials.
I'm trying to create a weapon special similar to plague. Is this created in the same place? If so, I'm gonna need technical help. If not, where are some examples so I can figure out what I'm doing?
Thanks.
After about... say, three hours, I discovered there's a difference between abilities and weapon specials. It's not excessively hard to create abilities, but I can't figure out weapon specials.
I'm trying to create a weapon special similar to plague. Is this created in the same place? If so, I'm gonna need technical help. If not, where are some examples so I can figure out what I'm doing?
Thanks.
I am your best nightmare...
I'm quite new to this myself, but I think weapon specials can be created in the same place. Here is an example I have successfully gotten to work:
The following code is a snip from the unit who has the weapon special:
This isn't the same kind of action you are trying to do, but it is a weapon special that works as such. As I said, I'm no expert on this so If the way I have done this is not optimal, then I'm sure someone will correct me, but I saw you hadn't received an answer yet so hopefully this will help you get started. I have never tried to make a special that functions like plague so I can't even begin to help you with that specifically, but this is an example of a created weapon special.
Code: Select all
#-----------------------------------------------------------------------------
#Weapon Specials
#-----------------------------------------------------------------------------
#define WEAPON_SPECIAL_DEFENSIVE_SPECIALIST
[damage]
id=defense_specialist
name= _ "Defensive Specialist"
description= _ "Defensive Specialist:
This unit has specialized in defensive combat and will deal double damage to the attacker with this weapon when defending."
multiply=2
active_on=defense
[/damage]
#enddef
Code: Select all
...
[attack]
name=spear
type=pierce
range=melee
damage=4
number=2
icon=attacks/spear-militia.png
[specials]
{WEAPON_SPECIAL_DEFENSIVE_SPECIALIST}
[/specials]
[animation]
...
Hey, thanks!
I'm new at this too... but you did help me by showing that abilities and weapon specials are in fact in the same file. Just they're different. Also, you've got a good special... simple, but good.
I moved the discussion here so as to be more specific to what I was looking for.
Thanks for your help.
I'm new at this too... but you did help me by showing that abilities and weapon specials are in fact in the same file. Just they're different. Also, you've got a good special... simple, but good.
I moved the discussion here so as to be more specific to what I was looking for.
Thanks for your help.
I am your best nightmare...