Adding locations to world omniporter

Arcadius

Gold Donator
Oct 22, 2016
205
1
38
Hey
I'm trying to add to the world omniporter script to add my own custom locations but it keeps throwing a serialization error:


Code:
                                                                                          Server is running in DEBUG mode.                                                                                                                                                                                                                                                                                                                                    
[VitaNexCore]:
[VitaNexCore]: Compile action started...
[VitaNexCore]: Compiling Services...
[VitaNexCore]: Compiling Modules...
[VitaNexCore]: Compile action completed in 0.01 seconds
[VitaNexCore]:
[VitaNexCore]: Configure action started...
[VitaNexCore]: Configuring Services...
[VitaNexCore]: Configuring Modules...
[VitaNexCore]: Configure action completed in 0.49 seconds
Regions: Loading...done
World: Loading...
An error was encountered while loading a saved object
- Type: Server.Items.WorldOmniporter
- Serial: 0x40053513
Delete the object? (y/n)
After pressing return an exception will be thrown and the server will terminate.

Error:
System.Exception: Load failed (items=True, mobiles=False, guilds=False, data=False, type=Server.Items.WorldOmniporter, serial=0x40053513) ---> System.Exception: ***** Bad serialize on Server.Items.WorldOmniporter *****
   at Server.World.Load() in c:\Users\Ted Gress\Desktop\ServUO-master reboot\ServUO-master\ServUO-master\Server\World.cs:line 645
   --- End of inner exception stack trace ---
   at Server.World.Load() in c:\Users\Ted Gress\Desktop\ServUO-master reboot\ServUO-master\ServUO-master\Server\World.cs:line 864
   at Server.Core.Main(String[] args) in c:\Users\Ted Gress\Desktop\ServUO-master reboot\ServUO-master\ServUO-master\Server\Main.cs:line 556
This exception is fatal, press return to exit
 

Neshoba

Well-Known Member
Feb 1, 2016
325
17
what did You add ?? are you adding to shard facets or to a custom map ?/
 

Neshoba

Well-Known Member
Feb 1, 2016
325
17
these 3 lines are missing something ,, post script and Il see if I can see anything causing it
  • System.Exception: Load failed (items=True, mobiles=False, guilds=False, data=False, type=Server.Items.WorldOmniporter, serial=0x40053513) ---> System.Exception: ***** Bad serialize on Server.Items.WorldOmniporter *****
  • at Server.World.Load() in c:\Users\Ted Gress\Desktop\ServUO-master reboot\ServUO-master\ServUO-master\Server\World.cs:line 645
  • --- End of inner exception stack trace ---
  • at Server.World.Load() in c:\Users\Ted Gress\Desktop\ServUO-master reboot\ServUO-master\ServUO-master\Server\World.cs:line 864
  • at Server.Core.Main(String[] args) in c:\Users\Ted Gress\Desktop\ServUO-master reboot\ServUO-master\ServUO-master\Server\Main.cs:line 556
  • This exception is fatal, press return to exit
 

Arcadius

Gold Donator
Oct 22, 2016
205
1
38
Code:
Server.World line 645


            if (!failedMobiles && File.Exists(ItemDataPath))
            {
                using (FileStream bin = new FileStream(ItemDataPath, FileMode.Open, FileAccess.Read, FileShare.Read))
                {
                    BinaryFileReader reader = new BinaryFileReader(new BinaryReader(bin));

                    for (int i = 0; i < items.Count; ++i)
                    {
                        ItemEntry entry = items[i];
                        Item item = entry.Item;

                        if (item != null)
                        {
                            reader.Seek(entry.Position, SeekOrigin.Begin);

                            try
                            {
                                m_LoadingType = entry.TypeName;
                                item.Deserialize(reader);

                                if (reader.Position != (entry.Position + entry.Length))
                                {
                                    throw new Exception(String.Format("***** Bad serialize on {0} *****", item.GetType()));
                                }
                            }
                            catch (Exception e)
                            {
                                items.RemoveAt(i);

                                failed = e;
                                failedItems = true;
                                failedType = item.GetType();
                                failedTypeID = entry.TypeID;
                                failedSerial = item.Serial;

                                break;
                            }
                        }
                    }

                    reader.Close();
                }

Main 556

[code]ScriptCompiler.Invoke("Configure");

            Region.Load();
            World.Load();

            ScriptCompiler.Invoke("Initialize");

            MessagePump messagePump = MessagePump = new MessagePump();

            _TimerThread.Start();

            foreach (Map m in Map.AllMaps)
            {
                m.Tiles.Force();
            }

            NetState.Initialize();

            EventSink.InvokeServerStarted();
}
[/code]

Line 864
Code:
            EventSink.InvokeWorldLoad();

            m_Loading = false;

            ProcessSafetyQueues();

            foreach (Item item in m_Items.Values)
            {
                if (item.Parent == null)
                {
                    item.UpdateTotals();
                }

                item.ClearProperties();
            }

            foreach (Mobile m in m_Mobiles.Values)
            {
                m.UpdateRegion(); // Is this really needed?
                m.UpdateTotals();

                m.ClearProperties();
            }

            foreach (SaveData saveData in _Data.Values)
            {
                saveData.Prep();
            }

            watch.Stop();

            Utility.PushColor(ConsoleColor.Green);
            Console.WriteLine(
                "...done ({1} items, {2} mobiles, {3} customs) ({0:F2} seconds)",
                watch.Elapsed.TotalSeconds,
                m_Items.Count,
                m_Mobiles.Count,
                _Data.Count);
            Utility.PopColor();
        }
 

Arcadius

Gold Donator
Oct 22, 2016
205
1
38
So....post mortem, I've got the omniporter working with custom locations. I don't have as many as I'd like however, so I was wondering why "Guardia Shrines" isn't showing up if somebody doesn't mind taking a look.
 

Attachments

Ishya

Well-Known Member
Apr 2, 2015
98
14
34
I have a question about the WorldOmniporter how do you get more teleporters to put at your custom areas without crashing your shard?