Is there a file where I can customize items currently in the game as well as add my own items?
Post automatically merged:

Specifically can I increase the amount of items and/or weight a backpack or container can hold?
Can I change how much gold can stack in one pile? Or change items from non-stackable to stackable?
Post automatically merged:

Or monsters from non-tamable to tameable? Non-mountable to mountable?
Just trying to figure out where I can customize things.
 
Last edited:
my advice is is brows the scripts folder... open it and then use the search bar to look for key words.

for example I would start by opening scripts folder and searching for "backpack" then try to pick the correct script containing the word backpack.

In reality though the backpack is a container so you should search for container. possibly "container stones"

As long as you're getting hits on your search you are on the right path but the fewer the better.

Stack seem to be maxed out at 60000. Technically you can go up to like 65000 or something but 60000 looks better.

For making monstors tamable that are not you need to copy the code from a tamable creature to your monster you want tamed... You can copy code from greater dragons for example making a headlessone have fire breath and be tamable lol.
 
Is there a file where I can customize items currently in the game as well as add my own items?

Most every item in the game has its own file. If you find that file, make changes, then compile, those changes become real.
Easiest way to create your own as a beginner is to copy an item similar to what you would like, change as neccessary, save, compile.
 
This is so frustrating! Thanks all for your help!
I apparently clicked on the "properties' of the administrator account character's backpack.
Something is wrong because it does not have the grid setup any longer and whenever I click on the backpack the system boots me out.
I am looking at all the files searching for "backpack" but can't find it anywhere. Where can I locate the character backpack so i can maybe reset the properties or something so I don't get booted out every time I click on the backpack. I can't see items in the backpack and I can't access it. Thanks!
 
UO\Scripts\Items\Containers\Container.cs contains the entry for backpack. Line 452 on mine.
public class Backpack : BaseContainer, IDyable

public override int DefaultMaxWeight
{
get
{
Mobile m = ParentEntity as Mobile;
if (m != null && m.Player && m.Backpack == this)
{
return 550;
}
else
{
return base.DefaultMaxWeight;
}
}
}

And thats the script that makes the characters backpack 550 weight instead of 400. Line 467.
 
Thanks! Also is there a way to use a recall rune into a dungeon?
Post automatically merged:

Thanks! Also is there a way to use a recall rune into a dungeon?
Trying to get my Admin account to travel to locations faster for easier setup. Thanks.
 
UO\Scripts\Spells\Base\SpellHelper.cs

private static readonly TravelValidator (Aprox Line 745)

Underneath the TravelValidator, theres a readonly bool, with a BUNCH of comments, falses, and trues. Those are true/false for Recall from, recall to, gate from, gate to, mark, teleport from, teleport to, as well as a bunch of different regions. Any true's you set will change that ability in that region.

1611443184889.png

Think of it as a table. If true, you can do the Region (above) and Action (left) in that area. False is your cant.
 
Can you make a current monster that is not rideable into a mount? Let's say I want to ride a dragon.
I looked in the script for a dragon bit don't see where to change if it is rideable or not.
Also can I access it's backpack like a Giant Beetle?
 
Container pack = Backpack;

if (pack != null)
pack.Delete();

pack = new StrongBackpack
{
Movable = false
};

AddItem(pack);

Thats the code for backpacks on pets.
public override bool CanAutoStable => (Backpack == null || Backpack.Items.Count == 0) && base.CanAutoStable;

#region Pack Animal Methods
public override DeathMoveResult GetInventoryMoveResultFor(Item item)
{
return DeathMoveResult.MoveToCorpse;
}

public override bool IsSnoop(Mobile from)
{
if (PackAnimal.CheckAccess(this, from))
return false;

return base.IsSnoop(from);
}

public override bool OnDragDrop(Mobile from, Item item)
{
if (CheckFeed(from, item))
return true;

if (PackAnimal.CheckAccess(this, from))
{
AddToBackpack(item);
return true;
}

return base.OnDragDrop(from, item);
}

public override bool CheckNonlocalDrop(Mobile from, Item item, Item target)
{
return PackAnimal.CheckAccess(this, from);
}

public override bool CheckNonlocalLift(Mobile from, Item item)
{
return PackAnimal.CheckAccess(this, from);
}

public override void GetContextMenuEntries(Mobile from, List<ContextMenuEntry> list)
{
base.GetContextMenuEntries(from, list);

PackAnimal.GetContextMenuEntries(this, from, list);
}
#endregion


and on the class, if you base it on BaseMount, it becomes mountable.
 
Thanks. Also is there a way to have less items in a monster loot?
Also maybe have higher intensity or more attributes on the loot?
Post automatically merged:

So do i need to go to the particular monster and say it is a PackAnimal?
Also where do I change the class to basemount? In the script for that monster?
 
Inside LootPack.cs are the definitions for LootPacks

public static readonly LootPackItem[] MagicItemsUltraRich = new[]
{
new LootPackItem(typeof(BaseWeapon), 276), new LootPackItem(typeof(BaseRanged), 69),
new LootPackItem(typeof(BaseArmor), 397), new LootPackItem(typeof(BaseShield), 52),
new LootPackItem(typeof(BaseJewel), 207)
};

The numbers after the type is the intensity on the dropped equipment. To reduce how much monsters drop, it has to do with how many LootPacks drop. For example: Dark Father has
public override void GenerateLoot()
{
AddLoot(LootPack.SuperBoss, 2);
AddLoot(LootPack.HighScrolls, Utility.RandomMinMax(6, 60));
}
So he drops 2 sets of SuperBoss, and between 6 and 60 High Level Scrolls. SuperBoss sets include:

public static readonly LootPack LootSuperBoss =
new LootPack(
new[]
{
new LootPackEntry(false, true, Gold, 100.00, "10d100+800"),
new LootPackEntry(false, false, MagicItemsUltraRich, 100.00, 1, 5, 25, 100, true),
new LootPackEntry(false, false, MagicItemsUltraRich, 100.00, 1, 5, 25, 100, true),
new LootPackEntry(false, false, MagicItemsUltraRich, 100.00, 1, 5, 25, 100, true),
new LootPackEntry(false, false, MagicItemsUltraRich, 100.00, 1, 5, 25, 100, true),
new LootPackEntry(false, false, MagicItemsUltraRich, 100.00, 1, 5, 33, 100, true),
new LootPackEntry(false, false, MagicItemsUltraRich, 100.00, 1, 5, 33, 100, true),
new LootPackEntry(false, false, MagicItemsUltraRich, 100.00, 1, 5, 33, 100, true),
new LootPackEntry(false, false, MagicItemsUltraRich, 100.00, 1, 5, 33, 100, true),
new LootPackEntry(false, false, MagicItemsUltraRich, 100.00, 1, 5, 50, 100, true),
new LootPackEntry(false, false, MagicItemsUltraRich, 100.00, 1, 5, 50, 100, true),
new LootPackEntry(false, false, Instruments, 2.00, 1)
});

so 10 items per SuperBoss, so he drops 20 items, with the chance at instrument.
 
I don't get this part:

"and on the class, if you base it on BaseMount, it becomes mountable."

I don't see BaseMount in the creature scripts. Where do I find it? Thanks.
 
BaseMount.cs can be found at UO\Scripts\Mobiles\Normal\BaseMount.cs

You replace BaseCreature, with BaseMount, which enables the ability to mount.

public abstract class BaseMount : BaseCreature

BaseMount, pulls its info from BaseCreature.
 
Ahh thanks!
Post automatically merged:

Where do I find a T-Rex script?
Post automatically merged:

The script for the T-Rex is what I mean
Post automatically merged:

Also receiving these errors with the BaseMount:

Errors:
+ Mobiles/Named/Miasma.cs:
CS1729: Line 10: 'BaseMount' does not contain a constructor that takes 0 arguments
+ Mobiles/Normal/GreaterDragon.cs:
CS7036: Line 11: There is no argument given that corresponds to the required formal parameter 'rangeFight' of 'BaseMount.BaseMount(string, int, int, AIType, FightMode, int, int, double, double)'
+ Mobiles/Normal/Triton.cs:
CS7036: Line 69: There is no argument given that corresponds to the required formal parameter 'rangeFight' of 'BaseMount.BaseMount(string, int, int, AIType, FightMode, int, int, double, double)'
 
Last edited:
Besides the errors posted above and not being able to find the script for the T-Rex, I have a couple of generic, noob questions.
1) I see some very useful scripts here. Where do I put them? I see put in your "customs" file on some posts but I can't find this folder. Most don't say where to put them so I am lost.
2) Where do I find information on how to write these custom scripts? Like what do the numbers correlate to after the name etc.
Thanks.
 
1) Technically the files can go anywhere inside the Scripts folder. Most people just put a Custom folder inside Scripts for custom edits.
2) Base C# coding, and knowledge of the UO base files. The numbers are passed on to the base function inside the base files, using those numbers are variables/parameters.

Errors with GreaterDragon and Triton are the constructor values don't correspond to proper values for BaseMount.
Miasmas error is your missing some of the variables needed to be passed to BaseMount for it to work.

If you open the Miasma file, you need to find the [Constructable]
[Constructable]
public Miasma()

Inside BaseMount it has the following:

public BaseMount(string name, int bodyID, int itemID, AIType aiType, FightMode fightMode, int rangePerception, int rangeFight, double activeSpeed, double passiveSpeed)
: base(aiType, fightMode, rangePerception, rangeFight, activeSpeed, passiveSpeed)

Which means inside public Miasma, you need to define, name, bodyId, itemid, aitype, fightmode, rangeperception, rangefight, activespeed, and passivespeed (Thats what all the numbers you were asking about mean)
 
Back