Go Back   RunUO - Ultima Online Emulation > RunUO > New Join Forum

New Join Forum So your new to RunUO and looking to work with people that are new, this is the place.

Reply
 
Thread Tools Display Modes
Old 12-23-2006, 05:52 AM   #1 (permalink)
Forum Newbie
 
Join Date: Dec 2006
Posts: 5
Default Where might a person obtain new loot scripts?

I've just started learning, and have already made ok progress I suppose. But my husband made a comment that there is not much loot on the monsters. As I don't really know how to script for RunUO yet, having only experience scripting Morrowind and Oblivion, I was hoping there might be something available I could download.... Just until I can figure things out. I believe he's wanting something akin to the loot system on the Live EA servers.
I did infact do quite a bit of searching around the forum, but failed to turn up any loot systems that could be installed into the RunUO package I downloaded.

Thank you ahead of time.
Lady Ultima
LadyUltima is offline   Reply With Quote
Old 12-23-2006, 07:15 AM   #2 (permalink)
Forum Newbie
 
Faelar's Avatar
 
Join Date: Dec 2006
Posts: 11
Default

Take a look here : The Ultimate Loot FAQ Hope this will help you. ^^
Faelar is offline   Reply With Quote
Old 12-23-2006, 10:38 PM   #3 (permalink)
Forum Newbie
 
Join Date: Dec 2006
Posts: 5
Default Hey, thanks for replying.

I went to the link provided and read it. Now I have some questions.

First:

If I add loot directly to each mob's entry, how is it I can make a new item?
I downloaded the RUO Weapon Generator and used it. I placed the generated scripts in the folders for the proper weapon catagory, but it gave me a bunch of errors when I booted the server, so I deleted them. So, how exactly does one add in new weapon and armor entries? Do they need to be thier own files individually? Or do I need to put the new items within the base item's script? And do I need to declare the new items in any other scripts before I put them in the mob's loot?

I realize I probably seem like a complete idiot. But I really don't understand how the script structures work. I tried to read the 'tutorial' on how to make an item, but it read like stereo instructions and I ended up more confused then before I read it. I just need a basic understanding of how the scripts all work with each other so I can proceed with understanding each individual script, and how to make new ones.

So perhaps you could explain to me what scripts are needed to make a fictitious weapon and how to add it to a mob's loot table. That would be grand help for sure. And I would be most grateful for the assistance.

Oh and on that note...I finally managed to get a spawn system to work! YAY!. I had tried the XmlSpawner2, but couldn't get it to work. So I tried Nerun 5.0 and it works great. =) And what's awesome is, I was able to choose not to load despise ( I had set the spawns there last night ).

Anyhow, thanks for the help and Merry Christmas!

Lady Ultima
LadyUltima is offline   Reply With Quote
Old 12-24-2006, 12:11 AM   #4 (permalink)
Forum Expert
 
Tannis's Avatar
 
Join Date: Feb 2004
Age: 27
Posts: 2,047
Default

Okies, let's take a weapon that already exists. The Bonecrusher, an OSI artifact. This is what the script looks like, you can find it in your RunUO folder in Scripts\Items\Weapons\Artifacts.
Code:
using System;
using Server;

namespace Server.Items
{
	public class BoneCrusher : WarMace
	{
		public override int LabelNumber{ get{ return 1061596; } } // Bone Crusher
		public override int ArtifactRarity{ get{ return 11; } }

		public override int InitMinHits{ get{ return 255; } }
		public override int InitMaxHits{ get{ return 255; } }

		[Constructable]
		public BoneCrusher()
		{
			ItemID = 0x1406;
			Hue = 0x60C;
			WeaponAttributes.HitLowerDefend = 50;
			Attributes.BonusStr = 10;
			Attributes.WeaponDamage = 75;
		}

		public BoneCrusher( Serial serial ) : base( serial )
		{
		}

		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );

			writer.Write( (int) 0 );
		}
		
		public override void Deserialize(GenericReader reader)
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();

			if ( Hue == 0x604 )
				Hue = 0x60C;

			if ( ItemID == 0x1407 )
				ItemID = 0x1406;
		}
	}
}
This line:
Code:
public class BoneCrusher : WarMace
tells you what the name of the weapon will be called when you [add it in game; BoneCrusher (case sensitive in the script, not when adding it in game). The second part, WarMace tells you what type of weapon it is. So you would ask yourself, will it be a kryss, katana, dagger, etc.

The next part:
Code:
public override int LabelNumber{ get{ return 1061596; } } // Bone Crusher
is a localized message. That means that the number 1061596 contains a message to be displayed on game when you hover over the item. In this case, this message says BoneCrusher. The // in the line tells the compiler (server.exe) not to read anything on that line after those 2 marks. You can also look up all localized messages using a localized message viewer. This line is not required in many custom scripts you'll make.

Next, you see:
Code:
public override int ArtifactRarity{ get{ return 11; } }
Again, not something you would need to put in every script, but it's a nice addition. It's what makes the weapon show "Artifact Rarity XX" when you hover over it. You can plug in any number where you see the 11.

This:
Code:
public override int InitMinHits{ get{ return 255; } }
public override int InitMaxHits{ get{ return 255; } }
tells the weapon to start with 255 out of 255 durability. If you didn't have that in there, it would start out with some random minimum and maximum durability, neither of them very high. Again, something you can change just by changing the numbers.

Here:
Code:
		[Constructable]
		public BoneCrusher()
		{
			ItemID = 0x1406;
			Hue = 0x60C;
			WeaponAttributes.HitLowerDefend = 50;
			Attributes.BonusStr = 10;
			Attributes.WeaponDamage = 75;
		}
is what you'll see people refer to on here as the constructor. You can control different attributes about your item. The name itself which you will need to add since not every item has a localized message. You can conrol the color or "hue". The ItemID of the item is basically what it will look like. Again, another one of those things you won't need to include in most scripts. The Hue is the color. You can either do this in decimal which is all digits like 1055 or in hexidecimal which is what it's set with right now. You can convert from hexidecimal to decimal using the calculator that comes with your computer.

The WeaponAttributes.HitLowerDefend is what you would see as Hit Lower Defense on a weapon. The 50 is the percentage of Hit Lower Defense that will be on the weapon. The Attributes.BonusStr is adding Strength to the weapon, and the 10 is how much strength. The Attributes.WeaponDamage is going to make there be Damage Increase on the weapon, and it will be set to 75%.

You see in the constructor, there's a BoneCrusher just like towards the top of the script. Those 2, and the one towards the bottom need to match, and they all need to be the same case or you will get errors. That will be how you add the item in game. You could make a weapon you wanted named "Candy Cane" for instance, and you could add it on game by typing [add whippingstick. All you would need to do is add a new line in the constructor for name. It would look like this:
Code:
Name = "Candy Cane";
Next comes the serialize and deserialize. It needs to be there, but I can't explain how it works. I just know what it's there for. The area that says:
Code:
if ( Hue == 0x604 )
				Hue = 0x60C;

			if ( ItemID == 0x1407 )
				ItemID = 0x1406
is again, not something in most scripts. I think I know what it's for, but I'm not going to say in case I'm wrong. Joeku or TMS or someone else smart will hopefully explain it to us. It's not something you need to worry about when you're first starting out that, I can tell you that.

Really, to learn scripting your best bet is to download a simple script from here, like one for a single piece of armor or a single weapon. Load your shard and add it in your game. Look at the attributes on it, and compare them to what you see in the script. You'll figure it out easy that way. Don't jump straight into the housing system to try and figure out how it works. Hope this was a decent enough explanation. I'm still a newb at scripting and I've been around a few years.
__________________


UO Art
Come visit us! It's all about the artwork.
Tannis is offline   Reply With Quote
Old 12-24-2006, 03:54 AM   #5 (permalink)
Forum Newbie
 
Join Date: Dec 2006
Posts: 5
Default Consider yourself hugged :)

I appriciate you taking the time to explain things. That helped SO much.

If I can figure this out, I can start making new items. Maybe I will share what I make, so others can use it too....sense it doesn't look like people have gotten around to doing any public releases of loot configurations I taught myself 3D Studio Max, and how to script in Morrowind and Oblivion...with enough determination I can figure this out too.

Once again, thanks a million!

Lady Ultima
LadyUltima 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