Latest update as of 1/2/14

Any discussion not related to the other forum topics
Post Reply
nasomi
Posts: 141
Joined: Wed Feb 13, 2013 8:51 am

Latest update as of 1/2/14

Post by nasomi » Sat Jan 03, 2015 3:16 pm

For those that are lost on why everything is blowing up, some stuff changed. This is only needed if you preserve character data, and this only updates for character related tables.

First off, you may want to wipe your ls's and start over. It's easier.
delete from char_inventory where itemid = 513 or itemid = 514 or itemid = 515;

Second off, you need to open char_inventory and add extra blob(24) default null.
alter table char_inventory add extra blob(24);

Third, you need to add zoning to char_stats.
alter table char_stats add zoning tinyint(1) unsigned not null default '0';

Next you can clear your linkshells table.
delete * from linkshells;

Now you want to clean up your char_inventory table
alter table char_inventory drop column locked, drop column col, drop column row, drop column level, drop column rotation, drop column currCharges, drop column lastUseTime, drop column worn, drop column augment0, drop column augment1, drop column augment2, drop column augment3, drop column trialNumber;

I say start over with the linkshells because it's easier, however if you're curious, linkshells are populated with a blob in extra in the char_inventory table. I pulled it's contents from a newly created linkshell and it showed 'E\0\0\0\0\0��\0��4�\0\0\0\0\0\0\0\0\0\0'. However if you update char_inventory set extra = 'E\0\0\0\0\0��\0��4�\0\0\0\0\0\0\0\0\0\0' where itemid = 513 or itemid = 514 or itemid = 515; you will assign all linkpearls to the same "chat", so regardless of which pearl you have on, you chat in the same channel with each other. After messing iwth it a bit, I decided it was easier to start over.

And thanks KJ for cleaning all that up. Here's hte commit in question:
https://github.com/DarkstarProject/dark ... 86a5017917

Also it resets all item charges to full charge, and on zoning it refills all charges, but that should be fixed shortly.

If you log in dead, you need to add the zoning field to char stats:
alter table char_stats add zoning tinyint(1) not null default '0';

Edited to address the dead issue.
Last edited by nasomi on Tue Jan 06, 2015 8:48 am, edited 1 time in total.

User avatar
kjLotus
Special Guest
Posts: 1813
Joined: Sun Jul 22, 2012 2:16 pm

Re: Latest update as of 1/2/14

Post by kjLotus » Sat Jan 03, 2015 3:32 pm

if you want to preserve linkshells, you have to write the linkshellid as a double word into extra at byte 0, and the linkshell color (same as in linkshell table) as a word at byte 6. the rest is signature, but you can leave that out and the game server will fix it (since it has its own column)

also, charged items will all have their charges wiped - remaining charges goes into extra as a byte at byte 1

i'm not really sure if mysql has easy byte manipulation within a query, so i'm not 100% sure on an easy query to do it all for you

Delaide
Posts: 478
Joined: Sat Jun 14, 2014 8:58 am

Re: Latest update as of 1/2/14

Post by Delaide » Mon Jan 05, 2015 11:01 am

Thanks for the update nasomi. I noticed there was some changes, so was wondering if I would need to change as needed.

I wonder if there would be a better way to maintain the character databases so that we won't need to worry about this in the future. Maybe I just need to figure out how to make proper git forks so I can maintain my own without concern.

starlightknight
Posts: 25
Joined: Sun Apr 06, 2014 11:43 am

Re: Latest update as of 1/2/14

Post by starlightknight » Mon Jan 05, 2015 11:09 am

Delaide wrote:Thanks for the update nasomi. I noticed there was some changes, so was wondering if I would need to change as needed.

I wonder if there would be a better way to maintain the character databases so that we won't need to worry about this in the future. Maybe I just need to figure out how to make proper git forks so I can maintain my own without concern.
There are systems for managing core schema changes such as dbdeploy or flyway that help you upgrade schemas automatically by applying differential DDLs and DMLs. These tools keep track of what level your schema is at and bring in changes automatically when you run it.

The problem with using one with our stuff would be that we're pretty much just sql dumps right now. We'd need to first separate out the table definitions and constraints from the actual data, and you wouldn't want the data dump files managed by one of these tools, just the tables.

Even with those however, blobs can be evil to migrate data to. In this case the best option is generally to write a small program to do it. It can range from hard or impossible to do with plain SQL depending on what is contained in it.

Delaide
Posts: 478
Joined: Sat Jun 14, 2014 8:58 am

Re: Latest update as of 1/2/14

Post by Delaide » Fri Jan 09, 2015 9:41 am

Okay, I just updated my server today after the 1/2/2015 update, and, well, everything is missing from my storage.

Looking at my game server log, I think I know what it is, but need help fixing it.

Here is the area I think it giving me the problem information:

Code: Select all

[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 31 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 6 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 79 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 77 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 78 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 59 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 71 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 2 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 65 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 57 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 11 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 17 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 18 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 19 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 29 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 22 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 16 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 9 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 7 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 8 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 1 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 14 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 42 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 3 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 15 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 33 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 35 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 13 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 21 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 30 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 27 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 55 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 20 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 28 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 32 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 36 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 39 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 38 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 10 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 26 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 23 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 34 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 37 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 4 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 5 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 41 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 40 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 24 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 58 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 25 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 12 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 49 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 43 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 48 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 50 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 44 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 45 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 46 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 47 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 53 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 54 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 52 is out of range
[22:40:10][1;36m[Debug][0m ItemContainer: SlotID 51 is out of range
Maybe when I manually edited the .sql dump before updating, I messed up something? What should the storage ID be?

Code: Select all

  `location` tinyint(1) unsigned NOT NULL DEFAULT '0',

User avatar
tagban
Posts: 352
Joined: Fri Dec 28, 2012 11:31 am
Location: Pennsylvania, USA

Re: Latest update as of 1/2/14

Post by tagban » Fri Jan 09, 2015 10:54 am

Jump on IRC they can prolly respond faster.

User avatar
kjLotus
Special Guest
Posts: 1813
Joined: Sun Jul 22, 2012 2:16 pm

Re: Latest update as of 1/2/14

Post by kjLotus » Fri Jan 09, 2015 2:39 pm

all your furniture is unset after fixing char_inventory: go back into your mog house and put them back in place

Delaide
Posts: 478
Joined: Sat Jun 14, 2014 8:58 am

Re: Latest update as of 1/2/14

Post by Delaide » Sat Jan 10, 2015 12:04 am

kjLotus wrote:all your furniture is unset after fixing char_inventory: go back into your mog house and put them back in place
Yep, thanks, that worked. I had to log out and back in before I could see anything in that storage, but it is all back and ready to go now.

Post Reply