Jump to content

Question

Posted (edited)

Is there a reason why mob Skills are now in a SQL DB? Why was it changed from a text format to DB? I personally liked it better in the text format rather than opening a SQL DB just for skills.

Isn't it possible to add this as an option for us in the Inter_athena.conf where it states "Use SQL Tables"? Can't we separate it into "Use Mob Skills SQL" or something?

On a side note, it doesn't let me edit the tables either >.>

bump

Edited by Mysterious

12 answers to this question

Recommended Posts

Posted (edited)

Thus, I know. However, according to: https://rathena.svn....ter_athena.conf

//Use SQL item_db, mob_db and mob_skill_db for the map server

use_sql_db: no

I find it REALLY pointless to have mob_skill_db in SQL. How can I remove the map server from reading the mob_skill_db in the SQL? =/

NvM. I believe I found out how.

Edited by Mysterious
Posted

For others having the same problem, just make sure this is toggled to "no".

//Use SQL item_db, mob_db and mob_skill_db for the map server
use_sql_db: no

If you're running a SQL server, you need item_db and mob_db lol

Posted

Yes but keep in mind rAthena is half SQL and TXT. They're working very hard on the convert.

Guess that's true. Anyways doesn't bother me. I stopped the server from reading sql mob_skill and made it read mob_skill_db (text) instead.

Posted

This is probably topic revival but... Mind sharing how you did it please? :S... I'm not sure where to find a way to stop the emulator from NOT reading ONLY the mob skill db (and mob_skill_db2 of course)

Posted

This is probably topic revival but... Mind sharing how you did it please? :S... I'm not sure where to find a way to stop the emulator from NOT reading ONLY the mob skill db (and mob_skill_db2 of course)

We'll it's been awhile... lets see if I remember correctly :P.

Go to /conf/inter_athena.conf and find:

// Map Database Tables
item_db_db: item_db
item_db_re_db: item_db_re
item_db2_db: item_db2
mob_db_db: mob_db
mob_db2_db: mob_db2
mob_skill_db_db: mob_skill_db
mob_skill_db2_db: mob_skill_db2

Comment out mob_skill_db_db: mob_skill_db and mob_skill_db2_db: mob_skill_db2

Go to /src/map/map.c and find:

char mob_skill_db_db[32] = "mob_skill_db";
char mob_skill_db2_db[32] = "mob_skill_db2";

and comment them out.

In your /src/map/map.h find:

extern char mob_skill_db_db[32];
extern char mob_skill_db2_db[32];

Comment them out

Go to /src/map/mob.c and find:

/**
* read all mob-related databases
*/
static void mob_load(void)
{
sv_readdb(db_path, "mob_item_ratio.txt", ',', 2, 2+MAX_ITEMRATIO_MOBS, -1, &mob_readdb_itemratio); // must be read before mobdb
mob_readchatdb();
if (db_use_sqldbs)
{
	mob_read_sqldb();
	mob_read_sqlskilldb();
}
else
{
	mob_readdb();
	mob_readskilldb();
}
sv_readdb(db_path, "mob_avail.txt", ',', 2, 12, -1, &mob_readdb_mobavail);
mob_read_randommonster();
sv_readdb(db_path, DBPATH"mob_race2_db.txt", ',', 2, 20, -1, &mob_readdb_race2);
}

and change it to:

/**
* read all mob-related databases
*/
static void mob_load(void)
{
sv_readdb(db_path, "mob_item_ratio.txt", ',', 2, 2+MAX_ITEMRATIO_MOBS, -1, &mob_readdb_itemratio); // must be read before mobdb
mob_readchatdb();
if (db_use_sqldbs)
{
	mob_read_sqldb();
	mob_readskilldb();

}
else
{
	mob_readdb();
	mob_readskilldb();
}
sv_readdb(db_path, "mob_avail.txt", ',', 2, 12, -1, &mob_readdb_mobavail);
mob_read_randommonster();
sv_readdb(db_path, DBPATH"mob_race2_db.txt", ',', 2, 20, -1, &mob_readdb_race2);
}

Basically changing mob_read_sqlskilldb(); to mob_readskilldb(); under if (db_use_sqldbs) so that when you either set it to read SQL DBS or Not (in your inter_athena.conf) it'll read the mob_skill_db.txt formats instead.

This change should work! Lemme know what happens please :D

Posted

Well apparently this interferes with :

static int mob_read_sqlskilldb(void){}

function within the same file so... I still get compile errors xD... Im not sure this function will still have any use, all it seems to do is to read exactly what I want to delete xD... for now let me try commenting the function.

Posted

wow Thanks it worked perfectly!... god you need to know every place in the source to be able to change small stuff heh

Thanks a lot again! :D

Glad it worked for you :D! Enjoy. xP. Yeah, the source is a maze... if you don't know what you're looking for you'd get confused/lost really easily :P

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...