Page 1 of 1

Poison Duration:

Posted: Wed Apr 23, 2014 7:38 pm
by Faust
Did a few tests (not extensively) and seemed like there was no duration on poison with it lasting forever. Would this be the case here or is the delay just significantly long? What is it even suppose to be and is it tiered per poison level?

Demo Code
Batlin - http://forums.uosecondage.com/viewtopic.php?f=11&t=9786 wrote:

Code: Select all

  // handle poison duration
  Q5JF --;
  if(Q5JF < 0x01)
  {
    systemMessage(this, "The poison seems to have worn off.");
    Q660(this);
    return(0x00);
  }

Re: Poison Duration:

Posted: Wed Apr 23, 2014 10:46 pm
by Bixby Legbone
Faust wrote:Did a few tests (not extensively) and seemed like there was no duration on poison with it lasting forever. Would this be the case here or is the delay just significantly long? What is it even suppose to be and is it tiered per poison level?

Demo Code
Batlin - http://forums.uosecondage.com/viewtopic.php?f=11&t=9786 wrote:

Code: Select all

  // handle poison duration
  Q5JF --;
  if(Q5JF < 0x01)
  {
    systemMessage(this, "The poison seems to have worn off.");
    Q660(this);
    return(0x00);
  }

On this shard in this era there is a definite limit to the length to the duration of poison. Once enough time has passed, it will wear off the target. I do not know the specific duration that is era accurate; although the higher level poison, the more damage inflicted per the same window of time.

http://wiki.uosecondage.com/Poisoning

Re: Poison Duration:

Posted: Thu Apr 24, 2014 11:20 am
by Faust
Good to know that there is a defnite time period until it elapses. I didn't test it thoroughly and simply used a casted poison iterating a Razor script of a few hundred seconds where it never ran its course. That lead me to wonder if it ever ended and research some of the demo code to see if it did elapse after an extended period of time.

What would be nice to know now is if the time period is accurate at the moment since everything else is from the original code.

Do you have any information on this Kaivan?

Re: Poison Duration:

Posted: Thu Apr 24, 2014 5:14 pm
by Kaivan
I can't speak to what the total poison duration is in UOSA code beyond the fact that we did discuss potion ticks and the duration between each tick a few years ago, and we found that lesser strength poisons had a longer duration between each tick relative to poisons of a greater strength. Reviewing the demo code, the total duration of a lesser poison was anywhere between 2.5 and 5 minutes, which is a very sizable period of time. I'll try to find out if our duration is the same.

Re: Poison Duration:

Posted: Fri Apr 25, 2014 10:09 am
by Faust
Was there just a random value applied giving it such a substantial difference? Would just look at the demo code but don't have a copy of it at the moment since it's sitting on a hard drive with my old dismantled PC. The portion that I used in my initial response was from Batlin after doing some research. I need to take a look at a snippet of that code sometime.

Are there any download locations for the demo project anymore since Derrick's JoinUO went poof?

Re: Poison Duration:

Posted: Mon Apr 28, 2014 7:00 pm
by Kaivan
I apologize for not responding earlier (busy weekend and all), but here is the relevant code for determining the number of ticks:

Code: Select all

  strength = getObjVar(this, "poison_strength");
  setPoisoned(this, 0x01);
  Q4R0 = 0x0F;
  Q5JB(this, strength);
  Q5JF = (random(0x0A, 0x14) * strength);
  callBack(this, Q4R0, 0x53);
Q5JF represents the ticks, and Q4R0 represents the time between each tick. Function Q5JB produces the necessary messages based on the strength of the poison, and sets the length of time for the callback which then reduces the total tick count.

Re: Poison Duration:

Posted: Tue Apr 29, 2014 10:19 am
by Faust

Code: Select all

mobile = this;
strength = getObjVar(mobile, "poison_strength");
setPoisoned(mobile, true);
Q4R0 = 15;
Q5JB(mobile, strength);
Q5JF = (random(10, 20) * strength);
callBack(mobile, Q4R0, 83);
Few questions.
  • Are we pretty much looking at something like this?
  • Does strength hold a value of 0,1,2,3,4 or 1,2,3,4,5?
  • How does the callBack function calculate the data?
This looks like there should be a constant poison damage every 15 seconds unless the callBack function reduces that value.

Re: Poison Duration:

Posted: Tue Apr 29, 2014 4:38 pm
by Kaivan
To answer your questions in brief:
  • The modified code that you provided is precisely what is going on in the scripts. This particular piece of code is triggered when the script is first attached to the victim.
  • Poisons operate with a value between 1 and 5 (there is a small function that will default to a strength of 1 if some bug causes no value to be attached to the victim).
  • Q4R0 is a script-wide variable that is initially set to 15, and is re-calculated in function Q5JB to be the appropriate length based on the intensity of the poison. Since Q5JB is forcibly called when the script is first attached, the length of time for Q4R0 is effectively the appropriate time for each poison type for the duration of the poison effect.

Re: Poison Duration:

Posted: Wed Apr 30, 2014 9:20 am
by Faust
Gotcha

Last remaining question... are we using these precise values for the delay on UOSA?

Re: Poison Duration:

Posted: Wed Apr 30, 2014 2:14 pm
by Kaivan
I did get that checked on and we do use the same length of time as the demo for each poison strength on a per tick basis, and for the total number of ticks.

Re: Poison Duration:

Posted: Wed Apr 30, 2014 3:32 pm
by Faust
Great to know.

I noticed in all the previous discussions during the poison revamp a few years ago there was nothing mentioned about the duration of poison. There was only talks about how often the damage ticks landed and of course the damage itself. Not to mention the curing situation as well was a heated debate.

Glad to see everything is working as intended.