Go Back   RunUO - Ultima Online Emulation > RunUO > Custom Script Releases

Custom Script Releases This forum is where you can release your custom scripts for other users to use.

Please note: By releasing your scripts here you are submitting them to the public and as such agree to publish them under the GPL licensing terms. The RunUO Team has made its software GPL for you to use and enjoy you should do the same for anything based off of RunUO.

Reply
 
Thread Tools Display Modes
Old 07-02-2009, 10:56 PM   #1 (permalink)
Forum Novice
 
nerun's Avatar
 
Join Date: Jun 2003
Location: Brazil
Age: 31
Posts: 971
Default Nerun's Static Exporter (to .cfg decoration file)

Summary:
"StaticExport" is a command to export your custom decoration inside a bound box to a file .cfg like.

Changes v2.0 (29-Aug-2009):
- fixed an issue when copying teleporters: if there is no map destination, it would crash the server;
- fixed LocalizedSigns;
- added exception for InternalItem as for AddonComponent;

Changes v1.9 (05-Jul-2009):
- now Exporter recognizes RunUO Spawners (creatures, range and count) and BaseBevarage (content);
- know issue, not fixed yet: doors not works well;

Changes v1.8 (03-Jul-2009):
- hard code improvement: now it will better organize the configuration file. If more then one item has the same ItemID and properties (like Hue and Name) all them will be placed together in the configuration file.

Changes v1.7 (02-Jul-2009):
- code improvement: now it recognizes addons and other constructable items;
- recognize custom Names and Hues too;

Changes v1.6:
- Zardoz's changes added (target);

Changes v1.5:
- updated to RunUO 2.0

Changes v1.4:
- "possible mistaken null statement" fixed;

Changes v1.3:
- Keyword teleporter are now extracted with coordinates, target map, target destination an keyword;

Changes v1.2:
- Moongates are now exported with coordinates, target map and target destination;
- Items Hue are now exported too;

Changes v1.1:
- Teleporters are now exported with coordinates, map definitions and point destination;

Installation:
1) Download StaticExport.cs
2) Paste in Customs folder

Usage:
1) [staex filename
2) The file will be saved in "c:\RunUO\Export" folder, with name "filename.cfg".
3) Now you can cut/paste your decoration file to the /Data/Decoration/"facet you want" folder and use [decorate in-game and your decoration files will be loaded with RunUO decorations too.
Attached Files
File Type: cs StaticExport.cs (10.4 KB, 137 views)
__________________
GURPZine - gurpzine.com.br (brazillian RPG blog specialized in GURPS)

Last edited by nerun; 11-15-2009 at 05:42 PM. Reason: new release
nerun is offline   Reply With Quote
Old 07-03-2009, 05:37 AM   #2 (permalink)
Forum Novice
 
Join Date: Jul 2006
Age: 31
Posts: 754
Default

Thanks NeRun this will most definitely be handy.
__________________
Friends Come and go but Enemies accumulate
oiii88 is offline   Reply With Quote
Old 07-03-2009, 03:47 PM   #3 (permalink)
Lurker
 
Niightmare's Avatar
 
Join Date: Jul 2009
Age: 16
Posts: 21
Default

Thanks man, I was looking for something like this.. Thanks
Niightmare is offline   Reply With Quote
Old 08-28-2009, 04:22 PM   #4 (permalink)
Lurker
 
Kendo's Avatar
 
Join Date: May 2009
Location: Virginia
Age: 34
Posts: 8
Thumbs up

Great program Nerun! You're the best.

Just one problem that I noticed with using the Static Exporter.

When copying teleporters, if the teleporters do not have a map destination, it will crash the server on the [Decroate command.

Example:

I created an area to use for a Halloween Fun Area and I had several teleporters set up. While creating the teleporters, I was lazy and didn't put the map destinations in, just the coords. After exporting the area to the cfg file and then testing it by using the decorate command, the server crashed. After investigating the .cfg file, I found this...

Code:
Teleporter 7107 (PointDest=(5460, 499, 0); MapDestination=)
5462 497 0

Teleporter 7107 (PointDest=(5443, 499, 0); MapDestination=)
5453 502 0

Teleporter 7107 (PointDest=(5480, 499, 0); MapDestination=)
5476 495 0
So, when the server crashed, the log stated:

Code:
System.Exception: Invalid map name
   at Server.Map.Parse(String value)
   at Server.Commands.DecorationList.Construct()
   at Server.Commands.DecorationList.Generate(Map[] maps)
   at Server.Commands.Decorate.Generate(String folder, Map[] maps)
   at Server.Commands.Decorate.Decorate_OnCommand(CommandEventArgs e)
   at Server.Commands.CommandSystem.Handle(Mobile from, String text, MessageType type)
   at Server.Mobile.DoSpeech(String text, Int32[] keywords, MessageType type, Int32 hue)
   at Server.Mobiles.PlayerMobile.DoSpeech(String text, Int32[] keywords, MessageType type, Int32 hue)
   at Server.Network.PacketHandlers.UnicodeSpeech(NetState state, PacketReader pvSrc)
   at Server.Network.MessagePump.HandleReceive(NetState ns)
   at Server.Network.MessagePump.Slice()
   at Server.Core.Main(String[] args)
Of course, I didn't know where the problem was right away, but after finding out the file had those entries, I corrected them using the Find/Replace and change the Mapdestinations=0 for Felucca.

Code:
Teleporter 7107 (PointDest=(5460, 499, 0); MapDestination=0)
5462 497 0

Teleporter 7107 (PointDest=(5443, 499, 0); MapDestination=0)
5453 502 0

Teleporter 7107 (PointDest=(5480, 499, 0); MapDestination=0)
5476 495 0
Decorate command worked great after that.

I have a test server and this will greatly help copying decorations and other files over. I just wanted to share my experience. I wouldn't know where to look to correct this in the .cs file, but if you update it, I'll make sure to download the new version.

Thanks again!
Kendo is offline   Reply With Quote
Old 08-29-2009, 10:54 AM   #5 (permalink)
Forum Novice
 
nerun's Avatar
 
Join Date: Jun 2003
Location: Brazil
Age: 31
Posts: 971
Default

Thx, i had noticed that before, but i forgot to upload the new file.
__________________
GURPZine - gurpzine.com.br (brazillian RPG blog specialized in GURPS)
nerun is offline   Reply With Quote
Old 08-29-2009, 12:14 PM   #6 (permalink)
Lurker
 
Kendo's Avatar
 
Join Date: May 2009
Location: Virginia
Age: 34
Posts: 8
Default

If you left out having to put the Map Destination on teleporters or setting it to 'null', I wonder if that would work?

The way I'm thinking is if no map destination is stated on in the props, it defaults to current map.

Moongates however don't work this way, I'm sure they do need a map destination to work, even on current map.

Again, thanks Nerun for your awesome scripts!
Kendo is offline   Reply With Quote
Old 08-08-2010, 06:01 PM   #7 (permalink)
Forum Novice
 
Nockar's Avatar
 
Join Date: Jul 2008
Posts: 382
Default

I did a full backup of Trammel. Then on a test server I ran this and it crashes the server. I finally figured out the first set of errors was coming from anything with the word Component in it. Then once I got rid of all of those. I ran it again and it crashed on Sign.

I don’t see anything with a = no value. So I am not sure what is causing it to crash.

Code:
xception:
System.Exception: Bad type: Server.Items.Sign ---> System.MissingMethodException: No parameterless constructor defined for this object.
   at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck)
   at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache)
   at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic)
   at Server.Commands.DecorationList.Construct()
   --- End of inner exception stack trace ---
   at Server.Commands.DecorationList.Construct()
   at Server.Commands.DecorationList.Generate(Map[] maps)
   at Server.Commands.Decorate.Generate(String folder, Map[] maps)
   at Server.Commands.Decorate.Decorate_OnCommand(CommandEventArgs e)
   at Server.Commands.CommandSystem.Handle(Mobile from, String text, MessageType type) in e:\UO\Run UO SA SVN\Server\Commands.cs:line 321
   at Server.Mobile.DoSpeech(String text, Int32[] keywords, MessageType type, Int32 hue) in e:\UO\Run UO SA SVN\Server\Mobile.cs:line 4773
   at Server.Mobiles.PlayerMobile.DoSpeech(String text, Int32[] keywords, MessageType type, Int32 hue)
   at Server.Network.PacketHandlers.UnicodeSpeech(NetState state, PacketReader pvSrc) in e:\UO\Run UO SA SVN\Server\Network\PacketHandlers.cs:line 1375
   at Server.Network.MessagePump.HandleReceive(NetState ns) in e:\UO\Run UO SA SVN\Server\Network\MessagePump.cs:line 268
   at Server.Network.MessagePump.Slice() in e:\UO\Run UO SA SVN\Server\Network\MessagePump.cs:line 129
   at Server.Core.Main(String[] args) in e:\UO\Run UO SA SVN\Server\Main.cs:line 485
__________________
Nockar 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 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5