It is currently Fri Nov 21, 2008 3:59 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 15 posts ] 
Author Message
 Post subject: Attributes & GainSystem Fix
PostPosted: Wed Mar 26, 2008 2:56 pm 
Offline
User avatar

Joined: Fri Dec 28, 2007 11:19 pm
Posts: 113
Location: Montreal, Canada
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?

_________________
Image
FantasiaShard.com


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

Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 27, 2008 3:30 pm 
Offline
User avatar

Joined: Fri Dec 28, 2007 11:19 pm
Posts: 113
Location: Montreal, Canada
Just like this, Does this happen to everyone or only me?

_________________
Image
FantasiaShard.com


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 27, 2008 5:08 pm 
Offline
Certified POL Expert
User avatar

Joined: Sat Feb 04, 2006 6:26 pm
Posts: 576
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.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 27, 2008 5:56 pm 
Offline
User avatar

Joined: Fri Dec 28, 2007 11:19 pm
Posts: 113
Location: Montreal, Canada
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? ;)

_________________
Image
FantasiaShard.com


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 27, 2008 6:04 pm 
Offline
User avatar

Joined: Fri Dec 28, 2007 11:19 pm
Posts: 113
Location: Montreal, Canada
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 :\

_________________
Image
FantasiaShard.com


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 27, 2008 7:24 pm 
Offline
POL Developer
User avatar

Joined: Wed Jan 25, 2006 2:30 am
Posts: 428
Location: San Diego, California
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


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 27, 2008 9:32 pm 
Offline
Certified POL Expert
User avatar

Joined: Sat Feb 04, 2006 6:26 pm
Posts: 576
Oh that's right Austin. I remember seeing that too before I put in the rounding up fix.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 28, 2008 7:21 pm 
Offline
User avatar

Joined: Fri Dec 28, 2007 11:19 pm
Posts: 113
Location: Montreal, Canada
Forget it...

_________________
Image
FantasiaShard.com


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

Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 28, 2008 7:57 pm 
Offline
User avatar

Joined: Fri Feb 10, 2006 8:08 am
Posts: 327
Location: Myrtle Beach, South Carolina
Didn't test, but I'm bored, :D

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


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 28, 2008 8:31 pm 
Offline
User avatar

Joined: Fri Dec 28, 2007 11:19 pm
Posts: 113
Location: Montreal, Canada
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...

_________________
Image
FantasiaShard.com


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 30, 2008 3:10 pm 
Offline
User avatar

Joined: Fri Dec 28, 2007 11:19 pm
Posts: 113
Location: Montreal, Canada
Still not working at all using lastest distro and core.

_________________
Image
FantasiaShard.com


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 08, 2008 3:20 pm 
Offline
User avatar

Joined: Fri Dec 28, 2007 11:19 pm
Posts: 113
Location: Montreal, Canada
I don't know if anything has been fixed for it but it is not working.

_________________
Image
FantasiaShard.com


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 29, 2008 12:18 pm 
Offline
User avatar

Joined: Fri Dec 28, 2007 11:19 pm
Posts: 113
Location: Montreal, Canada
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....

_________________
Image
FantasiaShard.com


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 29, 2008 4:44 pm 
Offline
Certified POL Expert
User avatar

Joined: Sat Feb 04, 2006 6:26 pm
Posts: 576
I got the skill gain to work with the distro functions and found that skill didn't gain past 0.7 either. This was a while ago.

I re-wrote functions to be something like this:

Code:
function AP_SetTrueSkill(mobile, attributeid, points)
   var success := 0;
   if ( points >= 0 )
      success := SetAttributeBaseValue(mobile, attributeid, CInt(CDbl(points) * 10.0 + 0.1));
   else
      success := SetAttributeBaseValue(mobile, attributeid, CInt(CDbl(points) * 10.0 - 0.1));
   endif
   return success;
endfunction


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.


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 29, 2008 4:47 pm 
Offline
User avatar

Joined: Fri Dec 28, 2007 11:19 pm
Posts: 113
Location: Montreal, Canada
I tried the kludge and still doesn't work for me. I shall now test your code, thanks man.

_________________
Image
FantasiaShard.com


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subice by phpBBservice.nl