TR Handbook Ideas + updates

23 posts / 0 new
Last post
10Kaziem's picture
10Kaziem
Asset DeveloperInterior Developer
Joined:
2015-12-12 23:47
Last seen:
3 years 3 months ago

As people may or may not know, our new place to put guidelines, tutorials, and resources is now the TR Handbook.

This handbook is really under construction, and that means we need help to write it and get ideas.

What is going in this handbook?

- A quick guide to what TR needs in terms of help from modders

- Guidelines to each type of modding: asset development, concepts, literature, quests and dialogue, making a showcase, etc

- Links to tutorials and resources for modders that are having trouble or want to learn more about how to mod their particular thing.

 

What do we need help with? If you're someone who makes content of any kind for us here at TR, we need your input on how things are made and what is necessary. And if you know of tutorials, resources, places for inspiration, hints, tips, programs, or anything that is generally helpful as a modder, please post it here. This includes anything you know of from the old forums, please relink it here.

 

I and others will be updating the handbook. If you make a suggestion in this thread, it will be tagged when it has been incorporated or seen to. Updates will be posted below as they happen.

Rot's picture
Rot
Quest Developer
Joined:
2014-03-16 17:45
Last seen:
2 years 6 days ago

On interiors & exteriors, some tutorials were reposted in this thread. [Added 4/10/16 -10K] There's a pdf resource I can't find :( that compiled ground textures with samples... apparently all the original tutorial threads were dumped amidst everything else in the Archive forum so it might be somewhere in there. A basic TESAME cleaning [Added 4/10/16 -10K] tutorial is probably needed. An old list of ideas for tutorials that were probably never made.

On questing, there are good if pell-mell guidelines and advice in this old thread. For scripting everybody should know about MSFD, but just in case. [Added 4/10/16 -10K]

On animation, you'd probably be better off asking one of the couple people who know how to do it for the MW engine, but here are all the tutorials I'd gathered over time (unsorted)

10Kaziem's picture
10Kaziem
Asset DeveloperInterior Developer
Joined:
2015-12-12 23:47
Last seen:
3 years 3 months ago

Hello all! Tamriel Rebuilt’s lead devs have finally gotten the handbook in working order, though the section with the guidelines for each forum is still under construction, the handbook is now our new go-to place for all the things you need to know about TR, such as:

Guidelines for how to do modding

Information on skype meetings and the IRC channel

An explanation of our pipeline

A progress report

Our planning documents for House Dres, the Master Plan, and so on.

Assets needed lists for the Deshaan Plains, etc

Begin directing questions to the handbook. It is still under construction, but it has plenty of info in it.

 

Feedback on the handbook can be put in this thread. There is now a link to the handbook in the main navigation menu under Development.

Does: concepts, textures, youtube vids, admin stuff e.g. PR, handbook, assets, small website things. Activity level: wildly unpredictable. Still active. Find me on Discord.

10Kaziem's picture
10Kaziem
Asset DeveloperInterior Developer
Joined:
2015-12-12 23:47
Last seen:
3 years 3 months ago

Alrighty people! Anyone with itchy editing fingers who knows stuff about TR, please post yourself here. We need help to update this thing.

Things badly in need of updating:

http://www.tamriel-rebuilt.org/content/asset-development-guidelines

http://www.tamriel-rebuilt.org/content/showcasing-guidelines

If anyone knows enough about this stuff to write up guidelines, please post your ideas here. We need help! We’re also looking for suggestions for good resources and tutorials for people that we can link to.

Does: concepts, textures, youtube vids, admin stuff e.g. PR, handbook, assets, small website things. Activity level: wildly unpredictable. Still active. Find me on Discord.

10Kaziem's picture
10Kaziem
Asset DeveloperInterior Developer
Joined:
2015-12-12 23:47
Last seen:
3 years 3 months ago

Modder’s Guide has been updated to a more readable state. I’m going to try to work on the Asset and Showcase guidelines more, but help is always appreciated.

Does: concepts, textures, youtube vids, admin stuff e.g. PR, handbook, assets, small website things. Activity level: wildly unpredictable. Still active. Find me on Discord.

worsas's picture
worsas
Developer EmeritusAsset Reviewer
Joined:
2016-01-26 12:34
Last seen:
49 min 24 sec ago

Hey Kaziem.

I don’t know, if it helps, but here is our checklist for reviewing models at P:C, that could be a helpful addition in your asset creation guidelines. It’s just a list of a number of very simple but crucial points:

http://project-tamriel.com/viewtopic.php?f=116&t=91

 

[Added 4/9/16. -10K]

10Kaziem's picture
10Kaziem
Asset DeveloperInterior Developer
Joined:
2015-12-12 23:47
Last seen:
3 years 3 months ago

Awesome, Worsas. I’ll take a look through it and see what we can use from it.

Does: concepts, textures, youtube vids, admin stuff e.g. PR, handbook, assets, small website things. Activity level: wildly unpredictable. Still active. Find me on Discord.

Parker's picture
Parker
Developer EmeritusInterior DeveloperQuest Developer
Joined:
2016-01-19 04:30
Last seen:
3 years 4 months ago

Something I’d like to add to the writing guidelines:

All dialogue for individual settlements should be written and compiled in a Google Doc first. All modders should have access to these documents for commenting, though to prevent haphazard editting, a single modder should be assinged to each document to add or edit entries. Never write dialogue in the Construction Set directly. Editting and reviewing topics in the CS is a major hassle, and writing should not be implemented in the game until it has been vetted and finalized beforehand.

 

worsas's picture
worsas
Developer EmeritusAsset Reviewer
Joined:
2016-01-26 12:34
Last seen:
49 min 24 sec ago
  • Be sure to clean up any duplicate vertices, edges, and faces.

I just read this in your new guidelines. I would like to add that duplicate vertices are nothing you can or should prevent with the nif-format, we are using. Sure there may be duplicates that are needless, but for the most part it is how you implement hard edges. If you have a flat face in your modelling program it will be exported as a disconnected piece of geometry. Also, you automatically get disconnected geometry at texture seams, on exporting.

Alpha should only be included on faces that require it. Be sure not to put alpha’d faces on top of each other, since this causes texture errors in Morrowind.

It is possible to sort faces in blender, so they will blend correctly together. Alternatively you can split them into separate nitrishapes, which is how the alpha blending with the vanilla trees is done, But alpha blending is generally very performance-costly. If you disable blending and go with only alpha testing you can have faces behind each other or even overlapping faces without a problem, even without any underwater problems, at the cost of a hard alpha edge.

[Notes incorporated into Handbook, with Seneca37’s suggestions below. 4/9/16 -10K]

Seneca37's picture
Seneca37
Developer EmeritusExterior DeveloperInterior Developer
Joined:
2015-07-05 20:55
Last seen:
4 years 2 weeks ago

I still stand by the removal of duplicate vertices. Most of the features that result in duplicate vertices (i.e. seams) are lost when the file is exported to nif file. Having duplicates add not only to the vertices, but the UV maps and Triangles too.

 

As for the alpha stuff. Yeah I agree, unfortunately most of MW’s models are crappy. If the NiAlphaProperty is set properly then the issue is resolved.

 

10Kaziem's picture
10Kaziem
Asset DeveloperInterior Developer
Joined:
2015-12-12 23:47
Last seen:
3 years 3 months ago

Minor updates we included today to showcasing and asset guidelines. Worsas: your notes + link to the P:C page have been seen and used.

Does: concepts, textures, youtube vids, admin stuff e.g. PR, handbook, assets, small website things. Activity level: wildly unpredictable. Still active. Find me on Discord.

10Kaziem's picture
10Kaziem
Asset DeveloperInterior Developer
Joined:
2015-12-12 23:47
Last seen:
3 years 3 months ago

Shuffled the tutorials all into one page called Tutorials. Admins now have the capability of adding new tutorials to the site, where they will be automatically sorted into the list of tutorials. http://www.tamriel-rebuilt.org/content/tutorials

Does: concepts, textures, youtube vids, admin stuff e.g. PR, handbook, assets, small website things. Activity level: wildly unpredictable. Still active. Find me on Discord.

10Kaziem's picture
10Kaziem
Asset DeveloperInterior Developer
Joined:
2015-12-12 23:47
Last seen:
3 years 3 months ago

Does: concepts, textures, youtube vids, admin stuff e.g. PR, handbook, assets, small website things. Activity level: wildly unpredictable. Still active. Find me on Discord.

Kevaar's picture
Kevaar
Developer EmeritusQuest Developer
Joined:
2016-01-19 19:35
Last seen:
1 month 2 weeks ago

Something I’d like to be added to the guidelines on literature writing, and that is letting folks know the formatting that the ingame books accept, for they are limited. Like this:
*No italics, bold, or underlined text, for the game engine doesn’t support these.
*Consider that a couple lines in a Word document or a forum page may turn into a sizeable paragraph ingame. Write like you are writing for a web page (aka, more white space, shorter paragraphs) rather than a physical book.
*Red colored text is accepted by the game engine, but should be rare and only used in special circumstances. AKA, don’t use this in place of italics or other formatting. Ask yourself, why is the author using red ink?
*Text can be centered, but typically this is only for use in scrolls and pamphlets, or for formatting title pages.
*There is no maximum length as far the game engine is concerned, but most ingame books are no more than 15,000 characters. Longer books should be broken up into volumes.

There are two parts to a title page as well.
Part One: The title and the author name that appears when the player mouses over the ingame book. Both should be short as this identifies the object at a glance: no longer than about 25 characters. Put Anonymous in the case of the text having no identified author.

***And I would propose putting these into the asset browser using the tags TITLE: and AUTHOR: at the top of the description rather than the bold/italic thing we have now. That’s just me and my OCD though.

Part Two: Then there’s the title page that appears within the book’s text itself. This part isn’t a requirement, but the space to use should you wish to make a more lengthy title or elaborate on the author’s titles. For example:
 

Literature Guidelines
An Exhaustive and Exhausting Report on How to 
MAKE THINGS PURDY
With some Caveats and Quibbles, see Appendix X..

This report put together by Lord Kevaar Prolexity
Proprietor of the Tamriel Rebuilt Library and Author Extraordinaire

While the author/title tagline would then look like this:
TITLE: Literature Guidelines
AUTHOR: Lord Kevaar Prolexity

10Kaziem's picture
10Kaziem
Asset DeveloperInterior Developer
Joined:
2015-12-12 23:47
Last seen:
3 years 3 months ago

Does: concepts, textures, youtube vids, admin stuff e.g. PR, handbook, assets, small website things. Activity level: wildly unpredictable. Still active. Find me on Discord.

Kevaar's picture
Kevaar
Developer EmeritusQuest Developer
Joined:
2016-01-19 19:35
Last seen:
1 month 2 weeks ago

The Literature Guidelines have been updated for use with the Asset Browser. (I had to walk back my statement up there about the author subfield. My mind is still in some other game’s construction kit...the Morrowind CS dun care about no author!)

sirrah's picture
sirrah
Interior Developer
Joined:
2016-01-17 13:07
Last seen:
1 year 9 months ago

Something that came up in InfallibleDres’s showcase thread; it would be good to explicitly mention in the showcase guidelines that modders should make sure they don’t have any mesh replacers installed, as they can be easily overlooked.

10Kaziem's picture
10Kaziem
Asset DeveloperInterior Developer
Joined:
2015-12-12 23:47
Last seen:
3 years 3 months ago

Right! I’ll add that in when I get a chance.

Does: concepts, textures, youtube vids, admin stuff e.g. PR, handbook, assets, small website things. Activity level: wildly unpredictable. Still active. Find me on Discord.

Rot's picture
Rot
Quest Developer
Joined:
2014-03-16 17:45
Last seen:
2 years 6 days ago

I don’t see any section for NPCing but Klinn’s catalogs on MMH for heads and clothes may be useful (though they don’t include TR items)

Rot

There's a pdf resource I can't find :( that compiled ground textures with samples

Not quite the same one but there’s this catalog for terrain textures

Gnomey's picture
Gnomey
Asset DeveloperWriterExterior DeveloperInterior Developer
Joined:
2015-08-10 20:50
Last seen:
2 weeks 4 days ago

I want to add a section on roadsigns and player navigation to the Exterior Modding Guide, at the tail end of the road section. Here's what I have so far:

The main purpose of roads is to allow players to easily navigate the gameworld on foot. Some navigation aids can be added along roads to help with that, such as lights along well-maintained roads and guarskin banners at the entrances of Dunmer towns. The most important and complex aids to implement are road signs. Here are some guidelines to give a general idea of how they should be placed:
1. Road signs are stored in Tamriel_Data. If a sign is missing from Tamriel_Data, submit it to the current Tamriel_Data add-on file. Do not create new signs in a claim or other landmass file.
2. Metal-rimmed road signs are used in Imperialized areas, and should not be used alongside wooden signs. Imperialized areas are:
    a. near Imperial settlements, forts and major locations (like the Caldera Ebony Mines)
    b. near cities with an Imperial garrison, probably Hlaalu Tier II+ cities (like Balmora or larger) and Almalexia
3. signposts should be placed at the edges of settlements and at forks in the road network, or at any other locations where the player may need directions.
4. generally only three signs should point in the same direction on a single post. If a signpost becomes too crowded, add a second one next to it. Make sure the signs can easily be read by the player from the road. Test them in-game!
5. what signs should appear on which signposts depends heavily on context. Some general rules:
    a. signposts should point to the next settlements directly reachable by any given road without passing another settlement on the way.
    b. signposts on the main road network should generally point to the next major (Tier II+) city in any given direction, and nearby settlements on the way.
    c. signposts next to settlements should have a sign pointing to the settlement (vanilla does this).
    d. minor settlements only need signposts from the settlement edge to where the road to the settlement splits off from the main road network.
    e. if a location can be reached by two roads, there should generally only be one sign at the relevant fork in the road, pointing to the better (shorter, safer, better maintained) route.

Stripes's picture
Stripes
Interior Developer
Joined:
2018-01-19 20:28
Last seen:
2 years 6 months ago

Companion following script for escort quests.

I know escort quests are hated lol but it was mentioned by someone maybe a month or so ago to use a companion following script for escort quests.

Attached are 2 versions of script templates based on Grumpy's Companion Project. One for NPC and the other for walking creatures.

This is a tried and true method that has had years of refinement. As someone once told me years ago when I undertook my first companion mod, "Don't reinvent the wheel". I was trying to script everything from scratch and ran into the same issues that have already had workarounds by people smarter than me.

The meat and potatoes of it is the warp script and the speed up script.

The speed up script basically speeds the npc up when it's far away and slows it back down when its close.

The warp script positions the NPC behind the player if they get too far away.

The speed script does a good job of preventing the warp script from triggering but sometimes followers get stuck or confused so then the warp kicks in and problem solved.

With a single follower warp is rarely triggered but with multiple followers the AI all fights over the same spot behind the player and NPC's constantly warp to the front of the line. But you really don't notice unless you walk backwards everywhere lol.

Grumpy decided to disable warp during combat for several reasons, but simply put it breaks immersion and I agree with his decision.

With this script one can litterally ignore the npc and just go from point A to point B, with one exception which is hard coded. Followers will attack every hostile  creature and NPC along the way. Which for most companion mods isn't a big deal as they generally finish them off quickly and resume following. For an escort quest if you hear combat music you'd better stop and turn around and protect the brave but stupid follower that apparently is horrible with directions and needs you to take them somewhere.

I had the hairbrained idea that this script could be triggered by a Startscript in dialogue results and it does work that way but has potential problems. ( I can post my findings about this later when I finish my analysis). Also TR quest developers are over ambitious (in a good way, much respect) and for simplicity I believe its best just to copy the code into the Actor's script attached to it and adjust and make additions as needed.

I included notes in the script to help out. For more information see Grumpy's notes on Emma's website and his Companion Project which can be found on Morrowind Modding History.

The following code is attached in a txt file:

begin T_ScNpc_follow_template
 
 
; NPC FOLLOWING SCRIPT TEMPLATE, INTENDED FOR USE ON ESCORT QUESTS
; a modified version of script used in Grumpy's Companion Project
;
; NPC should have an ability with Restore Fatigue 1, Water Breathing, and Swift Swim
 
 
;;;LOCAL VARIABLES FOR FOLLOWING SCRIPT
float ax
float ay
float bx
float by
float bz
float cx
float cy
float cz
float t1
float t2
float t3
float t4
float coDist
float coDist2
float playz
float timer
float sheatheTimer
float moveTimer
short doOnce
short doOnce2
short combatDone
short weapUse
short combatCheck
short soundPlayed
short flyCheck
short wwCheck
short s_check
short warp
short c_speed
short c_athletics
short counter
short addOnce
 
;;;DECLARE ANY ADDITIONAL LOCAL VARIABLES YOU REQUIRE HERE
;short nohello
;short nolore
;short companion
;short stayoutside
 
 
if ( MenuMode == 1 )
  return
endif
 
;;;ESCORT FAILED. UPDATE JOURNAL
;;;INPUT YOUR JOURNAL ID AND INDEX
;if ( OnDeath == 1 )
;  Journal, "ID" Index
;endif
 
;;;DONT RUN ANY MORE SCRIPT IF NPC IS DEAD
if ( GetHealth <= 0 )
 
;;;FAILSAFE IN CASE ONDEATH DOESN'T TRIGGER
;;;INPUT YOUR JOURNAL ID AND INDEX
;  if ( GetJournalIndex, "ID" < XX )
;    Journal, "ID", Index
;  endif
 
  return
endif
 
;;;SHEATHING SCRIPT
;;;"FIXES" THE BUG THAT NPC SOMETIMES KEEPS WEAPON DRAWN AFTER COMBAT
if ( combatCheck == 1 )
  set sheathetimer to sheatheTimer + GetSecondsPassed
  if ( GetSoundPlaying, "Weapon Swish" == 1 )
    set sheatheTimer to 0
    return
  elseif ( GetSoundPlaying, crossbowShoot == 1 )
    set sheatheTimer to 0
    return
  elseif ( GetSoundPlaying, bowShoot == 1 )
    set sheatheTimer to 0
    return
  elseif ( sheatheTimer > 4 )
  if ( GetSoundPlaying "Weapon Swish" == 0 )
    set sheatheTimer to 0
    set soundPlayed to 1
  elseif ( sheatheTimer > 4 )
  if ( GetSoundPlaying "crossbowShoot" == 0 )
    set sheatheTimer to 0
    set soundPlayed to 1
  elseif ( sheatheTimer > 4 )
  if ( GetSoundPlaying "bowShoot" == 0 )
    set sheatheTimer to 0
    set soundPlayed to 1
  endif
  endif
  endif
  endif
endif
 
if ( soundPlayed == 1 )
  equip "silver dagger"
  removeitem "silver dagger" 1
  set soundPlayed to 0
  set combatCheck to 0
  set combatDone to 1
endif
 
if ( combatDone == 1 )
  set timer to timer + GetSecondsPassed
  if ( timer > 6 )
    set timer to 0
    set combatDone to 0
    set warp to 0
  endif
endif   
 
;;;WARP SCRIPT
;;;NPC WARPS BEHIND PLAYER IF IT FALLS TOO FAR BEHIND BECAUSE ITS STUCK OR CONFUSED
;;;WARP IS DISABLED DURING COMBAT. (COMBAT IS DETERMINED BY WEAPON DRAWN, HENCE THE ABOVE SHEATHING SCRIPT ^)  
 
if ( GetCurrentAIPackage == 3 ) ;NPC IS FOLLOWING
 
  if ( flyCheck == 1 )
  if ( GetWeaponDrawn == 0 )
    set playz to ( Player->GetPos z )
    SetPos z playz
  elseif ( flyCheck == 1 )
  if ( GetCurrentAIPackage != 3 )
  if ( GetWeaponDrawn == 0 )
    set playz to ( GetPos z )
    SetPos z playz
  endif
  endif
  endif
  endif
 
  if ( GetWeaponDrawn == 1 )
  if ( flyCheck == 0 )
    set combatCheck to 1
    set timer to 0
    set warp to 1
    return
  elseif ( GetWeaponDrawn == 1 )
  if ( flyCheck == 1 )
    set combatDone to 1
    set timer to 0
    set warp to 1
    return
  endif
  endif
  endif
 
  set ax to ( Player->GetPos x )
  set ay to ( Player->GetPos y )
 
  if ( doOnce == 0 )
    set bx to ( Player->GetPos x )
    set by to ( Player->GetPos y )
    set bz to ( Player->GetPos z )
    set doOnce to 1
  endif
 
  set t1 to ( ax - bx )
  set t1 to ( t1 * t1 )
  set t2 to ( ay - by )
  set t2 to ( t2 * t2 )
  set t1 to ( t1 + t2 )
  set coDist to ( GetSquareRoot, t1 )
 
  if ( coDist > 360 )
    set doOnce to 0
  endif
 
  if ( coDist > 180 )
  if ( doOnce2 == 0 )
    set cx to ( Player->GetPos x )
    set cy to ( Player->GetPos y )
    set cz to ( Player->GetPos z )
    set doOnce2 to 1
  endif
  endif
 
  set t3 to ( ax - cx )
  set t3 to ( t3 * t3 )
  set t4 to ( ay - cy )
  set t4 to ( t4 * t4 )
  set t3 to ( t3 + t4 )
  set coDist2 to ( GetSquareRoot, t3 )
 
  if ( coDist2 > 360 )
    set doOnce2 to 0
  endif
 
  if ( warp == 0 )
  if ( coDist > 350 )
  if ( GetDistance Player > 680 )   ;DISTANCE SETTING MAY BE CHANGED FOR PREFERENCE
    SetPos x bx
    SetPos y by
    SetPos z bz
    AiFollow Player 0 0 0 0
  elseif ( warp == 0 )
  if ( coDist2 > 350 )
  if ( GetDistance Player > 680 )   ;DISTANCE SETTING MAY BE CHANGED FOR PREFERENCE
    SetPos x cx
    SetPos y cy
    SetPos z cz
    AiFollow Player 0 0 0 0
  endif
  endif
  endif
  endif
  endif
 
;;;NPC HEALS WHEN PLAYER RESTS IF FOLLOWING
;;;THE MORE HOURS SLEEPING THE MORE IS HEALED
 
  if ( GetPCSleep == 1 )
    modcurrenthealth 5
    modcurrentmagicka 5
  endif
 
endif
 
;;;IF ADDITIONS ARE DESIRED, PLEASE ADD THEM BELOW HERE...
 
 
 
 
 
;;;AND ABOVE HERE.
 
;;;FRAME COUNTER  
if ( counter < 20 )
  set counter to counter + 1
  return
endif
set counter to 0
 
;;;ADDITIONS CAN ALSO BE ADDED TO THIS FOLLOWING SECTION, BUT BEWARE OF THE COUNTER.
;;;COUNTER CAN POOCH SOME FUNCTIONS IF THEY NEED BE CHECKED EVERY FRAME
 
 
 
 
 
 
if ( GetCurrentAIPackage == 3 ) ;NPC IS FOLLOWING
 
;;;NPC MIMICKS PLAYER BEHAVIOUR TO KEEP UP  
 if ( GetPCSneaking == 1 )
    ForceSneak
  elseif ( GetPCSneaking == 0 )
    ClearForceSneak
  endif
  if ( Player->GetEffect sEffectLevitate == 1 )
  if ( flyCheck == 0 )
    cast levitate player
    addspell T_Test_Flight
    set flyCheck to 1
  endif
  endif
  if ( Player->GetEffect sEffectLevitate == 0 )
  if ( flyCheck == 1 )
    removespell T_Test_Flight
    set flyCheck to 0
  endif
  endif
  if ( Player->GetEffect sEffectWaterWalking == 1 )
  if ( wwCheck == 0 )
    cast "water walking" player
    addspell T_Test_Waterwalking
    set wwCheck to 1
  endif
  endif
  if ( Player->GetEffect sEffectWaterWalking == 0 )
  if ( wwCheck == 1 )
    removespell T_Test_Waterwalking
    set wwCheck to 0
  endif
  endif
 
;;;SPEED UP NPC IF IT LAGS BEHIND
;;;DISTANCE AND SPEED SETTINGS MAY BE CHANGED FOR PREFERENCE
 
  if ( GetDistance Player < 500 )
    if ( s_check == 1 )
      set c_speed to ( ( Player->GetSpeed ) + 5 )
      set c_athletics to ( ( Player->GetAthletics ) + 5 )
      setSpeed  c_speed
      setAthletics c_athletics
      set s_check to 0
    endif
  elseif ( GetDistance Player > 500 )
    if ( s_check == 0 )
      set c_speed to ( ( Player->GetSpeed ) * 2.5 )
      set c_athletics to ( ( Player->GetAthletics ) * 2.5 )
      setSpeed  c_speed
      setAthletics c_athletics
      set s_check to 1
    endif
  endif
endif
 
;;; NPC NOT FOLLOWING. CLEAN UP
if ( GetCurrentAIPackage != 3 )
  setspeed 20  ; SET SPEED TO BASE SPEED
  if ( GetForceSneak == 1 )
    ClearForceSneak  
  endif
  if ( wwCheck == 1 )
    removespell T_Test_Waterwalking
    set wwCheck to 0
  endif
  if ( flyCheck == 1 )
    removespell T_Test_Flight
    set flyCheck to 0
  endif
endif
 
;;;DO SOMETHING ONLY ONCE
;;;for setting variables, adding topics, and whatnot
 
if ( addonce == 0 )
  setacrobatics 200 ;TO PREVENT NPC FROM TAKING TOO MUCH FALLING DAMAGE
  set addonce to 1
endif
 
 
end
 
 
----------------------------------------------------------------------
 
begin T_ScCrea_Follow_template
 
; CREATURE FOLLOWING SCRIPT TEMPLATE, INTENDED FOR WALKING CREATURE ESCORT QUESTS
; a modified version of script used in Grumpy's Companion Project
;
; Creature should have an ability with Restore Fatigue 1, Water Breathing, and Swift Swim but not required
 
 
;;; LOCAL VARIABLES FOR FOLLOWING SCRIPT
float ax
float ay
float bx
float by
float bz
float cx
float cy
float cz
float t1
float t2
float t3
float t4
float coDist
float coDist2
float time
float counter
short doOnce
short doOnce2
short addonce
short flyCheck
short warp
short p_speed
short s_check
 
;;; DECLARE ANY ADDITIONAL LOCAL VARIABLES YOU REQUIRE HERE
;short companion
;short stayoutside
 
 
if ( MenuMode == 1 )
  return
endif
 
;;;ESCORT FAILED. UPDATE JOURNAL
;;;INPUT YOUR JOURNAL ID AND INDEX
;if ( OnDeath == 1 )
;  Journal, "ID" Index
;endif
 
;;;DONT RUN ANY MORE SCRIPT IF NPC IS DEAD
if ( GetHealth <= 0 )
 
;;;FAILSAFE IN CASE ONDEATH DOESN'T TRIGGER
;;;INPUT YOUR JOURNAL ID AND INDEX
;  if ( GetJournalIndex, "ID" < XX )
;    Journal, "ID", Index
;  endif
 
  return
endif
 
 
;;; WARP SCRIPT
;;; CREATURE WARPS BEHIND PLAYER IF IT FALLS TOO FAR BEHIND BECAUSE ITS STUCK OR CONFUSED
;;; WARP IS *NOT* DISABLED DURING COMBAT FOR CREATURES
 
if ( GetCurrentAIPackage == 3 )   ;CREATURE IS FOLLOWING
  set ax to ( player->GetPos x )
  set ay to ( player->GetPos y )
 
  if ( doOnce == 0 )
    set bx to ( player->GetPos x )
    set by to ( player->GetPos y )
    set bz to ( player->GetPos z )
    set doOnce to 1
  endif
 
  set t1 to ( ax - bx )
  set t1 to ( t1 * t1 )
  set t2 to ( ay - by )
  set t2 to ( t2 * t2 )
  set t1 to ( t1 + t2 )
  set coDist to ( GetSquareRoot, t1 )
 
  if ( coDist > 360 )
    set doOnce to 0
  endif
 
  if ( coDist > 180 )
  if ( doOnce2 == 0 )
    set cx to ( player->GetPos x )
    set cy to ( player->GetPos y )
    set cz to ( player->GetPos z )
    set doOnce2 to 1
  endif
  endif
 
  set t3 to ( ax - cx )
  set t3 to ( t3 * t3 )
  set t4 to ( ay - cy )
  set t4 to ( t4 * t4 )
  set t3 to ( t3 + t4 )
  set coDist2 to ( GetSquareRoot, t3 )
 
  if ( coDist2 > 360 )
    set doOnce2 to 0
  endif
 
  if ( warp == 0 )
  if ( coDist > 350 )
  if ( GetDistance player > 700 )   ;DISTANCE SETTING MAY BE CHANGED FOR PREFERENCE
    SetPos x bx
    SetPos y by
    SetPos z bz
    AiFollow player 0 0 0 0
  elseif ( warp == 0 )
  if ( coDist2 > 350 )
  if ( GetDistance player > 700 )   ;DISTANCE SETTING MAY BE CHANGED FOR PREFERENCE
    SetPos x cx
    SetPos y cy
    SetPos z cz
    AiFollow player 0 0 0 0
  endif
  endif
  endif
  endif
  endif
 
;;;CREATURE HEALS WHEN PLAYER RESTS IF FOLLOWING
;;;THE MORE HOURS SLEEPING THE MORE IS HEALED
 
  if ( GetPCSleep == 1 )
    modcurrenthealth 5
    modcurrentmagicka 5
  endif
 
endif
 
;;;IF ADDITIONS ARE DESIRED, PLEASE ADD THEM BELOW HERE...
 
 
 
 
 
;;;AND ABOVE HERE.
 
;;;FRAME COUNTER  
if ( counter < 20 )
  set counter to counter + 1
  return
endif
set counter to 0
 
;;;ADDITIONS CAN ALSO BE ADDED TO THIS FOLLOWING SECTION, BUT BEWARE OF THE COUNTER.
;;;COUNTER CAN POOCH SOME FUNCTIONS IF THEY NEED BE CHECKED EVERY FRAME
 
 
 
 
 
if ( GetCurrentAIPackage == 3 ) ;CREATURE IS FOLLOWING
 
;;;SPEED UP CREATURE IF IT LAGS BEHIND
;;;DISTANCE AND SPEED SETTINGS MAY BE CHANGED FOR PREFERENCE
 
  if ( GetDistance Player < 600 )
    if ( s_check == 1 )
      set p_speed to ( ( Player->GetSpeed ) + 5 )
      setSpeed  p_speed
      set s_check to 0
    endif
  elseif ( GetDistance Player > 600 )
    if ( s_check == 0 )
      set p_speed to ( ( Player->GetSpeed ) * 2.5 )
      setSpeed  p_speed
      set s_check to 1
    endif
  endif
 
;;;CREATURE WAITS IF PLAYER FLIES OFF
 
  if ( flyCheck == 0 )
  if ( Player->GetEffect sEffectLevitate == 1 )
    AiWander 0 0 0 0
    set flyCheck to 1
  endif
  endif
 
endif
 
;;;CREATURE NOT FOLLOWING. CLEAN UP
if ( GetCurrentAIPackage != 3 )
  setspeed 50    ;SET SPEED TO BASE SPEED
 
;;;RESUME FOLLOWING WHEN PLAYER STOPS LEVITATING
  if ( flyCheck == 1 )
  if ( Player->GetEffect sEffectLevitate == 0 )
    AiFollow player 0 0 0 0
    set flyCheck to 0
  endif
  endif
endif
 
;;;DO SOMETHING ONLY ONCE
;;;for setting variables, adding topics, and whatnot
if ( addonce == 0 )
  ;set stayoutside to 1
  set addonce to 1
endif
 
end
 

AttachmentSizeDate
Plain text icon TR_follow_script_template.txt11.56 KB2018-06-17 07:04
Arvisrend's picture
Arvisrend
Developer EmeritusQuest Developer
Joined:
2014-01-02 23:57
Last seen:
1 week 3 days ago

Creature part of an NPCing guide:

# NPCing

 

*NPCing* is when a finished piece of land (usually a section file) gets its NPCs and characters added to it, along with the generic dialogue (and possibly some simple miscellaneous quests).

 

Most of the time, exterior and interior claims come with no NPCs, although they often come with notes on who is meant to inhabit them. To find these notes, first find these claims; ideally they should be in the "Merged Claims" list of your section file or one of its earlier versions.

 

## NPCs

 

[TODO! Write this section. So far, the topics list at https://www.tamriel-rebuilt.org/claims/npcs-and-general-dialogue-indal-ruhn seems a good start.]

 

## Creatures

 

### Where and how many?

 

Creatures are meant to provide *challenge* as well as *opportunity* to the player. "Opportunity" is both an opportunity to train skills and one to collect loot. They also occasionally serve as *gatekeepers* -- that is, they prevent access to certain places until the player and their character have achieved some level of mastery. Finally, they provide some degree of *characterization* to the place they inhabit.

 

In general, any cell that does not mostly consist of town or farms should have creatures. How many? In vanilla, the number seems to range from 2 to 8 depending on the cell (and Bloodmoon's cells have 12 or more at higher levels, but this is best not imitated). The number itself can serve to characterize the place -- think of placing more creatures in wilder, junglier and more dangerous places, and fewer creatures in calmer, more inhabited, more trodden places. Morrowind's creature count goes highest in the Red Mountain region; since we don't have a direct analogue of this on the Mainland, it's safe to stay on the lower side. Another argument in favor of lower numbers is that (1) combat in Morrowind gets boring and (2) Mainland is larger than Vvardenfell, whence it makes sense to spread enemies thinner. And finally, most of Mainland has seen regular traffic for centuries, whereas Vvardenfell has been a Temple reserve until 15 years ago. So 3-4 critters per Mainland cell seems adequate. Rules like this, of course, are meant to have exceptions.

 

This is all about hostile or possibly-hostile creatures. Friendlies (e.g., netch and scribs) can count for 1/2 or 1/3 of a hostile; no one will mind too many of them (in good measure). Moreover, friendlies can be near towns and farms, whereas enemies must be a good distance away (otherwise, guards will go crazy). Free-flying netch, for example, should be everywhere around netch-farming communities.

 

Bodies of water that are sufficiently large and not isolated should have water creatures (slaughterfish, dreugh, tullies). Keep in mind that the hostile fish have huge "attack radii", so it's easy to overfill the ocean.

 

### Which ones?

 

Vanilla Morrowind is lazy and unsystematic about the choice of creatures to place. We should do better.

 

One thing that we are doing different is that *we don't levelscale*! We still use leveled creatures, but these don't actually depend on the player's level; the critters on a leveled list are usually of roughly the same difficulty, and they appear at each level. Thus, if you stroll through Mainland at level 1, you won't be walking through regions devoid of life... but you might not survive the harder places.

 

There are essentially three ways to place a creature:

 

- Place the **creature** itself (from the Creature tab). This is how you should place unique creatures for quests, for example. You can also place generic creatures this way, but this should be done sparingly and with good reason. Keep in mind that most creatures don't respawn if placed this way (unless the "Respawn" checkbox is checked in the creature's settings -- which it usually isn't).

 

- Place a **deterministic leveled creature** (from the Leveled Creature tab). This is a leveled list whose name starts with T_Mw_Cr_. It consists of a single creature, appearing at level 1 with 100% chance. This is just a way to place a respawning critter. Note that we should eventually have such a leveled list for each creature; you may need the TR_Data Addon for some.

 

- Place a **random leveled creature** (from the Leveled Creature tab). This is a leveled list whose name starts with T_Mw_RStat_ (for region-based lists -- e.g., "T_Mw_RStat_AscadBluffD05" is a list of harder enemies for the Ascadian Bluffs) or with T_Mw_Stat_ (for general random critters -- e.g., "T_Mw_Stat_DaedraDifficulty2" is a list of mid-tier daedra). It is randomized but not levelscaled (so all critters in them appear at level 1 and should be of roughly the same difficulty if aggressive). 
The syntax for the region-based lists is T_Mw_RStat_[RegionName]D[DifficultyLevel](orp). The "orp" means "or peaceful", which may and may not be present; when present, it means that the list includes peaceful critters (so don't use it for gatekeepers). The "DifficultyLevel" is a rough approximation of how challenging the creature is; for example, 01 means "like a kwama forager", 05 means "like a nix-hound", 09 means "like a kagouti". We will go far higher, but so far the only places using this system are some of the easiest regions in Heartland, so don't expect to find anything difficult in those lists.

 

[TODO! Have I ever been more precise about difficulty levels?]

 

Note how our random leveled creatures are sorted by region, for the purpose of characterization. As always, the rule allows for exceptions, and it makes sense to mix near region borders.

 

Morrowind's creatures have no "team AI". You can place several wolves near each other (and it's generally encouraged to do so), but don't expect them to aid each other in combat; a player can pull them one by one with destruction spells and finish them one by one without the others realizing what is going on.

 

When placing packs, consider mixing deterministic leveled creatures with non-respawning creatures, so that only part of the pack will respawn. This ensures that the spot won't ever become fully lifeless, but doesn't become a too-convenient hunting ground.

 

Gatekeepers are needed around places that offer really good loot, particularly if these places are too close to low-level zones. These should preferrably be deterministic or T_Mw_RStat_ without the "orp" (so there will *always* be an enemy blocking the way).

 

As usual, context matters. Mudcrabs should live in swamps and on shores; daedra in Daedric shrines and in places that have been abandoned to Daedric influence; cliff racers near mountains (sparingly please!); etc.

GavnerPurl's picture
GavnerPurl
Joined:
2018-11-13 22:55
Last seen:
5 years 6 months ago

I made a fairly hefty edit of the Project History page here, mostly consisting of grammar and spelling mistakes being fixed. There are a lot of issues relating to the use of past and present tense which I did not fix but can if anyone thinks it necessary.

Happy to help!

The Ending of the Words is ALMSIVI