Page 1 of 1

Questions about craft skill rates, Magic levels, & chocobos.

Posted: Thu Aug 23, 2012 6:47 am
by KenJammin
1. I've modified the craft level up rates in the map_conf file. However it seems as though they only effect the rates to get a skill up i'd like to make it so its easy to get .5 or .3 a skill up instead of the usual .1 or .2.

2. How do i modify the level mages can learn a spell? I'd imagine i still need to edit the script for the scroll/useable item itself but how do i make it so after i learn it i can change which jobs have access to it. (basically i'm trying to make it so any job can use the tele spells at an early level.)

3. Where are chocobo move speeds stored? I'd like to buff out the move speeds of chocobo's a tad.

I know my way around scripting and idk where these values are stored or if some of them are saved client side (i'd hate to be on a wild goose chase).

Thanks for any help i'm looking forward to knowing the limitations of the server and whats to be done so i can start contributing!

Re: Questions about craft skill rates, Magic levels, & choco

Posted: Thu Aug 23, 2012 1:32 pm
by PrBlahBlahtson
KenJammin wrote:2. How do i modify the level mages can learn a spell? I'd imagine i still need to edit the script for the scroll/useable item itself but how do i make it so after i learn it i can change which jobs have access to it. (basically i'm trying to make it so any job can use the tele spells at an early level.)
Database table "spell_list." Note that all of that information is loaded when game_server starts, so if you change it while the server is running, you won't notice any changes until the server has been restarted.

The scrolls will also still list the retail level, because that data is all stored in the client.

Re: Questions about craft skill rates, Magic levels, & choco

Posted: Thu Aug 23, 2012 4:38 pm
by KenJammin
under what column? Is it the jobs column? cause that column is blank for me.

Re: Questions about craft skill rates, Magic levels, & choco

Posted: Fri Aug 24, 2012 12:18 am
by PrBlahBlahtson
Well, that's what I get for looking without leaping.

Yes, it's inside the jobs column, but it's a little harder than that. The jobs are all handled as binary data, which Navicat can't really display or manipulate the way you're trying to. Hope you like SQL queries!

So here's an example of a spell:

Code: Select all

INSERT INTO `spell_list` VALUES ('1', 'cure', 0x0000010003000500000000000000000000000005, '6', '7', '0', '95', '33', '8', '2000', '5000', '7', '7', '1', '4000', '0', '0', '1.00', '0', '0');
The part you want to look at is the 0x000... section. Each pair of numbers refers to a job. Warrior, Monk, and so on. Check your Job Levels in-game if you need the order, they match perfectly.

In this case, the number (in octal, not decimal) is the level that the spell is available at. If you're not familiar with Octal, here's Cure III as an example:

Code: Select all

INSERT INTO `spell_list` VALUES ('3', 'cure_iii', 0x000015001A001E0000000000000000000000001E, '6', '7', '0', '95', '33', '46', '2500', '6000', '7', '7', '3', '4000', '0', '0', '1.00', '0', '0');
See that 15 for White Mage? That's 21. The 1A for Red Mage is 26. 1E is Paladin's 30, and the 1E at the end is Scholar.

Edit:
If you want to make editing these faster, here's a Query you can create in Navicat to help streamline the process a little.

Code: Select all

DELETE FROM `spell_list` WHERE spellid IN (1,2,3);
INSERT INTO `spell_list` VALUES ('1', 'cure', 0x0000010003000500000000000000000000000005, '6', '7', '0', '95', '33', '8', '2000', '5000', '7', '7', '1', '4000', '0', '0', '1.00', '0', '0');
INSERT INTO `spell_list` VALUES ('2', 'cure_ii', 0x00000B000E001100000000000000000000000011, '6', '7', '0', '95', '33', '24', '2250', '5000', '7', '7', '2', '4000', '0', '0', '1.00', '0', '0');
INSERT INTO `spell_list` VALUES ('3', 'cure_iii', 0x000015001A001E0000000000000000000000001E, '6', '7', '0', '95', '33', '46', '2500', '6000', '7', '7', '3', '4000', '0', '0', '1.00', '0', '0');
Change the numbers at the end of that first row as necessary, and copy the lines from spell_list.sql (you can open it in Notepad) for the spells you're replacing. There are probably neater ways to do it, depending on what you're up to. "Update 'spell_list' set job=0x0101010101010101010101010101010101010101;" would give all spells to all jobs at L1.

Re: Questions about craft skill rates, Magic levels, & choco

Posted: Fri Aug 24, 2012 8:50 am
by KenJammin
When i tried to modify it i got this:
'SOH SOH SOH SOH SOH SOH SOH SOH SOH SOH SOH SOH'
in sql. Tried doing it by editing the document and using the query browser. Same result.

Edit:
Okay So i was able to get it into sql without any weird issues.
Using:
0x0001010101010101010101010101010101010101

Its not working in game though tomorrow i'll try it with a different spell or something.

Re: Questions about craft skill rates, Magic levels, & choco

Posted: Fri Aug 24, 2012 1:06 pm
by PrBlahBlahtson
Used

Code: Select all

Delete from `spell_list` where spellid in (144);
INSERT INTO `spell_list` VALUES ('144', 'fire', 0x0000000D13000117000000000000000000000010, '2', '1', '0', '4', '36', '24', '2250', '10000', '2', '252', '144', '4000', '0', '35', '1.00', '0', '0');
to give Paladin "Fire" at Level 1. Restarted server. Paladin used Scroll of Fire (item 4752) successfully, learned Fire.

Unable to cast via menu or text command, though. Hmm. Guessing that the client does not like shenanigans, or that it somehow knows that Paladin does not possess "Black Magic." Provided with a /RDM 1 support job and still unable to use.

That's getting a bit further into the core or client than I'm familiar with, unfortunately. The server should know only what you teach it, so I'm guessing the client is just refusing to accept something can cast a spell it doesn't agree on.

Re: Questions about craft skill rates, Magic levels, & choco

Posted: Sat Aug 25, 2012 8:01 am
by KenJammin
Ah well i'm guessing my first question is also related then.

When i was testing it out today i ended up with the same results, i was able to use the scroll but no dice on actually casting it. I also tried to cast it with the console funny enough. I started to assume that the level was stored somewhere on the client when i realized the MP listed is also stored client side.

I just edited the equipment of the teleport rings to basically do what i wanted... don't know why i didn't start with that in the first place.

That leaves me with question 1: how do i modify skill up rates to account for +.5's and +.3's.

Re: Questions about craft skill rates, Magic levels, & choco

Posted: Sat Sep 15, 2012 1:50 am
by bluekirby0
1) It will take a bit of source code wizardry (and recompiling) but it isn't too complicated. In src/map/charutils.cpp look for the TrySkillUP function. I'm not going to look very closely at it right now, but what you need to change should be in there.

2) The client "knows" jobs/levels for spells AND the server enforces those rules, so it would require modifying both the client and the server to do what you want.

3) Once again it will take a bit of code wizardry. Look around for any references to the speed config option in the code and you should find what you are looking for. Unfortunately I don't know more specifically where to tell you to look.