Guide to NPC Detailing

Place to discuss history, story, character development, questlines for factions and other specifics.

Moderators: Haplo, Lead Developers

Locked
User avatar
immortal_pigs
Developer
Posts: 582
Joined: Thu May 15, 2008 2:45 pm
Location: Utrecht

Guide to NPC Detailing

Post by immortal_pigs »

Guide to NPC detailing

Table of Contents.
1. General rules
2. Pathgrids
3. Populating the wilderness
4. Creating NPCs
5. Setting ownership
6. Dialog
7. Tips, tricks and resources
8. Region painting
9. Making unique items
10. Other naming conventions
11. Standard scripts


1. General rules

When working on an NPC claim, you are adding the final touches of life and personality to the world TR is creating in Morrowind. This is an important job, and is vital in creating the atmosphere and experience felt by the player. For this reason there are some general guidelines that ought to be followed.

1. Be aware that you are world building. Your job is not just to create quirky personalities and memorable characters - that is part of your role, but you've also got to paint in broader brushstrokes. Think about the demographics and economic systems you're presenting. Think about the quantity of native Dunmer versus outlanders, the representation of relevant local factions.

2. To that end, think about the bigger picture when writing your dialogue. The 'generic' dialogue which is given to all non-unique townsfolk offers as much opportunity for world building (if not in some ways more) than unique entries for selected individuals. Don't just make everyone in town offer the 'latest rumors' about some quirky town event, but additionally offer a more general insight into the kind of people who live here, what their attitude to life in Morrowind is. Consider the influence of local factions and wider events.

3. To do the above things properly, some idea of the lore of Morrowind and the Elder Scrolls more generally is helpful. Reread some of the vanilla dialogue whilst you're writing up your claim - some of it is a lot better and more subtle and interesting than you may remember! Read some of the books in-game, especially those which are not stories but are themselves world building history books.

At some point someone should probably write a guide about the general lore state-of-play with regards to factions, geopolitics and whatnot. This guide, however, is going to be a lot more functional.

4. One lore tip I will offer here is something that is always the first thing anyone ever sees in an NPC, and needs to be got right - names. Don't rely on TR's name generator, which is often terrible. Create your own names, based on existing NPCs. (filter the NPC list by Race in order to get all the representatives together) Some general rules are as follows:

Dunmer - Most Dunmer have a first name and a second family name. It appears that wives take their husband's names upon marriage (or equivalent ceremony). Some outlaw Dunmer choose not to take a family name. Very few law abiding citizens would dare drop their family's name, however. Stylistically, there are occasionally some subtle differences between the names of Dunmer from different factions - most noticeable with the Ashlanders. There are much harder to detect trends between Great Houses as well.

Altmer - Usually only a first name. Sometimes 'of [Summerset Isle location]' as a title. (e.g. Nalcarya of White Haven)

Bosmer - Usually only a first name.

Imperials - Most Imperials have a first name and a family name. Often Latin sounding, with men frequently ending in -us and women ending in -a. Don't overdo this, but do note it as a means of maintaining stylistic consistency.

Nords - Generally only a first name, occasionally with title (e.g. Eydis Fire-Eye). Surname '[fathersname]son/dottir' is used in some Elder Scrolls places, but not in vanilla Morrowind. Can be used sparingly. If you want to get 'real worldy', names sound Scandinavian and Germanic, moreso than Slavic or Russian. (e.g. Beowulf rather than Vladimir) So if you want to look for inspiration, go to the Viking Sagas or Saxon England.

Redguards - Usually only a first name. Occasionally, Redguards have 'modern' names that we would recognize in the real world (e.g. Garry, Katie). Don't overdo this, and don't use really obvious names - maybe use a twist in the spelling.

Bretons - Most Bretons have a first name and a family name. Often French sounding. As a general note for Bretons and to a lesser extent Redguards and Nords too, remember that they might be Imperial citizens with Imperial fathers - and thus have an Imperial name rather than a Nordic/Redguard/Breton one. (in ES, as a side note, children inherit the majority of their racial traits from their mother)

Orcs - All Orcs have a first name and a second name (their father's name), the latter preceded by the prefix gro- or gra-, depending on gender. Male orcs are gro, females are gra. (e.g. Dul gro-Dush, Dura gra-Bol)

Argonians - Two types of Argonian name. Some have pure Argonian names, others have the translated Imperial versions. (e.g. Jeelus-Tei, Skink-in-Tree's-Shade) As you should know from Suran's Haj-Ei quest, all Argonians have both. Argonians with multi-part names tend towards hyphens, though apostrophes are occasionally used.

Khajiit - There is a TIL document where Jobasha speaks about Khajiit names, which you could use - but don't be bound by it. Many names are prefixed by one or two letters, followed by an apostrophe (hyphens are occasionally used).

2. Pathgrids
Most interiors, all settlement exteriors and any wilderness exteriors with hard-to-navigate terrain (twisty roads/bridges etc.) require pathgrids so the NPCs don't go walking into walls and stuff. Guide to pathgrids may be found here:

http://tamriel-rebuilt.org/?p=modding_data/tutorials&section=202276

3. Populating the wilderness
The wilderness consists of all exteriors without settlements or towns. So that could be mountains, seas, lakes, forests, grazelands, swamps, ashlands, etc... Also the term wilderness is applicable to dwemer ruins, daedric ruins, caves, grottoes, Dunmer fortresses, ancestral tombs and Old Mournhold ruins. Generally the wilderness is intended to be hostile.

There are two types of hostiles in Morrowind; creatures and hostile NPCs (baddies).
Daedric ruins, dwemer ruins, caves and fortresses typically contain baddies, though this isn't a rule set in stone. Most ancestral tombs are just undead, and grottoes have mostly only sea creatures. Baddies are also suitable around bandit camps in the wilderness.

This section will focus on creatures, creating baddies will be explained at the end of the section "Creating NPCs".

Creatures
There are two types of creatures; "creatures" and "leveled creatures".

"Creatures" are like normal NPCs, they don't respawn, once killed they are gone. Generally you don't need to place "creatures", unless you want to create a specific one time only experience (one time only because once dead, they won't respawn).

"Leveled creatures" are the staple of wilderness populating. In the object viewer they all look like ninja monkeys. Leveled creatures respawn and adapt to the players level. If you go to the leveled creatures tab in the CS, you will see two relevant things; the "ID" and the "Creature List". The creature list will show you which creature package is integrated into the leveled creature.

Update: The following is no longer up to date. See http://www.tamriel-rebuilt.org/old_forum/viewtopic.php?t=23780 for new leveled creature guidelines. -- arvisrend, 16 Dec 2012

Take for example the following LC: "ex_shore_all_lev+0". In the creatures list you see "mudcrab -1, cliff racer_diseased -4, cliff racer -4, netch_b.." This means that if the player is level 1, the LC will turn up as a mudcrab. Once the player hits level 4, it can be a cliff racer. This way, the higher the level of the player, the stronger the LC will be. Note that many leveled lists will come with a +0, +2 and -2 variant. +2 makes for slightly easier encounters, -2 makes for slightly harder ones (as higher level creatures show up correspondingly later or earlier).

As NPC detailer regarding populating the wilderness, the most important thing to do is to place the right LCs in the right location. Mostly TR has already created a specific creature pack for your region, see for example "TR_r_Molagreahd", or "TR_r_Lan_Orethan". Check the creature list to be sure you're not dropping nautical LCs on land or sinking kwama LCs in the sea.

There are a few creatures that it is recommended you hand place - a "kwama worker entrance" outside most egg mine interiors, and on a rare occasion you might put a "skeleton" outside an ancestral tomb.


4. Creating NPCs
See the attached PDF.

Race/Sex/Class/Faction/Level
Script
Items
- clothing
- armor
- weapons
- spells
AI
- Idle
- Wander
- Services


Creating Slaves
When creating slaves, follow the following naming convention:

TR_mX_S_Name_Surname

If you wish for the slaves to be releasable (so if they're in a bandit cave, definitely; if they're in a settlement, possibly in rare cases), you'll need to create (if there isn't a suitable one already - check) a slave key, and add a new base entry to the 'go free' topic.

("You have the key. Will you let me go free?" filtered for Slave class, the Cell in question, possession of the Key, and with a Results box "Choice "Unlock the slaves' bracers." 1 "Nevermind." 2")

Creating Baddies
When creating baddies, follow the following naming convention:

TR_mX_O_Name_Surname
The "O" stands for outlaw.

Once the NPC is created, go to AI, then set "Fight" to 100. This will make the NPC into a baddie.

Note: baddies are outlaws, they have no rights. They don't have any property, so you shouldn't set anything to the ownership of a baddie. Also, set "Alarm" to 0 for baddies.

If you don't want to create baddies yourself, you can always use "TR_Roamer_X". These are pre-created baddies which you can use to populate bandit camps. While self made baddies should not be set to respawn, Roamers do respawn. Update: Placing roamers is no longer considered good style! We are eventually going to get rid of the old ones, too. -- arvisrend, 16 Dec 2012

Creating dead NPCs
You may want to create random dead NPCs in the wilderness. For example a dead adventurer in a daedric ruin or a drowned traveler on the bottom of the sea.

Naming convention:
TR_mX_d_Name_Surname
"d" stands for dead.

Once the NPC is created, deselect "Auto Calculate Stats", then set their health to 0. They will be dead in-game.

Also, be sure to check "persists", so the corpse does not disappear after 2 weeks.

Update: Also make sure that the dead NPCs have no generic scripts (like TR_m3_NPC) -- they don't need them. Sound_Flies is a reasonable script for an NPC to have in most places, though. Also, dead NPCs shouldn't have any spells unless they're specifically meant to. -- arvisrend, 16 Dec 2012




5. Setting ownership
See the other PDF.

Normal NPCs within an interior are the "owners" of everything inside that interior. When you set ownership to their items, grabbing them will be reported as theft if nearby NPCs Alarm values are sufficient.

Ownership is especially important when creating traders/people that offer barter. Traders will offer everything they have their ownership set to as long as it's part of their selected trader type. (So clothiers won't sell weapons they have ownership of.) Setting ownership is useful for realism; what the player sees in the shop is also what is offered by the trader.

Because of this, do not overburden their personal inventory with extra items if unnecessary. Simultaneously, if there is anything in a room which a trader should not sell (e.g. the pillows on his bed, the food on other customer's tables), assign the ownership to anyone but the trader. Even if there is no one else in the room, you can assign it to a random NPC (for tradition, why not "a shady smuggler" or the relevant kind of guard for this town) - it will still be reported as a crime when stolen.

Update: But most traders SHOULD have some items on their inventory as well: namely, restocking items like arrows, standard scrolls, potions, basic ingredients, repair hammers etc. -- arvisrend, 16 Dec 2012



6. Dialog
To learn dialog, download "Srikandi's dialogue tutorial" which can be found here:
http://tamriel-rebuilt.org/?p=modding_data/tutorials

There are a couple of rules specific to TR regarding dialog.

1. BIGCAPS dividers. See section 7.

2. American English. Honor instead of honour, realize instead of realise. While instead of whilst. -ize instead of -ise. As a general rule, de-frenchify.

These are the following dialog topics that need to be created by the detailer.

greetings
This is what the NPC will first say to the player. Using Random100 you can create a couple of random greetings for the town. Note that Morrowind has very decent random greetings already, so you should only make random greetings above "Random100 > 50". This means that half of the greetings (those below RandomNumber 50) will be Morrowind, the other half self made.

TR NPC detailing greetings go into "Greetings 7".

Update: Never put any greetings beneath the "Nerevarine" greetings under Greeting 7.

background
If you want, you can create unique backgrounds for your NPCs. Though this isn't a rule set in stone. At the very least it makes sense to give the more important NPCs a unique background.
Backgrounds should always be filtered through the NPC ID.

latest rumors
These can be randomized via Random100. Around 1-4 rumors is sufficient. Rumors are related to quests and things the PC will want to investigate. They are gentle nudges to the player.

little advice
Little advice can be randomized. It's mainly fluff but can contain little snippets of useful advice.

little secret
Can also be randomized. This is also half fluff, half useful. The line between advice and secret is kind of thin.

services
This is an essential dialog piece. In here you inform the player of the services (traders, smiths, trainers, spellmakers, taverns, etc...) in the location.

someone in particular
In here you simply inform the player of the important people in the town. These could be the leader, the ruler, guild heads or quest givers.

specific place
This topic can be used to give the player directions, telling them what lies north, what lies south, how far away the next city is, etc...

[Town/Location]
Here you create a new topic, about the specific town you're populating. In this topic NPCs give a little description of their location.

[Other Relevant Locations/Regions]
Optional. Here you can refer to the nearby Imperial fort, or talk about the geographic region, as in "Inlet Bog", "Mephalain Mountains" or "Lan Orethan".

[Important Persons]
If there's an extra important person, like the town ruler, you can optionally create a specific topic about them.




7. Tips, tricks and resources

1. Having to create new NPCs all the time can be tedious. Instead, you can create a base NPC. Three base NPCs I often use are:

TR_mX_Base (Has the TR_mX_NPC script)
TR_mX_S_Base (Has the TR_mX_Slave script)
TR_mX_O_Base (Has Fight = 100)

First simply create the NPC with the relevant values. Then save.

From then on, simply right click the Base NPC, click "edit", change the ID, when the editor asks you if you want to create a new object, say yes. This way you skip having to set scripts or fight values, ad nauseam.

Update: Of course, instead of creating a base NPC, one can copy a similar existing NPC. -- arvisrend, 16 Dec 2012


2. Check the signposts! Many locations often undergo name changes, so you should check if the signposts are still correct.

3. As with interiors, where de_ and com_ furniture are used appropriately to designate Dunmer and Imperial houses, and are not mixed, be mindful of what clothes you give NPCs. Some have IDs which indicate allegiance such as "common_shirt_02_[h/t/r]" which belong to Houses Hlaalu, Telvanni and Redoran respectively; or "common_shirt_01_[a/e/u/z]" which belong to the Ashlander Ahemmusa, Erabenimsun, Urshilaku and Zainab tribes. More subtly, it is sometimes not mentioned in the ID, but for example "expensive_[shirt/pants/robe]_01" are clearly designed as Ashlander garb, and should not be used on non-Ashlanders, whilst "expensive_robe_02" is really intended only to be used by Temple members.

4. Don't make any uber NPCs. Stay well away from level 40 NPCs with full daedric armor and 100000 gold. With armor in general, it makes for a more realistic world if most NPCs (Baddies included) are not in excess of level 20 at most, and stay for the most part to the lower level armors which could be expected to be mass-produced. Obviously there can be exceptions, but use your head, and don't go overboard. For regular run-of-the-mill Baddies, levels from 8 - 16 are recommended. For town dwellers, there can be much greater variance, from 2 to mid 20s. Obviously there can always be exceptions, but always justify them. Don't just slap down a level 25 bandit boss with Orcish armor just because you want to.

5. Make sure traders have a sensible but realistic amount of gold (2500 = rich. Around 500 or less is decent, and 250 or so for an average small-time trader). Make sure trainers don't have values of 100 in all their skills.

6. Idle animations can be used to make your NPCs more dynamic. See resources.

7. BIGCAPS dividers work like this
Say you're creating dialog for Andothren, for example "little advice". In the dialog section you go to the topic "little advice". You can already see something like this:

BEGIN TR MAP6 ADVICE
END TR MAP6 ADVICE
BEGIN TR MAP5 ADVICE
END TR MAP5 ADVICE
BEGIN TR MAP4 ADVICE
END TR MAP4 ADVICE

Because Andothren is presumably part of map 4, you create bigcaps dividers between BEGIN and END TR MAP 4 ADVICE.
It should look like this.

BEGIN TR MAP4 ADVICE
BEGIN TR MAP4 ANDOTHREN ADVICE
END TR MAP4 ANDOTHREN ADVICE

END TR MAP4 ADVICE

As a general formula:

BEGIN TR MAPX [TOPIC]
BEGIN TR MAPX [LOCATION] [TOPIC]
END TR MAPX [LOCATION] [TOPIC]
END TR MAPX [TOPIC]

Make sure your dividers are filtered with the ID "dialog placeholder". If you don't filter your dividers, every single NPC in the game will say things like "BEGIN ANDOTHREN ADVICE" under little advice, or "BEGIN OLD EBONHEART BACKGROUND" under background.

8. You may want to lock some houses, for example if the resident NPC strolls about town rather then staying at home. NPCs of different stature receive a different lock level, depending on the wealth of the area being locked. So commoners get low lock levels to about 35. More wealthy NPCs get between 40-60. 100 locks should only be used in extreme cases. Remember also not to neglect traps in ruins and dungeons.

8. Region painting
When you rename a cell, it becomes marked on the map. Only towns, cities or notable locations should receive a mark on the map. As soon as a cell is given a name, it becomes marked. Many exterior claims come with all their cells named, which is not what we want. To correct this problem:

Use the File - Export Data - Cell Exteriors - New Cell Exteriors function to get a .txt file, from which you remove all the non-map-marked cell names (leaving just "" instead of "PlaceholderCellName_01"), re-save and then Import.

Once the names are removed, all unnamed cells will just be called 'Wilderness'. To fix this, open up the Region Paint tool and apply the correct regions for your claim from TR_Data. This automatically gives the correct name to all the Wilderness cells. A cell should be painted with the color of the predominant region in that cell. If a cell is split between two regions, check for interiors in the cell - the region with the most interiors in the cell wins (because the only time the player really sees region names in-game is when exiting an interior).

9. Creating unique weapons.
For added flavor you may want to create new (enchanted) weapons to give to bosses or to specialized vendors.

First the naming convention:
TR_mX_w_Name

To make a new weapons, right click on a preexisting weapons type and click "edit". Change the ID to the desired name, change the in-game name, perhaps change the stats. Now click "ok". The CS asks if you want to create a new object, say "yes".

If you want to add an enchantment, go to the "enchanting" tab and create a new enchantment. The naming convention for enchantments is:
TR_mX_Name_en

Go back to your weapon, click edit, go to the enchantments and scroll till you find your new enchantment. Then save.

10. Other naming conventions

When detailing an NPC claim, you will also have to create the misc. quests. These are the relevant naming conventions.

For Journals:

TR_m(map number)_(Location Short)_(Name Short)

For example, the quest "Religious Inquiry" in "Sailen" looks like this:

TR_m3_Sa_Inquiry

The possible quest "Indoril Blues" in "Othrensis" would look like this:

TR_m3_Ot_Blues

For Objects used in quests:

TR_m(map number)_q_A(claim number)_Name

For example, the script for a drunken bandit located in map 3 in claim 5 would be:

TR_m3_q_A5_DrunkenBandit


11. Standard Scripts

Rentable Beds

To make a rentable bed you will first need to make 3 things:

1-A global variable that sets wether or not the bed is rented. It should be named TR_Rent_[Town/City name]_[name of the inn]. The inn name is usually abreviated, like the variable for the Luck Lockup is called Rent_Balmora_Lucky.
2-A NPC to rent your bed. They must be the class 'publician'.
3-A unique door which leads to the bed.

First you will need to make a copy of a bed script. I will use the script Pub_Balmora_Lucky as an example. Copy and paste all of it into a new script editor and change the name at the top to match your pub, not forgetting to add the TR_ prefix and the naming conventions for your area. You can also change the comments at the top if you want. The two things you need to change are the names of the global variable and the door. In the case of the Lucky Lockup script these are Rent_Balmora_Lucky and Rent_Balmora_Lucky_Door. There are two instances of each in the script, so be sure to change them both to your unique bed and global variable. If you wish you can also change the lock level depending on how rich the area is. You will also have to add the TR_MapX script, so copy the working part of that and put it at the bottom of the script. Save this new script and attach it to your publician.

Now you will need to make some dialogue to let the player chose to buy the bed. Under the vanilla topic 'beds' copy the top response and edit it to be specific to your publician. You can then edit it to give the player instructions to get to their bed.

Lastly, once you have decided which bed will be the rentable one, double click on it and it tick extra data (if you haven't already done this while setting ownership of course). Under Global Variable/Rank you can then select the global variable you made earlier. When this variable is one, as set by the script, the bed belongs to the player, but when it is zero it is illegal to sleep in the bed.
Attachments
Guide2NPCs.rar
guide to NPCs
(3.42 MiB) Downloaded 256 times
SettingOwnership.pdf
(2 MiB) Downloaded 280 times
NPC-Idle-Animations.pdf
(1.97 MiB) Downloaded 307 times
Last edited by immortal_pigs on Sat Jan 15, 2011 2:24 pm, edited 12 times in total.
User avatar
Bloodthirsty Crustacean
Developer Emeritus
Posts: 3869
Joined: Fri Feb 02, 2007 7:30 pm
Location: Elsewhere

Post by Bloodthirsty Crustacean »

An impressive guide. Good work. I might make a few tweaks here or there if things need clarification, but it looks like you've covered all the main bases and not made any substantial mistakes. Thanks for this: I always wanted to do something like this, but never had the time.

P.S. Could we get that first guide up without being in .rar form? That way I don't have to download it, and can just see it in my browser.
a man builds a city
with
Banks and Cathedrals
a man melts the sand so he
can see the world outside


"They destroyed Morrowind? Fiddlesticks! Now we're going to have to rebuild it again!"
User avatar
immortal_pigs
Developer
Posts: 582
Joined: Thu May 15, 2008 2:45 pm
Location: Utrecht

Post by immortal_pigs »

It's too large for the first post, so I'll do it here.
Attachments
Guide2NPCs.pdf
(6.19 MiB) Downloaded 235 times
User avatar
Aeven
Lead Developer
Posts: 1964
Joined: Sun Aug 17, 2008 2:43 pm
Location: Groningen

Post by Aeven »

Lol @ the havovwo.nl in your guide. Studying for your exams/checking if you did well? ;)
User avatar
Bloodthirsty Crustacean
Developer Emeritus
Posts: 3869
Joined: Fri Feb 02, 2007 7:30 pm
Location: Elsewhere

Post by Bloodthirsty Crustacean »

I have stickied this. Also, you're missing section 1. :P
a man builds a city
with
Banks and Cathedrals
a man melts the sand so he
can see the world outside


"They destroyed Morrowind? Fiddlesticks! Now we're going to have to rebuild it again!"
User avatar
Haplo
Lead Developer
Posts: 11651
Joined: Sat Aug 30, 2003 6:22 pm
Location: Celibacy

Post by Haplo »

Oh noesssss I can't get past the missing section!

Also, we use dialogue instead of dialog since that's how Bethesda did it. I changed that bit already.
Forum Administrator & Data Files Manager

[06/19/2012 04:15AM] +Cat table stabbing is apparently a really popular sport in morrowind

[August 29, 2014 04:05PM] <+Katze> I am writing an IRC bot! :O
[August 29, 2014 04:25PM] *** Katze has quit IRC: Z-Lined
User avatar
gro-Dhal
Lead Developer
Posts: 985
Joined: Sun Nov 05, 2006 4:32 pm
Location: A charter'd street

Post by gro-Dhal »

Excellent- been considering getting into this side of modding for a while.
User avatar
RelinQ
Member
Posts: 882
Joined: Fri Feb 01, 2008 9:12 am
Location: Between Australia & Germany

Post by RelinQ »

Now this is good!, Excellent Work here Immortal! :D

I'm rather interested in the questing and dialogue side of TR myself and I think this has just cleared up the few things I was curious about, 'Alarm' being one of them. :wink::)

Now I'm not entirely familiar with how TR's Dialogue is set out yet, but I'm guessing we use the other groups as well as Greeting 7 for additional dialogue like quests, factions, etc. , right?

Thanks.
User avatar
immortal_pigs
Developer
Posts: 582
Joined: Thu May 15, 2008 2:45 pm
Location: Utrecht

Post by immortal_pigs »

updated to include the following
- Region Painting
- Lock values for houses
- Allowing Beth responses to filter in random responses
User avatar
Bloodthirsty Crustacean
Developer Emeritus
Posts: 3869
Joined: Fri Feb 02, 2007 7:30 pm
Location: Elsewhere

Post by Bloodthirsty Crustacean »

Cheers, I've expanded/corrected some of those sections, and finally added Section 1! :P
a man builds a city
with
Banks and Cathedrals
a man melts the sand so he
can see the world outside


"They destroyed Morrowind? Fiddlesticks! Now we're going to have to rebuild it again!"
blackbird
Reviewer
Posts: 1816
Joined: Thu Mar 01, 2007 9:55 pm
Location: Brugge (bruges), Flanders, Belgium

Post by blackbird »

Good work!
But I think you could add a line of merging interiors. A claim like m3a6 ( I don't know about the other claims) still needs some interiors.

if you want to merge multiple esp's, you have to select all the esp's you want and set one of those esp's to an active file. Go to the menu tab and select the option 'Combine Loaded plugins' and give the new file a new name.
User avatar
The Greatness
Developer
Posts: 358
Joined: Sat May 29, 2010 5:13 pm

Post by The Greatness »

Code: Select all

[b]Rentable Beds[/b]

To make a rentable bed you will first need to make 3 things:

1-A global variable that sets wether or not the bed is rented. It should be named TR_Rent_[Town/City name]_[name of the inn]. The inn name is usually abbreviated, like the variable for the Luck Lockup is called Rent_Balmora_Lucky.
2-A NPC to rent your bed. They must be the class 'publican'.
3-A unique door which leads to the bed.

First you will need to make a copy of a bed script. I will use the script Pub_Balmora_Lucky as an example. Copy and paste all of it into a new script editor and change the name at the top to match your pub, not forgetting to add the TR_ prefix and the naming conventions for your area. You can also change the comments at the top if you want. The two things you need to change are the names of the global variable and the door. In the case of the Lucky Lockup script these are Rent_Balmora_Lucky and Rent_Balmora_Lucky_Door. There are two instances of each in the script, so be sure to change them both to your unique bed and global variable. If you wish you can also change the lock level depending on how rich the area is. You will also have to add the TR_MapX script, so copy the working part of that and put it at the bottom of the script. Save this new script and attach it to your publican.

Now you will need to make some dialogue to let the player chose to buy the bed. Under the vanilla topic 'beds' copy the top response and edit it to be specific to your publican. You can then edit it to give the player instructions to get to their bed.

Lastly, once you have decided which bed will be the rentable one, double click on it and it tick extra data (if you haven't already done this while setting ownership of course). Under Global Variable/Rank you can then select the global variable you made earlier. When this variable is one, as set by the script, the bed belongs to the player, but when it is zero it is illegal to sleep in the bed.
Warning: may contain large amounts of sarcasm.

Myzel- We never actually see slaves working on Vvardenfell either. They're always just standing there. If you ask me they deserve a good whipping.
Locked