Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Success backporting hairs to 1.5.5, but gs is so finicky

Newbie Spellweaver
Joined
Mar 20, 2021
Messages
47
Reaction score
4
I've been working for several days on trying to build a way to backport hairs (and in future potentially other fashion etc) from current PWI into 1.5.5. Very roughly I:
1) Wrote a pgm to scan through 1.5.5 elements.data, finding the hairs, removing them from the main elements.data (FashionEssence + FaceHairEssence + FaceTextureEssence records), putting each in its own folder and extracting the necessary SKI and DDS files from facedata.pck and icons from surfaces.pck
2) Ran same pgm over current PWI elements.data (which is now compressed and in a completely different format, so some challenges there, see https://forum.ragezone.com/f452/new-pwi-compressed-elements-data-1207197)
3) Wrote a pgm to reconsistute the complete elements.data from what's left in the main file, plus the fragments stored in separate folders, inserting the SKI and DDS files into facedata.pck and rebuilding the big images of all the item icons in surfaces.pck
4) Upload new elements.data to the server.... and hope it starts....

And well, sometimes that works, and sometimes gs won't start. Luckily I was only really doing this to get 2 hairs I especially wanted (58525 + 60269) and if I kept elements.data exactly as 1.5.5 and added only those (+ associated FaceHairEssence + FaceTextureEssence records) then it worked, I'm able to use those hairs now, the models and icons all look correct.

But others I've tried to import, the server won't start up. Even just copies of existing hairs (where they release event-gold-untradeable versions of the same hairs) stop it working. Clearly my build process works, as it worked with the other 2 hairs (and the correctness of the PCKs makes no odds to whether the server will start anyway). So what's the problem?

I've failed to get any useful logs. Only error msg I've seen said worldmanager.cpp line 1449, which (if the source I've got is in sync with this build..) is just calling GDB::get_serverdata, so that tells me nothing useful. If I run gs interactively, all the chinese chars just display diamonds so its unreadeable. If I look in /PWServer/155/logs/gs_all.log or I do "./gs >gslog.txt", it gets truncated because it isn't fully flushed when gs falls over. So I can get nothing useful in terms of error messages, just a "yes it starts" or "no it doesn't start" and guess why.

One theory (and this is my real question, if anyone knows) - does 1.5.5 have a limit on itemIDs must be < 65535 because they're held in 2 bytes somewhere? I ask because I tested adding 1 hair and it worked perfect, then I changed its item ID (changed nothing else!) and then the server did start, but the client behaved oddly. It had wrong name and icon on the ground. It did look correct in my bag. It didn't work when worn, just showed default hair.

Or any other ideas? Or suggestions how I can get useful logs? Much appreciated, thanks.
 
Shh, quiet, you might piss somebody off
Developer
Joined
Dec 23, 2011
Messages
1,797
Reaction score
2,167
I've been working for several days on trying to build a way to backport hairs (and in future potentially other fashion etc) from current PWI into 1.5.5. Very roughly I:
1) Wrote a pgm to scan through 1.5.5 elements.data, finding the hairs, removing them from the main elements.data (FashionEssence + FaceHairEssence + FaceTextureEssence records), putting each in its own folder and extracting the necessary SKI and DDS files from facedata.pck and icons from surfaces.pck
2) Ran same pgm over current PWI elements.data (which is now compressed and in a completely different format, so some challenges there, see https://forum.ragezone.com/f452/new-pwi-compressed-elements-data-1207197)
3) Wrote a pgm to reconsistute the complete elements.data from what's left in the main file, plus the fragments stored in separate folders, inserting the SKI and DDS files into facedata.pck and rebuilding the big images of all the item icons in surfaces.pck
4) Upload new elements.data to the server.... and hope it starts....

And well, sometimes that works, and sometimes gs won't start. Luckily I was only really doing this to get 2 hairs I especially wanted (58525 + 60269) and if I kept elements.data exactly as 1.5.5 and added only those (+ associated FaceHairEssence + FaceTextureEssence records) then it worked, I'm able to use those hairs now, the models and icons all look correct.

But others I've tried to import, the server won't start up. Even just copies of existing hairs (where they release event-gold-untradeable versions of the same hairs) stop it working. Clearly my build process works, as it worked with the other 2 hairs (and the correctness of the PCKs makes no odds to whether the server will start anyway). So what's the problem?

I've failed to get any useful logs. Only error msg I've seen said worldmanager.cpp line 1449, which (if the source I've got is in sync with this build..) is just calling GDB::get_serverdata, so that tells me nothing useful. If I run gs interactively, all the chinese chars just display diamonds so its unreadeable. If I look in /PWServer/155/logs/gs_all.log or I do "./gs >gslog.txt", it gets truncated because it isn't fully flushed when gs falls over. So I can get nothing useful in terms of error messages, just a "yes it starts" or "no it doesn't start" and guess why.

One theory (and this is my real question, if anyone knows) - does 1.5.5 have a limit on itemIDs must be < 65535 because they're held in 2 bytes somewhere? I ask because I tested adding 1 hair and it worked perfect, then I changed its item ID (changed nothing else!) and then the server did start, but the client behaved oddly. It had wrong name and icon on the ground. It did look correct in my bag. It didn't work when worn, just showed default hair.

Or any other ideas? Or suggestions how I can get useful logs? Much appreciated, thanks.

yes 155 has a ID limit of 65535, and this is very easy to explain.

to send equipment informations to players, wanmei does a simply merge of following values

Armor Type equipment

ID 2 bytes | EquipmentStoneColor 2 bytes

Fashion Type Equipment

ID 2 bytes | Fashion Color 2 bytes

resulting in a single INT per equipment ( 4 bytes ), in the following updates, they changed to equipment INT and fashion SHORT resulting in 6 bytes per equipment.
although changing server to provide information this way is not enough to solve the issue from 155 version, multiple client changes must be done to accomplish new data transport.
 
Upvote 0
Newbie Spellweaver
Joined
Mar 20, 2021
Messages
47
Reaction score
4
>> does 1.5.5 have a limit on itemIDs must be < 65535
Seems that really may have been my only problem, was expecting something much deeper than that. Ported over 13 more hairs from current PWI to my 1.5.5 today and worked first time, woot.
 
Upvote 0
Back
Top