Quess Posted June 9, 2011 Author Share Posted June 9, 2011 Where can i change max stats? Couldn't find it in constants ;o Link to comment Share on other sites More sharing options...
RyokuHasu Posted June 10, 2011 Share Posted June 10, 2011 FINNALY XD someone finnaly has a use for my tutorial.http://www.touchofdeathforums.com/smf/index.php/topic,70107.0.htmlshows how to give custom max stats to every class. Link to comment Share on other sites More sharing options...
Quess Posted June 10, 2011 Author Share Posted June 10, 2011 I meant I want to be able to make stats bigger than 255\. Does it change that? Link to comment Share on other sites More sharing options...
Joyce Posted June 10, 2011 Share Posted June 10, 2011 Change:```Stat(1 To Stats.Stat_Count - 1) As Byte```To:```Stat(1 To Stats.Stat_Count - 1) As Long```On both the client and server, ModTypes. Type PlayerRecThen find:```If GetPlayerRawStat(index, PointType) >= 255 Then```In ModHandledata, Sub HandleUseStatpoint and change it to whatever you want the max amount to be. (Taking in mind the limits of the Long variable, I however doubt you can come up with a sane number that goes over that, however) Link to comment Share on other sites More sharing options...
maxi_d_great Posted June 10, 2011 Share Posted June 10, 2011 dont forget```Sub SetPlayerStat(ByVal Index As Long, Stat As Stats, ByVal Value As Long) ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler If Index > MAX_PLAYERS Then Exit Sub If Value <= 0 Then Value = 1 If Value > MAX_BYTE Then Value = MAX_BYTE Player(Index).Stat(Stat) = Value ' Error handler Exit Suberrorhandler: HandleError "SetPlayerStat", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit SubEnd Sub```change this line```If Value > MAX_BYTE Then Value = MAX_BYTE```give thanks to lightning Link to comment Share on other sites More sharing options...
Joyce Posted June 10, 2011 Share Posted June 10, 2011 Ah right, forgot about that security check. Link to comment Share on other sites More sharing options...
Quess Posted June 10, 2011 Author Share Posted June 10, 2011 Shall i change this "MAX_BYTE" to number, as long or what?When i try to put 999 there i'm getting out of range error while connecting to server. Link to comment Share on other sites More sharing options...
erkro1 Posted June 10, 2011 Share Posted June 10, 2011 @Quess:> Shall i change this "MAX_BYTE" to number, as long or what?Change it to MAX_LONG Link to comment Share on other sites More sharing options...
Quess Posted June 10, 2011 Author Share Posted June 10, 2011 Thanks for instant reply ;DD Link to comment Share on other sites More sharing options...
erkro1 Posted June 10, 2011 Share Posted June 10, 2011 @Quess:> Thanks for instant reply ;DDYour welcome ;) Link to comment Share on other sites More sharing options...
Quess Posted June 10, 2011 Author Share Posted June 10, 2011 Hmm… Changed it to MAX_LONG, but I got out of range error again ;<Then tried to change NpcRec, ItemRec and ClassRec like this.```Stat(1 To Stats.Stat_Count - 1) As Byte```To this:```Stat(1 To Stats.Stat_Count - 1) As Long```And:```Add_Stat(1 To Stats.Stat_Count - 1) As ByteStat_Req(1 To Stats.Stat_Count - 1) As Byte```To:```Add_Stat(1 To Stats.Stat_Count - 1) As LongStat_Req(1 To Stats.Stat_Count - 1) As Long```And "out of range" error AGAIN! ;< Link to comment Share on other sites More sharing options...
maxi_d_great Posted June 10, 2011 Share Posted June 10, 2011 go try to make another accnt , Link to comment Share on other sites More sharing options...
Joyce Posted June 10, 2011 Share Posted June 10, 2011 It doesn't work on old accounts, as they're stuffed with the old data formats. Link to comment Share on other sites More sharing options...
Quess Posted June 10, 2011 Author Share Posted June 10, 2011 And shall i change those ItemRec, NpcRec and ClassRec? Link to comment Share on other sites More sharing options...
Joyce Posted June 10, 2011 Share Posted June 10, 2011 No.. changing those means you'll need to delete your items and NPCs as well.. Link to comment Share on other sites More sharing options...
Quess Posted June 10, 2011 Author Share Posted June 10, 2011 Deleted all old accounts/palyers and I'm still getting "out of range" error. What the ****? Link to comment Share on other sites More sharing options...
Joyce Posted June 10, 2011 Share Posted June 10, 2011 You must've changed something else, try debugging it and see where it gives you RTE9\. Don't come here complaining without handing us any info. Link to comment Share on other sites More sharing options...
Quess Posted June 10, 2011 Author Share Posted June 10, 2011 Hmm… Downloaded new Eclipse and now it works. I think that the problem was with Altar's engine from which i was creating my game... Sorry for bothering you with it ^^ Link to comment Share on other sites More sharing options...
Quess Posted June 19, 2011 Author Share Posted June 19, 2011 This has to work… I did this with the latest Eclipse Origins, but had problems to do it with some other engine. Just try to download new Eclipse and do everything again. Link to comment Share on other sites More sharing options...
UzGo Posted August 19, 2011 Share Posted August 19, 2011 fixed Link to comment Share on other sites More sharing options...
UzGo Posted August 19, 2011 Share Posted August 19, 2011 Thanks A LOT For the max stats I am so happy :) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now