Section II

2.0 - MOONGATES/TELEPORTERS

First, go to where you want the moongate to bring the player. Stand directly on top of that location, as it's your character's coordinates that will be marked on the moongate when you cast the 'MARK spell as mentioned further down this text. Then add a moongate on the ground in front of your character using either of the following commands:
'ADD 0x0f6c (Blue MoonGate)
'ADD 0x0dda (Red MoonGate)
'ADD 0x1fd4 (Black Moongate)

Step 1: Then type 'SET TYPE 50 (and click on the moongate.)
Step 2: Type 'MARK (and click on the moongate).
Step 3: Use 'SET MOVABLE 1 on the moongate, then pick it up and go place it at whatever location you want your players to be able to teleport from.
Step 4: Type 'SET TYPE 60 (and click on moongate).
Step 5: Type 'SET MOVABLE 2 to make players unable to pick up the Moongate.
Step 6: Rename the moongate to something less suspicious than "a recall rune to #" (it gets that name in step 2, since the mark spell is really meant for marking recall runes =)
Step 7: Type 'SET DECAYABLE 0 and target your moongate to make sure it won't be affected by item-decay.

If you want to make it a two-ways Moongate, follow the above steps, but mark the moongate at where the previous moongate brought the player (one step away from it to avoid a looping moongate).

To make a teleporter, follow the above steps, but exchange the moongate with the object you wish to function as a teleporter.

An alternative way of doing teleporters is through the file UOX3/JS/teleport.scp - which is scripted teleportation locations, mostly used for stuff like dungeon entrances/exits and such.

2.01 - KEYS AND LOCKS

To make a key/lock-pair, first make a blank key and set its Type to 7('SET TYPE 7). Then set the More value of the item to lock and the key to the same value. To make sure the lock is unique, it is suggested to set the More of the lock to the same value as its serial number, for instance 'SET MORE 0x######## where the #s represent the serial number of the lock. There, you are done!

To make a Master Key which can lock/unlock all locks,simply create a key, set its Type to 7('SET TYPE 7) and its More to 0xFF('SET MORE 0xFF). It will then be able to lock/unlock anything.(even if it doesn't have a lock!!)

2.02 - LIGHT SOURCES

To make a hidden lightsource, add any item to use as a dummy object, like a wooden floor tile. Example: 'ADD 0x04a9. Use 'SET DIR #(Look chapter 4.2) to set the object's lighteffect. Then set it's ID to 0x1647 ('SET ID 0x1647)

For normal lightsources, either look up the ID's of lamps/lightposts/torches/etc in InsideUO and add those using 'ADD 0x####, or browse through the 'ADD-menu to the Lighting-submenu (Look under 'Building').

//2.03 - TOWNSTONES(DOES NOT WORK! THEY HAVE BEEN DISABLED!!!!!!)

N/A

2.04 - HOUSE DEEDS

To make a player house(small houses, two stories, towers etc) you go into the ADD-menu by typing 'ADD, then select the Deeds sub-menu, then House-Deeds, then select the type of House deed you want to add. Once it's been added safely to your backpack, double-click the deed and you will get a ghost-image of the house, allowing you to select where on the map you wish to place the house. The area in which you place the house should be relatively free of trees, rocks, bushes etc, so they won't stick up through the floor of the house :) If the house is placed successfully, you will be teleported inside the house.

A command that is very useful for debugging player-houses is 'HOUSEICONS ON, which makes the houses invisible and show instead a "deed" on the ground where the house is placed. If you move the deed, you move the house. If you delete the deed, you delete the house (though not necessarily all items in the house).

To view the houses in the normal way again, use 'HOUSEICONS OFF.

You can also make a house of your own desire, but then you must manually place each section of the house. Each section is the size of one UO square. A great tool to find the sections you need with, is InsideUO. This is a great program. With this you can browse through all of UO's graphics and sounds and animation, and add them on your server by entering ('ADD 0x####) where 0x### is the hex-number you get when you doubleclick on an item within InsideUO. Go here to find InsideUO : https://uo.stratics.com/heptazane/index.shtml

Another way to build houses is to use Xuri's WorldBuilder, which helps you by automating tasks such as floor/wall/roof-building ingame, only requiring you to choose the "which" and "where"-specifics. You can find Xuri's WorldBuilder at the following address: https://wb.uox3.org

2.05 - VENDORS

A vendor is an NPC who sells/buys things from players. To make a vendor, either add one from the NPC menu ('ADD), or follow these steps to make your own.

1.) Create a basic npc
2.) Type 'MAKESHOP and click on the NPC. This will give him vendor status and buy/sell packs.
3.) Type 'OPENLAYER 0x1a and click on the NPC. This will open the vendor sell pack. In this sell pack you place all the items you wish the vendor to sell. F.example: You want the vendor to sell loafs of bread, so you add a loaf of
bread('ADD ITEM 0x103b) and place it on the ground. Place the loaf of bread inside the vendor sell pack.
4.) Now set how many loafs of bread you want the NPC to sell each time he restocks ('SET RESTOCK #, and click on loaf).
5.) Ok now you must set the price that players must pay to get a loaf of bread. Type 'SET BUYVALUE $$ (insert price here), and click on the loaf of bread.
6.) (Optional) You can specify a global restock-rate for all your vendors. This is the time it takes for the vendors to restock their wares when someone has bought something. To do so, type 'SETSHOPRESTOCKRATE # (insert time in minutes here).

Ok now you have a vendor who will sell things to people if they say "vendor buy". But you also want to make a vendor who buy things from players, you say? No problem, all you have to do, is open the vendor's BUY pack, with 'OPENLAYER 0x1c. Place all items you want the npc to buy inside here, and set the price he will give for those items ('SET SELLVALUE $$ on each item).

So the NPC vendor has three packs...the Sell pack('OPENLAYER 0x1a) the buy pack ('OPENLAYER 0x1c) and another pack where all the items the players have sold to the vendor lies ('OPENLAYER 0x1b)

The only thing remaining now, is to put some clothing on your vendor so as he/she will not freeze hehe...Go to 2.06 - CUSTOM NPCs, and look under "Putting Clothes On Yer NPC".

2.06 - CUSTOM NPCs

To make your own custom NPC, follow the steps below:

1.) Adding a basic NPC
First you must add a basic NPC. Write 'ADD NPC male to add a basic male npc, or 'ADD NPC female for a basic female NPC.
2.) Assigning an NPC AI
If you want, you can set your NPC to be one of the following:

a healer - type 'SET NPCAI 1
a monster - type 'SET NPCAI 2
a guard - type 'SET NPCAI 4
a banker - type 'SET NPCAI 8
(If you don't want your NPC to have either of these AIs, ignore the 'SET NPCAI command.)

3.) Clothing the NPC
Ok now to put some clothing/equipment on yer NPC. The first you have to do, is to add whatever clothes you wish the NPC to wear. Go to the CLOTHES menu by typing 'ADD then navigate through GEAR to CLOTHES. Now add the items you want to equip on the NPC, then drag the clothes onto the NPC's paperdoll to equip them. If there are already clothes on the NPC that you want to remove, use the 'REMOVE command and target the clothes on the paperdoll.
Do the same with any weapons/armor you wish the NPC to wear.

4.) Making the NPC move about
To let the npc walk around, use one of the following lines:
NPC doesn't move anywhere: 'SET NPCWANDER 0
NPC follows specified target: 'SET NPCWANDER 1 (Specify target using 'FOLLOW)
NPC wanders around freely: 'SET NPCWANDER 2
NPC wanders in a boxed area: 'SET NPCWANDER 3 (Box is set with 'NPCRECT x1 y1 x2 y2)
NPC wanders in a circle radius: 'SET NPCWANDER 4 (Circle is set with 'NPCCIRCLE x y radius)

(To get the x and y-coordinates, type 'WHERE. The first number is X-coordinate, the second is Y-coordinate, and the third is the Z coordinate(height).

2.07 - SPAWNING

To spawn NPCs, Monsters or Items, either use Chaos' CGMT Tool(Look the LINKS-section of this file), or follow these steps:

1.) Create a tile of which the npc/monster/item shall spawn from, using the 'ADD SPAWNER 0x#### command. This can be any object, but it has to be added using this command. The regular 'ADD ITEM # command will not work! ('ADD SPAWNER 0x04a9)
2.) Rename the spawn tile to something like "Orc spawn" or something. This will be useful if you want to find the spawn in the world files either to modify it or to delete it. ('RENAME spawnname)
3.) Now to tell the spawn tile what NPC/ITEM to spawn. All the NPC's and Items are listed in the files in UOX3\DFNDATA\ITEMS\ or NPCS\. Look up the NPC/ITEM you want to spawn, and type 'SET SPAWNSECTION # - where # is the NPC/ITEM [header-id] (not their ID!) from the DFN files.
4.) Specify the minimum time it should take for an NPC to spawn ('SET MININTERVAL #), as well as the maximum ('SET MAXINTERVAL #).
5.) Now to set the type of spawner.

ITEM spawner: 'SET TYPE 61
NPC spawner: 'SET TYPE 62
Area-NPC spawner: 'SET TYPE 69

6.) If your spawner is a NPC spawner, set the amount of NPCs you want the spawner to spawn, by using 'SET AMOUNT #(insert number of npcs here)

7.) If your spawner is an Area-NPC spawner, you need to specify the the X/Y offsets, which determine the area where the spawner will be allowed to randomly spawn the specified NPC.

Warning:
If your spawning NPC/monster is in wander mode, then take care that they are properly setup in your NPC-DFN files. If your using NPCWANDER 2 in the NPC-DFN files, then you don't need to do anything special, but if your using NPCWANDER 3 or 4, then make sure FX1, FY1, FZ1 are all set to -1. That will tell them to use their spawn location coordinates as their center point. Example:

NPCWANDER=4
FX1=-1
FY1=-1
FZ1=-1
FX2=20

This example tells the NPC to wander in a radius, set the center point for where it is spawned, and it may wander up to 20 tiles in any direction.

Also, for ITEMS, if you drag the spawned item directly off the spawner and onto your character, the item will not respawn again. Don't drag items from spawners onto your character. It appear okay to drag them onto the ground, your pack or your paperdoll though.

(thanks to Dragonbytes homepage for this litte thingy about spawning, a bit edited by me though :)

2.08 - MAGIC WEAPONS & WANDS

To make a magic weapon, wand or other item,follow the steps listed below:

1.) First of all, add the weapon, wand or any other object that you want to be magic, by using the 'ADD menu or 'ADD 0x####(where 0x#### is the hex code of the object you want to add)
2.) Set the item's type to 15 ('SET TYPE 15)
3.) Then set the spell circle of the spell the item will cast: 'SET MOREX # (1-8)
4.) Ok now set the spell number from within the spell circle you chose, by
using 'SET MOREY # (1-8)
5.) Then set the number of charges the item is to have ('SET MOREZ #)

2.09 - ADVANCEMENT OBJECT

When used, an advancement object gives the user an amount of stats/skills that are specified in a section of UOX3/DFNDATA/ADVANCE/advance.dfn

Here follows a step-by-step guide for setting up Advancement Objects:

1) Add a gate. For a blue moongate use: 'ADD 0x0f6c For a red moongate use: 'ADD 0x0dda
2) You can dye the gate a different color if you wish with 'DYE.
3) Use 'SET TYPE 80 for single use advancement gate. Once a character walks through any advancement gate he
can't use any gate of this type after that.
Use 'SET TYPE 81 for multiple use advancement. This kind of gate will let a character use it over and over again.
4) Use 'SET MOREX xxx to set what type of gate it is where xxx is the section advancement number from the advance.scp file
5) Make it permanent: 'SET DECAYABLE 0
6) Make it unmovable: 'SET MOVABLE 3
7) Use 'TWEAK or 'RENAME newname to give the moongate a new name matching the type of advancement object you've selected.

To make new types of Advancement Objects:
Only advanced users should attempt this. Open up the ADVANCE.DFN file with notepad. Go down just above EOF and press enter. Now enter your new advancement gate definition. Make sure to choose a number that is not already in the file for it. Make sure to keep the EOF at the end of the file. Below is a commented example of an advancement gate definition.

// Master Smith <---Label to tell you what kind of gate it is when you read the file.
[ADVANCEMENT 1] <---Adv. Obj. identifier. Must have a unique value.
{
STR=95 <--- Sets STR to 95
DEX=80 <--- Sets DEX to 80
INT=60 <--- Sets INT to 60
BLACKSMITHING=940 <--- Sets Blacksmithing skill to 94.0
MINING=940 <---Sets Mining skill to 94.0
TINKERING=940 <--- Sets Tinkering skill to 94.0
EQUIPITEM=0x13e3 <--- Adds and equips a smith's hammer
PACKITEM=0x0fbc <--- Adds tongs
PACKITEM=0x1bf2,50 <--- Adds 50 ingots
PACKITEM=0x0e85 <--- Adds a pick-axe
PACKITEM=0x1ebc <--- Adds Tinkers' Tools
}

The item numbers are section item numbers from the item-DFN-files in the UOX3/DFNDATA/ITEMS/ folder. You can also use SKIN 0x#### to change the player's skin color where 0x#### is the ID of the colour.

2.10 - SOUND OBJECTS

To make an object that plays sounds whenever people walk over it, or even come close enough, first add object that can be walked over, like a wooden floor tile ('ADD 0x04a9). Then set it's type to 88 ('SET TYPE 88), before you use the following commands to specify the sound-effect, radius and probability for the sound to play:

'SET MOREX 0x#### where 0x#### is the hex-ID of the sound.
'SET MOREY r where "r" is the radius in tiles which the sound object will trigger for.
'SET MOREZ % where % is the probability in percent of the sound being played.

Example
: If using item type 88, MOREX 0x019c, MOREY 0 and MOREZ 80, there will be a 80% chance of a lich laughing whenever someone steps on (radius 0) the specified sound object.

Also: See chapter 4.3 for a list of sounds availible.

2.11 - DAMAGE OBJECTS

To make an object that hurts people each time they walk over it (populary called damage objects), first add an item that people can walk over ('ADD 0x04a9), and if you don't want it to be seen, hide it ('SET VISIBLE 2).

Next set it's type to 85 ('SET TYPE 85).
Now set the base damage that's being done(morex), and random damage on top of that between (morey) and (morez):
'SET MOREX basedamage
'SET MOREY rnd-damage-min
'SET MOREZ rnd-damage-max


Example: Place a flamestrike animation object on ground using 'ADD 0x3709, then use 'SET TYPE 85 on it followed by 'SET MOREX 10, 'SET MOREY 10, 'SET MOREZ 25. This will do 20-35 damage every time a character walks through it.

2.12 - MONSTER GATES

To make an object that will transform a player into a monster/animal,
first create a moongate:
'ADD 0x0f6c (Blue MoonGate)
'ADD 0x0dda (Red MoonGate)
'ADD 0x1fd4 (Black Moongate)

Alright. Now set the moongate's TYPE to 82 ('SET TYPE 82).
Then set it's DESC property to the ID of the npc you wish the player to transform into (look in UOX3/DFNDATA/NPC/, in any of the DFNs there), by using 'SET DESC #.

When done, use 'SET MOVABLE 1 on the moongate (and use 'ALLMOVE ON if necessary to be able to pick up the moongate), move it to the desired location, then use 'SET MOVABLE 2 to make players unable to pick it up and move it.

2.13 - MESSAGE BOARDS

There is no additional setup for message boards other than having to actually ADD them to your world! :)
'ADD 0x1E5E (board that fit on N/S wall)
'ADD 0x1E5F (board that fit on E/W wall)

2.14 - GUILDSTONES

First add a Guildstone deed with 'ADD 0x14f0 then do 'SET TYPE 202 on the deed to make it turn into a Guildstone when someone clicks on it twice. The Guildstone will be placed at the exact location of the player who double-clicks it, and cannot be moved!

2.15 - BOOKS

(Text originally written by punt, edited/partially rewritten by Xuri)
Books use a certain file (the so called bok-file) to store its texts.
Each new book has a corresponding bok-file, which is stored in the /BOOKS folder in the UOX3 root-directory.

There are two kinds of books:
Writeable books and read-only books.

1) Writeable Books:
First, add a book ('ADD 0x0ff1), set its type to 11 ('SET TYPE 11) and set its morex value to 666('SET MOREX 666). You can set the maximum number of pages via 'SET MOREY #. If the morey is omitted its set to the default value of 16 pages, but it's recommended to set it explicitly anyway. The absolute maximum (client side limitation) is 255 pages.

On the first opening of a writeable book the corresponding bok file is created, and after the creation of the bok file it is absolutely NOT POSSIBLE TO ALTER the MAXIMUM number of pages (Changing the morey value after its creation does NOT change the maximum number of pages in a book). If the book gets too small there's (currently) painfully, no other way than deleting the book and creating a new one with a higher maximum number of pages. Dropping that nasty limitation would imply : much slower execution time and a lot of development time. In other words: It's not likely that this limitation will ever fall. The current implementation does not allow copying of books.
Example of how to make a writable book with 32 pages:
'ADD 0x0ff1
'SET TYPE 11
'SET MOREX 666
'SET MOREY 32

2) Read-Only Books:
The same procedure as for writeable books is used here, just the morex value has to be 999. Remark: Of course it is not useful to create a read-only-book, as you'll get an empty book you cant change. Hmmm. So most of the time it will only be useful to create it as writeable book, "fill it with text" and then "lock" it (make it read-only) via change of morex value from 666 to 999 afterwards.

3) Important remarks:
NEVER EVER edit a bok file "manually" (for example via text editor). It may look "readable" when viewed, but manually editing a bok file will very likely lead to file corruption, making the book unusable in the future, and in worst case lead to client crashes.

Performance/lag issues:
You might ask - why not always set the maximum number of pages to the absolute max of 255? Well, there's a bad client side limitation/issue that can't be done anything about with writeable books ( not read-only and old (read-only) book). The ENTIRE text has to be sent on EACH opening of a writeable book. Even if its empty - the send-page number-overhead is negligible. For a 255 pages book its about 2k (again per opening). A full 255 pages book is about 65k.
I have tested such a beast (255 pages FULL with text) and it lead to 3 seconds of lag per opening.

Once more: Read-only new books DON'T have that bad property. If you make a full 255 page new writable book and after filling it turn it to a read-only new book ( type 999) it's lag contribution is near zero.
So be careful with big writeable books.

2.16 - NPC AI

The command 'SET NPCAI # sets the "artificial intelligence" of the NPCs, or the way they react to certain things. Such as the banker opening your bank box when saying BANK or the guards attacking monsters in town.
Below is a list of numbers that can be used with the 'SET NPCAI # command.

00=No AI. Default value.
01
=Sets NPC to a healer. Will ressurrect ghosts.
02=Sets NPC to evil monster. Will attack all good monsters/animals and players.
04=Sets NPC to guard. Will attack all evil monsters(02) and all players that attack
within town limits.
08=Sets NPC to banker(can be used on player too). Will open bank box if someone says BANK near him/her.
88=Chaotic AI - attacks everything, from innocents to monsters (Blade Spirit/Energy Vortexes use this AI).
666=Evil Healer, resurrects murderers and criminals.

Additionally, there's the following AIs, which are used internally in the UOX3 source code, and may/may not work properly if used manually.

17=Player Vendor AI, used for - doh - Player Vendors =)
32=Pet Guarding AI, used for Pets that are guarding something/someone.

Additional NPC AI can be scripted through the JavaScript-engine. See the JS Docs for further information.

2.17 - MAKING GM's GLOW IN THE DARK

To make a GM (or another character) glow in the dark, you can change the ID of an item the GM is wearing to that of a lightsource. This will make the item an invisible lightsource (and thus can only be removed by death! death=unequip everything) which follows the character around wherever he goes. Note that no other item can be equipped in the same spot as the lightsource item,  so be sure to choose an item that is equipped in a spot where few other items are equipped. Earrings, bracelets, or body sashes work fine for this purpose.

First, set the light-radius you want to surround the character, by using the 'SET DIR # command. Recommended light-radiuses: 1 for wide radius, 2 for close up radius, 29 for extra wide radius. Then simply use 'SET ID 0x1647 to change the selected item into a lightsource!

To make an item glow in the dark(any item, including equipped ones), simply add an invisible lantern to the item with 'glow command. To remove the invisible lantern, use 'unglow.

2.18 - BLACK DYE TUBS
Add a normal dye tub ('ADD 0x0FAB) then do 'DYE 0x01 on it.
2.19 - SECRET DOORS
Secret doors are doors that look like walls. These work just as the other doors(except for looking different). Add a wallpiece from InsideUO which says "a secret door" and set it to type 12. Voila, or whatnot! :)
2.20 - PLAYER VENDORS
Add a deed ('ADD 0x14f0) and set it to type 217('SET TYPE 217) and you have a player vendor deed. It has the same commands as the OSI vendors so i'll just refer you all to https://uo.stratics.com for all the commands... ;)
2.21 - SPELLCASTING NPCs

In order for your NPCs to use spells you must include SPATTACK and SPADELAY values in their sections in the DFNs. SPATTACK represents the available spell circles (1-8), and SPADELAY is the delay in seconds between each time the NPC casts a spell from his available repertoire. So as an example - by setting SPATTACK=8 and SPADELAY=3 under the [orc] section of UOX3/DFNDATA/NPC/humanoids.dfn, all orcs spawned afterwards will be able to cast spells from spell circle 1 through 8, with a (minimum) 3 second delay between each spell cast.

However, the NPCs still need sufficient magery skill and mana to cast these spells. MAGERY=1000 will make the NPC a GrandMaster Mage, since 1000 = 100.0 skillpoints. Also, INT=100 will give the NPC 100 intelligence, and thus also 100 mana to use for it's spells.

These values can also be assigned to NPCs ingame, using the 'SET SPATTACK # and 'SET SPDELAY # commands, (Note that the ingame command uses SPDELAY, not SPADELAY!) as well as 'SET MAGERY # and 'SET INT #.

2.22 - PLAYER RACES

In the file races.dfn in the UOX3/DFNDATA/RACE/ folder, it's possible to set up new races that the players can be, as well as define NPC races and relations (allies & enemies) inbetween. By default, races.dfn already has a number of races set up for the various NPCs you'll find in UOX3. The first race definition in the file, however, is "Human", and is by default assigned to all new characters that are created. If you want to set up a system of different playable races, like humans, elves, dwarves, etc, it's adviced to create new sections for all of these (including humans), and use the first entry as a "no-race" - the one used by new characters before they've chosen a new race.

The simplest way of creating new races, is by copying & pasting an existing section to the bottom of the file (before the EOF line though!) and then change the race section identifier and any properties that race should have. If you're creating a new race for NPCs, make sure to give said NPCs a new entry in their definition-files; RACE=# where # is the section number of the race you want to assign them.

There are however a number of different settings for races, most of which are not used by the default races. Here follows a list:

[RACE #] //Race Identifier Value, must be unique
{
NAME=Dwarf // Name of race
STRCAP=100 // Cap on strength
DEXCAP=100 // Cap on dexterity
INTCAP=100 // intelligence cap
REQUIREBEARD // Males must have beards, will add if needed
NOBEARD // Must have no beard, will delete if they have it
GENDER=MALE // Only males can be this race, acceptable values MALE, and FEMALE
BEARDMIN=0440 // Min beard colour, must have max also, if 0, then disabled
BEARDMAX=0480 // Max beard colour, must have min also, if 0, then disabled
SKINMIN=0480 // Skin min colour, must have max also, if 0, then disabled
SKINMAX=0520 // Skin max colour, must have min also, if 0, then disabled
HAIRMIN=0440 // Hair min colour, must have max also, if 0, then disabled
HAIRMAX=0520 // Hair max colour, must have min also, if 0, then disabled
SKILLNAMEG=2 // Skill name gain and how much (SKILLNAME = MAGERY or whatever skill you want)
SKILLNAMEL=2 // skill name loss and how much
RACIALENEMY=1 // Racial enemy number... can be more than one entry
RACIALAID=2 // Racial aid number... can be more than one entry
LIGHTDAMAGE=5 // take 5 damage from light
LIGHTAFFECT // if here, take damage from light
LIGHTSECS=5 '/ take damage from light every 5 secs
HEATDAMAGE=5 // take 5 damage from heat
HEATAFFECT // if here, take damage from heat
HEATSECS=5 // take damage from heat every 5 secs
COLDDAMAGE=5 // take 5 damage from cold
COLDAFFECT // if here, take damage from cold
COLDSECS=5 // take damage from cold every 5 secs
LIGHTNINGDAMAGE=5 // take 5 damage from lightning
LIGHTNINGAFFECT // if here, take damage from lightning
LIGHTNINGSECS=5 // take damage from lightning every 5 secs
RAINDAMAGE=5 // take 5 damage from rain
RAINAFFECT // if here, take damage from rain
RAINSECS=5 // take damage from rain every 5 secs
SNOWDAMAGE=5 // take 5 damage from snow
SNOWAFFECT // if here, take damage from snow
SNOWSECS=5 // take damage from snow every 5 secs
NIGHTVIS=3 // night vision bonus... the number is the light level bonus you get at ANY time
PLAYERRACE=0 // 0 is nonplayer race, 1 is player race
LANGUAGEMIN=500 // skill value(Spirit Speak) needed to interpret that races speech
}

Skill gain/loss information can be adjusted dynamically now, though it still can default to:
For skill gain:
0=None
1=Slight
2=Moderate
3=Significant


and for skill loss:
0=None
1=Slight
2=Moderate
3=Significant


Basically, add a new section called COMBAT MODS like this:
(If you don't have at least 4 entries, the defaults are used.)

[COMBAT MODS]
{
MOD0=0
// % bonus for mod 0
MOD1= 5
MOD2=10
MOD3=25
MOD4=50
}


Then use SKILLNAMEL=0 to 4 or SKILLNAMEG=0 to 4 to define the penalty or bonus added to the specified skills of the race you add these lines to. Example:
MAGERYL=3
SWORDSMANSHIPG=2

The above will give a MOD3 (25%) penalty to a race's Magery-skill, and a MOD2 (10%) bonus to a race's Swordsmanship-skill. This means that the efficient skill-value is lowered or raised by the apropriate amount in skill-checks. It does NOT affect skill-gain or skill-atropy at all.

Any Racial Enemies will show up as orange to eachother, and NPCs of such opposing races will attack eachother. Any Racial Aids (Allies) will show up as green to eachother, and any allied NPC races will not attack eachother. Murderers still flag red though, no matter what the racial enemy/aid settings are. Race names will show up in the paperdoll as well as above the animated character when you click on them, as long as the character doesn't belong to the default race (which is RACE 0).

A simple way of letting players choose which race to become, is to create "Race Gates" at the starting location of new characters, then when the players walk through any given race gate, they'll be turned into that race. Then place a teleporter to that race's starting location behind the gate, so they'll be teleported to that race's starting location (if different per race).

To add a new Race Gate, you need to add a new item-section to the ITEM-DFNs, located in the UOX3/DFNDATA/ITEMS/ folder. You can either add this new section to one of the existing .DFN-files there, or create a new .DFN file to hold your race gates specifically. In this example, we'll create a new file using Notepad, which we'll save as racegates.dfn in the above mentioned folder.

The contents of the file should be as follows (without the comments, they're not vital for the functionality of the race gates ;):

[elvish_racegate]
{
NAME=Elvish Racegate
// name of the gate
ID=0x0dda
// moongate ID
COLOR=0x0015
// color of moongate
TYPE=83
// MUST be type 83, otherwise it won't work
MOREX=1
// Race to convert to
MOREY=0
// 0 means it's not reusable by the same player, 1 means it is
}

EOF

You can also create "Racial weapons", which do double damage against specific races. To do this, simply give the weapons a new entry in their section of the DFN files, saying RACE=# where # is the Race section ID of the race you want the weapon to do double damage against!

2.23 - "ORDER&CHAOS" GATES (OUTDATED)

These gates work like those at Lord British & Lord Blackthorn's castles on UO. You use a key or a switch/lever,
and the gates raise or lower.
This is how you set them up:

First you add the gates themselves, called the "portcullis", either in north/south direction('add 06 f6) or in
east/west direction ('add06 f5). Then you set the gates to type 3(Order) or 5(Chaos), before doing 'setmorez # on them, where # is 1 for Order gates and 3 for Chaos gates.

Now after doing that, you add a key, switch, lever or anything else you want to use as "gate opener", and set it to type 2(Order) or 4(Chaos). The gates should now raise and lower after you use the gate opener.

2.24 - UNUSED

UNUSED CURRENTLY

2.25 - UNUSED

UNUSED CURRENTLY

2.26 - REGIONAL BANKS (OUTDATED)

If USESPECIALBANK 1 is activated the new banking system is active.
There is a common bank and a regional bank.

common bank -> you get your command-bank-box it if you say "bank" near a banker (bank-npc)
regional bank -> you get your reginal-bank-box if you say a trigger-word you can specify
via server.scp entry SPECIALBANKTRIGGER triggerword
for example SPECIALBANKTRIGGER WARE. --> the triggerword for regional bank is ware
so if you want to get you regional bank box in that case you have to say ware near a banker

so whats the differnce between those two bank-types ?
common bank, like the old system ...
you get all items you've placed in the bank EVERYWHERE.
So if you place 2 items in the bank of britain you see those same 2 items
if you open your bank box in the bank of vesper.
This principle only applies to the common bank.
The regional bank does NOT have it.
Regional banks work ... regional
So if you put items in the bank of britain you only get those items if you open a regional
bank box in britain.
If you goto the bank of vesper you WILL NOT see that items.
You see only that ones you placed in the vesper-regional box.
If you didnt place anything in vesper-regional bank it will be empty.
though you placed 2 items in britain bank.
Common-bank -> not regional, all items you place in a comman bank box can be fetched at any other bank.

2.27 - ENGRAVING ITEMS (OUTDATED)

This is new and non-UO, select inscribe skill and target a piece of armor. It will then ask you for circle and spell to engrave. If successful, you will place the spell on the item with 5 charges on it. This checks the magery skill, the tinkering skill and the inscription skill, it is rather hard to master. Again this may need tweaking later. A player may engrave any item that has att or def greater than zero, thus shirts, armor, weapons, hats may all be engraved. Food and pets may NOT.

2.28 - SETTING SKILLS AND STATS

You can set the skills and stats on ANY NPC or Player. For example, to set the ARCHERY skill to 80 on an NPC, you would type the following... 'SET ARCHERY 800. You set 800 as the number instead of 80 because the system sees the last number as the 'decimal'. For instance, 809 would set archery to 80.9.

To view a list of the available skills, and how you need to spell them when using them with the 'SET command, try 'SHOWSKILLS 0 and target a character.

To set the stats, you do one of the following:
'SET STR #
'SET DEX #
'SET INT #
Where # is a number between 0 - 100

2.29 - SETTING THE OWNER OF ITEMS/PETS

This command's foremost function is to set an owner of an item/npc. Lets say you want a horse you can ride on; When you create a horse, or one is spawned, it is by definition wild, and has to be tamed using the animal taming skill.

But by using the 'SET OWNER command, you can easily make yourself (or someone else) the owner of said horse - or another NPC for that matter. Simply type 'SET OWNER 1 (1 doesn't mean anything, but the command currently needs a placeholder value behind OWNER to function at all) and target the horse - then target yourself when the second targeting cursor comes up.

You can also use 'SET OWNER on items. Only the owner of the item can then use it, but no such restrictions are put in place for picking up/moving the item.

2.30 - MAKING POTIONS MANUALLY

You can define any item as a potion, it doesn't have to be the default potion graphics. But in this example we'll use the normal graphics for a strength potion, which is 0x0f0b. So first we do 'ADD 0x0f0b and place the item on the ground. Or target yourself, and it will be placed in your backpack instead, which is useful if you have normal players around who might feel an urge to pick up your newly created item. ;)

Next, use 'SETSCPTRIG 5003 on the red potion you just created, which will assign the potions.js JavaScript to the potion, giving it actual potion functionality. Two steps remain now; Defining what type of potion we're making, and how strong it should be.

To define what type of potion it should be, use the 'SET MOREY # command, where you replace # with a number from the list below:
1 = agility
2 = cure
3 = eplosion
4 = heal
5 = night sight
6 = poison
7 = refresh
8 = strength
9 = mana
10 = LSD

To define how 'strong' a potion should be, set the morez value ('SET MOREZ #) from the list below:
1 = lesser
2 = normal
3 = greater

2.31 - MAKING FIREWORKS STAFFS/WANDS

Set any item to type 181 ('SET TYPE 181), then set the number of firework charges with 'SET MOREX #, and it will become a fireworks-wand/staff/object.

2.32 - CUSTOM WEIGHT FOR ORE/LOGS

To customize the weight(and other properties) of ore and logs, which aren't added from the scripts when you gather them ingame, and thus get their weight-values from the hardcoded values in the UO Client, you can edit UOX3/DFNDATA/HARDITEMS/harditems.dfn, as any properties assigned to an item in here will override the default hardcoded client values for such items.

The default harditems.dfn file already has weight-values for ore and logs setup, but you can modify those to your heart's content if you want to. An example follows:

// Logs
[0x1be0]
{
weight=200
pileable=1
decay=1
}


Explanation of the properties/values above:
0x1be0 is one of the item-IDs used for Logs,
weight=200
means that each log weighs 2 (or 2.00) stones. To make a log weigh 10 stones, you could use weight=1000. To make each log weigh half a stone, you'd use weight=50. And so on.
pileable=1
means that the item can be put in piles, so you have a 'pile' of 100 logs instead of 100 seperate logs spread out in your backpack.
Decay=1
means the item will eventually decay if put on the ground.

2.33 - CONTAINER SPAWNER

(Spawning Containers 101 By Iain, edited by Xuri)

1) Create a container using the 'ADD SPAWNER command. You can either lookup the ID in InsideUO, the item-DFNs or by using 'ISTATS on another container ingame.
2) SET SPAWNSECTION # equal to the item-id to spawn in the container. Note: MUST be a hex-id or a decimal ID! I.e. "0x0f60" works, but "longsword" doesn't.
3) SET MININTERVAL # equal to the minimum time to spawn an item.
4) SET MAXINTERVAL # equal to the maximum time to spawn an item.
5) SET AMOUNT # equal to the amount of items to spawn.
6) 'SET TYPE 63 for an unlocked container spawner, 64 for locked container spawners or 65 for unlocked container.

2.34 - IMPROVED ORDER & CHAOS GATES (OUTDATED)

This is an improved version of Chaos & Order gates.
Now you aren't limited to only two gates in your world, but can have as many gates as you want!
Here's how it works, pasted from the man who wrote the code ;)

"Openable Gates - by WIG based on Order&Chaos Gates code

Ok, i found Order&Chaos gates stuff really great, but i noticed something:
With order&chaos gates, you can only have 2 gates in your world, for example
double-clicking on a Order Gate Switch will open ALL Order Gates in your world.
But what will happen if you want to use these gate stuff in your castles, etc.?
So i copied Chaos&Order Gates code, and modified it, so now you give the same
morey to both gate&switch, and switch works for only gates with its morey.

The gates use item type 205, and "gate openers" use item type 206.

Here's what you should do to set up a gate (copied and modified from Xuri's UOX3 Guide):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
First you add the gates themselves, called the "portcullis", either in
north/south direction('add 06 f6) or in east/west direction ('add06 f5).
Then set the gates to type 205, and 'setmorey 1 on them.
After that, give all parts of your gate the same unique number using 'setmorey #

Now after doing that, you add a key, switch, lever or anything else you
want to use as "gate opener", and set it to type 206. Then, set the "gate
opener"s morey to the same number you used for gates.
The gates should now raise and lower after you use the gate opener."

2.35 - SETTING ITEMS AS 1- OR 2-HANDED

This is controlled through the DFN-files, in the definition-section for any specific equippable item. By setting it's LAYER= value to either 1 or 2 you specify whether the item is equippable in the left or right hand, which for weapons generally means the same as one or two-handed weapons.

Note though that the 2D-client has "hardcoded" values for whether or not an item is equippable next to another, so if you change a halberd to one-handed you will not be able to equip it next to a shield or one-handed weapon by normal means. In that case you need a new method of equipping items, such as for instance through a custom JavaScript.

Shields also use LAYER=2, but they aren't two-handed shields! It only means they can only be used along with a one-handed weapon.

2.36 - NPCs ON HORSEBACK

To make an NPC ride a horse or other mount, you need to do a few changes to your UOX3 DFN-scriptfiles.

First you need to make a new "horse" item in one of the DFN files in the UOX3/DFNDATA/ITEMS/ folder, or specifically add a new DFN file for this purpose. In this example we'll create a new file using Notepad or another text-editor, which we save as miscitems.dfn in a subfolder called CUSTOM. The entire path for the new file will then be UOX3/DFNDATA/ITEMS/CUSTOM/miscitems.dfn.

We then define a new item inside this file, like this:
in layer 0x19 of their character (LAYER 25 in items.scp):

[my-mount-item]
{
NAME=a horse
ID=0x
3E9F
LAYER=25
NEWBIE
}


Note that ID of the new item must be unique, i.e. it cannot exist as an ID for an item in any of the other DFN files in the ITEMS folder. I've chosen 'my-mount-item' as the ID, which is as good as any I guess.

Next, we open UOX3/DFNDATA/NPC/malehuman.dfn, where we find our test-subject, the NPC with the complex ID of [male]. Scroll to the bottom of the section for the [male] NPC, and add the following on a new line before the ending bracket (that's the } symbol):

EQUIPITEM=my-mount-item

Save the file, and start up UOX3 (or reload the DFN-files from console if it's already running). When ingame, try doing 'ADD NPC male, and with luck the NPC that gets added is seated on a horse! The NEWBIE tag ensures that your players won't get hold of the "horseitem"

Now he will appear on horseback when he is spawned/added ingame, and the NEWBIE tag ensures that your
players won't get hold of the "horseitem" which the NPC has equipped, if the NPC should die.

In the above example we used a horse as mount, but there are several others that can be used. Below follows a list of possible IDs you can use for the "mount-item", just add another item (with an unique header-ID!) and exchange the item-ID (which above is 0x3E9F) with either of the IDs listed below:

0x3E9F // horse
0x3EA0 // horse
0x3EA1 // horse
0x3EA2 // horse
0x3EA3 // desert ostard
0x3EA4 // forest ostard
0x3EA5 // frenzied ostard
0x3EA6 // llama
0x3EA7 // nightmare
0x3EA8 // silver steed
0x3EA9 // dark steed
0x3EAA // ethereal horse
0x3EAB // ethereal llama
0x3EAC // etheral ostard
0x3EAD // ki-rin
0x3EAF // Minax War Horse
0x3EB0 // Shadowlord War Horse
0x3EB1 // Council of Mages War Horse
0x3EB2 // Britannian War Horse
0x3EB3 // sea horse - 3D-clients only
0x3EB4 // unicorn
0x3EB5 // nightmare
0x3EB6 // nightmare
0x3EB7 // nightmare (true black?)
0x3EB8 // ridgeback
0x3EBA // ridgeback
0x3EBB // skeletal mount
0x3EBC // giant beetle
0x3EBD // swamp dragon
0x3EBE // armoured swamp dragon

2.37 - MAKING WRIST-WATCHES

Making wrist-watches is actually pretty simple. First add a "bracelet"-item using 'ADD 0x1086, then set it's TYPE value to 241 using 'SET  TYPE 241. Rename the bracelet using 'RENAME a wrist watch , and you're done!

You now have an equippable wrist watch that tells the time when double-clicked =)