PenUltima Online Forum Index Official Core: 096.7
Official Core: 097 2008-02-26
Donate towards the POL web hosting bill!
 POL Home   FAQ   Search    Memberlist   Usergroups    Register    Profile   Log in to check your private messages   Log in
Attributes & GainSystem Fix

 
Post new topic   Reply to topic    PenUltima Online Forum Index -> Distro Bug Reports
Display posts from previous:   

Author Message
*Edwards



Joined: 29 Dec 2007
Posts: 61
Location: Montreal, Canada

PostPosted: Wed Mar 26, 2008 6:56 pm    Post subject: Attributes & GainSystem Fix Reply with quote

Headache cuz I can't find the answer now after different tests. I can't find why I train a skill to 0.7% and stuck. It doesn't increase at all after 0.7%. I tested with official pol097distro that is published today 2008-03-26. I'm wondering if there is someone else using this version so we could verify if it is me or not. I understand the gain system and thus I added a check to tell me once the skill has increase:

Code:
SkillDbgMsg(mobile, "Passed. Advance "+skill_name+": "+advance);

   var temp := true_skill + advance;
        AP_SetTrueSkill(mobile, skill_name, temp);
   var change := AP_GetTrueSkill(mobile, skill_name);
        SkillDbgMsg(mobile, skill_name+" is now: "+change);


With this code once used I get a message like:

Passed. Advance anatomy: 0.1
Anatomy is now: 0.7
And of course I pass every time and it gives me that message but the skill still and always 0.7% maximum.... Does anyone could give me an answer?


Last edited by *Edwards on Fri Mar 28, 2008 11:32 pm; edited 1 time in total

Author Message
*Edwards



Joined: 29 Dec 2007
Posts: 61
Location: Montreal, Canada

PostPosted: Thu Mar 27, 2008 7:30 pm    Post subject: Reply with quote

Just like this, Does this happen to everyone or only me?

Author Message
OldnGrey



Joined: 04 Feb 2006
Posts: 500

PostPosted: Thu Mar 27, 2008 9:08 pm    Post subject: Reply with quote

I am not sure where your problem is.
I took the distro combat system and re-wrote it to fit my shard so I can't pinpoint your problem.

The SkillDbgMsg message only reports the advance.

I'd suggest you take a look at the attributes package and especially the CheckSkillAdvance function and the SkillCheck function to see if there is any gain supposed to happen.

There are a few SkillDbgMsg messages in there that would tell you if the cap was reached or it was too hard or too easy or if settings are getting in the way - eg FreeGainUntil
Perhaps take a look at attributes\config\settings.cfg to see if they make sense.

Overall though, I think the attributes system is pretty good, but I haven't used it as it stands.

Author Message
*Edwards



Joined: 29 Dec 2007
Posts: 61
Location: Montreal, Canada

PostPosted: Thu Mar 27, 2008 9:56 pm    Post subject: Reply with quote

It's the same over here but anyway I took a break of it and wanted to know if I were the only one. If I find something wrong I'll notice here. Thanks anyway OldNGrey. Enjoy your stay and remember our beer? Wink

Author Message
*Edwards



Joined: 29 Dec 2007
Posts: 61
Location: Montreal, Canada

PostPosted: Thu Mar 27, 2008 10:04 pm    Post subject: Reply with quote

Just created a command:

Command .test
Code:
use uo;

include ":attributes:attributes_ex";
include ":skilllocks:common";


Program ChecrSkill(mobile)

        var advance := 0.1;
        var true_skill := AP_GetTrueSkill(mobile, TACTICS);
   var temp := true_skill + advance;
        AP_SetTrueSkill(mobile, TACTICS, temp);
   var change := AP_GetTrueSkill(mobile, TACTICS);
endprogram


I can gain at 0.7 without problems using .test but if I have 0.7 and use .test it doesn't increase at all... It's really strange.

I understand attributes with pol097 but I can't find the answer to this question... Need help :\

Author Message
Austin
POL Developer


Joined: 30 Jan 2006
Posts: 345
Location: San Diego, California

PostPosted: Thu Mar 27, 2008 11:24 pm    Post subject: Reply with quote

Probably is related to the core floating point precision problem.

There is a while loop in the skill gain code that has a kludge for that.

Author Message
OldnGrey



Joined: 04 Feb 2006
Posts: 500

PostPosted: Fri Mar 28, 2008 1:32 am    Post subject: Reply with quote

Oh that's right Austin. I remember seeing that too before I put in the rounding up fix.

Author Message
*Edwards



Joined: 29 Dec 2007
Posts: 61
Location: Montreal, Canada

PostPosted: Fri Mar 28, 2008 11:21 pm    Post subject: Reply with quote

Forget it...

Last edited by *Edwards on Mon Apr 07, 2008 8:43 pm; edited 1 time in total

Author Message
MontuZ
Distro Developer


Joined: 10 Feb 2006
Posts: 286
Location: Myrtle Beach, South Carolina

PostPosted: Fri Mar 28, 2008 11:57 pm    Post subject: Reply with quote

Didn't test, but I'm bored, Very Happy

Quote:
var temp := (stat_value + advance);

if ( temp == AP_GetTrueStat(mobile, stat_name) )
temp *= 10;
temp += 1;
temp := CDbl(temp / 10);
endif


OR..

Quote:
var temp := (stat_value + advance);

if ( temp == AP_GetTrueStat(mobile, stat_name) )
temp := (CDbl((temp * 10) + 1) / 10);
endif

Author Message
*Edwards



Joined: 29 Dec 2007
Posts: 61
Location: Montreal, Canada

PostPosted: Sat Mar 29, 2008 12:31 am    Post subject: Reply with quote

Just sent my precision because the original file don't even fix the main problem. Also if you look closely to the skill function "while loop" it was looking for AP_GetTrueStat instead of GetTrueSkill...

Author Message
*Edwards



Joined: 29 Dec 2007
Posts: 61
Location: Montreal, Canada

PostPosted: Wed Apr 30, 2008 7:10 pm    Post subject: Reply with quote

Still not working at all using lastest distro and core.

Author Message
*Edwards



Joined: 29 Dec 2007
Posts: 61
Location: Montreal, Canada

PostPosted: Thu May 08, 2008 7:20 pm    Post subject: Reply with quote

I don't know if anything has been fixed for it but it is not working.

Post new topic   Reply to topic    PenUltima Online Forum Index -> Distro Bug Reports All times are GMT - 4 Hours
Page 1 of 1

 




Powered by phpBB © 2001, 2005 phpBB Group :: Theme & Graphics by GHS & Scott E. Royalty