Page 1 of 1
Bug 25: Crafting class is Unknown in /who
Posted: Sun Nov 16, 2014 3:19 pm
by BugTracker
Bug ID : 25 - Crafting class is Unknown in /who
Bug Date : 2014/10/23 06:25:01
Assigned To : John Adams
Priority : Medium
Category : VGClient
Sub-Category : Gameplay: Crafting
Severity : Minor (e.g. Cosmetic)
Reproducible : Every time
Details:
In /who, players crafting class is Unknown -- add the proper values to the database (?) or defaults so the generic class shows up properly.
Originated From World: New Telon (1)
Chunk : Tursh Village (144)
Location : 56493 -32334 34580
Re: Bug 25: Crafting class is Unknown in /who
Posted: Sun Nov 16, 2014 3:27 pm
by Volt
John you just posted about this in the 0.2 priorities thread. But trying out this new nifty function to make a forum post instead.
Actually John it is you who need to change in the db schema. New characters shall have a crafting class of 255 (and not 1050 like it is now).
Btw, new characters shall not be assigned to Artificers, but to 255 = none or unknown.
Re: Bug 25: Crafting class is Unknown in /who
Posted: Sun Nov 16, 2014 3:41 pm
by John Adams
Dev Notes:
[quote]
Entered on Nov 14, 2014 10:11 by Volt
Crafting class is not yet implemented, i.e. I can not fix this until we start implement the crafting system.
Entered on Nov 14, 2014 16:11 by Volt
I take that back. I found a screenshot proving that if a character does not have a crafting class, it shall not be shown at all in the /who result. I will fix this.
Entered on Nov 15, 2014 04:11 by Volt
Analyzed and the conclusion is that players crafting class showing as Unknown in /who is a symptom. The root cause is that there is now a db column 'characters'.'crafting_class' and this gets the value 1050 (decimal) at or around character creation. This is not good. The value must be 255 (decimal) / 0xff (hex). I can not see even how this happens. Re-assigning to John to determine who to fix this.[/quote]
To reply, In the `characters` table, the default value was set to '1050' so this is why everyone received Unknown for crafting classes. Are you saying these below values are incorrect? I cannot for the life of me remember where I got these values, but I certainly would not have made them up myself so they came from somewhere.
1000 => "Blacksmith"
1002 => "Artificer"
1004 => "Outfitter"
1050 => "Crafter"
Where did you come up with 255 (0xff)? And what then are the valid crafting classes? I will adjust my portal code.
Re: Bug 25: Crafting class is Unknown in /who
Posted: Thu Nov 20, 2014 5:58 pm
by Ratief
0=>blacksmith
1=>alchemist (though I can't get the client to accept the attributes, I Really wanted to be able to add this class someday)
2=>artificer
3=>gemworker (not all attributes even exist)
4=>outfitter
255=>crafter
the rest seem to map to 'Unknown'
and yes I have this working on my server (and i''m defaulting everyone to smiths for now)
BTW, the crafting class should be 1 byte (uint8_t) or tinyint in SQL. The code currently has it as uint32_t.
Re: Bug 25: Crafting class is Unknown in /who
Posted: Sat Nov 22, 2014 8:35 am
by Volt
[quote="John Adams"]To reply, In the `characters` table, the default value was set to '1050' so this is why everyone received Unknown for crafting classes. Are you saying these below values are incorrect? I cannot for the life of me remember where I got these values, but I certainly would not have made them up myself so they came from somewhere.
1000 => "Blacksmith"
1002 => "Artificer"
1004 => "Outfitter"
1050 => "Crafter"
Where did you come up with 255 (0xff)? And what then are the valid crafting classes? I will adjust my portal code.[/quote]
I just spent some time diving through logs, and while it makes all the sense that you didn't make up those values I still have no clue where you got them from. I would think there is something clever to this, but I also can't figure what.
I got 0xff from logs (OP_WhoList.crafting_class and OP_ServerCharacterUpdate.crafting_class_2).
What I found in the logs is pretty much what Ratief already wrote, but since I did the work I will expand it a bit here:
From player perspective your character can have any of 10 crafting "classes" (this is not exactly class thus the quotation marks but I didn't find a better term):
Re: Bug 25: Crafting class is Unknown in /who
Posted: Sat Nov 22, 2014 8:45 am
by John Adams
Volt, thank you for the write up. I wish I remembered where 1002, 1004, 1006 and 1050 came from I feel embarassed that I do not heh. But the default crafting_class ID in `characters` is now 255, and the field has been turned into an unsigned tinyint(3) in the latest vgo_world.sql. I think this will solve that problem.