Netruk44/uesp-wiki-content huggingface dataset:
Tes3Mod:SetJournalIndex

SetJournalIndex
 

Sets the Journal to that index. Can move up or down.  Not used so I'm not sure what purpose or use this function is. Although it is supposedly included in the original game, it only works in Tribunal or later versions.

SetJournalIndex is primarily useful to set a Journal to an entry without displaying any journal text. This can be used as a form of a quest variable without being forced to actually create a global variable to govern that quest -- for example, to display something to the player, and then set a special flag for that quest you can set the index to 46, and then check to see if the dialogue entry is 46 instead of 45 to have the NPC do something different when reacting to the player.  Essentially, it's a way of tracking the player's shenanigans without tipping off the player with a journal entry.

You can set the journal index to values where a journal index doesn't actually exist, as well.
Whether or not you can use SetJournalIndex to repeatedly display the same journal entry over and over, I haven't tried.

See Also: Journal
Tes3Mod:SetFactionReaction

SetFactionReaction
 

Defines the reaction of one faction towards members of another faction. Positive value indicate more like, while negative values indicate dislike.  For example, 
 
will cause all thieves guild members to dislike all temple members (it is not reversible so you would have to also set the Temple faction reaction to the Thieves guild).

See Also: GetFactionReaction, ModFactionReaction
Tes3Mod:SetAngle

SetAngle
 

Sets the angle of the object in degrees using the given world axis.  In Tribunal the function also accepts float variables in addition to literal values.

Setangle does not appear to work with actors. Consider using Face instead.
Tes3Mod:SetAtStart

SetAtStart
 

This resets the object to the original position and orientation it was given in the editor, before any movement or rotation occurred. Be warned that this function doesn't always seem to do exactly as it should. Objects are not necessarily reset to their editor-defined position.
Tes3Mod:SetDelete

SetDelete
 

The SetDelete function can be used in combination with Disable to remove an object more completely. SetDelete 1 marks a reference for deletion while SetDelete, 0 clears that flag. 

If the reference was placed in-game (e.g., by the player dropping an item, or by a PlaceAtPC script command), then it will be deleted immediately. But if the reference was placed by an esm or esp file, then it will be marked as deleted, and will not display nor have its scripts run. If you delete from the console you will notice this as in the title of the console: for an ingame reference, the title will revert back to "Console", while for an esp/esm reference the title will continue to match the reference id, and you will be able to setdelete 0, if you wish.

Tips
Always disable the object at least one frame before deleting it. The main thing is to not delete the object while it is still actively engaged in some other activity. 

Example code (near beginning of script):
 
if ( deleteobj = 1 ) ;Local variable, set when you want to delete
    if ( deletetimer == 0 )
        Disable
    endif

    if ( deletetimer  
That way, with the return, it stops the rest of the script if it's up near the top of it (below where you setup the variables though), and disables it, and gives it a bit of time before it's deleted. It may not need 10 frames, but that's not long, and it worked in my scripts. It can be quite a useful function in scripting things, as it allows for a script to use PlaceAtPC or PlaceItem scripts or such to create items within the world, at different locations, or different situations, where you may want to delete such items after.

Other useful tips for successfully using SetDelete are:
#Always disable the object at least one frame ahead of time.
#After entering a cell or using a cast spell or explode spell, wait two seconds before deleting.
#Always call setDelete from a local script.
#Never SetDelete if the object is in an inventory.

See Also: DontSaveObject
Tes3Mod:DontSaveObject

DontSaveObject
 

Call when you do not want to save any changes in the calling object to the player's save game.

Although this has been said to be a new function with Tribunal, it also appears to work fine in the original game (such as in the diseaseAscended script which is in the original game).

See Also: SetDelete
Tes3Mod:SameFaction

SameFaction
 

Returns 1 if player is in the faction of the calling NPC, or 0 otherwise.
Tes3Mod:Set

Set
 
		Set   to   

       Where:	    = Local, global, or external variable to set
		 

Use   to store a value or expression to a variable. The expression can be a complex mathematical expression including numbers, functions, and variables. When using the   command, you should make use of spaces to surround all operators and variables. You should also surround all functions with brackets (if you do not use brackets some functions will not compile correctly). 

Note that you can have multiple functions in the   expression, however they must all apply to the same object reference.
For example:
Tes3Mod:SayDone

SayDone
 

Returns 1 if the object is not saying anything, or 0 otherwise.

See Also: Say
Tes3Mod:Say

Say
 

Makes the subject say the given WAV file, only works on animating objects. 

See Also: SayDone
Tes3Mod:Rotate

Rotate 
RotateWorld
 

Rotates the object along the specified world (RotateWorld) or object (Rotate) axis at the specified number of degrees per second. To be used properly, the function should be called continuously while rotation is desired, for example:
 
which should start rotating an object up when it is activated and stop when it is activated again.
Tes3Mod:Resurrect

Resurrect
 

Brings actor back to life. When you do this any changes made to the actor in game (stats, inventory, etc...) will be reset to their original value.  I have experienced game crashes when using this function from the console sometimes (not consistent).
Tes3Mod:ResetActors

ResetActors (RA)
 

Console command that moves all actors to their starting positions and sets their AI package to the default.
Tes3Mod:RemoveSoulGem

RemoveSoulGem
 

Removes one soulgem containing the given creature's soul from the calling actor's inventory. Note that some references incorrectly mention an optional 'Count' argument where you can specify the number of the soulgem to remove (confirmed in script output with Bloodmoon and latest patch).
Tes3Mod:RepairedOnMe

RepairedOnMe
 

Returns 1 if the calling object is repaired by given object, or 0 otherwise.  For example,
 
checks against a Banhammer being repaired by a journeyman's hammer.  Obviously, the ObjectID should be a valid repair item and the calling item should be a weapon or armor.
Tes2Mod:DFRemake/Resource - RMEnableDungeon

RMEnableDungeon ( )

Inputs
None

Outputs
None

Description
Shows and enables the processing for the current dungeon.

Example
   RMEnableDungeon()

See Also
RMDisableDungeon
Tes2Mod:DFRemake/Resource - RMDisableDungeon

RMDisableDungeon ( )

Inputs
None

Outputs
None

Description
Hides and disables the processing for the current dungeon.

Example
   RMDisableDungeon()

See Also
RMEnableDungeon
Tes2Mod:DFRemake/Resource - Regions

Daggerfall is divided into 61 regions (12? unused and empty), sometimes called provinces or counties, which locations are organized into.


Design Notes
Nothing special will be done with 'empty' regions.



Public Constants
DF_NUM_REGIONS: The number of regions (61 by default). The first region is 0.


Public Functions
Tes2Mod:DFRemake/DFEIsValidRegion

integer DFEIsValidRegion ( DWORD RegionIndex )

Inputs
RegionIndex: The index of the region to check.

Outputs
Returns 1 if the given region is valid, and 0 otherwise.

Description
Checks if the given region is a valid region index. Although regions are pretty much hard-coded at 61, this provides a useful sanity check for region indices.

Example
   Local Result as integer
 
   Result = DFEIsValidRegion(17)
   if (not Result) then End
Tes2Mod:DFRemake/DFEGetRegionName

string DFEGetRegionName ( DWORD RegionIndex )

Inputs
RegionIndex: The region to get the name of.

Outputs
Returns the given region name.

Description
Use this function to access the name of a region. If available, the appropriate language will be used.

Example
   RegionName$ = DFEGetRegionName(15)
Tes2Mod:DFRemake/DFEGetFirstRegionLocation

integer DFEGetFirstRegionLocation ( DWORD MemblockPtr, DWORD RegionIndex )

Inputs
MemblockPtr: Pointer to the memblock (from GET MEMBLOCK POINTER) to receive the location data. The memblock should be allocated with at least 256 bytes.
RegionIndex: The region index to start iterating locations in.

Outputs
Returns 0 if there are no locations in the given region (or on any error). Returns 1 on success.

Description
Use this function to start iterating through all locations in a given region. See DFEGetNextRegionLocation for a description of the memblock data format.

Example
   Local Result as integer
   make memblock 1, 256
   Result = DFEGetFirstRegionLocation(get memblock ptr(1), 19)

See Also
DFEGetNextRegionLocation
Tes2Mod:DFRemake/DFEGetNextRegionLocation

integer DFEGetNextRegionLocation ( DWORD MemblockPtr, DWORD RegionIndex )

Inputs
MemblockPtr: Pointer to the memblock (from GET MEMBLOCK POINTER) to receive the location data. The memblock should be allocated with at least 256 bytes.
RegionIndex: The region index to start iterating locations in.

Outputs
Returns 0 if there are no more locations in the given region (or on any error). Returns 1 on success.

Description
Use this function to continue iterating through all locations in a given region after an initial call to DFEGetFirstRegionLocation. The memblock format is as follows:



Example
   Local Result as integer
   Local XPos   as float
   Local YPos   as float
   Local Type   as DWORD
 
   make memblock 1, 256
   Result = DFEGetFirstRegionLocation(get memblock ptr(1), 19)
 
   while (Result)
      XPos = memblock float(1, 0)
      YPos = memblock float(1, 4)
      Type = memblock DWORD(1, 8)
 
      print "Found location at ", XPos, ", ", YPos, " of type ", Type
 
      Result = DFEGetNextRegionLocation(get memblock ptr(1), 19)
   endwhile

See Also
DFEGetFirstRegionLocation
Location Types
Tes2Mod:DFRemake/Resource - Location Types

These are a list of the predefined location types. Note that the location type is a bit field with the low 4-bits being the basic location type and the high 4-bits any additional flags.



It has been confirmed that these flags and types include everything used in Maps.bsa.
Tes2Mod:DFRemake/DFEGetFirstRegionDungeon

integer DFEGetFirstRegionDungeon ( DWORD MemblockPtr, DWORD RegionIndex )

Inputs
MemblockPtr: Pointer to the memblock (from GET MEMBLOCK POINTER) to receive the dungeon data. The memblock should be allocated with at least 256 bytes.
RegionIndex: The region index to start iterating dungeons in.

Outputs
Returns 0 if there are no dungeon in the given region (or on any error). Returns 1 on success.

Description
Use this function to start iterating through all dungeons in a given region. See DFEGetNextRegionDungeon for a description of the memblock data format used.

Example
   Local Result as integer
   make memblock 1, 256
   Result = DFEGetFirstRegionDungeon(get memblock ptr(1), 19)

See Also
RMGetNextRegionDungeon
Tes2Mod:DFRemake/DFEGetNextRegionDungeon

integer DFEGetNextRegionDungeon ( DWORD MemblockPtr, DWORD RegionIndex )

Inputs
MemblockPtr: Pointer to the memblock (from GET MEMBLOCK POINTER) to receive the dungeon data. The memblock should be allocated with at least 256 bytes.
RegionIndex: The region index to continue iterating dungeons in.

Outputs
Returns 0 if there are no more locations in the given region (or on any error). Returns 1 on success.

Description
Use this function to continue iterating through all dungeons in a given region after an initial call to DFEGetFirstRegionDungeon. The memblock format is as follows:



Example
   Local Result as integer
   Local XPos   as float
   Local YPos   as float
  
   make memblock 1, 256
   Result = DFEGetFirstRegionDungeon(get memblock ptr(1), 19)
  
   while (Result)
      XPos = memblock float(1, 0)
      YPos = memblock float(1, 4)
  
      print "Found dungeon at ", XPos, ", ", YPos
  
      Result = DFEGetNextRegionDungeon(get memblock ptr(1), 19)
   endwhile

See Also
DFEGetFirstRegionDungeon
Tes2Mod:DFRemake/Definitions

The following are definitions of common terms used throughout the project documentation. 


;3d Object: Small Daggerfall object models stored in Arch3d.bsa. Typical objects include houses, a piece of a dungeon (hallway, room) or smaller construction pieces.

;Block: A collection of Daggerfall 3d objects that builds part of a dungeon or town. Block data is stored in Blocks.bsa in the form of RDB files (dungeon) and RMB (town and other exterior pieces).

;DFELibrary: The DLL, written in Visual C++ v6, which adds Daggerfall related commands to DarkBasic.

;Flat: A 2D plane which always faces the player. Also known as a decal.

;Landscape Block: The landscape design used in DarkBasic splits the entire land into small, more manageable blocks. Each block is a square grid of planes and is large enough to hold a single town.

;Landscape Pixel: The original DF map is divided into 1000x500 pixels. Each pixel contains basic information such as average height, climate, and texture set.

;Object ID: The value DarkBasic uses to identify objects.

;Object Value: The value used by Daggerfall to identify basic 3d objects in Arch3d.bsa.
Tes2Mod:DFRemake/Fractal Roads

Wilderness exploration in the original DF was relatively unexciting. One idea would be to link towns with some sort of road system which would at least link the towns together and help improve the overall state of the wild. While this is certainly an 'extra' in the remake development, if such as system is relatively simple to implement, it should be considered.

Simple Linear Linking 
A basic road system would simply be straight lines from a given town to its closest neighbours. This would be something done before-hand (since its relatively time consuming) and stored externally for later use. During landscape creation, this road data would be accessed in order to appropriately texture the land with roads.

This has the advantage of being quite simple to implement but creates boring roads with no overall structure.


Noisy Linear Linking 
This builds upon the previous concept but adds some random noise into the road position to provide variety. Any sort of random variations from a straight line would be fine, as long as the start and end locations remain the same. This still has the disadvantage of not having any overall structure.


Size Based Linking
This is again built off the previous concepts with the change of linking towns is based on their size. The pre-computed road linkage would be performed over several iterations. The first run would link major towns together, the capitol of each region for instance. These roads would be considered as major roads. In subsequent runs, roads would be created to join up smaller sized towns. Roads would not only join towns to towns, but towns to nearby towns as well. In this manner an overall road network is created and would hopefully make it more realistic.

The implementation of such a system would be similar to the previous designs. The road network would be pre-computed and stored in an external file. Only the start and end of each road segments would need to be stored (along with possibly the road size and a random seed). For the 10,000 locations in DF this would result in a file size in the order of 1 MB (assuming an average of 3 roads per town which is generous). If we stored the road data on a block-by-block basis (making it easier to create them) this would increase to the order of 100 MB. If we only used the medium-large towns to the create the roads, these values could be much smaller (10-50%).
Tes3Mod:PurgeTextures

PurgeTextures (PT)
 

Console command that presumably unloads all textures currently being used. Caution, may freeze game.
Tes3Mod:Position

Position 
PositionCell
 

Sets the position of the calling object to the given exterior (Position) or interior (PositionCell) location. If you try to teleport to an unsafe place (clipping with an object or out in the void), you will instead be placed at the next safe location. Some people have noticed bugs using the Position function (NPCs disappearing) and recommend using the PositionCell function instead, which can be outside if an exterior cell name is given.

Note that you must specify ZRot in minutes (1 degree = 60 minutes; north = 0, east = 5400, south = 10800, west = 16200) except for when you position the player, then degrees must be used (north = 0, east = 90, south = 180, west = 270). See "Morrowind Scripting for Dummies (9th Edition)"[ pages 50 and 54 for reference.

If you PositionCell something you have never met into your current cell then its local script will not start running (until you leave the area and return anyways).

A common application of this function is to create a teleportation item (though, since variables are not accepted, you can only teleport to set locations), for example:
 

You should not use either function from dialogue results as it can cause the game to crash. Instead, create a script to peform the teleporting and use a StartScript to start it from the dialogue result.

See Also: PlaceItem, PlaceItemCell
Tes3Mod:PlayBink

PlayBink
 

Plays the given BIK movie file.
Tes3Mod:PlaceItem

PlaceItem 
PlaceItemCell
 

New functions added in Tribunal to create new item references into the world.  PlaceItem will create a new item in the exterior while PlaceItemCell does the same for an interior cell. With either function, if the target cell for the reference is an exterior cell and the given coordinate is outside of that cell, then the reference will be added to the cell containing the coordinate. This is a nice addition that allows you to add things to the world without previously placing them in the editor.

There seems to be a bug with PlaceItemCell in that items added with the function disappear if you save, exit, and reload. This seems to depend on the order in which things occur. For instance if you add an NPC to the clothier to a cell that the player has never visited the NPC will be there. However, if you save the game after the NPC has been added, reload that save and then visit the cell the NPC will not be there.

See Also: PlaceAtPC
Tes3Mod:PlaceAt

PlaceAtMe 
PlaceAtPC
 

Places the object at the player (PlaceAtPC) or another object/activator (PlaceAtMe), in the direction you specify and the distance. If that location is not safe (in the air, in a wall, etc), the object will be placed at one of the other axis or at the player's exact location (feet). It is used most often to spawn NPCs/creatures near the player/object for a coordinated and timed attack.

See Also: PlaceItem, PlaceItemCell
Tes3Mod:PCSkipEquip

PCSkipEquip
 

Not a function but must be defined as a short variable in order to be used.  When defined, set this to 1 to skip equipping the object, or 0 otherwise. Good for popping up messages for breaking seals on books and such.
Tes3Mod:PCVampire

PCVampire
 

A global variable that gives the state of the player's vampire status.
Tes3Mod:PCRace

PCRace
 

A global variable that holds a numeric value for the player's race.
 
It is unknown what happens for a newly created race.
Tes3Mod:PCGet3rdPerson

PCGet3rdPerson
 

Returns 1 if in 3rd person mode, or 0 otherwise.

See Also: PCForce3rdPerson, PCForce1stPerson
Tes3Mod:PCForce3rdPerson

PCForce3rdPerson
 

Queue the change to 3rd person mode (this may have to wait for the current animation to finish).

See Also: PCGet3rdPerson, PCForce1stPerson
Tes3Mod:PCForce1stPerson

PCForce1stPerson
 

Queue the change to 1st person mode (this may have to wait for the current animation to finish).

See Also: PCGet3rdPerson, PCForce3rdPerson
Tes3Mod:PayFine

PayFine 
PayFineThief
 

Pays the player's fine for committing any crimes and resets the game's AI so that guards and NPCs don't hate the player any more. PayFine is used by the game to clear the AI after the player pays a fine to a guard or other law enforced. It removes any stolen merchandise from the player's inventory and puts it into the evidence chests around the island. PayFineThief is similarly used when the player uses the Thieves Guild to remove any bounty on their head but does not remove any stolen items.
Tes3Mod:PCClearExpelled

PCClearExpelled
 

Clears the player's expelled flag for the given faction.  If no faction is specified, the caller's faction is used.  Faction names for Great Houses are just the unique part of the house name, ie "Hlaalu".  Faction names for the three imperial-sponsored guilds are formatted like "Thieves Guild".

Note: The Mages guild will not give you more duties if you use pcclearexpelled, because it uses a second variable called ExpMagesGuild to track how long you've been expelled.  The code you need is   (Alternatively, use both   and  .)
 

See Also: PCExpell, PCExpelled
Tes3Mod:PCExpell

PCExpell
 

Expells the player from the given faction.

See Also: PCClearExpelled, PCExpelled
Tes3Mod:PCExpelled

PCExpelled
 

Returns 1 if the player is currently expelled from the given faction, or 0 otherwise.

See Also: PCClearExpelled, PCExpell
Tes3Mod:OnPCSoulGemUse

OnPCSoulGemUse
 

Not a function but must be defined as a short variable in order to be used.  When defined, it will be set to 1 when the player uses a soul gem for enchanting or recharging an item.  Should be manually reset if you wish to check for additional soul gem uses.
Tes3Mod:OnPCEquip

OnPCEquip
 

Not a function but must be defined as a short variable in order to be used.  When defined, it will be set to 1 when the player equips the item, and remain 1 while the player has it equipped (unless manually reset) and is 0 otherwise.
Tes3Mod:OnPCHitMe

OnPCHitMe
 

This is not a function but must be defined as a short variable in the script to be used.  When the player hits the object, the variable will be set to 1.  It must be reset to 0 when testing for it, such as in the above example script.
Tes3Mod:OnRepair

OnRepair
 

Not a function but must be defined as a short variable in order to be used. Returns 1 if calling object has been attempted to be repaired, or 0 otherwise. This function is currently broken and does not work.  

See Also: OnPCRepair
Tes3Mod:OnActivate

OnActivate
 

Returns 1 if calling object is activated, or 0 otherwise.  An object is activated when you approach it in the game and press the spacebar (by default).
Tes3Mod:OnPCAdd

OnPCAdd
 

Not a function but must be defined as a short variable in order to be used.  When defined, it will be set to 1 when the player adds the calling item to their inventory.  Should be manually reset if you wish to check for additional item additions.
Tes3Mod:OnPCDrop

OnPCDrop
 

Not a function but must be defined as a short variable in order to be used.  When defined, it will be set to 1 when the player drops the calling item from their inventory.  Should be manually reset if you wish to check for additional item drops.
Tes3Mod:HurtStandingActor

HurtStandingActor
 

Damages any actor standing on the object the given number of health points per second.  As mentioned above, a positive value will heal the actor, and a negative value will damage them.  The value can not only be a literal number, but also a variable (local or global).

See Also: HurtCollidingActor
Tes3Mod:HurtCollidingActor

HurtCollidingActor
 

Damages colliding actor the given number of health points per second. This function requires Tribunal.

See Also: HurtStandingActor
Tes3Mod:HasItemEquipped

HasItemEquipped
 

Returns 1 if the given item is currently equipped on the calling actor, or 0 otherwise.
Tes3Mod:HasSoulGem

HasSoulGem
 

Returns 1 if the calling object has the given creature's soul gem in their inventory, or 0 otherwise.
Tes3Mod:Help

Help
 

Console-only command that lists some of the console specific functions.