Richy420Rich Posted September 24, 2012 Author Share Posted September 24, 2012 A small program I did which allows developers to generate custom Experience (To Next Levels) Without being bound to a formula.Firstly, download the attached program and place the application in your server folder.Open it up and set your levels/experience needed, click Generate when you're finished.I've included the source so you can add levels or build off it or whatever.This also requires some server side source edits, follow the tutorial below.Server, modTypes… Before the Public Types;```Public Generate As LevelRec```Under Public Type OptionRec```Public Type LevelRecExperience(1 To MAX_LEVELS) As LongEnd Type```Server, ModDatabase, you need these; Put these on the bottom.```Public Sub LoadExpFile()Dim filename As StringDim F As LongCall CheckExpFilefilename = App.Path & "\data\Experience" & ".dat"F = FreeFileOpen filename For Binary As #FGet #F, , GenerateClose #FEnd SubPublic Sub CheckExpFile()If Not FileExist("\data\Experience.dat") ThenCall SaveExpFileEnd IfEnd SubPublic Sub SaveExpFile()Dim filename As StringDim F As Longfilename = App.Path & "\data\Experience" & ".dat"F = FreeFileOpen filename For Binary As #FPut #F, , GenerateClose #FEnd Sub```In server, ModGeneral - LoadGameData, Before the end sub.```Call SetStatus("Loading Experience Sheet...")Call LoadExpFile```In server, ModPlayer, replace GetPlayerNextLevel with this;```Function GetPlayerNextLevel(ByVal index As Long) As LongIf Generate.Experience(GetPlayerLevel(index)) > 0 ThenGetPlayerNextLevel = Generate.Experience(GetPlayerLevel(index))ElseGetPlayerNextLevel = (50 / 3) * ((GetPlayerLevel(index) + 1) ^ 3 - (6 * (GetPlayerLevel(index) + 1) ^ 2) + 17 * (GetPlayerLevel(index) + 1) - 12)End IfEnd Function``` Link to comment Share on other sites More sharing options...
clark Posted September 24, 2012 Share Posted September 24, 2012 Working because you know ^^ …By the way Hp /mp generator would be nice no? ![:P](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/tongue.png) (suggestion) Link to comment Share on other sites More sharing options...
Zzbrandon Posted September 24, 2012 Share Posted September 24, 2012 Yea Hp and Mp if you did that it would be the awesomest ![:D](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/biggrin.png) Link to comment Share on other sites More sharing options...
Richy420Rich Posted September 24, 2012 Author Share Posted September 24, 2012 Yup, you just set the MAX property of the level scrollbar to whatever your max level is - That's why I included the source.As for the HP/MP.. It's possible, just add the types and scrollbars to the generator for HP/MP. Make it save on clicking Generate and then edit the GetPlayerMaxVital to read from the generator types. You homies gonna have to learn sometime so I'm just gonna leave this as a base. ![;)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/wink.png) Link to comment Share on other sites More sharing options...
Zzbrandon Posted September 24, 2012 Share Posted September 24, 2012 You should make a tut atleast how to convert it to HP/Mp atleast because you are the maker of the program ![:D](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/biggrin.png) would help Link to comment Share on other sites More sharing options...
clark Posted September 24, 2012 Share Posted September 24, 2012 Better say because some people (like me) are going to mess things and tell : not working *Hahahaha ![:D](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/biggrin.png) * Link to comment Share on other sites More sharing options...
Joyce Posted September 24, 2012 Share Posted September 24, 2012 He doesn't have to, you two are just lazy and can't be bothered to learn. Nor do you have any right to nag him if you change it into something it was never intended for.Anyway, nice work.. Although I'd personally still prefer to stick to a formula. Math isn't THAT hard. :] Link to comment Share on other sites More sharing options...
clark Posted September 24, 2012 Share Posted September 24, 2012 Being lazy no . Actually it's easy saying where to look etc… but when you don't know the code you need to use it's hard...(for exp = getplayernextlevel) actually for hp mp i don't even know how it's called so no it's not being lazy it's just don't know everything to do it.. and i'm still learning the vb6(my messager is not provocating sorry that's my english don't let me tell it without that feeling of being angry ^^ ) Link to comment Share on other sites More sharing options...
Richy420Rich Posted September 24, 2012 Author Share Posted September 24, 2012 > He doesn't have to, you two are just lazy and can't be bothered to learn. Nor do you have any right to nag him if you change it into something it was never intended for.> > Anyway, nice work.. Although I'd personally still prefer to stick to a formula. Math isn't THAT hard. :]Thanks, it was requested more than once so I just posted it here, personally I don't mind a formula but customs are alright also if you don't want it to look like a pattern.> Being lazy no . Actually it's easy saying where to look etc… but when you don't know the code you need to use it's hard...> > (for exp = getplayernextlevel) actually for hp mp i don't even know how it's called so no it's not being lazy it's just don't know everything to do it.. and i'm still learning the vb6> > (my messager is not provocating sorry that's my english don't let me tell it without that feeling of being angry ^^ )Smallville. It'll be in modCombat, Function - GetPlayerMaxVitalThey're split up by classes, in essence, Knight's have more HP than Mages but Mages have more MP than Knights.And I personally think it's silly to give multiple values per level like this program does for Experience.So check that Function and the last number in the formula is the base for which you're giving per level, the rest of the formula is just adding a Stat and Level mix to it to break pattern. Link to comment Share on other sites More sharing options...
Justn Posted September 24, 2012 Share Posted September 24, 2012 Omg no.more sitting infront of my calculator.. thanks for sharing richy this is cool@Brandon: ~~gtfo~~ Would you kindly leave this topic good Sir? Link to comment Share on other sites More sharing options...
Valentine90 Posted September 24, 2012 Share Posted September 24, 2012 Congratulations, this is really useful, thanks for sharing. Link to comment Share on other sites More sharing options...
clark Posted September 24, 2012 Share Posted September 24, 2012 Thanks Richy That's all i needed to know ![;)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/wink.png) ! Link to comment Share on other sites More sharing options...
Domino_ Posted September 24, 2012 Share Posted September 24, 2012 Best way I have seen in forum for custom exp for lvl.Thanks. ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png) Link to comment Share on other sites More sharing options...
Richy420Rich Posted September 25, 2012 Author Share Posted September 25, 2012 Lol thanks everyone, I didn't think many would really use it but it was a very easy program to make, it saves a crapload of case coding, and also faster than the old fashioned .ini I/O. Of course, a formula is the most effecient way to do it but each to their own. ![:P](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/tongue.png) Link to comment Share on other sites More sharing options...
Dawibex96 Posted October 6, 2012 Share Posted October 6, 2012 I have a problem, my settings:Level 1: 50expLevel 2: 80expLevel 3: 120expLevel 4: 180expLevel 5: 240expbut in game i need only 15 exp for level 2, 30 for level 3, 45 for level 4, whats wrong? Link to comment Share on other sites More sharing options...
Richy420Rich Posted November 1, 2012 Author Share Posted November 1, 2012 1\. You need to place the Experience Generator inside your server folder, it will redirect the Experience.dat file to the data folder.2\. Then you need to set the level/experience within the Experience Generator, then save it once you're finished.3\. Then you need to add the code that is instructed in the OP inside your servers source.@clark; This doesn't cause DX8 issues, it doesn't even mess with any DX components; The vital addition must be causing the DX8 issue. Talk to the dude who added that.@Anyone else; If these instructions don't work, then you're doing it wrong. Link to comment Share on other sites More sharing options...
Richy420Rich Posted November 1, 2012 Author Share Posted November 1, 2012 Aight I stand corrected, apologies. There was a relatively small bug that came with this application which I've fixed in the OP. Just redownload the application and it should work. Link to comment Share on other sites More sharing options...
Larias Posted February 6, 2013 Share Posted February 6, 2013 Just wanted to say thanks, Richy. I love it. Link to comment Share on other sites More sharing options...
boyesjs03 Posted February 7, 2013 Share Posted February 7, 2013 This is sweet man, nice one :-) 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