Wesnoth refuses to identify my weapon special...

The place to post your WML questions and answers.

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.
Post Reply
User avatar
A Guy
Posts: 793
Joined: May 24th, 2008, 1:55 am

Wesnoth refuses to identify my weapon special...

Post by A Guy »

Okay, may someone please tell me where I went wrong here? The special has its effect, but there's no name.

Code: Select all

[attacks]
    id=attack_only
    name= _ "attack only"
    description= _ "Attack Only:
    This attack cannot be used to retaliate."
    active_on=defense
    value=0
[/attacks]
I'm just... a guy...
I'm back for now, I might get started on some work again.
User avatar
Dragonchampion
Posts: 758
Joined: November 6th, 2007, 7:46 pm
Location: North Carolina

Re: Wesnoth refuses to identify my weapon special...

Post by Dragonchampion »

Try [damage]

I think that's what we've been doing wrong.
Ehhhh... don't mind me, I'm just the annoying little modder who gets on peoples nerves. I'll just lurk till Someone says my name. :P

Oh, and also Creator of The War Of Terrador
User avatar
Mist
Inactive Developer
Posts: 753
Joined: February 15th, 2007, 8:44 am
Location: Milton Keynes, UK

Re: Wesnoth refuses to identify my weapon special...

Post by Mist »

What do you mean by "there's no name?"
The name doesn't show outside combat? You need to add name_inactive and description_inactive keys. Specials as opposed to abilities are by default inactive outside combat, if you want them shown in unit description all the tame you need to remember that.
Somewhere, between the sacred silence and sleep.
Disorder.
User avatar
Dragonchampion
Posts: 758
Joined: November 6th, 2007, 7:46 pm
Location: North Carolina

Re: Wesnoth refuses to identify my weapon special...

Post by Dragonchampion »

He was trying to make a special that makes it so that a unit cannot attack with the weapon in defense, but it wouldn't work. Don't worry, we solved it.
Ehhhh... don't mind me, I'm just the annoying little modder who gets on peoples nerves. I'll just lurk till Someone says my name. :P

Oh, and also Creator of The War Of Terrador
User avatar
A Guy
Posts: 793
Joined: May 24th, 2008, 1:55 am

Re: Wesnoth refuses to identify my weapon special...

Post by A Guy »

Ah, thank you, Mist. Guess there was a use for name_inactive and description_inactive after all.
I'm just... a guy...
I'm back for now, I might get started on some work again.
Tet
Posts: 391
Joined: February 18th, 2009, 5:11 am

Re: Wesnoth refuses to identify my weapon special...

Post by Tet »

If you want to not use one weapon on the defence but their is another weapon instead, you could alter some strange settings without a special. It was in one of the wikis. Sorry for not beeing more specific. I believe many units use this to determine one of more possible defence weapons automatically.
My Temple Project: http://forums.wesnoth.org/viewtopic.php?f=23&t=29800
This is "must-play" campaign! Don´t read the thread, unless you need help. http://forums.wesnoth.org/viewtopic.php?f=8&t=31895
Jozrael
Posts: 1034
Joined: June 2nd, 2006, 1:39 pm
Location: NJ, USA.

Re: Wesnoth refuses to identify my weapon special...

Post by Jozrael »

I believe it was an attribute that meant the AI weighted the weapon more heavily when comparing which one to use on defense.
Post Reply