Joined: 29 Dec 2007 Posts: 85 Location: Montreal, Canada
Posted: Wed Mar 26, 2008 6:56 pm Post subject: Attributes & GainSystem Fix
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:
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: 85 Location: Montreal, Canada
Posted: Thu Mar 27, 2008 7:30 pm Post subject:
Just like this, Does this happen to everyone or only me?
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: 85 Location: Montreal, Canada
Posted: Thu Mar 27, 2008 9:56 pm Post subject:
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?
Author
Message
*Edwards
Joined: 29 Dec 2007 Posts: 85 Location: Montreal, Canada
Posted: Thu Mar 27, 2008 10:04 pm Post subject:
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: 355 Location: San Diego, California
Posted: Thu Mar 27, 2008 11:24 pm Post subject:
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.
Joined: 29 Dec 2007 Posts: 85 Location: Montreal, Canada
Posted: Sat Mar 29, 2008 12:31 am Post subject:
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: 85 Location: Montreal, Canada
Posted: Wed Apr 30, 2008 7:10 pm Post subject:
Still not working at all using lastest distro and core.
Author
Message
*Edwards
Joined: 29 Dec 2007 Posts: 85 Location: Montreal, Canada
Posted: Thu May 08, 2008 7:20 pm Post subject:
I don't know if anything has been fixed for it but it is not working.
Author
Message
*Edwards
Joined: 29 Dec 2007 Posts: 85 Location: Montreal, Canada
Posted: Thu May 29, 2008 4:18 pm Post subject:
Code:
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.
Austin it's been a long time already and it still doesn't work...
The distro is burned at the stake if people can't increase a skill... Well, I'm not forcing anyone just trying to find a way to fix it.
Does someone else use core097? Do they have problems with the gains? For my part using distro097 and even with the kludge it doesn't work....
It worked for me but it looks so crude. I sent this fix in to the distro team but I think Austin dropped it in favour of his own kludge.
I took my code to a live shard but then found the skill calculations were taking too long. So I removed all of the floating point calculations and went back to 10 * integer values. I have the feeling that floating point calculations are just inherently slow.
Author
Message
*Edwards
Joined: 29 Dec 2007 Posts: 85 Location: Montreal, Canada
Posted: Thu May 29, 2008 8:47 pm Post subject:
I tried the kludge and still doesn't work for me. I shall now test your code, thanks man.