Go Back   RunUO - Ultima Online Emulation > RunUO > Core Modifications > Subsystems

Subsystems This forum is for modifications to the various subystem code of RunUO

Reply
 
Thread Tools Display Modes
Old 08-20-2005, 09:09 AM   #1 (permalink)
Forum Novice
 
Join Date: Oct 2003
Location: Vienna, Austria
Age: 22
Posts: 127
Send a message via ICQ to Arahil
Default Region Loading mistake

When the world is loaded at server startup (the call to World.Load in ScriptsCompiler.cs), the regions are not loaded from the XML file. Region.Load is called in the MainLoop directly after the ScriptCompiler, but at this time the deserialization of the Regions is already finished.

But since there are no regions known by the server before Region.Load is called, FindRegionByUId, which is called while reading saves/regions/regions.idx always returns null, which prevents any further loading.

so to fix this problem the order of the actions has to be changed a little bit.
Regions.Load should be called after the deserialisation of mobiles, items and guilds, and when the xml file is read regions can be deserialized.

but since no region in the standard distro uses region serilization, this bug is not really critical
Arahil is offline   Reply With Quote
Old 08-23-2005, 07:54 PM   #2 (permalink)
Forum Novice
 
Join Date: Oct 2003
Location: Vienna, Austria
Age: 22
Posts: 127
Send a message via ICQ to Arahil
Default

I#m sorry, i overlooked one little thing: before Region.Load is called, the Initialize()-Methods of all the Scripts ar called, and there (in all the Subtypes of Region) are some Region-registration calls.

Just wanted to let you know that this was a mistake of me, not a RunUO-bug - even though it seems that no one cared anyway
Arahil is offline   Reply With Quote
Old 08-23-2005, 08:04 PM   #3 (permalink)
Account Terminated
 
Join Date: Sep 2002
Age: 26
Posts: 3,846
Send a message via ICQ to Phantom Send a message via AIM to Phantom Send a message via MSN to Phantom
Default

So the order is wrong, or its right and you just didn't follow the code
Phantom is offline   Reply With Quote
Old 08-24-2005, 09:12 AM   #4 (permalink)
Forum Novice
 
Join Date: Oct 2003
Location: Vienna, Austria
Age: 22
Posts: 127
Send a message via ICQ to Arahil
Default

it's correct, but it is pretty tricky
Arahil is offline   Reply With Quote
Old 09-23-2005, 10:24 AM   #5 (permalink)
 
Join Date: Jan 2003
Posts: 134
Default

Anyway the region system has been completely rewritten for the next version.
The region serialization is no longer supported while the regions.xml capabilities have been greatly improved.

The order in which regions are loaded has been changed too
__________________
Phenos - Lorenzo Castelli
E-Mail: gcastelli@racine.ra.it
Phenos is offline   Reply With Quote
Old 09-23-2005, 12:18 PM   #6 (permalink)
 
Join Date: Oct 2002
Age: 23
Posts: 4,689
Default

Thats not to say that you couldn't still have a single item in the world which has a custom region on it, and serialize its properties with it on world save, and then on world load, create the region back again, and deserialize its properties, and then just add it back with all the rest. I would assume that would work with the new system Or you could go the XML route as well.
XxSP1DERxX is offline   Reply With Quote
Old 09-23-2005, 01:22 PM   #7 (permalink)
Account Terminated
 
Join Date: Sep 2002
Age: 26
Posts: 3,846
Send a message via ICQ to Phantom Send a message via AIM to Phantom Send a message via MSN to Phantom
Default

Quote:
Originally Posted by Phenos
Anyway the region system has been completely rewritten for the next version.
The region serialization is no longer supported while the regions.xml capabilities have been greatly improved.

The order in which regions are loaded has been changed too
Reminds himself to smack Asayre, in order to get Phenos a moderator title...
Phantom is offline   Reply With Quote
Old 09-24-2005, 05:58 AM   #8 (permalink)
 
Join Date: Jan 2003
Posts: 134
Default

Quote:
Originally Posted by XxSP1DERxX
Thats not to say that you couldn't still have a single item in the world which has a custom region on it, and serialize its properties with it on world save, and then on world load, create the region back again, and deserialize its properties, and then just add it back with all the rest. I would assume that would work with the new system
Yes of course: that's in fact the recommended way to implement dynamic regions.
__________________
Phenos - Lorenzo Castelli
E-Mail: gcastelli@racine.ra.it
Phenos is offline   Reply With Quote
Old 10-02-2005, 12:51 AM   #9 (permalink)
Forum Expert
 
Join Date: Feb 2005
Location: Houston, TX
Age: 20
Posts: 313
Send a message via ICQ to autumntwilight Send a message via AIM to autumntwilight Send a message via MSN to autumntwilight Send a message via Yahoo to autumntwilight
Default

Quote:
Originally Posted by Phantom
Reminds himself to smack Asayre, in order to get Phenos a moderator title...
I was about to say... Who is Phenos? How the hell does he know? I don't think it's fair if anyone not on the RunUO team gets to know before everyone else, but I can't stop it so hey what can I say?
autumntwilight is offline   Reply With Quote
Old 10-02-2005, 12:57 AM   #10 (permalink)
Account Terminated
 
Join Date: Sep 2002
Age: 26
Posts: 3,846
Send a message via ICQ to Phantom Send a message via AIM to Phantom Send a message via MSN to Phantom
Default

Quote:
Originally Posted by autumntwilight
I was about to say... Who is Phenos? How the hell does he know? I don't think it's fair if anyone not on the RunUO team gets to know before everyone else, but I can't stop it so hey what can I say?
He is on the RunUO Team, he has been for about 6 months, your just slow
Phantom is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5