Poison Code

The place to post your WML questions and answers.

Moderators: Developers, 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.

Poison Code

Postby Lehor » May 31st, 2013, 3:50 pm

Hello,

does somebody of you know what the code of the weapon file of poison is?
I mean these files like absorb.cfg and so on which determine the functions of the special weapons.

Thank you for your answers!
Greetings Lehor
User avatar
Lehor
 
Posts: 7
Joined: January 8th, 2013, 6:22 pm

Re: Poison Code

Postby Dugi » May 31st, 2013, 3:53 pm

Look into abilities.cfg maybe, but that isn't the exact code that is there. Poison is handled by the executable, there are no .cfg files that describe it.
Legend of the Invincibles - single player campaign, trying to be an expansion to regular Wesnoth, where units can advance indefinitely, gear becomes an important factor and tons of new abilities increase the game's variety.
User avatar
Dugi
 
Posts: 3368
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains

Re: Poison Code

Postby Wussel » May 31st, 2013, 4:06 pm

Most annoying is that it is not possible to make stronger or weaker poison.

But maybe you find a way. Good luck.
Wussel
 
Posts: 186
Joined: July 28th, 2012, 5:58 am

Re: Poison Code

Postby Dugi » May 31st, 2013, 7:34 pm

Wussel wrote:Most annoying is that it is not possible to make stronger or weaker poison.
???
You CAN make a purely WML-based imitation of poison, with all effects it should have, but possibly with different damage, healing possibilities, and so on. Also, the amount of damage poison does is a global setting that can be changed, although it is not recommended.
Legend of the Invincibles - single player campaign, trying to be an expansion to regular Wesnoth, where units can advance indefinitely, gear becomes an important factor and tons of new abilities increase the game's variety.
User avatar
Dugi
 
Posts: 3368
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains

Re: Poison Code

Postby Lehor » June 1st, 2013, 8:25 pm

So what would the code for the poison be?

Greetings Lehor
User avatar
Lehor
 
Posts: 7
Joined: January 8th, 2013, 6:22 pm

Re: Poison Code

Postby Pentarctagon » June 1st, 2013, 9:04 pm

Moved to WML Workshop as well.
A shadow in the night, a light in the dark.
There is no honor only death.
~Pentarctagon~
User avatar
Pentarctagon
Moderator
 
Posts: 2289
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Poison Code

Postby Wussel » June 15th, 2013, 6:09 am

Hi, I gave up on messing with poison ability long ago.

Assuming you want an apprentice unit with weak poison say "4".

That would make it useless to change poison globally. Easiest way would probably be to "remember" who got poisoned by "apprentice" and add 4 HP back every turn.

I would not expect Dugi to write a useful wml version of poison for you.

It would be most easy to include more variety in the code say:

Damage each turn (1 to 12) standard 8
Kills at the end (Yes or No) standard No
Lasts how many rounds (1 to indefinite) standard indefinite

That would take a while and it would have to get on the radar of the developer. They probably know this and disregarded it because it makes the game more sophisticated.

Good luck and keep posting!
Wussel
 
Posts: 186
Joined: July 28th, 2012, 5:58 am

Re: Poison Code

Postby Dugi » June 15th, 2013, 10:10 am

I have not written any WML for him because of the way he asked for it. I don't like this attitude. A normal person would ask how to do it or something, but he told me to do it.

For specific poison-like abilities, the code would consist of a dummy weapon special (possibly also an object that colours the unit green, via apply_to=image_mod), an event that inflicts a status when the weapon special hits, a turn refresh event that would unpoison all units poisoned this way standing in a village or next to a healer and damage those who remain poisoned. Of course, this is quite easy, but still too long to write for somebody who asks in a rude way.
Legend of the Invincibles - single player campaign, trying to be an expansion to regular Wesnoth, where units can advance indefinitely, gear becomes an important factor and tons of new abilities increase the game's variety.
User avatar
Dugi
 
Posts: 3368
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains

Re: Poison Code

Postby Varkarrus » June 15th, 2013, 7:01 pm

Check again, he wasn't being rude at all. Also, it doesn't sound like he speaks English that well, so he gets at least a bit of a free pass.
Varkarrus
 
Posts: 18
Joined: March 16th, 2013, 6:40 pm

Re: Poison Code

Postby Dugi » June 16th, 2013, 7:59 am

He broke the guideline 'ask, don't demand'. This was pretty much a demand, as if it was my or someone else's duty to help him. That is why I didn't reply. That is why nobody else replied except two posts that weren't helpful to him at all.

Anyway, I have already written the principal instructions to write the code. It is meaningless to give entire pieces of code to people with little coding knowledge, because they may place it incorrectly then, or do a small change wrongly and then report that it doesn't work. It happened many times. It is much better to help him to write the code, giving him hints, corrections and smaller pieces of code, until it gets assembled. This takes more time, but will teach him to use similar things and will make sure that he'll not ask two days later about another custom ability with similar properties.
Legend of the Invincibles - single player campaign, trying to be an expansion to regular Wesnoth, where units can advance indefinitely, gear becomes an important factor and tons of new abilities increase the game's variety.
User avatar
Dugi
 
Posts: 3368
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains

Re: Poison Code

Postby 8680 » June 16th, 2013, 5:21 pm

Dugi wrote:He broke the guideline 'ask, don't demand'.

If you felt that Lehor’s post was in violation of the Posting Guidelines (specifically §1i thereof), then you ought to have reported it, per Posting Guidelines §5, as I have told you before.

Dugi wrote:This was pretty much a demand, as if it was my or someone else's duty to help him.

I disagree. “So what would the code for the poison be?” seems to me to be a perfectly valid question being asked.

Dugi wrote:That is why I didn't reply. That is why nobody else replied except two posts that weren't helpful to him at all.

Wussel’s post seems to me to be meant helpfully. Pentarctagon’s post doesn’t count, being merely a notice of thread movement, not constituting participation in the thread.
User avatar
8680
Moderator
 
Posts: 745
Joined: March 20th, 2011, 11:45 pm

Re: Poison Code

Postby JaMiT » June 16th, 2013, 10:03 pm

Wussel wrote:They probably know this and disregarded it because it makes the game more sophisticated.

That would be better worded as "complicated" or "complex", not "sophisticated". One of the guiding principles of Wesnoth game design is "Keep It Simple-Stupid".[1] Greater sophistication in implementation (more-or-less meaning being able to handle variations) is usually good, provided the overall "simple stupid" guideline is not violated.

In this case, the question really is whether or not it is worth complicating the player's experience with poisons of various strengths. For example, suppose a player has poisoned units on the board -- how would the player know which are affected by the weaker (or stronger) poison and which are affected by standard poison? How would this difference be distinguished in the poisoning units? (And maybe some additional non-obvious complications that I cannot think of off the top of my head.) Is there enough benefit from this change to poison to warrant these complications for players?
JaMiT
Developer
 
Posts: 511
Joined: January 22nd, 2012, 12:38 am

Re: Poison Code

Postby Pentarctagon » June 17th, 2013, 12:54 am

JaMiT wrote:
Wussel wrote:They probably know this and disregarded it because it makes the game more sophisticated.

That would be better worded as "complicated" or "complex", not "sophisticated". One of the guiding principles of Wesnoth game design is "Keep It Simple-Stupid".[1] Greater sophistication in implementation (more-or-less meaning being able to handle variations) is usually good, provided the overall "simple stupid" guideline is not violated.

In this case, the question really is whether or not it is worth complicating the player's experience with poisons of various strengths. For example, suppose a player has poisoned units on the board -- how would the player know which are affected by the weaker (or stronger) poison and which are affected by standard poison? How would this difference be distinguished in the poisoning units? (And maybe some additional non-obvious complications that I cannot think of off the top of my head.) Is there enough benefit from this change to poison to warrant these complications for players?


An easy way to let players know would be to have it say something like "-X Poison" instead of just "Poison" where status conditions are displayed.
A shadow in the night, a light in the dark.
There is no honor only death.
~Pentarctagon~
User avatar
Pentarctagon
Moderator
 
Posts: 2289
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Poison Code

Postby Dugi » June 17th, 2013, 10:32 am

If you felt that Lehor’s post was in violation of the Posting Guidelines (specifically §1i thereof), then you ought to have reported it, per Posting Guidelines §5, as I have told you before.
Posting Guidelines are not Forum Rules, they are just suggestions about good behaviour. Therefore, I don't think that breaking Posting Guidelines should be reported, but if the official interpretation is different, fine then.
Also, although I usually help with things like this, I have used my right that I do not have to reply, because I did not like the way he asked for it. And after Wussel's comment, I felt an urge to explain why I didn't reply.

Anyway, this guy first posted on 31st of may and last visited on 5th of june, so I don't believe that there is any reason to post anything here.
Legend of the Invincibles - single player campaign, trying to be an expansion to regular Wesnoth, where units can advance indefinitely, gear becomes an important factor and tons of new abilities increase the game's variety.
User avatar
Dugi
 
Posts: 3368
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains

Re: Poison Code

Postby 8680 » June 17th, 2013, 6:29 pm

Dugi wrote:Therefore, I don't think that breaking Posting Guidelines should be reported, but if the official interpretation is different, […]

It is. And I do not contest your “right to not post”.
User avatar
8680
Moderator
 
Posts: 745
Joined: March 20th, 2011, 11:45 pm

Next

Return to WML Workshop

Who is online

Users browsing this forum: No registered users and 1 guest