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: [SOLVED] Problem with adding custom races in Trinity  (Read 1910 times)

Moridhin

  • Registred Member
  • LUA Script Tinker
  • *****
  • Posts: 46
    • View Profile
[SOLVED] Problem with adding custom races in Trinity
« on: April 08, 2013, 08:24:49 pm »
Ok here is the thing:
-I did client part of adding custom races(i added 2),they show up without errors in character creation screen.
-I did core edit of SharedDefines.h and compiled without problems.
-I added into database query just for playercreateinfo table(only that for testing purpose)
BUT when i try to create new character with those new races i get in my world console this error:
Code: [Select]
Player::Create: Possible hacking-attempt: Account 1 tried creating a character named 'Adsdas' with an invalid race/class pair (14/1) - refusing to do so.
Any ideas how to solve this?
Here is mine added line in playercreateinfo:
Code: [Select]
INSERT INTO `playercreateinfo` VALUES ('14', '1', '1', '14', '-618.518', '-4251.67', '38.718', '0');Its broken warrior (i added only that for testing purpose) with starting zone same as orcs.
-
Also upload shareddefines.h if someone could check it out.
Tnx
« Last Edit: April 15, 2013, 08:35:15 pm by Admin »

Linwood

  • Registred Member
  • BLP Convertor
  • *****
  • Posts: 11
    • View Profile
Re: Problem with adding custom races in Trinity
« Reply #1 on: April 13, 2013, 03:04:32 pm »
Your race MAX_RACES is 13 it must be 18 (forest troll)+1 = 19

#define MAX_RACES         19
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Ascathos

  • Moderators
  • Creator of Worlds
  • *****
  • Posts: 1129
    • View Profile
Re: Problem with adding custom races in Trinity
« Reply #2 on: April 14, 2013, 05:38:11 pm »
As I wrote for MAX_CLASSES (And it's the same for MAX_RACES; really:)

Quote
I upped the "MAX_[... (Here: CLASSES)" value by one, so that it counts 11 (9 by default, one for "zero" (as CLASS_NONE) and our new class).

Basically, the number of used races (mostly the ones not commented out if I am not wrong), + 1 (RACE_NONE) + 1 for the new race.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Moridhin

  • Registred Member
  • LUA Script Tinker
  • *****
  • Posts: 46
    • View Profile
Re: Problem with adding custom races in Trinity
« Reply #3 on: April 15, 2013, 03:40:06 pm »
Tnx guys,very much for your answers,will check it out and see if it works!
I set it to 19 and it worked perfectly!!
Ty you very much!I cracked my head with this for a month,finaly get it to work.
Tnx :)
« Last Edit: January 01, 1970, 01:00:00 am by Admin »