This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: [QUESTION] Character creation settings  (Read 1211 times)

Смердокрыл

  • Registred Member
  • Creator of Worlds
  • *****
  • Posts: 445
    • View Profile
[QUESTION] Character creation settings
« on: August 11, 2015, 01:15:31 am »
Hey!
I need to:
Change the allowed race/class combinations (no loginscreen changes, I just want the client not to crash when I log into a character of an unusual race/class combination)
Allow spaces and other signs in character names. Also increase the maximum character name length.

How can I achieve this goals?
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
or no.
At least I tried.

Amaroth

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 1219
    • View Profile
    • Amaroth's Tools
Re: [QUESTION] Character creation settings
« Reply #1 on: August 11, 2015, 08:16:58 am »
Race/class combinations are stored in CharBaseInfo.dbc. You need to add a row there. For instance, if you want to have human hunter, you have to add row with data 1, 3 there (1 = human race, 3 = hunter class). You need to have DBC on both client and server side in order to make this work.

There is another issue with this. Server will crash on startup if it won't find base stats for level 1 of any combinatoin of race/class. So, if you will create human hunters, server won't know what should their base stats be, and there are no default values - so it will crash. You need to create those base stats. Check world.player_levelstats table. You need to create at least level 1 stats. When server can't find base stats for some level, it uses values from highest lower level which has stats set. However, thats not possible for level 1, obviously. Thats why you need to set at least those, to even make it work at all. If you have leveling system on your server, then you will probably want to set also stats for another, perhaps all (80?) levels.

You also might need to check all playercreateinfo tables. Server also needs to know where should be newly created character spawned, which spells should it know, which items should it have... Something what won't be set for your new race/class combination. There are settings for whole race or for all members of that class, which will apply to your custom character too, but you might want to edit or add something.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
English YT tutorial channel. Check it out if you preffer videos over walls of text.:
https://www.youtube.com/AmarothEng

Want to support me for my releases and/or tutorials? You can send donation via Paypal to:
jantoms@seznam.cz

Смердокрыл

  • Registred Member
  • Creator of Worlds
  • *****
  • Posts: 445
    • View Profile
Re: [QUESTION] Character creation settings
« Reply #2 on: August 11, 2015, 11:00:15 am »
Thanks, Amaroth, you are very good at explaining stuff)
And what about character names?
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
or no.
At least I tried.

Смердокрыл

  • Registred Member
  • Creator of Worlds
  • *****
  • Posts: 445
    • View Profile
Re: [QUESTION] Character creation settings
« Reply #3 on: August 11, 2015, 11:04:17 am »
Quote from: "Amaroth"
CharBaseInfo.dbc
For some reason I can't open it with MyDBCEditor. It returns an error "Invalid Fieldsize: 2,66666666666667" and then something in german like "Zugriffsverletzung bei Adresse 0045E121 in Modul 'MyDbcEditor.exe'. Lesen von Adresse 00000000."
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
or no.
At least I tried.

Amaroth

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 1219
    • View Profile
    • Amaroth's Tools
Re: [QUESTION] Character creation settings
« Reply #4 on: August 11, 2015, 05:22:05 pm »
This is one of those really rare DBCs which are to be opened by Taliis. MyDBCEditor can't open this particular one, thats true.

About character names, I have seen some values reffering to them in worldserver config file, there are min and max name lengths set. I don't know if there is something also in client side, probably yes, but it can be quite likely just hardcoded in client itself. It is also possible that maximal name length can be capped by interface coding (LUA/XML, don¨t ask me where, I am not familiar with this kind of files at all, I just know how they work).

About spaces in names, I don't really know. And I would not even recommend to do something like that, because quite a lot of GM commands take more than one argument and those arguments are being separated by - usually - spaces. For example .guild invite.:
.guild invite CharName "GuildNameInCommas". This simply won't work with character name which is containing space. Guild name can contain spaces, sure - thats why those commas are there. But you can't put them around character name, so you are basically screwed and would have to remake all GM commands using character names as arguments. Even for instance .appear CharName won't probably work, because its quite likely that server will recognize only 1st part of name as given argument, if given name will contain space.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
English YT tutorial channel. Check it out if you preffer videos over walls of text.:
https://www.youtube.com/AmarothEng

Want to support me for my releases and/or tutorials? You can send donation via Paypal to:
jantoms@seznam.cz