How to edit Section ID for private server characters

Dave

Member
As the title suggests, I am looking for a way to edit the Section ID of characters for my own private server. I have downloaded various (many) tools and the all seem to be antiquated. The only one that almost worked was simply hex editing psobb.exe while in the lobby. The instructions gave a hex address for the location of the Section ID but that was for the 1.25.10 exe. I think (...think...) that if I knew the hex address in the 1.25.13 exe, I would be able to accomplish it otherwise. Thank you in advance for any insight you can provide.
 

Soly

Member
That might not work either... I don't think the latest server allows that.

I hope you are using MySQL, if you are using it, you can open your character data blob, go to the offset 0x03A8 and modify that byte.
 

Dave

Member
Thank you very much for the reply.
I am using the DAT version.
Installing MySQL seemed a little intimidating and I doubt I would ever be playing with more than myself and a few friends.
After a week of reading forum posts and tinkering, everything else seems to be working great.
I would hate to scrap what I've worked on but if that's the only way to CHOOSE my section id...
 

tofuman

Administrator
Staff member
You could add a command to the source which sets the section id. Which would be easier then having to edit the dat database directly.
 

Dave

Member
I take that to mean I would need to download and open the source code in Visual Studio.
Is that correct?
 

Dave

Member
I did download the source code and opened it in VS2010.
I was unable to find any other the other commands in the code to use as an example for writing my own.
then...
I managed to hex edit the character.dat file successfully.
I changed the first character slot on the first account (Guild Card 42000001 - slot 1) from Greenill to Purplenum.
I'm not sure how difficult that will be with a few accounts and several characters but its an option.
 

tofuman

Administrator
Staff member
something like this should work fine inside the Send06 function.

Code:
if ((!strcmp(myCommand, "sectionid")) && ((client->isgm) || (playerHasRights(client->guildcard, 3))))
{
   if ( myCmdArgs == 0 )
     SendB0 ("Need to specify Section ID...", client);
   else
   {
     unsigned int sectionID = atoi(myArgs[0]);
     if ((sectionID >= ID_Viridia) && (sectionID <= ID_Whitill))
     {
       client->character.sectionID = sectionID;
       SendB0 ("Please change blocks to reflect changes...", client);
     }
     else
       SendB0 ("Invalid Section ID specified...", client);
   }
}
 
Last edited:

Dave

Member
Okay, so I just blew my own mind.
Thank you so much for your suggestion tofu.
I finally found the commands...in the ship server solution...duh.
I am not sure why I originally assumed they would be in the login server solution.
I used the /lang command as a template.
IT WORKS!...except...
If I leave the argument blank, the client errors out (NULL).
I included the error trap from the /lang command.
Would it be okay if I pasted the code here?
 

Dave

Member
oh, lol.
You did it for me.
Thank you so much and sorry to take up your time.
I usually try to figure all of this out on my own.
You rock!
 

Dave

Member
There is an extra curly brace in the above code.
I just wanted to point it out in case any other code noobs like me come across it.
It took me a minute to figure out why the ship wouldn't compile.
Now, all I need to do is find someone to teach the in and outs of the game. :p
 

tofuman

Administrator
Staff member
Ah yeah. I've removed the extra curly brace just in case someone ever wants to use it in the future.
 

konrad

Member
I did download the source code and opened it in VS2010.
I was unable to find any other the other commands in the code to use as an example for writing my own.
then...
I managed to hex edit the character.dat file successfully.
I changed the first character slot on the first account (Guild Card 42000001 - slot 1) from Greenill to Purplenum.
I'm not sure how difficult that will be with a few accounts and several characters but its an option.

Hi Dave,

I'm trying to change the section id of my characters by hex editing the character.dat. I'm having trouble finding exactly what to edit in order to change a characters section id.

Would you mind telling me what exactly I should search for when hex editing the character.dat?
 
Top