Abilities Era massive abilities help thread

The place to post your WML questions and answers.

Moderators: Forum Moderators, Developers

Forum rules
Please use [code] BBCode tags in your posts for embedding WML snippets.

Abilities Era massive abilities help thread

Postby Ken_Oh » July 6th, 2006, 6:48 pm

This is for this thread in the Faction & Era forum.

Here's the help that I need at the moment:
1. Look over the following ability ideas and see if there are any that absolutely cannot be done with current WML.
2. Look over the following ability ideas and see if you want to offer and help at all coding (even hints and clues, because I'm no WML wizard).
3. Test the current era to see if the abilities work.
4. Since abilities sometimes aren't the easiest thing to code, if you have your own ability that you've already coded and want to donate, I'm sure we could find a place for it in the era, so please post it.

Here are the planned abilities for the units. Some are blatantly stolen from the Ideas forum. Here is a good place to start (I'll give credit where it is due when I actually get some of them working).

Here's a small legend for notes (nothing before the name means it isn't included):
* seems to be working perfectly
+ works OK but is buggy or is missing something
- does something but may crash or do something totally unexpected
? doesn't do a $%*# thing other than show up on the unit

Knights
* Dread: Offensive only, defender only counter-attacks at 50%
* Bloodlust: Offensive only, if target is killed unit is allowed another attack
+Knockback: offensive only, moves defending unit back one hex (I want my version of knockback to let the defender get all of its attacks before moving back)
* Storm: Offensive only, each unit in the attack can only make 1 attack

Pirates
Parry: Every successful strike means 0% chance-to-hit for the opponent's following strike
Ensnare: Offensive only, as soon as one strike hits, every strike after during the attack gets 100% chance-to-hit
Knockout: affected unit cannot move or attack for 1 turn or until hit
* Dash: After attack, player gains remaining movement points and can move

Bandits
* Chaos: Player gains control of unit during the side turn, unit has 1 MP and can attack
* Spiked Armor: Defensive only, each attempted melee strike opponent makes causes 3 points damage to the opponent
Loner: When there are no allied units on adjacent tiles, this unit does double damage
* Raid: Offensive only, each successful strike with raid takes 2xp from the defender and gives it to the raider.

I hope you guys like the idea and want to help out. Staring here is a good for beginners, like myself: http://www.wesnoth.org/wiki/WML_Abilities
Attachments
Abilities_v0.1.8.zip
(27.07 KiB) Downloaded 246 times
Last edited by Ken_Oh on January 14th, 2007, 2:54 pm, edited 16 times in total.
User avatar
Ken_Oh
Moderator Emeritus
 
Posts: 2172
Joined: February 6th, 2006, 4:03 am
Location: Baltimore, Maryland, USA

Postby JW » July 6th, 2006, 7:11 pm

Dang, you've got lots of the abilities in here already. :wink:

Some of those are pretty cool sounding. I especially like that you included the xp drain ability - I think it's an important one to have possible. (Would go great in the EOM for the Mind Flayer.)
User avatar
JW
 
Posts: 5041
Joined: November 10th, 2005, 7:06 am
Location: Chicago-ish, Illinois

Postby Noyga » July 6th, 2006, 8:55 pm

Here is the implementation of Dread (that was easy, it is a reversed, more simple steadfast):
Code: Select allExpand
#define ABILITY_DREAD
   [resistance]
      id=dread
      multiply=2
      apply_to=blade,pierce,impact,fire,cold,holy
      name= _ "dread"
      description= _ "Dread:
This unit's resistances are doubled, up to a maximum of 50%, when attacking."
      affect_self=yes
      active_on=offense
   [/resistance]
#enddef
User avatar
Noyga
Developer
 
Posts: 1790
Joined: September 26th, 2005, 5:56 pm
Location: France

Postby Ken_Oh » July 7th, 2006, 4:44 am

Here's a quick question.

Can I just make an abilities.cfg like how the main game does? Or do I have to keep it within units or scenarios, like how it says you have to here: http://www.wesnoth.org/wiki/WML_Abilities ?

That would make life so much easier I think.
User avatar
Ken_Oh
Moderator Emeritus
 
Posts: 2172
Joined: February 6th, 2006, 4:03 am
Location: Baltimore, Maryland, USA

Postby Noyga » July 7th, 2006, 8:34 am

You can make macros in your custom era's abilities.cfg (just like the main game does), or implement everything inside the unit, just like you like.
If you intend to use the ability more than once, macros are more flexible.
User avatar
Noyga
Developer
 
Posts: 1790
Joined: September 26th, 2005, 5:56 pm
Location: France

Postby JW » July 7th, 2006, 8:46 am

You can put your macros in any config that is loaded by the era's [+units] list IIRC.
User avatar
JW
 
Posts: 5041
Joined: November 10th, 2005, 7:06 am
Location: Chicago-ish, Illinois

Postby Noyga » July 7th, 2006, 8:49 am

Actually, since they are macros they don't need to be inside a [+unit] tag... They can be outside as well.
User avatar
Noyga
Developer
 
Posts: 1790
Joined: September 26th, 2005, 5:56 pm
Location: France

Postby turin » July 7th, 2006, 1:47 pm

The abilities.cfg file can go anywhere. I put it in a utils/ directory for the Imperial Era. You just have to remember to include it from the main campaign.cfg.

And you have to include it before you include the unit.cfgs. Which is why you shouldn't just put it in units/ - the game loads .cfgs in alphabetical order, and abilities.cfg is after all unit names that start with capital letters.

BTW, the Imperial Era has some new specials, and it is getting a few more new ones - you might want to include those in the era too.
For I am Turin Turambar - Master of Doom, by doom mastered. On Wesbreak. Please don't PM me unless you have a question only I can answer.
And I hate stupid people.
The World of Orbivm
User avatar
turin
Lord of the East
 
Posts: 11662
Joined: January 11th, 2004, 7:17 pm
Location: Texas

Re: Abilities Era massive abilities help thread

Postby Sapient » July 7th, 2006, 1:57 pm

My WML analysis... really Xan could answer this better than I can.

Knockout - can't be done properly. Knockout is a form of incapacitation, and currently the only way to be incapacitated is through stone. You may be able to simulate the effect by turning the unit to stone during the players turn (and his teammates turns), but this would cause other problems.

Storm - I don't think be done as stated, but you could use WML to store the units and give back any hp lost after the first strikes. This would cause other problems, though.

Parry - Same principle as storm

Ensnare - Tricky. You could remember the damage of the first hit, then re-apply it during miss events. This might have problems if the WML generates a kill during a miss.

(What happens if an ensnarer hits and is parried?)

Mist Aura - different DEF for ranged and melee? I'm pretty sure that's not supported by the code.

Dash - yes, possible (I think)
Spiked Armor - yes
Loner - yes
Raid - yes
http://www.wesnoth.org/wiki/User:Sapient... "Lift with the legs, Rogar, not the back." --Newmoon, Elven Archer
User avatar
Sapient
Developer
 
Posts: 4116
Joined: November 26th, 2005, 7:41 am

Re: Abilities Era massive abilities help thread

Postby zookeeper » July 7th, 2006, 3:07 pm

Sapient wrote:Knockout - can't be done properly. Knockout is a form of incapacitation, and currently the only way to be incapacitated is through stone. You may be able to simulate the effect by turning the unit to stone during the players turn (and his teammates turns), but this would cause other problems.

Could be done. Not simple at all, but within reasonable bounds. There are unit variables which determine whether a unit has moved (or if it has MP's left) and whether it has attacked yet. Using these it should be possible to incapacitate any unit for x turns.

Sapient wrote:Storm - I don't think be done as stated, but you could use WML to store the units and give back any hp lost after the first strikes. This would cause other problems, though.

I'm pretty sure you can abort an attack sequence prematurely in some way, for example by moving one unit to another location and then immediately back, or make some other modification (and then revert it) which doesn't allow the fight to continue anymore. Don't know how well the engine handles such cases though. :P
User avatar
zookeeper
WML Wizard
 
Posts: 8103
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Abilities Era massive abilities help thread

Postby turin » July 7th, 2006, 3:11 pm

zookeeper wrote:I'm pretty sure you can abort an attack sequence prematurely in some way, for example by moving one unit to another location and then immediately back, or make some other modification (and then revert it) which doesn't allow the fight to continue anymore. Don't know how well the engine handles such cases though. :P

But how do you interrupt the attack in the middle of it?
For I am Turin Turambar - Master of Doom, by doom mastered. On Wesbreak. Please don't PM me unless you have a question only I can answer.
And I hate stupid people.
The World of Orbivm
User avatar
turin
Lord of the East
 
Posts: 11662
Joined: January 11th, 2004, 7:17 pm
Location: Texas

Re: Abilities Era massive abilities help thread

Postby zookeeper » July 7th, 2006, 3:15 pm

turin wrote:But how do you interrupt the attack in the middle of it?

Well, I guess there's only one way to find out whether it can be done or not...stay tuned!
User avatar
zookeeper
WML Wizard
 
Posts: 8103
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Postby Ken_Oh » July 7th, 2006, 3:24 pm

This is exciting. :)
User avatar
Ken_Oh
Moderator Emeritus
 
Posts: 2172
Joined: February 6th, 2006, 4:03 am
Location: Baltimore, Maryland, USA

Postby turin » July 7th, 2006, 3:31 pm

BTW, what do the "*"s mean in your original post? That the special is already coded? That wasn't immediately clear.
For I am Turin Turambar - Master of Doom, by doom mastered. On Wesbreak. Please don't PM me unless you have a question only I can answer.
And I hate stupid people.
The World of Orbivm
User avatar
turin
Lord of the East
 
Posts: 11662
Joined: January 11th, 2004, 7:17 pm
Location: Texas

Postby zookeeper » July 7th, 2006, 3:34 pm

Well, at least moving one of the units mid-fight (in an name=attacker_hits event for example) interrupts the fight just nicely. So, this could be combined with, for example, moving the unit back into it's original position in a name=attack_end event, in theory making the whole hack invisible to the player.
User avatar
zookeeper
WML Wizard
 
Posts: 8103
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Next

Return to WML Workshop

Who is online

Users browsing this forum: Jeffers0n and 0 guests