Possible trait(death-triggered effect)

Brainstorm ideas of possible additions to the game. Read this before posting!

Moderator: Forum Moderators

Forum rules
Before posting a new idea, you must read the following:
ikanreed
Posts: 6
Joined: December 6th, 2006, 2:46 am
Contact:

Possible trait(death-triggered effect)

Post by ikanreed »

Quick summary: ondeath type effect(s).

Wesnoth is a fairly thorough game, and I can see how most ideas would do more harm than good. I was thinking about what triggers could be used be harnessed without affecting the front end user interface.

Walking dead create more walking dead when they kill, but nothing changes anything when they die.

My idea is this: a unit (with relative high cost per its effectiveness) that changes the terrain it dies on to it's race's favorite kind. Such as a merman who creates shallow water where it dies.

It doesn't add much complexity to the fundemental gameplay, but allows for manipulation of things the player would normally be unable to change.

It seems like it could be relatively easy to balance accross factions as well.
Fiach Dubh
Posts: 381
Joined: December 2nd, 2006, 4:10 am
Location: Thar an scáthán

Post by Fiach Dubh »

This is cool.
This is very cool.
As you may or may not know, I've been experimenting recently with what I call 'Pseudoabilities' - effects which work lie abilities, but are coded in a different way (because normal abilities are extremely limited in what they can do)

Sadly, I don't know how to change terrain types - but if I find out, this might very easily find its way into my current project (Talamh, a whole new setting for Battle for Wesnoth - see my thread in the Faction/Era forum for more info)

If I can get this to work, I'll also send you the code, along with instructions on how to use it. If I include it, you will of course receive full credit for the idea.
Jetryl wrote:Normal people are like candy ravers. You look away for a moment and next thing you know they're spreading vaseline on your nipples and cooing like a pigeon.
Stilgar
Posts: 465
Joined: January 21st, 2006, 8:22 pm

Post by Stilgar »

I think you mean ability and not trait, just so as you know. There is an important distinction between the two in Wesnoth. Traits are the randomly given small modifications to the base unit, like strong or quick. Abilities are something that all units of a type have and lets them do something special, like illuminate or cure.
ikanreed
Posts: 6
Joined: December 6th, 2006, 2:46 am
Contact:

Post by ikanreed »

Master Stilgar wrote:I think you mean ability and not trait, just so as you know. There is an important distinction between the two in Wesnoth. Traits are the randomly given small modifications to the base unit, like strong or quick. Abilities are something that all units of a type have and lets them do something special, like illuminate or cure.
You're right. I thought it was the other way around. My mistake. Thanks for the correction.
ILikeProgramming
Posts: 837
Joined: April 14th, 2005, 4:17 am

Post by ILikeProgramming »

How about something like:

Code: Select all

[event]
name=die
[filter]
type=Special_Merman
[/filter]
[terrain]
x=$x1
y=$y1
letter=c
[/terrain]
[/event]

Except for maybe x,y , this will work on untis of type Special_Merman and change the terrain they die on to shallow water.
User avatar
Sapient
Inactive Developer
Posts: 4453
Joined: November 26th, 2005, 7:41 am
Contact:

Post by Sapient »

I'll be sure to put a 'special_merman' on your Keep. ;)
http://www.wesnoth.org/wiki/User:Sapient... "Looks like your skills saved us again. Uh, well at least, they saved Soarin's apple pie."
ikanreed
Posts: 6
Joined: December 6th, 2006, 2:46 am
Contact:

Post by ikanreed »

Sapient wrote:I'll be sure to put a 'special_merman' on your Keep. ;)
I hadn't considered what sort of terrains ought to be limited in usage. But that is one obvious case of easy abuse. There are probably others as well(caves come to mind).
SkeletonCrew
Inactive Developer
Posts: 787
Joined: March 31st, 2006, 6:55 am

Post by SkeletonCrew »

ikanreed wrote:
Sapient wrote:I'll be sure to put a 'special_merman' on your Keep. ;)
I hadn't considered what sort of terrains ought to be limited in usage. But that is one obvious case of easy abuse. There are probably others as well(caves come to mind).
I'd put it on the enemies keep :P
I do like the idea of death events especially for higher level units. If only higher level units have it the abuse won't be too big, they don't often occur in multiplayer and you have to scarifice the unit giving you a big disadvantage. I could see this ability on the mermaid siren for example.
Since it can be done in WML you can make a unit and see how it works in practice.
User avatar
Ken_Oh
Moderator Emeritus
Posts: 2178
Joined: February 6th, 2006, 4:03 am
Location: Baltimore, Maryland, USA

Post by Ken_Oh »

You can prevent it triggering on certain terrain pretty easily, if you decide on it. See zookeeper's Knockback ability in http://www.wesnoth.org/wiki/WML_Abilities for an example.
ILikeProgramming
Posts: 837
Joined: April 14th, 2005, 4:17 am

Post by ILikeProgramming »

EDIT: Tested; it worked.
But it requires IF_TERRAIN

Code: Select all

#define MOD_TERRAIN UNIT_TYPE TERRAIN EXCLUDING 
[event] 
name=die 
[filter] 
type={UNIT_TYPE} 
[/filter] 
{IF_TERRAIN $x1 $y1 {EXCLUDING} (
[else]
[terrain] 
x=$x1 
y=$y1 
letter={TERRAIN} 
[/terrain] 
[/else]
)}
[/event] 
#enddef
Last edited by ILikeProgramming on December 7th, 2006, 3:36 am, edited 1 time in total.
ikanreed
Posts: 6
Joined: December 6th, 2006, 2:46 am
Contact:

Post by ikanreed »

Forgive my ignorance(especially since this is my idea and all) but what is the intended application of all this. Functional code is great and all, but what's it acheive?
Fiach Dubh
Posts: 381
Joined: December 2nd, 2006, 4:10 am
Location: Thar an scáthán

Post by Fiach Dubh »

When unit X dies, it changes the terrain in its hex to terrain type Y, unless the hex is 'naturally' terrain type Z.
Jetryl wrote:Normal people are like candy ravers. You look away for a moment and next thing you know they're spreading vaseline on your nipples and cooing like a pigeon.
ikanreed
Posts: 6
Joined: December 6th, 2006, 2:46 am
Contact:

Post by ikanreed »

That's not what I meant. I can read the script. Where will the script actually be used?
Fiach Dubh
Posts: 381
Joined: December 2nd, 2006, 4:10 am
Location: Thar an scáthán

Post by Fiach Dubh »

The easiest thing to do, would be to create a unit (let's use the 'Special Merman' as an example) and paste the code into it, anywhere inside the [unit] tags but outside of any other tag set. Then, immediately after it, write

Code: Select all

{MOD TERRAIN (Special Merman) Shallow Water Keep}
You have to replace 'Shallow Water' and 'Keep' with whatever letters are used to represent them.

You could also do the same thing in a scenario file, with exactly the same result.

EDIT: the concept of a death-triggered pseudoability gave me another idea. How about a phoenix-type unit - when it dies, it respawns at the same point, with its experience reset to 0? (technically, you create a new unit of the same type at the same location - it should be possible to store the original unit's name and assign it automatically to the new one)
Jetryl wrote:Normal people are like candy ravers. You look away for a moment and next thing you know they're spreading vaseline on your nipples and cooing like a pigeon.
ILikeProgramming
Posts: 837
Joined: April 14th, 2005, 4:17 am

Post by ILikeProgramming »

Fiach Dubh wrote:

Code: Select all

{MOD TERRAIN (Special Merman) Shallow Water Keep}
First off, you might want to exclude villages as well.

As for your other idea, I'll try to code it soon.
Post Reply