Poison Code
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.
Poison Code
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
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
Re: Poison Code
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.
Re: Poison Code
Most annoying is that it is not possible to make stronger or weaker poison.
But maybe you find a way. Good luck.
But maybe you find a way. Good luck.
Re: Poison Code
???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.
Re: Poison Code
So what would the code for the poison be?
Greetings Lehor
Greetings Lehor
- Pentarctagon
- Project Manager
- Posts: 5563
- Joined: March 22nd, 2009, 10:50 pm
- Location: Earth (occasionally)
Re: Poison Code
Moved to WML Workshop as well.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
take one down, patch it around
-2,147,483,648 little bugs in the code
Re: Poison Code
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!
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!
Re: Poison Code
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.
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.
Re: Poison Code
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.
Re: Poison Code
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.
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.
Re: Poison Code
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:He broke the guideline 'ask, don't demand'.
I disagree. “So what would the code for the poison be?” seems to me to be a perfectly valid question being asked.Dugi wrote:This was pretty much a demand, as if it was my or someone else's duty to help him.
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.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.
Re: Poison Code
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.Wussel wrote:They probably know this and disregarded it because it makes the game more sophisticated.
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?
- Pentarctagon
- Project Manager
- Posts: 5563
- Joined: March 22nd, 2009, 10:50 pm
- Location: Earth (occasionally)
Re: Poison Code
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.JaMiT wrote: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.Wussel wrote:They probably know this and disregarded it because it makes the game more sophisticated.
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?
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
take one down, patch it around
-2,147,483,648 little bugs in the code
Re: Poison Code
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.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.
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.
Re: Poison Code
It is. And I do not contest your “right to not post”.Dugi wrote:Therefore, I don't think that breaking Posting Guidelines should be reported, but if the official interpretation is different, […]