[Release]Instant leveling

09/10/2011 02:00 [Admin]Snuggle#1
Yay! Snuggles first release here!
(not that important lol)
So a lot of people are asking me how I did this on Ren.
I've decided to share how I applied instant leveling(without the use of mobs) to the game.
This will allow your players to select what level they want when making a toon.
Like so:

  1. First you need to go into the stored procedure usp_Create_Char_R.
    (This is located in PS_GameData for those that do not know)
  2. Now that you have that open find this line:
    Code:
    SET @SkillPoint = 5
  3. Remove that first before doing anything else.
    (If this is kept it will mess with the edits. At least for me it did)

    Where to add these edits you ask? After these lines:
    Code:
    @CharID int = 0,
    @NameCnt tinyint = 0
    
    AS
    
    SET NOCOUNT ON
    
    DECLARE @Ret int
  4. Now that we have all that out of the way it's time to start working on the instant leveling:
    Code:
    IF @Grow = 1 -- normal mode
    BEGIN
    	SET @Grow = 3
    	SET @Level = 15
    	SET @StatPoint = 126
    	SET @SkillPoint = 70
  5. Now this is pretty simple to set up here. You can choose what Grow or level you want. Make sure you set the stat and skill points correctly at whatever level you put in. (If someone applies a reset they will get unedited points)
  6. You also need to set the base stat points per level:
    (I added this part directly under the above part)
    Code:
    IF @Job = 0
    	BEGIN
    		SET @Str = 28
    	END
    	ELSE IF @Job = 1
    	BEGIN
    		SET @rec = 26
    	END
  7. This is set up to go with the level above. You will have to do the math on the points they get if you wish to increase/decrease the starting level.

That's it :cool: Now you can apply this to your server and tweak it how you want.
Make sure you always use a test server before applying something to a live server.

Note: This is not complete. You need to fill in the blanks like the Jobs and if you want to add custom levels to the other buttons.
I will NOT upload a video or screens on how to do this.
You must figure out how to do the extras on your own.

Extra: So lets say you want to add a custom start location based upon your new edit instead of just a single Job location in the map.ini.
Well this is pretty simple as well:

Code:
IF @Grow = 1 -- normal mode
BEGIN
	SET @Grow = 3
	SET @Level = 15
	SET @StatPoint = 126
	SET @SkillPoint = 70
	SET @Map = 18
As you can see here I simply added the map location under SkillPoint
Code:
IF @Family IN(0,1)
	BEGIN
	 -- set light coords and map
		SET @PosX = 208
		SET @PosY = 20
		SET @PosZ = 177
	END
	ELSE IF @Family IN(2,3)
	BEGIN
	 -- set fury coords and map
		SET @PosX = 766
		SET @PosY = 3
		SET @PosZ = 825
	END
Now here I added the locations for where they start based upon what Family they are(human, elf, etc)
This one makes lights start in the 1-15 light base and fury in fury base.
Simple really. Just thought someone might ask :P


Not sure if I'm missing anything here just let me know if something doesn't work right(no stupid "this doesn't work for me" or "how do i apply this?" questions. I will NOT answer those.)

Credits go to Abrasive for walking me through making this.
(Sorry for all the spam those times Abrasive :p lol)
09/10/2011 09:45 viper4513#2
Very nice guide here Snuggle, congrats on your first and keep up the good work! :)
09/10/2011 13:45 Xx.LaMin.xX#3
Just one suggestion Snuggle. Can you add SET @Exp = <Level Exp Ammount>

Otherwise it will show exp error in Log and people will start asking how to solve it. That is the way i found out on my server :P Hope this helps .
09/10/2011 16:53 viper4513#4
Quote:
Just one suggestion Snuggle. Can you add SET @Exp = <Level Exp Ammount>
That would be down to the people using this Release. Not everyone has the same expDefs, so having that in the query wouldnt work for everyone, therefor making even more questions here where people cudnt read through the code they used before using it.
09/10/2011 17:12 Xx.LaMin.xX#5
I understand that but they can read what i said on here.
I know that everybody dont have same expdefs.

Using that @Exp will fix ''error exp min usern=LaMin,charn=LaMin, level=15,exp=0,exppv=100''

See the exp=0 its becouse when you create char , it dont add exp to exp colum. So you need to add 100 exp to @exp = 100. Becouse there is the current exp showing. exppv=100

All you need to do is add the exp from your own exp defs should look like this:

Quote:
IF @Grow = 1 -- normal mode
BEGIN
SET @Grow = 3
SET @Level = 15
SET @StatPoint = 126
SET @SkillPoint = 70
SET @Exp = 100 (ex. my expdefs have 100 exp on lv15)
If you add that, the exp error wont show up anymore.
09/10/2011 17:24 HoaX.#6
We already have a pvp mode system like this on our Server so I decided to help a bit and post some files.

Mode Buttons:
[Only registered and activated users can see links. Click Here To Register...]


Put it in your data.saf In \interface\ folder.
09/10/2011 19:29 viper4513#7
I agree with you there Lamin, and having the info for the EXP in this topic is helpful to those people seeing that Exp error.. but still like i said before, adding it in the main thing would just make those "copy/paste" peoples screw everything up and come here crying "it set me at level 6 instead of level 15 WTF, your code sucks!"

Still, a nice release, with some good info for people who do find errors.
09/10/2011 20:00 [Admin]Snuggle#8
You set the exp in the ExpDefs not in the SP.
If a toon starts at 6 instead of 15 that would be your error not mine.
I did this the exact same way as I posted on my old server and it worked fine.
I removed exp completely from mobs so no one levels during farming.
As for pvp exp I just bumped up the exp required to level to 16 and 31 to the highest amount I could set it in the ExpDefs.
09/10/2011 20:16 viper4513#9
yeah i know Snuggle, was just saying if people started adding crap into your release it wouldnt work for people, then you would get the blame for it :)

Seen it happen on some of Abrasives Php scripts.

Your release works perfect for me, with no bugs or errors atall, and i did exactly the same as you i thinks. You explained it perfectly for any to get it working, and gave some nice details on it all aswell.

Also.. on another slightly different note, would you know where to find the "mode" descriptions atall? i havnt had a look around for them yet, i'm guessing they wuld be in the client files somewhere. Would just be nice to have those saying the right things too :)
09/10/2011 20:28 [Admin]Snuggle#10
If people add stuff to the SP then it would no longer be part of my work :P
It would be theirs and their edits. So it would be their fault if something went wrong.
I won't help outside the lines of what I've posted here.
Tough luck if you add something and ruin the whole thing :/

Quote:
Originally Posted by [Admin]Snuggle View Post
Make sure you always use a test server before applying something to a live server.
09/10/2011 23:57 ·Tyler·#11
Quote:
Originally Posted by viper4513 View Post
Also.. on another slightly different note, would you know where to find the "mode" descriptions atall? i havnt had a look around for them yet, i'm guessing they wuld be in the client files somewhere. Would just be nice to have those saying the right things too :)
I believe it's in the system-uni.txt file. That file has lots of goods to edit. :) I could be wrong though, I am writing this off memory instead of looking like I should.

Quote:
Originally Posted by Xx.LaMin.xX View Post
I understand that but they can read what i said on here.
I know that everybody dont have same expdefs.

Using that @Exp will fix ''error exp min usern=LaMin,charn=LaMin, level=15,exp=0,exppv=100''

See the exp=0 its becouse when you create char , it dont add exp to exp colum. So you need to add 100 exp to @exp = 100. Becouse there is the current exp showing. exppv=100

All you need to do is add the exp from your own exp defs should look like this:



If you add that, the exp error wont show up anymore.
LaMiN is correct on this, I added this to my character creation some time ago and was getting the same error he was, it was filling my log files quite fast. It's a good fix to add to this, I would just mention that the experience is based solely on their databases and not universally.

Tyler
09/11/2011 00:03 [Admin]Snuggle#12
That's odd how it didn't show up in my logs o.O
09/11/2011 05:35 HoaX.#13
Quote:
Originally Posted by ·Tyler· View Post
I believe it's in the system-uni.txt file. That file has lots of goods to edit. :) I could be wrong though, I am writing this off memory instead of looking like I should.
You're right. Search for number 5034 - 5037.
That's for em - um
09/11/2011 13:00 viper4513#14
Yeah, didnt show in mine either Snuggle :S maybe game versions that are different making this happen? :S

And thanks Tyler + HoaX xD i didnt get around to looking for the descriptions yet, but that will help me find them quicker :P
09/11/2011 16:36 [Admin]Snuggle#15
It might be because I set all the exp to 0 except for 15 and 30 o.O
Well are you guys who are having the logs fill up...are you letting people level on the server still? If so that is probably why or maybe you are still doing /exp2xenable <exp amount> ?