How do I make an item confer an ability?
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.
-
- Posts: 169
- Joined: June 9th, 2005, 12:03 am
- Location: Kiel, Germany
How do I make an item confer an ability?
I'd like to have a glowing pearl that gives "illuminates" to the unit that picks it up.
According to the Wiki, though, apply_to can only take the values new_attack, attack, hitpoints, movement, max_experience, loyal and status. No mention of "ability". Is the Wiki accurate, or am I missing something?
According to the Wiki, though, apply_to can only take the values new_attack, attack, hitpoints, movement, max_experience, loyal and status. No mention of "ability". Is the Wiki accurate, or am I missing something?
In general, the WML side of the wiki is pretty reliable. However, abilities are getting a makeover, so maybe it will become possible soon. I would also like items to be able to change defense and resistances (magic boots, extra armor)
You could open a feature request at http://www.gna.org/projects/wesnoth
You could open a feature request at http://www.gna.org/projects/wesnoth
Hope springs eternal.
Wesnoth acronym guide.
Wesnoth acronym guide.
You can definitely add traits, but now that I think of it, there doesn't seem to really be anything useful in the wiki about that. Since I'm better at WML than with wikis, I'll try to remember to write a simple macro for giving traits (custom ones, too) to units and just add it to somewhere in UsefulWMLFragments.appleide wrote:Hmm, i remember seeing a multiplayer scenario where there was this item that gave "quick" and "strong"... But i couldn't find the page that tells you how to do that. There is no trait section in the "effects" page either.
EDIT: After some hours of trying to do this, I'm starting to think that adding traits to an existing unit is practically impossible. Theoretically doable, I think, but I doubt anyone would want to try implementing it that way.
-
- Posts: 57
- Joined: January 1st, 2006, 4:53 pm
Yes, in fact there is already a macro that does this very thing: OBJ_POTION_STRONG in items.cfgmaliciouskorean wrote:you could do it without the name 'stong' actually showing up, but still giving the unit +1 dmg and +2hp
You are also supposed to be able to modify a unit's traits_description, but in my experience it doesn't work as advertised. :\
http://www.wesnoth.org/wiki/User:Sapient... "Looks like your skills saved us again. Uh, well at least, they saved Soarin's apple pie."
-
- Posts: 984
- Joined: February 21st, 2006, 11:02 pm
- Location: 0x466C616D65
Yes, it's all explained in http://www.wesnoth.org/wiki/EffectWML.Flametrooper wrote:On the subject of what apply_to can do, is it possible to apply something to speed: Give a unit an extra attack chance? (example: make a unit with a 6-3 attack now have a 6-4 attack)?