Some of my WML Experiments- New abilities-etc.
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.
Some of my WML Experiments- New abilities-etc.
Here I put some of my first tries to make WML do new or modified effects that are not included in the official Wesnoth:
"Counter" and "Invisibility" abilities
#define WEAPON_SPECIAL_COUNTER
# Canned definition of the Counter ability to be included in a
# [specials] clause.
[chance_to_hit]
id=counter
name= _ "counter"
description= _ "Counter:
When used in defence, this attack always has at least a 90% chance to hit."
value=60
cumulative=no
active_on=defence
[/chance_to_hit]
#enddef
#define ABILITY_INVISIBILITY
# Canned definition of the Invisibility ability to be included in an
# [abilities] clause.
[hides]
id=invisibility
name= _ "invisibility"
female_name= _ "female^invisibility"
description= _ "Invisibility:
This unit always remains undetected by its enemies, except by those standing next to it.
Enemy units can not see this unit, except if they have units next to it. Any enemy unit that first discovers this unit immediately loses all its remaining movement."
name_inactive= _ "invisibility"
female_name_inactive= _ "female^invisibility"
description_inactive= _ "Invisibility:
This unit always remains undetected by its enemies, except by those standing next to it.
Enemy units can not see this unit, except if they have units next to it. Any enemy unit that first discovers this unit immediately loses all its remaining movement."
affect_self=yes
[filter_self]
[filter_location]
terrain=*
[/filter_location]
[/filter_self]
[/hides]
#enddef
"Counter" and "Invisibility" abilities
#define WEAPON_SPECIAL_COUNTER
# Canned definition of the Counter ability to be included in a
# [specials] clause.
[chance_to_hit]
id=counter
name= _ "counter"
description= _ "Counter:
When used in defence, this attack always has at least a 90% chance to hit."
value=60
cumulative=no
active_on=defence
[/chance_to_hit]
#enddef
#define ABILITY_INVISIBILITY
# Canned definition of the Invisibility ability to be included in an
# [abilities] clause.
[hides]
id=invisibility
name= _ "invisibility"
female_name= _ "female^invisibility"
description= _ "Invisibility:
This unit always remains undetected by its enemies, except by those standing next to it.
Enemy units can not see this unit, except if they have units next to it. Any enemy unit that first discovers this unit immediately loses all its remaining movement."
name_inactive= _ "invisibility"
female_name_inactive= _ "female^invisibility"
description_inactive= _ "Invisibility:
This unit always remains undetected by its enemies, except by those standing next to it.
Enemy units can not see this unit, except if they have units next to it. Any enemy unit that first discovers this unit immediately loses all its remaining movement."
affect_self=yes
[filter_self]
[filter_location]
terrain=*
[/filter_location]
[/filter_self]
[/hides]
#enddef
- mnewton1
- Posts: 777
- Joined: November 12th, 2008, 4:31 am
- Location: On my pretty teal horsey.
- Contact:
Re: Some of my WML Experiments- New abilities-etc.
It says that you will have 90% to hit but the value is only set to 60. It should be set to 90 shouldn't it?Marco wrote:#define WEAPON_SPECIAL_COUNTER
# Canned definition of the Counter ability to be included in a
# [specials] clause.
[chance_to_hit]
id=counter
name= _ "counter"
description= _ "Counter:
When used in defence, this attack always has at least a 90% chance to hit."
value=60
cumulative=no
active_on=defence
[/chance_to_hit]
#enddef
Creator of Ageless Era
Check out Frogatto & Friends, it's made by the same people who created The Battle for Wesnoth!
Check out Frogatto & Friends, it's made by the same people who created The Battle for Wesnoth!
Re: Some of my WML Experiments- New abilities-etc.
Right, A stupid error..after all I'm a novice
I was wondering...is there a way to make a unit remove "petrify" status?
I was also thinking about a Dwarven Treasurer (Or whatever is the english for Italian "tesoriere") who, instead of having an upkeep has a negative upkeep of -1, i.e. produces money for his army...
Moreover, maybe this modified ability works:
#define ABILITY_DARKENS
# Canned definition of the Darkens ability to be included in an
# [abilities] clause.
[illuminates]
id=darkening
value=-25
max_value=-25
cumulative=no
name= _ "darkens"
female_name= _ "female^illuminates"
description= _ "Darkens:
This unit spreads darkness in the surrounding area, making chaotic units fight better, and lawful units fight worse.
Any units adjacent to this unit will fight as if it were night when it is dusk, and as if it were dusk when it is day."
affect_self=yes
[/illuminates]
#enddef
I also saw (in Age of Wonders) a very cool ability which morphs the terrain near a very powerful unit (e.g., I don't remember well and I'm inventing, an Elf Champion can turn plains into forests, a Frost Witch into glaciers and a Dread Reaper into barren land...
I was wondering...is there a way to make a unit remove "petrify" status?
I was also thinking about a Dwarven Treasurer (Or whatever is the english for Italian "tesoriere") who, instead of having an upkeep has a negative upkeep of -1, i.e. produces money for his army...
Moreover, maybe this modified ability works:
#define ABILITY_DARKENS
# Canned definition of the Darkens ability to be included in an
# [abilities] clause.
[illuminates]
id=darkening
value=-25
max_value=-25
cumulative=no
name= _ "darkens"
female_name= _ "female^illuminates"
description= _ "Darkens:
This unit spreads darkness in the surrounding area, making chaotic units fight better, and lawful units fight worse.
Any units adjacent to this unit will fight as if it were night when it is dusk, and as if it were dusk when it is day."
affect_self=yes
[/illuminates]
#enddef
I also saw (in Age of Wonders) a very cool ability which morphs the terrain near a very powerful unit (e.g., I don't remember well and I'm inventing, an Elf Champion can turn plains into forests, a Frost Witch into glaciers and a Dread Reaper into barren land...
Re: Some of my WML Experiments- New abilities-etc.
the 'darkens' one was once coded as 'Obscure' and can be found in the Invasion from the Unknown macros. If you want to use your version, you should change the female version of the name.
Re: Some of my WML Experiments- New abilities-etc.
In Age of Wonders I found some attacks that were more effective if the target was a specific unit (for example: "Holy Champion" does a bonus against chaotic targets). So I came up with these:
You should give this to a powered up version of a Loyalist lancer
#define ABILITY_DRAGONSLAYER
# Canned definition of the Dragonslayer ability to be included in a
# [specials] clause.
[damage]
id=dragonslayer
multiply=1.25
cumulative=yes
name=_ "dragonslayer"
female_name= _ "female^dragonslayer"
[filter_opponent]
race="drake"
[/filter_opponent]
description= _ "Dragonslayer:
This attack does 25% more damages against drakes
[/damage]
#enddef
I coded this other thinking about Balanced Advanced Era's Dark elves (e.g. the dark elf lord)
#define ABILITY_ELFHATER
# Canned definition of the Elfhater ability to be included in a
# [specials] clause.
[damage]
id=elfhater
multiply=1.25
cumulative=yes
name=_ "elfhater"
female_name= _ "female^elfhater"
[filter_opponent]
race="elf"
[/filter_opponent]
description= _ "Elfhater:
This attack does 25% more damages against elves
[/damage]
#enddef
You should give this to a powered up version of a Loyalist lancer
#define ABILITY_DRAGONSLAYER
# Canned definition of the Dragonslayer ability to be included in a
# [specials] clause.
[damage]
id=dragonslayer
multiply=1.25
cumulative=yes
name=_ "dragonslayer"
female_name= _ "female^dragonslayer"
[filter_opponent]
race="drake"
[/filter_opponent]
description= _ "Dragonslayer:
This attack does 25% more damages against drakes
[/damage]
#enddef
I coded this other thinking about Balanced Advanced Era's Dark elves (e.g. the dark elf lord)
#define ABILITY_ELFHATER
# Canned definition of the Elfhater ability to be included in a
# [specials] clause.
[damage]
id=elfhater
multiply=1.25
cumulative=yes
name=_ "elfhater"
female_name= _ "female^elfhater"
[filter_opponent]
race="elf"
[/filter_opponent]
description= _ "Elfhater:
This attack does 25% more damages against elves
[/damage]
#enddef
Re: Some of my WML Experiments- New abilities-etc.
#define ABILITY_POISONIMM
# Canned definition of the poison immunity ability to be included
# in an [abilities] clause.
[heals]
affect_self=yes
id=pois_imm
name= _ "immune to poison"
female_name= _ "female^immune to poison"
description= _ "Poison immunity:
A unit immune to poison immediately cures himself after being poisoned"
poison=cured
[/heals]
#enddef
# Canned definition of the poison immunity ability to be included
# in an [abilities] clause.
[heals]
affect_self=yes
id=pois_imm
name= _ "immune to poison"
female_name= _ "female^immune to poison"
description= _ "Poison immunity:
A unit immune to poison immediately cures himself after being poisoned"
poison=cured
[/heals]
#enddef
Re: Some of my WML Experiments- New abilities-etc.
that's not a very convenient way of providing poison immunity, you might as well have used a regeneration clause with a 0 value
why don't you try your strenghts with something more complex? something that requires going out of the shells of common ability clauses?
why don't you try your strenghts with something more complex? something that requires going out of the shells of common ability clauses?
Like cats? I've made a whole faction of them to kick ass with!
Don't like cats? I've made a whole faction of them to kick their asses! So everyone's happy :)
Felinian faction is part of the Beyond Southern Hells era
kitties need sprites! art topic here
Don't like cats? I've made a whole faction of them to kick their asses! So everyone's happy :)
Felinian faction is part of the Beyond Southern Hells era
kitties need sprites! art topic here
Re: Some of my WML Experiments- New abilities-etc.
You think about events and abilities that trigger them? I don't know where to start, I don't even know how to couple a special with an event and where in the game to place te event for it to work not only in a single scenario. Where could I find some info?
Re: Some of my WML Experiments- New abilities-etc.
you could analyse some eras already made, i myself made my beginnings basing off melinaths steelhive era, following this path there is my felinian faction with some simple pieces, and quite probably other bigger eras should probably sport a few specials
Like cats? I've made a whole faction of them to kick ass with!
Don't like cats? I've made a whole faction of them to kick their asses! So everyone's happy :)
Felinian faction is part of the Beyond Southern Hells era
kitties need sprites! art topic here
Don't like cats? I've made a whole faction of them to kick their asses! So everyone's happy :)
Felinian faction is part of the Beyond Southern Hells era
kitties need sprites! art topic here
Re: Some of my WML Experiments- New abilities-etc.
Here's the "Nocturne" ability that makes the unit petrify in dusk, first watch and second watch. The unit behaves much like a gargoyle
In abilities:
#define ABILITY_NOCTURNE
# Canned definition of the Nocturne ability to be included in a
# [abilities] clause.
[damage]
id=nocturne
description= _ "Nocturne:
This unit petrifies at dawn and day and unpetrifies at dusk and night"
[/damage]
#enddef
In eras:
In abilities:
#define ABILITY_NOCTURNE
# Canned definition of the Nocturne ability to be included in a
# [abilities] clause.
[damage]
id=nocturne
description= _ "Nocturne:
This unit petrifies at dawn and day and unpetrifies at dusk and night"
[/damage]
#enddef
In eras:
Code: Select all
[era]
id=era_custom
name= _ "Custom Era"
...
#event triggered by "Noctune" ability (petrify and unpetrify)
[event]
name="turn refresh"
[store_time_of_day]
[/store_time_of_day]
[if]
[variable]
name="time_of_day.id"
equals="dawn"
[/variable]
[or]
[variable]
name="time_of_day.id"
equals="morning"
[/variable]
[/or]
[or]
[variable]
name="time_of_day.id"
equals="afternoon"
[/variable]
[/or]
[/if]
[then]
[stone]
[filter]
ability="nocturne"
[filter_wml]
[status]
stoned="no"
[/status]
[/filter_wml]
[/filter]
[/stone]
[then]
[else]
[unstone]
[filter]
ability="nocturne"
[filter_wml]
[status]
stoned="yes"
[/status]
[/filter_wml]
[/filter]
[unstone]
[/else]
[/event]
[/era]
Re: Some of my WML Experiments- New abilities-etc.
Then, the "Punisher" special, that does a damage bonus against high level opponents
#define WEAPON_SPECIAL_PUNISHER
# Canned definition of the Punisher ability to be included in a
# [specials] clause.
[damage]
id=punisher
multiply=1.25
cumulative=yes
name=_ "punisher"
female_name= _ "female^punisher"
[filter_opponent]
level="2"
[or]
level="3"
[/or]
[or]
level="4"
[/or]
[/filter_opponent]
description= _ "Punisher:
This attack does 25% more damage against opponents of level 2 or above
[/damage]
#define WEAPON_SPECIAL_PUNISHER
# Canned definition of the Punisher ability to be included in a
# [specials] clause.
[damage]
id=punisher
multiply=1.25
cumulative=yes
name=_ "punisher"
female_name= _ "female^punisher"
[filter_opponent]
level="2"
[or]
level="3"
[/or]
[or]
level="4"
[/or]
[/filter_opponent]
description= _ "Punisher:
This attack does 25% more damage against opponents of level 2 or above
[/damage]
- Enchanteur
- Posts: 72
- Joined: September 28th, 2009, 11:05 am
Re: Some of my WML Experiments- New abilities-etc.
There is some fun ideas here.
my own experiments look like this too...
my own experiments look like this too...
French Player. For now, I'm working on creation of abilitys and units with WML. My goal is to make an enhanced version of Elves, playable with standard campains. HERE : http://forums.wesnoth.org/viewtopic.php ... 58&start=0
Re: Some of my WML Experiments- New abilities-etc.
This forum needs a sticky for ability and weapon special WML that users make. Or maybe put it on the wiki. The current spot for WML abilities on the wiki is hardly managed at all, though.
- solsword
- Code Contributor
- Posts: 291
- Joined: January 12th, 2009, 10:21 pm
- Location: Santa Cruz, CA
- Contact:
Re: Some of my WML Experiments- New abilities-etc.
There are certainly some out-of-date things on the wiki, but as was pointed out earlier when I suggested an add-on, the wiki is the current preferred location for abilities. And as your situation demonstrated, if people ask about WML abilities on the wiki, they may well get updated. For now, I'd encourage you to use the wiki.meowreka wrote:This forum needs a sticky for ability and weapon special WML that users make. Or maybe put it on the wiki. The current spot for WML abilities on the wiki is hardly managed at all, though.
The Knights of the Silver Spire campaign.
http://www.cs.hmc.edu/~pmawhorter - my website.
Teamcolors for everyone! PM me for a teamcolored version of your sprite, or you can do it yourself. If you just happen to like magenta, no hard feelings?
http://www.cs.hmc.edu/~pmawhorter - my website.
Teamcolors for everyone! PM me for a teamcolored version of your sprite, or you can do it yourself. If you just happen to like magenta, no hard feelings?
Re: Some of my WML Experiments- New abilities-etc.
It's very very frustrating to use a guide when half of it is not maintained and not up to date.solsword wrote:There are certainly some out-of-date things on the wiki, but as was pointed out earlier when I suggested an add-on, the wiki is the current preferred location for abilities. And as your situation demonstrated, if people ask about WML abilities on the wiki, they may well get updated. For now, I'd encourage you to use the wiki.meowreka wrote:This forum needs a sticky for ability and weapon special WML that users make. Or maybe put it on the wiki. The current spot for WML abilities on the wiki is hardly managed at all, though.