|
||
|
|
#1 (permalink) |
|
Join Date: Mar 2003
Location: Near a lava pool
Age: 8
Posts: 1,012
|
Summary:
This script exports a structure built in game with static items to a working addon script. The output script will create both the addon and the addon deed. Hue and light information will be exported as well. Description: I wrote this little script to help me out in a bigger project (maybe someone else did this before, I was too lazy to search for it ). It basically creates a fully working script for an addon based on a structure built in game (the script extracts static items, which is what the deco section of Pandora's Box creates, and I believe also UOArchitect). The script preserves hue and light type for light sources.It's very easy to use, the command is: [AddonGen <name> [<namespace>] <name> is the name of your object. It should not contain spaces (so if you want your structure called Tower Of Chaos, name would be TowerOfChaos - the script will then generated two items: TowerOfChaosAddon and TowerOfChaosAddonDeed). <namespace> this is optional. By default the script will place the classes it creates into Server.Items, unless this parameter is specified. Once the command is executed, you get an area picker to select the region you wish to export. The structure you're exporting will NOT be deleted. The script will be written to ...\RunUO\TheBox\<name>Addon.cs. Installation: Just put AddonGenerator.cs anywhere in your Scripts folder. Update May 29:
Update June 1: I have added a gump interface to the command. Access the gump by using no arguments (in other words just type [AddonGen). Through the gump you can specify whether you wish to export items and/or statics, and also a Z range. Keep in mind that when exporting statics hue information will be lost because RunUO doesn't load hue information from the statics*.mul files.
__________________
Oxygen should be regarded as a drug. |
|
|
|
|
|
#3 (permalink) | |
|
Forum Expert
Join Date: Jan 2003
Location: California
Age: 39
Posts: 3,260
|
Quote:
__________________
My Scripts: HoodableRobe CellarAddon SeigeUpdates Refresh/CloneMe Commands VooDoo Dolls Lost Alchemy SVN 187 Updates: Bard System + Upgrade Ultima VII |
|
|
|
|
|
|
#4 (permalink) |
|
Forum Expert
|
I'm not worthy to even say your name out loud. You are just amazing. I am so thankful we have such talents in this community, thank you for sharing this
__________________
Med-Surg Nurse, Full time Pittsburg State Univ Sophmore, and FT Mother to 5 kids |
|
|
|
|
|
#5 (permalink) | |
|
Join Date: Mar 2003
Location: Near a lava pool
Age: 8
Posts: 1,012
|
Quote:
__________________
Oxygen should be regarded as a drug. |
|
|
|
|
|
|
#6 (permalink) |
|
Forum Expert
|
I'm sorry Arya, I am having a problem. I use PB to add items from the deco tab, ( for example a coffin, and when i try to do [addongen CoffinS and i target the boundaries it either tells me no items selected, or error writing file
__________________
Med-Surg Nurse, Full time Pittsburg State Univ Sophmore, and FT Mother to 5 kids |
|
|
|
|
|
#7 (permalink) | |
|
Join Date: Mar 2003
Location: Near a lava pool
Age: 8
Posts: 1,012
|
Quote:
The file writing error needs some investigating on the other hand. Please open the script and go to line 250. Change the block from: Code:
catch
{
from.SendMessage( 0x40, "An error occurred when writing the file." );
fail = true;
}
Code:
catch ( Exception err )
{
Console.WriteLine( err.ToString() );
from.SendMessage( 0x40, "An error occurred when writing the file." );
fail = true;
}
__________________
Oxygen should be regarded as a drug. |
|
|
|
|
|
|
#10 (permalink) |
|
Forum Expert
Join Date: Jan 2004
Posts: 1,377
|
Overestimated? Nah...
Maybe a lot of people could have coded it. But you DID code it. That's what matters. So you are being loved now. Deal with it! *cough*
__________________
Dracarys retired - consider me dead to these boards |
|
|
|
|
|
#12 (permalink) | |
|
Faustrealms Co-Owner
Join Date: Jul 2003
Age: 26
Posts: 155
|
Quote:
I had the same error and fixed it by creating a new folder in the main RunUO directory labeled "TheBox" |
|
|
|
|
|
|
#14 (permalink) | |
|
Moderate
Join Date: Nov 2002
Location: USA
Posts: 6,598
|
Quote:
__________________
David Forum Moderator The RunUO.com Forum Moderator Team Forum Rules and Guidelines RunUO Forum Search Engine Download RunUO 2.0 RC2 |
|
|
|
|
|
|
#15 (permalink) |
|
Moderate
Join Date: Nov 2002
Location: USA
Posts: 6,598
|
Hey come on guys! Rate these submissions!
This is like awesome stuff here and with 15 posts and over 40 downloads I was the first one to rate it? Come on, snap to it!
__________________
David Forum Moderator The RunUO.com Forum Moderator Team Forum Rules and Guidelines RunUO Forum Search Engine Download RunUO 2.0 RC2 |
|
|
|
|
|
#16 (permalink) | |
|
Join Date: Jun 2003
Location: Third Rock from the sun ( Europe, Portugal )
Posts: 108
|
Quote:
* *end plug* Now back to Arya... Where exactly did you say you wanted the candles at, oh holy goddess of code? ![]() |
|
|
|
|
|
|
#17 (permalink) |
|
Join Date: Mar 2003
Location: Near a lava pool
Age: 8
Posts: 1,012
|
I fixed the (stupid) error occurring when the output folder didn't exist, and also added an option to change the default output location at the beginning of the file.
__________________
Oxygen should be regarded as a drug. |
|
|
|
|
|
#19 (permalink) | |
|
Join Date: Mar 2003
Location: Near a lava pool
Age: 8
Posts: 1,012
|
Quote:
If you're talking about array sizes, I'm using an ArrayList object which is similar to an array but can grow in size when needed, therefore you don't have to specify a maximum size. And yes, it does handle all Z levels.
__________________
Oxygen should be regarded as a drug. |
|
|
|
|
|
|
#21 (permalink) | |
|
Forum Expert
|
Quote:
Sir this is an excellent script, I would like to make a humble suggestion if i may... In your Summary for your Custom Path: Code:
/// <summary> /// Set this value if you wish the scripts to be output somewhere else rather than in the default RunUO\TheBox /// directory. This should be a full valid path on your computer /// ( Ex. C:\Program Files\RunUO\Scripts\Custom\Addons) /// </summary> while intermediate to advanced programmers will know what this means, newbs wont. roadmaster |
|
|
|
|
|
|
#23 (permalink) | |
|
Quote:
|
||
|
|
|
|
|
#24 (permalink) | |
|
Forum Novice
Join Date: Mar 2004
Location: Germany
Age: 23
Posts: 301
|
Quote:
But what he means is something like: string MyVariable = @"C:\Program Files\RunUO\MyOutput"; |
|
|
|
|
|
|
#25 (permalink) |
|
Forum Novice
Join Date: Jun 2003
Posts: 165
|
Seriously Arya, you are like a scripting goddess. You are great plus you are nice to people. I think I am going to add you on the Credits section of my shard web hahaha!
Seriously, 3 5-Star scripts in a few days... plus pandora's box... Incredible :_) |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|