namespace
int64 0
179
| page_id
int64 5
377k
| url
stringlengths 27
202
| title
stringlengths 2
177
| content
stringlengths 1
486k
| revision_id
int64 4.47k
2.57M
| timestamp
stringlengths 20
20
| contributor
stringlengths 2
167
⌀ | content_cleaned
stringlengths 0
486k
|
|---|---|---|---|---|---|---|---|---|
122
| 1,385
|
https://en.uesp.net/wiki/Tes3Mod:ToggleModes
|
Tes3Mod:ToggleModes
|
{{Morrowind Modding Functions Trail}}
{| BORDER=0 CELLPADDING=2 CELLSPACING=0
|-
| '''ToggleAI (TAI)'''
| '''ToggleBorders (TB)'''
| '''ToggleCollision (TCL)'''
| '''ToggleCollisionBoxes (TCB)'''
|-
| '''ToggleCollisionGrid (TCG)'''
| '''ToggleCombatStats (TCS)'''
| '''ToggleDebugText (TDT)'''
| '''ToggleDialogueStats (TDS)'''
|-
| '''ToggleFogOfWar (TFOW)'''
| '''ToggleFullHelp (TFH)'''
| '''ToggleGodMode (TGM)'''
| '''ToggleGrid (TG)'''
|-
| '''ToggleKillStats (TKS)'''
| '''ToggleLights (TL)'''
| '''ToggleLoadFade (TLF)'''
| '''ToggleMagicStats (TMS)'''
|-
| '''ToggleMenus (TM)'''
| '''TogglePathGrid (TPG)'''
| '''ToggleScriptOutput (TSO)'''
| '''ToggleScripts'''
|-
| '''ToggleSky (TS)'''
| '''ToggleStats (TST)'''
| '''ToggleTextureString (TTS)'''
| '''ToggleVanityMode (TVM)'''
|-
| '''ToggleWater (TWA)'''
| '''ToggleWireFrame (TWF)'''
| '''ToggleWorld (TW)'''
|}
<pre>
ToggleAI (TAI)
ToggleBorders (TB)
ToggleCollision (TCL)
ToggleCollisionBoxes (TCB)
ToggleCollisionGrid (TCG)
ToggleCombatStats (TCS)
ToggleDebugText (TDT)
ToggleDialogueStats (TDS)
ToggleFogOfWar (TFOW)
ToggleFullHelp (TFH)
ToggleGodMode (TGM)
ToggleGrid (TG)
ToggleKillStats (TKS)
ToggleLights (TL)
ToggleLoadFade (TLF)
ToggleMagicStats (TMS)
ToggleMenus (TM)
TogglePathGrid (TPG)
ToggleScriptOutput (TSO)
ToggleScripts
ToggleSky (TS)
ToggleStats (TST)
ToggleTextureString (TTS)
ToggleVanityMode (TVM)
ToggleWater (TWA)
ToggleWireFrame (TWF)
ToggleWorld (TW)
Type: Console
Example:
Scripts:
</pre>
These console commands enable/disable various modes or statistics within the game (use once to enable and again to disable). Their descriptions are as follows:
*'''ToggleAI''' - Toggle the NPC/creature AI?
*'''ToggleBorders''' - Toggles the display of exterior cell borders.
*'''ToggleCollision''' - Toggle all collision. When off, the player and all NPC/creatures can walk through anything.
*'''ToggleCollisionBoxes''' - Toggle display of collision boxes?
*'''ToggleCollisionGrid''' - Toggle display of collision grid?
*'''ToggleCombatStats''' - Turn combat stats on/off? Stats are displayed in the console window.
*'''ToggleDebugText''' - Toggles the display of debug statistic in the main display.
*'''ToggleDialogueStats''' - Turn dialogue stats on/off?
*'''ToggleFogOfWar''' - Toggles the display of unexplored areas of the map. When off the unexplored areas are black. When on the unexplored areas are displayed normally.
*'''ToggleFullHelp''' - Displays the ownership and script of objects and NPCs you look at.
*'''ToggleGodMode''' - Toggles invulnerability mode for the player. When on the player cannot be hurt, lose magicka, or lose fatigue. The player can still take damage from scripted effects, and from effects such as Sun Damage. Enchanted weapons also never lose their charge and weapons with zero charge (such as [[Morrowind:Clutterbane|Clutterbane]]), will function as if they had a charge.
*'''ToggleGrid''' - Unknown
*'''ToggleKillStats''' - Turn kill stats on/off. Kill stats are shown in the console.
*'''ToggleLights''' - Toggle display of lights.
*'''ToggleLoadFade''' - Toggles the use of a fade in/out when loading a new cell.
*'''ToggleMagicStats''' - Turn magic stats on/off. Toggling this off will prevent the player from creating any potions.
*'''ToggleMenus''' - By menus, the command means your HUD (display of compass, current weapon, spell, etc.). Toggling this off is good for taking screen shots without the clutter.
*'''TogglePathGrid''' - Toggles display of the AI path grid.
*'''ToggleScriptOutput''' - Unknown
*'''ToggleScripts''' - Toggles use of scripts or not.
*'''ToggleSky''' - Turns the sky on/off.
*'''ToggleStats''' - Turns all the various statistics on or off.
*'''ToggleTextureString''' - Unknown (display texture filenames of objects?)
*'''ToggleVanityMode''' - View 1st or 3rd person display?
*'''ToggleWater''' - Turns the display of water on/off.
*'''ToggleWireFrame''' - Turns the wire frame mode on/off.
*'''ToggleWorld''' - Toggles display of the gameworld, if off only NPCs and sky is visible.
| 1,657,099
|
2017-08-19T02:08:37Z
| null |
These console commands enable/disable various modes or statistics within the game (use once to enable and again to disable). Their descriptions are as follows:
ToggleAI - Toggle the NPC/creature AI?
ToggleBorders - Toggles the display of exterior cell borders.
ToggleCollision - Toggle all collision. When off, the player and all NPC/creatures can walk through anything.
ToggleCollisionBoxes - Toggle display of collision boxes?
ToggleCollisionGrid - Toggle display of collision grid?
ToggleCombatStats - Turn combat stats on/off? Stats are displayed in the console window.
ToggleDebugText - Toggles the display of debug statistic in the main display.
ToggleDialogueStats - Turn dialogue stats on/off?
ToggleFogOfWar - Toggles the display of unexplored areas of the map. When off the unexplored areas are black. When on the unexplored areas are displayed normally.
ToggleFullHelp - Displays the ownership and script of objects and NPCs you look at.
ToggleGodMode - Toggles invulnerability mode for the player. When on the player cannot be hurt, lose magicka, or lose fatigue. The player can still take damage from scripted effects, and from effects such as Sun Damage. Enchanted weapons also never lose their charge and weapons with zero charge (such as Clutterbane), will function as if they had a charge.
ToggleGrid - Unknown
ToggleKillStats - Turn kill stats on/off. Kill stats are shown in the console.
ToggleLights - Toggle display of lights.
ToggleLoadFade - Toggles the use of a fade in/out when loading a new cell.
ToggleMagicStats - Turn magic stats on/off. Toggling this off will prevent the player from creating any potions.
ToggleMenus - By menus, the command means your HUD (display of compass, current weapon, spell, etc.). Toggling this off is good for taking screen shots without the clutter.
TogglePathGrid - Toggles display of the AI path grid.
ToggleScriptOutput - Unknown
ToggleScripts - Toggles use of scripts or not.
ToggleSky - Turns the sky on/off.
ToggleStats - Turns all the various statistics on or off.
ToggleTextureString - Unknown (display texture filenames of objects?)
ToggleVanityMode - View 1st or 3rd person display?
ToggleWater - Turns the display of water on/off.
ToggleWireFrame - Turns the wire frame mode on/off.
ToggleWorld - Toggles display of the gameworld, if off only NPCs and sky is visible.
|
122
| 1,386
|
https://en.uesp.net/wiki/Tes3Mod:Categorical_Function_List
|
Tes3Mod:Categorical Function List
|
{{Trail|Modding|Construction Set}}
See Also: [[Morrowind Mod:Alphabetical Function List|Alphabetical Function List]]
==AI==
:[[Morrowind Mod:AIActivate|AIActivate]]
:[[Morrowind Mod:AIEscort|AIEscort]]
:[[Morrowind Mod:AIEscort|AIEscortCell]]
:[[Morrowind Mod:AIFollow|AIFollow]]
:[[Morrowind Mod:AIFollow|AIFollowCell]]
:[[Morrowind Mod:AITravel|AITravel]]
:[[Morrowind Mod:AIWander|AIWander]]
:[[Morrowind Mod:GetAIPackageDone|GetAIPackageDone]]
:[[Morrowind Mod:GetCurrentAIPackage|GetCurrentAIPackage]]
:[[Morrowind Mod:GetDetected|GetDetected]]
==Animation==
:[[Morrowind Mod:LoopGroup|LoopGroup]]
:[[Morrowind Mod:PlayBink|PlayBink]]
:[[Morrowind Mod:PlayGroup|PlayGroup]]
:[[Morrowind Mod:SkipAnim|SkipAnim]]
==Bloodmoon==
:[[Morrowind Mod:BecomeWerewolf|BecomeWerewolf]] <SMALL>Bloodmoon</SMALL>
:[[Morrowind Mod:GetPCInJail|GetPCInJail]] <SMALL>Bloodmoon</SMALL>
:[[Morrowind Mod:GetPCTraveling|GetPCTraveling]] <SMALL>Bloodmoon</SMALL>
:[[Morrowind Mod:GetWerewolfKills|GetWerewolfKills]] <SMALL>Bloodmoon</SMALL>
:[[Morrowind Mod:IsWerewolf|IsWerewolf]] <SMALL>Bloodmoon</SMALL>
:[[Morrowind Mod:PCWerewolf|PCWerewolf]] <SMALL>Global</SMALL><SMALL>Bloodmoon</SMALL>
:[[Morrowind Mod:PlaceAt|PlaceAtMe]] <SMALL>Bloodmoon</SMALL>
:[[Morrowind Mod:SetWerewolfAcrobatics|SetWerewolfAcrobatics]] <SMALL>Bloodmoon</SMALL>
:[[Morrowind Mod:StayOutside|StayOutside]] <SMALL>Variable</SMALL><SMALL>Bloodmoon</SMALL>
:[[Morrowind Mod:TurnMoon|TurnMoonRed]] <SMALL>Bloodmoon</SMALL>
:[[Morrowind Mod:TurnMoon|TurnMoonWhite]] <SMALL>Bloodmoon</SMALL>
:[[Morrowind Mod:UndoWerewolf|UndoWerewolf]] <SMALL>Bloodmoon</SMALL>
==Character==
:[[Morrowind Mod:EnableCharacterMenus|EnableBirthMenu]] <SMALL>Undocumented</SMALL>
:[[Morrowind Mod:EnableCharacterMenus|EnableClassMenu]] <SMALL>Undocumented</SMALL>
:[[Morrowind Mod:EnableCharacterMenus|EnableNameMenu]] <SMALL>Undocumented</SMALL>
:[[Morrowind Mod:EnableCharacterMenus|EnableRaceMenu]] <SMALL>Undocumented</SMALL>
:[[Morrowind Mod:EnableCharacterMenus|EnableStatReviewMenu]] <SMALL>Undocumented</SMALL>
==Collision ==
:[[Morrowind Mod:GetColliding|GetCollidingActor]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:GetColliding|GetCollidingPC]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:HurtCollidingActor|HurtCollidingActor]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:HurtStandingActor|HurtStandingActor]]
==Combat==
:[[Morrowind Mod:GetTarget|GetTarget]]
:[[Morrowind Mod:HitOnMe|HitAttemptOnMe]]
:[[Morrowind Mod:HitOnMe|HitOnMe]]
:[[Morrowind Mod:OnDeath|OnDeath]]
:[[Morrowind Mod:OnKnockout|OnKnockout]]
:[[Morrowind Mod:OnMurder|OnMurder]]
:[[Morrowind Mod:StartCombat|StartCombat]]
:[[Morrowind Mod:StopCombat|StopCombat]]
==Console==
:[[Morrowind Mod:BetaComment|BetaComment (BC)]]
:[[Morrowind Mod:CenterOnCell|CenterOnCell (COC)]]
:[[Morrowind Mod:CenterOnExterior|CenterOnExterior (COE)]]
:[[Morrowind Mod:FillJournal|FillJournal]]
:[[Morrowind Mod:FillMap|FillMap]]
:[[Morrowind Mod:FixMe|FixMe]]
:[[Morrowind Mod:Help|Help]]
:[[Morrowind Mod:MenuTest|MenuTest]]
:[[Morrowind Mod:MoveOneToOne|MoveOneToOne (MOTO)]]
:[[Morrowind Mod:Output|OutputObjCounts]] <SMALL>Undocumented</SMALL>
:[[Morrowind Mod:Output|OutputRefCounts]] <SMALL>Undocumented</SMALL>
:[[Morrowind Mod:Output|OutputRefInfo (ORI)]] <SMALL>Undocumented</SMALL>
:[[Morrowind Mod:PurgeTextures|PurgeTextures (PT)]] <SMALL>Undocumented</SMALL>
:[[Morrowind Mod:ResetActors|ResetActors (RA)]]
:[[Morrowind Mod:ShowAnim|ShowAnim (SA)]]
:[[Morrowind Mod:ShowGroup|ShowGroup (SG)]]
:[[Morrowind Mod:ShowSceneGraph|ShowScenegraph (SSG)]]
:[[Morrowind Mod:ShowTargets|ShowTargets (ST)]]
:[[Morrowind Mod:ShowVars|ShowVars (SV)]]
:[[Morrowind Mod:StopCellTest|StopCellTest (SCT)]]
:[[Morrowind Mod:TestCellsModels|TestCells]]
:[[Morrowind Mod:TestCellsModels|TestInteriorCells]]
:[[Morrowind Mod:TestCellsModels|TestModels (T3D)]]
:[[Morrowind Mod:TestCellsModels|TestThreadCells]] <SMALL>Undocumented</SMALL>
:[[Morrowind Mod:ToggleModes|ToggleAI (TAI)]]
:[[Morrowind Mod:ToggleModes|ToggleBorders (TB)]]
:[[Morrowind Mod:ToggleModes|ToggleCollision (TCL)]]
:[[Morrowind Mod:ToggleModes|ToggleCollisionBoxes (TCB)]]
:[[Morrowind Mod:ToggleModes|ToggleCollisionGrid (TCG)]]
:[[Morrowind Mod:ToggleModes|ToggleCombatStats (TCS)]]
:[[Morrowind Mod:ToggleModes|ToggleDebugText (TDT)]]
:[[Morrowind Mod:ToggleModes|ToggleDialogueStats (TDS)]]
:[[Morrowind Mod:ToggleModes|ToggleFogOfWar (TFOW)]]
:[[Morrowind Mod:ToggleModes|ToggleFullHelp (TFH)]]
:[[Morrowind Mod:ToggleModes|ToggleGodMode (TGM)]]
:[[Morrowind Mod:ToggleModes|ToggleGrid (TG)]]
:[[Morrowind Mod:ToggleModes|ToggleKillStats (TKS)]]
:[[Morrowind Mod:ToggleModes|ToggleLights (TL)]]
:[[Morrowind Mod:ToggleModes|ToggleLoadFade (TLF)]]
:[[Morrowind Mod:ToggleModes|ToggleMagicStats (TMS)]]
:[[Morrowind Mod:ToggleModes|ToggleMenus (TM)]]
:[[Morrowind Mod:ToggleModes|TogglePathGrid (TPG)]]
:[[Morrowind Mod:ToggleModes|ToggleScriptOutput (TSO)]]
:[[Morrowind Mod:ToggleModes|ToggleScripts]]
:[[Morrowind Mod:ToggleModes|ToggleSky (TS)]]
:[[Morrowind Mod:ToggleModes|ToggleStats (TST)]]
:[[Morrowind Mod:ToggleModes|ToggleTextureString (TTS)]]
:[[Morrowind Mod:ToggleModes|ToggleVanityMode (TVM)]]
:[[Morrowind Mod:ToggleModes|ToggleWater (TWA)]]
:[[Morrowind Mod:ToggleModes|ToggleWireframe (TWF)]]
:[[Morrowind Mod:ToggleModes|ToggleWorld (TW)]]
:[[Morrowind Mod:UsedOnMe|UsedOnMe]]
==Control==
:[[Morrowind Mod:DisableControls|DisablePlayerControls]]
:[[Morrowind Mod:DisableControls|DisablePlayerFighting]]
:[[Morrowind Mod:DisableControls|DisablePlayerJumping]]
:[[Morrowind Mod:DisableControls|DisablePlayerLooking]]
:[[Morrowind Mod:DisableControls|DisablePlayerMagic]]
:[[Morrowind Mod:DisableControls|DisablePlayerViewSwitch]]
:[[Morrowind Mod:DisableControls|DisableVanityMode]]
:[[Morrowind Mod:EnableControlsMenus|EnableInventoryMenu]] <SMALL>Undocumented</SMALL>
:[[Morrowind Mod:EnableLevelUpRest|EnableLevelupMenu]] <SMALL>Undocumented</SMALL>
:[[Morrowind Mod:EnableControlsMenus|EnableMagicMenu]] <SMALL>Undocumented</SMALL>
:[[Morrowind Mod:EnableControlsMenus|EnableMapMenu]] <SMALL>Undocumented</SMALL>
:[[Morrowind Mod:EnableControls|EnablePlayerControls]]
:[[Morrowind Mod:EnableControls|EnablePlayerFighting]]
:[[Morrowind Mod:EnableControls|EnablePlayerJumping]]
:[[Morrowind Mod:EnableControls|EnablePlayerLooking]]
:[[Morrowind Mod:EnableControls|EnablePlayerMagic]]
:[[Morrowind Mod:EnableControls|EnablePlayerViewSwitch]]
:[[Morrowind Mod:EnableLevelUpRest|EnableRest]]
:[[Morrowind Mod:EnableControlsMenus|EnableStatsMenu]] <SMALL>Undocumented</SMALL>
:[[Morrowind Mod:EnableControls|EnableVanityMode]]
:[[Morrowind Mod:GetControlsDisabled|GetPlayerControlsDisabled]]
:[[Morrowind Mod:GetControlsDisabled|GetPlayerFightingDisabled]]
:[[Morrowind Mod:GetControlsDisabled|GetPlayerJumpingDisabled]]
:[[Morrowind Mod:GetControlsDisabled|GetPlayerLookingDisabled]]
:[[Morrowind Mod:GetControlsDisabled|GetPlayerMagicDisabled]]
:[[Morrowind Mod:GetControlsDisabled|GetPlayerViewSwitch]] <SMALL>Broken</SMALL>
:[[Morrowind Mod:GetControlsDisabled|GetVanityModeDisabled]]
:[[Morrowind Mod:PCForce1stPerson|PCForce1stPerson]]
:[[Morrowind Mod:PCForce3rdPerson|PCForce3rdPerson]]
:[[Morrowind Mod:PCGet3rdPerson|PCGet3rdPerson]]
:[[Morrowind Mod:ShowRestMenu|ShowRestMenu]]
==Dialogue==
:[[Morrowind Mod:AddTopic|AddTopic]]
:[[Morrowind Mod:Choice|Choice]]
:[[Morrowind Mod:ClearInfoActor|ClearInfoActor]]
:[[Morrowind Mod:ForceGreeting|ForceGreeting]]
:[[Morrowind Mod:GetJournalIndex|GetJournalIndex]]
:[[Morrowind Mod:Goodbye|Goodbye]]
:[[Morrowind Mod:Journal|Journal]]
:[[Morrowind Mod:SetJournalIndex|SetJournalIndex]]
==Faction==
:[[Morrowind Mod:GetFactionReaction|GetFactionReaction]]
:[[Morrowind Mod:GetPCFacRep|GetPCFacRep]]
:[[Morrowind Mod:GetPCRank|GetPCRank]]
:[[Morrowind Mod:GetRace|GetRace]]
:[[Morrowind Mod:LowerRank|LowerRank]]
:[[Morrowind Mod:ModFactionReaction|ModFactionReaction]]
:[[Morrowind Mod:ModPCFacRep|ModPCFacRep]]
:[[Morrowind Mod:PCClearExpelled|PCClearExpelled]]
:[[Morrowind Mod:PCExpell|PCExpell]]
:[[Morrowind Mod:PCExpelled|PCExpelled]]
:[[Morrowind Mod:PCJoinFaction|PCJoinFaction]]
:[[Morrowind Mod:PCLowerRank|PCLowerRank]]
:[[Morrowind Mod:PCRaiseRank|PCRaiseRank]]
:[[Morrowind Mod:RaiseRank|RaiseRank]]
:[[Morrowind Mod:SameFaction|SameFaction]]
:[[Morrowind Mod:SetFactionReaction|SetFactionReaction]]
:[[Morrowind Mod:SetPCFacRep|SetPCFacRep]]
==Globals==
:[[Morrowind Mod:Day|Day]] <SMALL>Global</SMALL>
:[[Morrowind Mod:DaysPassed|DaysPassed]] <SMALL>Global</SMALL><SMALL>Tribunal</SMALL>
:[[Morrowind Mod:GameHour|GameHour]] <SMALL>Global</SMALL>
:[[Morrowind Mod:Month|Month]] <SMALL>Global</SMALL>
:[[Morrowind Mod:PCRace|PCRace]] <SMALL>Global</SMALL>
:[[Morrowind Mod:PCVampire|PCVampire]] <SMALL>Global</SMALL>
:[[Morrowind Mod:PCWerewolf|PCWerewolf]] <SMALL>Global</SMALL><SMALL>Bloodmoon</SMALL>
:[[Morrowind Mod:Year|Year]] <SMALL>Global</SMALL>
==Levelled List==
:[[Morrowind Mod:AddToLev|AddToLevCreature]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:AddToLev|AddToLevItem]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:RemoveFromLev|RemoveFromLevCreature]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:RemoveFromLev|RemoveFromLevItem]] <SMALL>Tribunal</SMALL>
==Magic==
:[[Morrowind Mod:AddSoulGem|AddSoulGem]]
:[[Morrowind Mod:AddSpell|AddSpell]]
:[[Morrowind Mod:Cast|Cast]]
:[[Morrowind Mod:DropSoulGem|DropSoulGem]]
:[[Morrowind Mod:ExplodeSpell|ExplodeSpell]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:GetEffect|GetEffect]]
:[[Morrowind Mod:GetSpellEffects|GetSpellEffects]]
:[[Morrowind Mod:GetSpellReadied|GetSpellReadied]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:HasSoulGem|HasSoulGem]]
:[[Morrowind Mod:RemoveEffects|RemoveEffects]]
:[[Morrowind Mod:RemoveSoulGem|RemoveSoulGem]]
:[[Morrowind Mod:RemoveSpell|RemoveSpell]]
:[[Morrowind Mod:RemoveSpellEffects|RemoveSpellEffects]]
==Miscellaneous==
:[[Morrowind Mod:CreateMaps|CreateMaps]]
:[[Morrowind Mod:EnableDisable|Disable]]
:[[Morrowind Mod:DontSaveObject|DontSaveObject]]
:[[Morrowind Mod:EnableDisable|Enable]]
:[[Morrowind Mod:FadeInOut|FadeIn]]
:[[Morrowind Mod:FadeInOut|FadeOut]]
:[[Morrowind Mod:FadeTo|FadeTo]]
:[[Morrowind Mod:GetButtonPressed|GetButtonPressed]]
:[[Morrowind Mod:GetDisabled|GetDisabled]]
:[[Morrowind Mod:GetInterior|GetInterior]] <SMALL>Undocumented</SMALL>
:[[Morrowind Mod:GetMoonPhase|GetMasserPhase]]
:[[Morrowind Mod:GetPCCell|GetPCCell]]
:[[Morrowind Mod:GetStat|GetPCCrimeLevel]]
:[[Morrowind Mod:GetPCInJail|GetPCInJail]] <SMALL>Bloodmoon</SMALL>
:[[Morrowind Mod:GetPCSleep|GetPCSleep]]
:[[Morrowind Mod:GetPCTraveling|GetPCTraveling]] <SMALL>Bloodmoon</SMALL>
:[[Morrowind Mod:GetMoonPhase|GetSecundaPhase]]
:[[Morrowind Mod:GetSquareRoot|GetSquareRoot]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:GetStanding|GetStandingActor]]
:[[Morrowind Mod:GetStanding|GetStandingPC]]
:[[Morrowind Mod:GoToJail|GoToJail]]
:[[Morrowind Mod:Lock|Lock]]
:[[Morrowind Mod:MenuMode|MenuMode]]
:[[Morrowind Mod:MessageBox|MessageBox]]
:[[Morrowind Mod:PayFine|PayFine]]
:[[Morrowind Mod:PayFine|PayFineThief]]
:[[Morrowind Mod:PCRace|PCRace]] <SMALL>Global</SMALL>
:[[Morrowind Mod:PCVampire|PCVampire]] <SMALL>Global</SMALL>
:[[Morrowind Mod:Random|Random]]
:[[Morrowind Mod:Resurrect|Resurrect]]
:[[Morrowind Mod:ShowMap|ShowMap]]
:[[Morrowind Mod:Unlock|Unlock]]
:[[Morrowind Mod:WakeUpPC|WakeUpPC]]
:[[Morrowind Mod:Xbox|XBox]]
==Movement==
:[[Morrowind Mod:CellChanged|CellChanged]]
:[[Morrowind Mod:CellUpdate|CellUpdate]]
:[[Morrowind Mod:ClearForceJump|ClearForceJump]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:ClearForceMoveJump|ClearForceMoveJump]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:ClearForceRun|ClearForceRun]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:ClearForceSneak|ClearForceSneak]]
:[[Morrowind Mod:EnableDisableLevitation|DisableLevitation]] <SMALL>Undocumented</SMALL>
:[[Morrowind Mod:EnableDisableTeleporting|DisableTeleporting]]
:[[Morrowind Mod:EnableDisableLevitation|EnableLevitation]] <SMALL>Undocumented</SMALL>
:[[Morrowind Mod:EnableDisableTeleporting|EnableTeleporting]]
:[[Morrowind Mod:ForceJump|ForceJump]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:ForceMoveJump|ForceMoveJump]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:ForceRun|ForceRun]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:ForceSneak|ForceSneak]]
:[[Morrowind Mod:GetAngle|GetAngle]]
:[[Morrowind Mod:GetDistance|GetDistance]]
:[[Morrowind Mod:GetForceJump|GetForceJump]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:GetForceMoveJump|GetForceMoveJump]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:GetForceRun|GetForceRun]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:GetForceSneak|GetForceSneak]]
:[[Morrowind Mod:GetLineOfSight|GetLineOfSight (GetLOS)]]
:[[Morrowind Mod:GetPCJumping|GetPCJumping]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:GetPCRunning|GetPCRunning]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:GetPCSneaking|GetPCSneaking]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:GetPos|GetPos]]
:[[Morrowind Mod:GetStartingAngle|GetStartingAngle]]
:[[Morrowind Mod:GetStartingPos|GetStartingPos]]
:[[Morrowind Mod:Move|Move]]
:[[Morrowind Mod:Move|MoveWorld]]
:[[Morrowind Mod:Position|Position]]
:[[Morrowind Mod:Position|PositionCell]]
:[[Morrowind Mod:Rotate|Rotate]]
:[[Morrowind Mod:Rotate|RotateWorld]]
:[[Morrowind Mod:SetAngle|SetAngle]]
:[[Morrowind Mod:SetAtStart|SetAtStart]]
:[[Morrowind Mod:SetPos|SetPos]]
:[[Morrowind Mod:SetStat|SetScale]]
==Object==
:[[Morrowind Mod:Activate|Activate]]
:[[Morrowind Mod:AddItem|AddItem]]
:[[Morrowind Mod:Drop|Drop]]
:[[Morrowind Mod:Equip|Equip]]
:[[Morrowind Mod:GetItemCount|GetItemCount]]
:[[Morrowind Mod:GetWeaponDrawn|GetWeaponDrawn]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:GetWeaponType|GetWeaponType]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:HasItemEquipped|HasItemEquipped]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:OnActivate|OnActivate]]
:[[Morrowind Mod:OnPCAdd|OnPCAdd]] <SMALL>Variable</SMALL>
:[[Morrowind Mod:OnPCDrop|OnPCDrop]] <SMALL>Variable</SMALL>
:[[Morrowind Mod:OnPCEquip|OnPCEquip]] <SMALL>Variable</SMALL>
:[[Morrowind Mod:OnPCHitMe|OnPCHitMe]] <SMALL>Variable</SMALL>
:[[Morrowind Mod:OnPCRepair|OnPCRepair]] <SMALL>Variable</SMALL>
:[[Morrowind Mod:OnPCSoulGemUse|OnPCSoulGemUse]] <SMALL>Variable</SMALL>
:[[Morrowind Mod:OnRepair|OnRepair]] <SMALL>Variable</SMALL>
:[[Morrowind Mod:PCSkipEquip|PCSkipEquip]] <SMALL>Variable</SMALL>
:[[Morrowind Mod:PlaceAt|PlaceAtMe]] <SMALL>Bloodmoon</SMALL>
:[[Morrowind Mod:PlaceAt|PlaceAtPC]]
:[[Morrowind Mod:PlaceItem|PlaceItem]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:PlaceItem|PlaceItemCell]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:RemoveItem|RemoveItem]]
:[[Morrowind Mod:RepairedOnMe|RepairedOnMe]]
:[[Morrowind Mod:SetDelete|SetDelete]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:StayOutside|StayOutside]] <SMALL>Variable</SMALL><SMALL>Bloodmoon</SMALL>
==Script==
:[[Morrowind Mod:ScriptRunning|ScriptRunning]]
:[[Morrowind Mod:StartScript|StartScript]]
:[[Morrowind Mod:StopScript|StopScript]]
==Sound==
:[[Morrowind Mod:GetSoundPlaying|GetSoundPlaying]]
:[[Morrowind Mod:PlaySound|PlayLoopSound3D]]
:[[Morrowind Mod:PlaySound|PlayLoopSound3DVP]]
:[[Morrowind Mod:PlaySound|PlaySound]]
:[[Morrowind Mod:PlaySound|PlaySound3D]]
:[[Morrowind Mod:PlaySound|PlaySound3DVP]]
:[[Morrowind Mod:PlaySound|PlaySoundVP]]
:[[Morrowind Mod:Say|Say]]
:[[Morrowind Mod:SayDone|SayDone]]
:[[Morrowind Mod:StopSound|StopSound]]
:[[Morrowind Mod:StreamMusic|StreamMusic]]
==Statistics==
:[[Morrowind Mod:GetStat|GetAcrobatics]]
:[[Morrowind Mod:GetStat|GetAgility]]
:[[Morrowind Mod:GetStat|GetAlarm]]
:[[Morrowind Mod:GetStat|GetAlchemy]]
:[[Morrowind Mod:GetStat|GetAlteration]]
:[[Morrowind Mod:GetStat|GetArmorBonus]]
:[[Morrowind Mod:GetStat|GetArmorer]]
:[[Morrowind Mod:GetArmorType|GetArmorType]]
:[[Morrowind Mod:GetStat|GetAthletics]]
:[[Morrowind Mod:GetStat|GetAttackBonus]]
:[[Morrowind Mod:GetAttacked|GetAttacked]]
:[[Morrowind Mod:GetStat|GetAxe]]
:[[Morrowind Mod:GetDisease|GetBlightDisease]]
:[[Morrowind Mod:GetStat|GetBlindness]]
:[[Morrowind Mod:GetStat|GetBlock]]
:[[Morrowind Mod:GetStat|GetBluntWeapon]]
:[[Morrowind Mod:GetStat|GetCastPenalty]]
:[[Morrowind Mod:GetStat|GetChameleon]]
:[[Morrowind Mod:GetDisease|GetCommonDisease]]
:[[Morrowind Mod:GetStat|GetConjuration]]
:[[Morrowind Mod:GetDeadCount|GetDeadCount]]
:[[Morrowind Mod:GetStat|GetDefendBonus]]
:[[Morrowind Mod:GetStat|GetDestruction]]
:[[Morrowind Mod:GetStat|GetDisposition]]
:[[Morrowind Mod:GetStat|GetEnchant]]
:[[Morrowind Mod:GetStat|GetEndurance]]
:[[Morrowind Mod:GetStat|GetFatigue]]
:[[Morrowind Mod:GetStat|GetFight]]
:[[Morrowind Mod:GetStat|GetFlee]]
:[[Morrowind Mod:GetStat|GetFlying]]
:[[Morrowind Mod:GetStat|GetHandToHand]]
:[[Morrowind Mod:GetStat|GetHealth]]
:[[Morrowind Mod:GetHealthGetRatio|GetHealthGetRatio]] <SMALL>Undocumented</SMALL>
:[[Morrowind Mod:GetStat|GetHeavyArmor]]
:[[Morrowind Mod:GetStat|GetHello]]
:[[Morrowind Mod:GetStat|GetIllusion]]
:[[Morrowind Mod:GetStat|GetIntelligence]]
:[[Morrowind Mod:GetStat|GetInvisible]]
:[[Morrowind Mod:GetStat|GetLevel]]
:[[Morrowind Mod:GetStat|GetLightArmor]]
:[[Morrowind Mod:GetLocked|GetLocked]]
:[[Morrowind Mod:GetStat|GetLongBlade]]
:[[Morrowind Mod:GetStat|GetLuck]]
:[[Morrowind Mod:GetStat|GetMagicka]]
:[[Morrowind Mod:GetStat|GetMarksman]]
:[[Morrowind Mod:GetStat|GetMediumArmor]]
:[[Morrowind Mod:GetStat|GetMercantile]]
:[[Morrowind Mod:GetStat|GetMysticism]]
:[[Morrowind Mod:GetStat|GetParalysis]]
:[[Morrowind Mod:GetStat|GetPCVisionBonus]] <SMALL>Undocumented</SMALL>
:[[Morrowind Mod:GetStat|GetPersonality]]
:[[Morrowind Mod:GetStat|GetReputation]]
:[[Morrowind Mod:GetStat|GetResistBlight]]
:[[Morrowind Mod:GetStat|GetResistCorprus]]
:[[Morrowind Mod:GetStat|GetResistDisease]]
:[[Morrowind Mod:GetStat|GetResistFire]]
:[[Morrowind Mod:GetStat|GetResistFrost]]
:[[Morrowind Mod:GetStat|GetResistMagicka]]
:[[Morrowind Mod:GetStat|GetResistNormalWeapons]]
:[[Morrowind Mod:GetStat|GetResistParalysis]]
:[[Morrowind Mod:GetStat|GetResistPoison]]
:[[Morrowind Mod:GetStat|GetResistShock]]
:[[Morrowind Mod:GetStat|GetRestoration]]
:[[Morrowind Mod:GetStat|GetScale]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:GetStat|GetSecurity]]
:[[Morrowind Mod:GetStat|GetShortBlade]]
:[[Morrowind Mod:GetStat|GetSilence]]
:[[Morrowind Mod:GetStat|GetSneak]]
:[[Morrowind Mod:GetStat|GetSpear]]
:[[Morrowind Mod:GetStat|GetSpeechcraft]]
:[[Morrowind Mod:GetStat|GetSpeed]]
:[[Morrowind Mod:GetSpell|GetSpell]]
:[[Morrowind Mod:GetStat|GetStrength]]
:[[Morrowind Mod:GetStat|GetSuperJump]]
:[[Morrowind Mod:GetStat|GetSwimSpeed]]
:[[Morrowind Mod:GetStat|GetUnarmored]]
:[[Morrowind Mod:GetStat|GetWaterBreathing]]
:[[Morrowind Mod:WaterLevel|GetWaterLevel]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:GetStat|GetWaterWalking]]
:[[Morrowind Mod:GetStat|GetWillpower]]
:[[Morrowind Mod:ModStat|ModAcrobatics]]
:[[Morrowind Mod:ModStat|ModAgility]]
:[[Morrowind Mod:ModStat|ModAlarm]]
:[[Morrowind Mod:ModStat|ModAlchemy]]
:[[Morrowind Mod:ModStat|ModAlteration]]
:[[Morrowind Mod:ModStat|ModArmorBonus]]
:[[Morrowind Mod:ModStat|ModArmorer]]
:[[Morrowind Mod:ModStat|ModAthletics]]
:[[Morrowind Mod:ModStat|ModAttackBonus]]
:[[Morrowind Mod:ModStat|ModAxe]]
:[[Morrowind Mod:ModStat|ModBlindness]]
:[[Morrowind Mod:ModStat|ModBlock]]
:[[Morrowind Mod:ModStat|ModBluntWeapon]]
:[[Morrowind Mod:ModStat|ModCastPenalty]]
:[[Morrowind Mod:ModStat|ModChameleon]]
:[[Morrowind Mod:ModStat|ModConjuration]]
:[[Morrowind Mod:ModStat|ModCurrentFatigue]]
:[[Morrowind Mod:ModStat|ModCurrentHealth]]
:[[Morrowind Mod:ModStat|ModCurrentMagicka]]
:[[Morrowind Mod:ModStat|ModDefendBonus]]
:[[Morrowind Mod:ModStat|ModDestruction]]
:[[Morrowind Mod:ModStat|ModDisposition]]
:[[Morrowind Mod:ModStat|ModEnchant]]
:[[Morrowind Mod:ModStat|ModEndurance]]
:[[Morrowind Mod:ModStat|ModFatigue]]
:[[Morrowind Mod:ModStat|ModFight]]
:[[Morrowind Mod:ModStat|ModFlee]]
:[[Morrowind Mod:ModStat|ModFlying]]
:[[Morrowind Mod:ModStat|ModHandToHand]]
:[[Morrowind Mod:ModStat|ModHealth]]
:[[Morrowind Mod:ModStat|ModHeavyArmor]]
:[[Morrowind Mod:ModStat|ModHello]]
:[[Morrowind Mod:ModStat|ModIllusion]]
:[[Morrowind Mod:ModStat|ModIntelligence]]
:[[Morrowind Mod:ModStat|ModInvisible]]
:[[Morrowind Mod:ModStat|ModLightArmor]]
:[[Morrowind Mod:ModStat|ModLongBlade]]
:[[Morrowind Mod:ModStat|ModLuck]]
:[[Morrowind Mod:ModStat|ModMagicka]]
:[[Morrowind Mod:ModStat|ModMarksman]]
:[[Morrowind Mod:ModStat|ModMediumArmor]]
:[[Morrowind Mod:ModStat|ModMercantile]]
:[[Morrowind Mod:ModStat|ModMysticism]]
:[[Morrowind Mod:ModStat|ModParalysis]]
:[[Morrowind Mod:ModStat|ModPCCrimeLevel]]
:[[Morrowind Mod:ModStat|ModPCVisionBonus]]
:[[Morrowind Mod:ModStat|ModPersonality]]
:[[Morrowind Mod:ModStat|ModReputation]]
:[[Morrowind Mod:ModStat|ModResistBlight]]
:[[Morrowind Mod:ModStat|ModResistCorprus]]
:[[Morrowind Mod:ModStat|ModResistDisease]]
:[[Morrowind Mod:ModStat|ModResistFire]]
:[[Morrowind Mod:ModStat|ModResistFrost]]
:[[Morrowind Mod:ModStat|ModResistMagicka]]
:[[Morrowind Mod:ModStat|ModResistNormalWeapons]]
:[[Morrowind Mod:ModStat|ModResistParalysis]]
:[[Morrowind Mod:ModStat|ModResistPoison]]
:[[Morrowind Mod:ModStat|ModResistShock]]
:[[Morrowind Mod:ModStat|ModRestoration]]
:[[Morrowind Mod:ModStat|ModScale]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:ModStat|ModSecurity]]
:[[Morrowind Mod:ModStat|ModShortBlade]]
:[[Morrowind Mod:ModStat|ModSilence]]
:[[Morrowind Mod:ModStat|ModSneak]]
:[[Morrowind Mod:ModStat|ModSpear]]
:[[Morrowind Mod:ModStat|ModSpeechcraft]]
:[[Morrowind Mod:ModStat|ModSpeed]]
:[[Morrowind Mod:ModStat|ModStrength]]
:[[Morrowind Mod:ModStat|ModSuperJump]]
:[[Morrowind Mod:ModStat|ModSwimSpeed]]
:[[Morrowind Mod:ModStat|ModUnarmored]]
:[[Morrowind Mod:ModStat|ModWaterBreathing]]
:[[Morrowind Mod:WaterLevel|ModWaterLevel]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:ModStat|ModWaterWalking]]
:[[Morrowind Mod:ModStat|ModWillpower]]
:[[Morrowind Mod:SetStat|SetAcrobatics]]
:[[Morrowind Mod:SetStat|SetAgility]]
:[[Morrowind Mod:SetStat|SetAlarm]]
:[[Morrowind Mod:SetStat|SetAlchemy]]
:[[Morrowind Mod:SetStat|SetAlteration]]
:[[Morrowind Mod:SetStat|SetArmorBonus]]
:[[Morrowind Mod:SetStat|SetArmorer]]
:[[Morrowind Mod:SetStat|SetAthletics]]
:[[Morrowind Mod:SetStat|SetAttackBonus]]
:[[Morrowind Mod:SetStat|SetAxe]]
:[[Morrowind Mod:SetStat|SetBlindness]]
:[[Morrowind Mod:SetStat|SetBlock]]
:[[Morrowind Mod:SetStat|SetBluntWeapon]]
:[[Morrowind Mod:SetStat|SetCastPenalty]]
:[[Morrowind Mod:SetStat|SetChameleon]]
:[[Morrowind Mod:SetStat|SetConjuration]]
:[[Morrowind Mod:SetStat|SetDefendBonus]]
:[[Morrowind Mod:SetStat|SetDestruction]]
:[[Morrowind Mod:SetStat|SetDisposition]]
:[[Morrowind Mod:SetStat|SetEnchant]]
:[[Morrowind Mod:SetStat|SetEndurance]]
:[[Morrowind Mod:SetStat|SetFatigue]]
:[[Morrowind Mod:SetStat|SetFight]]
:[[Morrowind Mod:SetStat|SetFlee]]
:[[Morrowind Mod:SetStat|SetFlying]]
:[[Morrowind Mod:SetStat|SetHandToHand]]
:[[Morrowind Mod:SetStat|SetHealth]]
:[[Morrowind Mod:SetStat|SetHeavyArmor]]
:[[Morrowind Mod:SetStat|SetHello]]
:[[Morrowind Mod:SetStat|SetIllusion]]
:[[Morrowind Mod:SetStat|SetIntelligence]]
:[[Morrowind Mod:SetStat|SetInvisible]]
:[[Morrowind Mod:SetStat|SetLevel]]
:[[Morrowind Mod:SetStat|SetLightArmor]]
:[[Morrowind Mod:SetStat|SetLongBlade]]
:[[Morrowind Mod:SetStat|SetLuck]]
:[[Morrowind Mod:SetStat|SetMagicka]]
:[[Morrowind Mod:SetStat|SetMarksman]]
:[[Morrowind Mod:SetStat|SetMediumArmor]]
:[[Morrowind Mod:SetStat|SetMercantile]]
:[[Morrowind Mod:SetStat|SetMysticism]]
:[[Morrowind Mod:SetStat|SetParalysis]]
:[[Morrowind Mod:SetStat|SetPCCrimeLevel]]
:[[Morrowind Mod:SetStat|SetPCVisionBonus]]
:[[Morrowind Mod:SetStat|SetPersonality]]
:[[Morrowind Mod:SetStat|SetReputation]]
:[[Morrowind Mod:SetStat|SetResistBlight]]
:[[Morrowind Mod:SetStat|SetResistCorprus]]
:[[Morrowind Mod:SetStat|SetResistDisease]]
:[[Morrowind Mod:SetStat|SetResistFire]]
:[[Morrowind Mod:SetStat|SetResistFrost]]
:[[Morrowind Mod:SetStat|SetResistMagicka]]
:[[Morrowind Mod:SetStat|SetResistNormalWeapons]]
:[[Morrowind Mod:SetStat|SetResistParalysis]]
:[[Morrowind Mod:SetStat|SetResistPoison]]
:[[Morrowind Mod:SetStat|SetResistShock]]
:[[Morrowind Mod:SetStat|SetRestoration]]
:[[Morrowind Mod:SetStat|SetScale]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:SetStat|SetSecurity]]
:[[Morrowind Mod:SetStat|SetShortBlade]]
:[[Morrowind Mod:SetStat|SetSilence]]
:[[Morrowind Mod:SetStat|SetSneak]]
:[[Morrowind Mod:SetStat|SetSpear]]
:[[Morrowind Mod:SetStat|SetSpeechcraft]]
:[[Morrowind Mod:SetStat|SetSpeed]]
:[[Morrowind Mod:SetStat|SetStrength]]
:[[Morrowind Mod:SetStat|SetSuperJump]]
:[[Morrowind Mod:SetStat|SetSwimSpeed]]
:[[Morrowind Mod:SetStat|SetUnarmored]]
:[[Morrowind Mod:SetStat|SetWaterBreathing]]
:[[Morrowind Mod:WaterLevel|SetWaterLevel]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:SetStat|SetWaterWalking]]
:[[Morrowind Mod:SetStat|SetWillpower]]
==System==
:[[Morrowind Mod:Begin|Begin]]
:[[Morrowind Mod:If|Else]]
:[[Morrowind Mod:If|ElseIf]]
:[[Morrowind Mod:Begin|End]]
:[[Morrowind Mod:If|EndIf]]
:[[Morrowind Mod:While|EndWhile]]
:[[Morrowind Mod:Float|Float]]
:[[Morrowind Mod:If|If]]
:[[Morrowind Mod:Long|Long]]
:[[Morrowind Mod:Operators|Operators]] <SMALL>Includes ->, +, -, etc.</SMALL>
:[[Morrowind Mod:Return|Return]]
:[[Morrowind Mod:Set|Set]]
:[[Morrowind Mod:Short|Short]]
:[[Morrowind Mod:While|While]]
==Time==
:[[Morrowind Mod:Day|Day]] <SMALL>Global</SMALL>
:[[Morrowind Mod:DaysPassed|DaysPassed]] <SMALL>Global</SMALL><SMALL>Tribunal</SMALL>
:[[Morrowind Mod:GameHour|GameHour]] <SMALL>Global</SMALL>
:[[Morrowind Mod:GetCurrentTime|GetCurrentTime]]
:[[Morrowind Mod:GetSecondsPassed|GetSecondsPassed]]
:[[Morrowind Mod:Month|Month]] <SMALL>Global</SMALL>
:[[Morrowind Mod:Year|Year]] <SMALL>Global</SMALL>
==Tribunal==
:[[Morrowind Mod:AddToLev|AddToLevCreature]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:AddToLev|AddToLevItem]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:ClearForceJump|ClearForceJump]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:ClearForceMoveJump|ClearForceMoveJump]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:ClearForceRun|ClearForceRun]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:DaysPassed|DaysPassed]] <SMALL>Global</SMALL><SMALL>Tribunal</SMALL>
:[[Morrowind Mod:ExplodeSpell|ExplodeSpell]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:ForceJump|ForceJump]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:ForceMoveJump|ForceMoveJump]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:ForceRun|ForceRun]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:GetColliding|GetCollidingActor]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:GetColliding|GetCollidingPC]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:GetForceJump|GetForceJump]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:GetForceMoveJump|GetForceMoveJump]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:GetForceRun|GetForceRun]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:GetPCJumping|GetPCJumping]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:GetPCRunning|GetPCRunning]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:GetPCSneaking|GetPCSneaking]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:GetStat|GetScale]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:GetSpellReadied|GetSpellReadied]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:GetSquareRoot|GetSquareRoot]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:WaterLevel|GetWaterLevel]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:GetWeaponDrawn|GetWeaponDrawn]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:GetWeaponType|GetWeaponType]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:HasItemEquipped|HasItemEquipped]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:ModStat|ModScale]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:WaterLevel|ModWaterLevel]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:PlaceItem|PlaceItem]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:PlaceItem|PlaceItemCell]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:RemoveFromLev|RemoveFromLevCreature]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:RemoveFromLev|RemoveFromLevItem]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:SetDelete|SetDelete]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:SetStat|SetScale]] <SMALL>Tribunal</SMALL>
:[[Morrowind Mod:WaterLevel|SetWaterLevel]] <SMALL>Tribunal</SMALL>
==Undocumented==
:[[Morrowind Mod:Companion|Companion]] <SMALL>Variable</SMALL> <SMALL>Undocumented</SMALL>
:[[Morrowind Mod:EnableDisableLevitation|DisableLevitation]] <SMALL>Undocumented</SMALL>
:[[Morrowind Mod:EnableCharacterMenus|EnableBirthMenu]] <SMALL>Undocumented</SMALL>
:[[Morrowind Mod:EnableCharacterMenus|EnableClassMenu]] <SMALL>Undocumented</SMALL>
:[[Morrowind Mod:EnableControlsMenus|EnableInventoryMenu]] <SMALL>Undocumented</SMALL>
:[[Morrowind Mod:EnableLevelUpRest|EnableLevelupMenu]] <SMALL>Undocumented</SMALL>
:[[Morrowind Mod:EnableDisableLevitation|EnableLevitation]] <SMALL>Undocumented</SMALL>
:[[Morrowind Mod:EnableControlsMenus|EnableMagicMenu]] <SMALL>Undocumented</SMALL>
:[[Morrowind Mod:EnableControlsMenus|EnableMapMenu]] <SMALL>Undocumented</SMALL>
:[[Morrowind Mod:EnableCharacterMenus|EnableNameMenu]] <SMALL>Undocumented</SMALL>
:[[Morrowind Mod:EnableCharacterMenus|EnableRaceMenu]] <SMALL>Undocumented</SMALL>
:[[Morrowind Mod:EnableCharacterMenus|EnableStatReviewMenu]] <SMALL>Undocumented</SMALL>
:[[Morrowind Mod:EnableControlsMenus|EnableStatsMenu]] <SMALL>Undocumented</SMALL>
:[[Morrowind Mod:Face|Face]] <SMALL>Undocumented</SMALL>
:[[Morrowind Mod:Fall|Fall]] <SMALL>Undocumented</SMALL>
:[[Morrowind Mod:GetHealthGetRatio|GetHealthGetRatio]] <SMALL>Undocumented</SMALL>
:[[Morrowind Mod:GetInterior|GetInterior]] <SMALL>Undocumented</SMALL>
:[[Morrowind Mod:GetStat|GetPCVisionBonus]] <SMALL>Undocumented</SMALL>
:[[Morrowind Mod:GetWindSpeed|GetWindSpeed]] <SMALL>Undocumented</SMALL>
:[[Morrowind Mod:Output|OutputObjCounts]] <SMALL>Undocumented</SMALL>
:[[Morrowind Mod:Output|OutputRefCounts]] <SMALL>Undocumented</SMALL>
:[[Morrowind Mod:Output|OutputRefInfo (ORI)]] <SMALL>Undocumented</SMALL>
:[[Morrowind Mod:PurgeTextures|PurgeTextures (PT)]] <SMALL>Undocumented</SMALL>
:[[Morrowind Mod:Show|Show]] <SMALL>Undocumented</SMALL>
:[[Morrowind Mod:TestCellsModels|TestThreadCells]] <SMALL>Undocumented</SMALL>
==Variable==
:[[Morrowind Mod:Companion|Companion]] <SMALL>Variable</SMALL> <SMALL>Undocumented</SMALL>
:[[Morrowind Mod:OnPCAdd|OnPCAdd]] <SMALL>Variable</SMALL>
:[[Morrowind Mod:OnPCDrop|OnPCDrop]] <SMALL>Variable</SMALL>
:[[Morrowind Mod:OnPCEquip|OnPCEquip]] <SMALL>Variable</SMALL>
:[[Morrowind Mod:OnPCHitMe|OnPCHitMe]] <SMALL>Variable</SMALL>
:[[Morrowind Mod:OnPCRepair|OnPCRepair]] <SMALL>Variable</SMALL>
:[[Morrowind Mod:OnPCSoulGemUse|OnPCSoulGemUse]] <SMALL>Variable</SMALL>
:[[Morrowind Mod:OnRepair|OnRepair]] <SMALL>Variable</SMALL>
:[[Morrowind Mod:PCSkipEquip|PCSkipEquip]] <SMALL>Variable</SMALL>
:[[Morrowind Mod:StayOutside|StayOutside]] <SMALL>Variable</SMALL><SMALL>Bloodmoon</SMALL>
==Weather==
:[[Morrowind Mod:ChangeWeather|ChangeWeather]]
:[[Morrowind Mod:GetCurrentWeather|GetCurrentWeather]]
:[[Morrowind Mod:GetWindSpeed|GetWindSpeed]] <SMALL>Undocumented</SMALL>
:[[Morrowind Mod:ModRegion|ModRegion]]
==Werewolf==
:[[Morrowind Mod:BecomeWerewolf|BecomeWerewolf]] <SMALL>Bloodmoon</SMALL>
:[[Morrowind Mod:GetWerewolfKills|GetWerewolfKills]] <SMALL>Bloodmoon</SMALL>
:[[Morrowind Mod:IsWerewolf|IsWerewolf]] <SMALL>Bloodmoon</SMALL>
:[[Morrowind Mod:PCWerewolf|PCWerewolf]] <SMALL>Global</SMALL><SMALL>Bloodmoon</SMALL>
:[[Morrowind Mod:SetWerewolfAcrobatics|SetWerewolfAcrobatics]] <SMALL>Bloodmoon</SMALL>
:[[Morrowind Mod:TurnMoon|TurnMoonRed]] <SMALL>Bloodmoon</SMALL>
:[[Morrowind Mod:TurnMoon|TurnMoonWhite]] <SMALL>Bloodmoon</SMALL>
:[[Morrowind Mod:UndoWerewolf|UndoWerewolf]] <SMALL>Bloodmoon</SMALL>
| 2,307,018
|
2021-01-07T23:43:17Z
|
HoodBot
|
See Also: Alphabetical Function List
AI
:AIActivate
:AIEscort
:AIEscortCell
:AIFollow
:AIFollowCell
:AITravel
:AIWander
:GetAIPackageDone
:GetCurrentAIPackage
:GetDetected
Animation
:LoopGroup
:PlayBink
:PlayGroup
:SkipAnim
Bloodmoon
:BecomeWerewolf
:GetPCInJail
:GetPCTraveling
:GetWerewolfKills
:IsWerewolf
:PCWerewolf
:PlaceAtMe
:SetWerewolfAcrobatics
:StayOutside
:TurnMoonRed
:TurnMoonWhite
:UndoWerewolf
Character
:EnableBirthMenu
:EnableClassMenu
:EnableNameMenu
:EnableRaceMenu
:EnableStatReviewMenu
Collision
:GetCollidingActor
:GetCollidingPC
:HurtCollidingActor
:HurtStandingActor
Combat
:GetTarget
:HitAttemptOnMe
:HitOnMe
:OnDeath
:OnKnockout
:OnMurder
:StartCombat
:StopCombat
Console
:BetaComment (BC)
:CenterOnCell (COC)
:CenterOnExterior (COE)
:FillJournal
:FillMap
:FixMe
:Help
:MenuTest
:MoveOneToOne (MOTO)
:OutputObjCounts
:OutputRefCounts
:OutputRefInfo (ORI)
:PurgeTextures (PT)
:ResetActors (RA)
:ShowAnim (SA)
:ShowGroup (SG)
:ShowScenegraph (SSG)
:ShowTargets (ST)
:ShowVars (SV)
:StopCellTest (SCT)
:TestCells
:TestInteriorCells
:TestModels (T3D)
:TestThreadCells
:ToggleAI (TAI)
:ToggleBorders (TB)
:ToggleCollision (TCL)
:ToggleCollisionBoxes (TCB)
:ToggleCollisionGrid (TCG)
:ToggleCombatStats (TCS)
:ToggleDebugText (TDT)
:ToggleDialogueStats (TDS)
:ToggleFogOfWar (TFOW)
:ToggleFullHelp (TFH)
:ToggleGodMode (TGM)
:ToggleGrid (TG)
:ToggleKillStats (TKS)
:ToggleLights (TL)
:ToggleLoadFade (TLF)
:ToggleMagicStats (TMS)
:ToggleMenus (TM)
:TogglePathGrid (TPG)
:ToggleScriptOutput (TSO)
:ToggleScripts
:ToggleSky (TS)
:ToggleStats (TST)
:ToggleTextureString (TTS)
:ToggleVanityMode (TVM)
:ToggleWater (TWA)
:ToggleWireframe (TWF)
:ToggleWorld (TW)
:UsedOnMe
Control
:DisablePlayerControls
:DisablePlayerFighting
:DisablePlayerJumping
:DisablePlayerLooking
:DisablePlayerMagic
:DisablePlayerViewSwitch
:DisableVanityMode
:EnableInventoryMenu
:EnableLevelupMenu
:EnableMagicMenu
:EnableMapMenu
:EnablePlayerControls
:EnablePlayerFighting
:EnablePlayerJumping
:EnablePlayerLooking
:EnablePlayerMagic
:EnablePlayerViewSwitch
:EnableRest
:EnableStatsMenu
:EnableVanityMode
:GetPlayerControlsDisabled
:GetPlayerFightingDisabled
:GetPlayerJumpingDisabled
:GetPlayerLookingDisabled
:GetPlayerMagicDisabled
:GetPlayerViewSwitch
:GetVanityModeDisabled
:PCForce1stPerson
:PCForce3rdPerson
:PCGet3rdPerson
:ShowRestMenu
Dialogue
:AddTopic
:Choice
:ClearInfoActor
:ForceGreeting
:GetJournalIndex
:Goodbye
:Journal
:SetJournalIndex
Faction
:GetFactionReaction
:GetPCFacRep
:GetPCRank
:GetRace
:LowerRank
:ModFactionReaction
:ModPCFacRep
:PCClearExpelled
:PCExpell
:PCExpelled
:PCJoinFaction
:PCLowerRank
:PCRaiseRank
:RaiseRank
:SameFaction
:SetFactionReaction
:SetPCFacRep
Globals
:Day
:DaysPassed
:GameHour
:Month
:PCRace
:PCVampire
:PCWerewolf
:Year
Levelled List
:AddToLevCreature
:AddToLevItem
:RemoveFromLevCreature
:RemoveFromLevItem
Magic
:AddSoulGem
:AddSpell
:Cast
:DropSoulGem
:ExplodeSpell
:GetEffect
:GetSpellEffects
:GetSpellReadied
:HasSoulGem
:RemoveEffects
:RemoveSoulGem
:RemoveSpell
:RemoveSpellEffects
Miscellaneous
:CreateMaps
:Disable
:DontSaveObject
:Enable
:FadeIn
:FadeOut
:FadeTo
:GetButtonPressed
:GetDisabled
:GetInterior
:GetMasserPhase
:GetPCCell
:GetPCCrimeLevel
:GetPCInJail
:GetPCSleep
:GetPCTraveling
:GetSecundaPhase
:GetSquareRoot
:GetStandingActor
:GetStandingPC
:GoToJail
:Lock
:MenuMode
:MessageBox
:PayFine
:PayFineThief
:PCRace
:PCVampire
:Random
:Resurrect
:ShowMap
:Unlock
:WakeUpPC
:XBox
Movement
:CellChanged
:CellUpdate
:ClearForceJump
:ClearForceMoveJump
:ClearForceRun
:ClearForceSneak
:DisableLevitation
:DisableTeleporting
:EnableLevitation
:EnableTeleporting
:ForceJump
:ForceMoveJump
:ForceRun
:ForceSneak
:GetAngle
:GetDistance
:GetForceJump
:GetForceMoveJump
:GetForceRun
:GetForceSneak
:GetLineOfSight (GetLOS)
:GetPCJumping
:GetPCRunning
:GetPCSneaking
:GetPos
:GetStartingAngle
:GetStartingPos
:Move
:MoveWorld
:Position
:PositionCell
:Rotate
:RotateWorld
:SetAngle
:SetAtStart
:SetPos
:SetScale
Object
:Activate
:AddItem
:Drop
:Equip
:GetItemCount
:GetWeaponDrawn
:GetWeaponType
:HasItemEquipped
:OnActivate
:OnPCAdd
:OnPCDrop
:OnPCEquip
:OnPCHitMe
:OnPCRepair
:OnPCSoulGemUse
:OnRepair
:PCSkipEquip
:PlaceAtMe
:PlaceAtPC
:PlaceItem
:PlaceItemCell
:RemoveItem
:RepairedOnMe
:SetDelete
:StayOutside
Script
:ScriptRunning
:StartScript
:StopScript
Sound
:GetSoundPlaying
:PlayLoopSound3D
:PlayLoopSound3DVP
:PlaySound
:PlaySound3D
:PlaySound3DVP
:PlaySoundVP
:Say
:SayDone
:StopSound
:StreamMusic
Statistics
:GetAcrobatics
:GetAgility
:GetAlarm
:GetAlchemy
:GetAlteration
:GetArmorBonus
:GetArmorer
:GetArmorType
:GetAthletics
:GetAttackBonus
:GetAttacked
:GetAxe
:GetBlightDisease
:GetBlindness
:GetBlock
:GetBluntWeapon
:GetCastPenalty
:GetChameleon
:GetCommonDisease
:GetConjuration
:GetDeadCount
:GetDefendBonus
:GetDestruction
:GetDisposition
:GetEnchant
:GetEndurance
:GetFatigue
:GetFight
:GetFlee
:GetFlying
:GetHandToHand
:GetHealth
:GetHealthGetRatio
:GetHeavyArmor
:GetHello
:GetIllusion
:GetIntelligence
:GetInvisible
:GetLevel
:GetLightArmor
:GetLocked
:GetLongBlade
:GetLuck
:GetMagicka
:GetMarksman
:GetMediumArmor
:GetMercantile
:GetMysticism
:GetParalysis
:GetPCVisionBonus
:GetPersonality
:GetReputation
:GetResistBlight
:GetResistCorprus
:GetResistDisease
:GetResistFire
:GetResistFrost
:GetResistMagicka
:GetResistNormalWeapons
:GetResistParalysis
:GetResistPoison
:GetResistShock
:GetRestoration
:GetScale
:GetSecurity
:GetShortBlade
:GetSilence
:GetSneak
:GetSpear
:GetSpeechcraft
:GetSpeed
:GetSpell
:GetStrength
:GetSuperJump
:GetSwimSpeed
:GetUnarmored
:GetWaterBreathing
:GetWaterLevel
:GetWaterWalking
:GetWillpower
:ModAcrobatics
:ModAgility
:ModAlarm
:ModAlchemy
:ModAlteration
:ModArmorBonus
:ModArmorer
:ModAthletics
:ModAttackBonus
:ModAxe
:ModBlindness
:ModBlock
:ModBluntWeapon
:ModCastPenalty
:ModChameleon
:ModConjuration
:ModCurrentFatigue
:ModCurrentHealth
:ModCurrentMagicka
:ModDefendBonus
:ModDestruction
:ModDisposition
:ModEnchant
:ModEndurance
:ModFatigue
:ModFight
:ModFlee
:ModFlying
:ModHandToHand
:ModHealth
:ModHeavyArmor
:ModHello
:ModIllusion
:ModIntelligence
:ModInvisible
:ModLightArmor
:ModLongBlade
:ModLuck
:ModMagicka
:ModMarksman
:ModMediumArmor
:ModMercantile
:ModMysticism
:ModParalysis
:ModPCCrimeLevel
:ModPCVisionBonus
:ModPersonality
:ModReputation
:ModResistBlight
:ModResistCorprus
:ModResistDisease
:ModResistFire
:ModResistFrost
:ModResistMagicka
:ModResistNormalWeapons
:ModResistParalysis
:ModResistPoison
:ModResistShock
:ModRestoration
:ModScale
:ModSecurity
:ModShortBlade
:ModSilence
:ModSneak
:ModSpear
:ModSpeechcraft
:ModSpeed
:ModStrength
:ModSuperJump
:ModSwimSpeed
:ModUnarmored
:ModWaterBreathing
:ModWaterLevel
:ModWaterWalking
:ModWillpower
:SetAcrobatics
:SetAgility
:SetAlarm
:SetAlchemy
:SetAlteration
:SetArmorBonus
:SetArmorer
:SetAthletics
:SetAttackBonus
:SetAxe
:SetBlindness
:SetBlock
:SetBluntWeapon
:SetCastPenalty
:SetChameleon
:SetConjuration
:SetDefendBonus
:SetDestruction
:SetDisposition
:SetEnchant
:SetEndurance
:SetFatigue
:SetFight
:SetFlee
:SetFlying
:SetHandToHand
:SetHealth
:SetHeavyArmor
:SetHello
:SetIllusion
:SetIntelligence
:SetInvisible
:SetLevel
:SetLightArmor
:SetLongBlade
:SetLuck
:SetMagicka
:SetMarksman
:SetMediumArmor
:SetMercantile
:SetMysticism
:SetParalysis
:SetPCCrimeLevel
:SetPCVisionBonus
:SetPersonality
:SetReputation
:SetResistBlight
:SetResistCorprus
:SetResistDisease
:SetResistFire
:SetResistFrost
:SetResistMagicka
:SetResistNormalWeapons
:SetResistParalysis
:SetResistPoison
:SetResistShock
:SetRestoration
:SetScale
:SetSecurity
:SetShortBlade
:SetSilence
:SetSneak
:SetSpear
:SetSpeechcraft
:SetSpeed
:SetStrength
:SetSuperJump
:SetSwimSpeed
:SetUnarmored
:SetWaterBreathing
:SetWaterLevel
:SetWaterWalking
:SetWillpower
System
:Begin
:Else
:ElseIf
:End
:EndIf
:EndWhile
:Float
:If
:Long
:Operators
:Return
:Set
:Short
:While
Time
:Day
:DaysPassed
:GameHour
:GetCurrentTime
:GetSecondsPassed
:Month
:Year
Tribunal
:AddToLevCreature
:AddToLevItem
:ClearForceJump
:ClearForceMoveJump
:ClearForceRun
:DaysPassed
:ExplodeSpell
:ForceJump
:ForceMoveJump
:ForceRun
:GetCollidingActor
:GetCollidingPC
:GetForceJump
:GetForceMoveJump
:GetForceRun
:GetPCJumping
:GetPCRunning
:GetPCSneaking
:GetScale
:GetSpellReadied
:GetSquareRoot
:GetWaterLevel
:GetWeaponDrawn
:GetWeaponType
:HasItemEquipped
:ModScale
:ModWaterLevel
:PlaceItem
:PlaceItemCell
:RemoveFromLevCreature
:RemoveFromLevItem
:SetDelete
:SetScale
:SetWaterLevel
Undocumented
:Companion
:DisableLevitation
:EnableBirthMenu
:EnableClassMenu
:EnableInventoryMenu
:EnableLevelupMenu
:EnableLevitation
:EnableMagicMenu
:EnableMapMenu
:EnableNameMenu
:EnableRaceMenu
:EnableStatReviewMenu
:EnableStatsMenu
:Face
:Fall
:GetHealthGetRatio
:GetInterior
:GetPCVisionBonus
:GetWindSpeed
:OutputObjCounts
:OutputRefCounts
:OutputRefInfo (ORI)
:PurgeTextures (PT)
:Show
:TestThreadCells
Variable
:Companion
:OnPCAdd
:OnPCDrop
:OnPCEquip
:OnPCHitMe
:OnPCRepair
:OnPCSoulGemUse
:OnRepair
:PCSkipEquip
:StayOutside
Weather
:ChangeWeather
:GetCurrentWeather
:GetWindSpeed
:ModRegion
Werewolf
:BecomeWerewolf
:GetWerewolfKills
:IsWerewolf
:PCWerewolf
:SetWerewolfAcrobatics
:TurnMoonRed
:TurnMoonWhite
:UndoWerewolf
|
122
| 1,387
|
https://en.uesp.net/wiki/Tes3Mod:AddItem
|
Tes3Mod:AddItem
|
{{Morrowind Modding Functions Trail}}
'''AddItem'''
<pre>
AddItem, ObjectID, Count
Where ObjectID = Object to add to caller's inventory.
Count = Number of item to add
Type: Object
Returns: none
Example: player->AddItem, "Gold_001", 200 (gives player 200 gold)
"sinnammu mirpal"->AddItem, cloudcleaver_unique, 1
chest_small_01->AddItem, l_b_amulets, -10
Scripts: bladeScript
blueScript
</pre>
{{TOCright|}}
==Use==
Adds a given number of items to the callers inventory. The most common use is in dialogue to handle rewards or quest items. It is often used together with [[Morrowind Mod:RemoveItem|RemoveItem]] to simulate giving something from one actor to another. However, '''AddItem''' will always create new items in the given inventory. Keep that in mind when dealing with items that run scripts of their own.
'''AddItem''' is not limited by the encumbrance value of a container.
'''AddItem''' can not be used on objects that have no reference in the game. Accessing disabled references is no problem.
The implementation of the inventory feature is poor, politely put. There are so many traps to avoid, that the bugs section would be longer than the real explanation. For this reason most of the bugs, traps, and problems are included in the main text.
==Caller==
'''Player''', '''Actors''', '''Containers'''
This function can be called by any actor or container from a script or dialog result. The behavior of the function changes significantly depending on the type of the caller, the time of the call, and sometimes the number of objects present in the game. The scripting language does not provide any means to determine any of these conditions; however, the use on actors in a dialog is generally safe.
At this point we need to remember the two types of uses of functions like '''AddItem''':
* <code>"some object"->AddItem "some item" count</code> refers to the object 'some object' defined in the CS and can be used anywhere in scripting.
* <code>AddItem "some item" count</code> can only be used in a script attached to 'some object' or in a dialog. Other than the first version it refers to the calling ''reference''.
Read the following section to learn how these function calls not necessarily do what you expect.
==How Inventories Work==
Every actor and container has in fact two inventories:
* '''The object inventory'''
:this list is defined in the CS and holds all the items the actors or containers will contain at the beginning. It should be noted, that leveled items are only evaluated coming from THIS list.
* '''The reference inventory'''
:this is an individual list for actors or containers that keeps track of the changes in the inventory during the game. Containers only get this second inventory list, if the player changes the content, other than just taking everything. Actors get it, when they are loaded for the first time. For all practical purposes the player's inventory works like this.
===Containers===
Container objects go through three states, which show a different behavior for the '''AddItem''' function:
# the container is newly loaded, the player has not changed the content, but he may open the container. When the player leaves the cell and returns later, the container will be newly loaded again. Every call of '''AddItem''', '''RemoveItem''' or '''GetItemCount''' at this point will refer to the object inventory. Changes will affect every reference of the same container in the game.
# the player opened the container and took everything before closing it. Now the container is marked empty. Any call of '''AddItem''', '''RemoveItem''' or '''GetItemCount''' at this point will still refer to the object inventory. Changes will affect every reference of the same container in the game, but THIS container will appear empty to the player.
# the player changed the content of a container. He did not take everything at once, or he put something new into it. Now the container gets his individual reference inventory. If the container has a script attached that calls '''AddItem''' on itself, the item is added only to this container. A container at state 3 stays that way, even if the player empties it again. '''Exception''': Organic containers that respawn are reset to state 1.
Example 1:
:You have two containers <code>my_reward_chest</code> and you call from a script <code>my_reward_chest->AddItem gold_001 100</code>
:* If you have not touched the containers, both will contain 100 gold.
:* Any container you have emptied will still be empty.
:* If you have changed a container (state 3), it will contain 100 gold.
Example 2:
:You have two containers <code>my_reward_chest</code> in the same cell with a script attached. This script looks for some game progress and then calls <code>AddItem gold_001 100</code> on itself.
:* If you have not touched the containers, both will contain 200 gold. (Both added 100 gold to the object inventory.)
:* Any container you have emptied will still be empty. If you emptied one and did not touch the second, that one will hold 200 gold. (Both added 100 gold to the object inventory.)
:* If you changed both (state 3) both will hold 100 gold. (they only add to themselves)
:* If you changed one (state 3) the changed one holds 200 gold, the unchanged 100. (the changed container adds gold only to itself, the unchanged adds gold to everyone.
:* If the containers are in different cells, the outcome would be different, as their scripts would run at different times - but you get the picture.
===Actors===
Actors show a different behavior than containers and they have only two states.
# the actor has never been loaded. Local scripts would not be executed yet, therefore '''AddItem''' can only be called in the form <code>some_actor->AddItem objectID count</code>, which would affect the object inventory.
# after an actor has been loaded, it has an individual inventory. Any call of AddItem from the reference - in a dialog or local script - will work as expected and add the item(s) to this reference. This is also true for dead actors.
However, the form <code>some_actor->AddItem objectID count</code> works in a strange way:
* If the actor <code>some_actor</code> is unique, a call of <code>some_actor->AddItem objectID count</code> will add the item(s) to that actors inventory.
* If the actor <code>some_actor</code> is NOT unique, a call of <code>some_actor->AddItem objectID count</code> will add the item(s) to the object inventory, so the new item will only be given to all references of <code>some_actor</code> that have not been loaded yet.
Examples:
* <code>"bob smith"->AddItem gold_001 100</code>: if Bob Smith is a unique NPC (as he should be), he now has 100 gold.
* <code>"imperial archer"->AddItem "silver arrow" 100</code>: only imperial archers that have not been loaded yet will have those 100 silver arrows.
===The Player===
The player's inventory works as expected.
==ObjectID==
'''Every portable item defined in CS''', '''Leveled Items'''
Normal items can be added to any actor or container.
Leveled items can be added to any actor or container, but they may not work as expected. They are only evaluated, if added to the object inventory. Added to the player, or a container in state 3, or an actor that has already been loaded, they appear as some strange and unusable icon.
Items that are created by the player like self-made potions or self enchanted items or filled soul gems can not be handled by AddItem. The same is true for health or number of usages. '''AddItem''' will only add items as defined in CS.
==Count==
'''short value'''
In scripts the function only accepts literal values for ''count''. Global variables (not local!) are accepted in dialog result fields, provided their value has been set before the dialog entry is displayed.
The use of the ''count'' value requires special care. The actual parameter is a short value (-32768 to 32767). The maximum number of items that can be added with one function call is therefore 32767, but the function will accept any numerical value and wrap. A value of 32768 is really -32768, 65356 is 0, and so on.
'''AddItem''' will accept negative values for ''count'', but '''not 0'''.
Calling '''AddItem''' with a negative value will actually add a positive amount of items to a container or actor, and those items become restockable, if the actor is a merchant. '''Do not add a negative amount of items to the players inventory!''' It will mess up the encumbrance value.
==Summary==
* The use of '''AddItem''' on the player with normal items and positive numbers is not a problem.
* Adding items to any actor from a local script (on the actor) or a dialog works as expected.
* If an actor is unique, an '''AddItem''' call from other scripts will work as expected.
* If you feel the need to add something to an existing container, you are out of luck, if the player has already emptied that container. There is no way to check for this. Find some other way to give the item to the player.
* You should not use leveled items unless you know exactly what you are doing.
==Notes==
* The encumbrance value is changed during the execution of '''AddItem''', [[Morrowind Mod:RemoveItem|RemoveItem]], when buying or selling, or when you pick up or drop items. This is only done once by adding or subtracting the weight of the items that are handled. If that gets messed up, the encumbrance value will be broken.
* The maximum value of 32767 seems to be enough for normal items, but one could think of situations, where you want to add more (gold comes to mind). Split it up into several AddItem calls or write a separate script to deal with this. Buying or selling or picking up or dropping items does not have that limitation.
* NPCs will always wear the best clothes and armor they have. If you add better clothes or armor (depending on the armor skills of the NPC) the NPC will wear these. This is also true if you add the better item with a negative ''count'' value. If the NPC is a merchant and you want him to sell the stuff, add it to a hidden chest he owns.
* If you add a negative amount of leveled items to a merchants container, the randomness is calculated only once. Restocking will always add the same items.
* Remember that the combination of [[Morrowind Mod:RemoveItem|RemoveItem]] and '''AddItem''' is the only way in scripting and dialog to transfer items between inventories. If an item has a script attached, this script will be started new for the new item and any data in local variables will be lost. The same is true for individual data like health, number of usage, magical charge. Buying or selling or the normal process of picking up or dropping an item do not have that problem.
==Bugs==
* Calling '''AddItem''' with a ''count'' of '''0''' will create an error at runtime. Since scripts only accept literals this is only a problem, if you add items in a dialog using a global variable. Make sure the variable is '''not 0'''.
* Using a variable for ''count'' in a script may even compile, but will result in a runtime error.
* Adding a negative amount of items to the players inventory is bad. The player will receive a positive number of items, but the weight is subtracted. Bad, bad, bad... (Makes a nice encumbrance cheat, though...)
* Not a Bug, but could lead to one in your mod: leveled items are only calculated '''before''' the player manipulates the content a container. Therefore you should add leveled item only to containers that have not been touched by the player. Otherwise the container will hold some unusable item with the name of your leveled list.
==Related Functions==
* [[Morrowind Mod:RemoveItem|RemoveItem]], [[Morrowind Mod:GetItemCount|GetItemCount]] (normal item handling)
* [[Morrowind Mod:AddSoulGem|AddSoulGem]] (adding filled soul gems)
* [[Morrowind Mod:Activate|Activate]] (pick up items)
* [[Morrowind Mod:OnActivate|OnActivate]], [[Morrowind Mod:OnPCAdd|OnPCAdd]] (react to the process of acquiring an item)
| 2,306,997
|
2021-01-07T23:42:58Z
|
HoodBot
|
AddItem
Use
Adds a given number of items to the callers inventory. The most common use is in dialogue to handle rewards or quest items. It is often used together with RemoveItem to simulate giving something from one actor to another. However, AddItem will always create new items in the given inventory. Keep that in mind when dealing with items that run scripts of their own.
AddItem is not limited by the encumbrance value of a container.
AddItem can not be used on objects that have no reference in the game. Accessing disabled references is no problem.
The implementation of the inventory feature is poor, politely put. There are so many traps to avoid, that the bugs section would be longer than the real explanation. For this reason most of the bugs, traps, and problems are included in the main text.
Caller
Player, Actors, Containers
This function can be called by any actor or container from a script or dialog result. The behavior of the function changes significantly depending on the type of the caller, the time of the call, and sometimes the number of objects present in the game. The scripting language does not provide any means to determine any of these conditions; however, the use on actors in a dialog is generally safe.
At this point we need to remember the two types of uses of functions like AddItem:
refers to the object 'some object' defined in the CS and can be used anywhere in scripting.
can only be used in a script attached to 'some object' or in a dialog. Other than the first version it refers to the calling reference.
Read the following section to learn how these function calls not necessarily do what you expect.
How Inventories Work
Every actor and container has in fact two inventories:
The object inventory
:this list is defined in the CS and holds all the items the actors or containers will contain at the beginning. It should be noted, that leveled items are only evaluated coming from THIS list.
The reference inventory
:this is an individual list for actors or containers that keeps track of the changes in the inventory during the game. Containers only get this second inventory list, if the player changes the content, other than just taking everything. Actors get it, when they are loaded for the first time. For all practical purposes the player's inventory works like this.
Containers
Container objects go through three states, which show a different behavior for the AddItem function:
# the container is newly loaded, the player has not changed the content, but he may open the container. When the player leaves the cell and returns later, the container will be newly loaded again. Every call of AddItem, RemoveItem or GetItemCount at this point will refer to the object inventory. Changes will affect every reference of the same container in the game.
# the player opened the container and took everything before closing it. Now the container is marked empty. Any call of AddItem, RemoveItem or GetItemCount at this point will still refer to the object inventory. Changes will affect every reference of the same container in the game, but THIS container will appear empty to the player.
# the player changed the content of a container. He did not take everything at once, or he put something new into it. Now the container gets his individual reference inventory. If the container has a script attached that calls AddItem on itself, the item is added only to this container. A container at state 3 stays that way, even if the player empties it again. Exception: Organic containers that respawn are reset to state 1.
Example 1:
:You have two containers and you call from a script
:* If you have not touched the containers, both will contain 100 gold.
:* Any container you have emptied will still be empty.
:* If you have changed a container (state 3), it will contain 100 gold.
Example 2:
:You have two containers in the same cell with a script attached. This script looks for some game progress and then calls on itself.
:* If you have not touched the containers, both will contain 200 gold. (Both added 100 gold to the object inventory.)
:* Any container you have emptied will still be empty. If you emptied one and did not touch the second, that one will hold 200 gold. (Both added 100 gold to the object inventory.)
:* If you changed both (state 3) both will hold 100 gold. (they only add to themselves)
:* If you changed one (state 3) the changed one holds 200 gold, the unchanged 100. (the changed container adds gold only to itself, the unchanged adds gold to everyone.
:* If the containers are in different cells, the outcome would be different, as their scripts would run at different times - but you get the picture.
Actors
Actors show a different behavior than containers and they have only two states.
# the actor has never been loaded. Local scripts would not be executed yet, therefore AddItem can only be called in the form , which would affect the object inventory.
# after an actor has been loaded, it has an individual inventory. Any call of AddItem from the reference - in a dialog or local script - will work as expected and add the item(s) to this reference. This is also true for dead actors.
However, the form works in a strange way:
If the actor is unique, a call of will add the item(s) to that actors inventory.
If the actor is NOT unique, a call of will add the item(s) to the object inventory, so the new item will only be given to all references of that have not been loaded yet.
Examples:
: if Bob Smith is a unique NPC (as he should be), he now has 100 gold.
: only imperial archers that have not been loaded yet will have those 100 silver arrows.
The Player
The player's inventory works as expected.
ObjectID
Every portable item defined in CS, Leveled Items
Normal items can be added to any actor or container.
Leveled items can be added to any actor or container, but they may not work as expected. They are only evaluated, if added to the object inventory. Added to the player, or a container in state 3, or an actor that has already been loaded, they appear as some strange and unusable icon.
Items that are created by the player like self-made potions or self enchanted items or filled soul gems can not be handled by AddItem. The same is true for health or number of usages. AddItem will only add items as defined in CS.
Count
short value
In scripts the function only accepts literal values for count. Global variables (not local!) are accepted in dialog result fields, provided their value has been set before the dialog entry is displayed.
The use of the count value requires special care. The actual parameter is a short value (-32768 to 32767). The maximum number of items that can be added with one function call is therefore 32767, but the function will accept any numerical value and wrap. A value of 32768 is really -32768, 65356 is 0, and so on.
AddItem will accept negative values for count, but not 0.
Calling AddItem with a negative value will actually add a positive amount of items to a container or actor, and those items become restockable, if the actor is a merchant. Do not add a negative amount of items to the players inventory! It will mess up the encumbrance value.
Summary
The use of AddItem on the player with normal items and positive numbers is not a problem.
Adding items to any actor from a local script (on the actor) or a dialog works as expected.
If an actor is unique, an AddItem call from other scripts will work as expected.
If you feel the need to add something to an existing container, you are out of luck, if the player has already emptied that container. There is no way to check for this. Find some other way to give the item to the player.
You should not use leveled items unless you know exactly what you are doing.
Notes
The encumbrance value is changed during the execution of AddItem, RemoveItem, when buying or selling, or when you pick up or drop items. This is only done once by adding or subtracting the weight of the items that are handled. If that gets messed up, the encumbrance value will be broken.
The maximum value of 32767 seems to be enough for normal items, but one could think of situations, where you want to add more (gold comes to mind). Split it up into several AddItem calls or write a separate script to deal with this. Buying or selling or picking up or dropping items does not have that limitation.
NPCs will always wear the best clothes and armor they have. If you add better clothes or armor (depending on the armor skills of the NPC) the NPC will wear these. This is also true if you add the better item with a negative count value. If the NPC is a merchant and you want him to sell the stuff, add it to a hidden chest he owns.
If you add a negative amount of leveled items to a merchants container, the randomness is calculated only once. Restocking will always add the same items.
Remember that the combination of RemoveItem and AddItem is the only way in scripting and dialog to transfer items between inventories. If an item has a script attached, this script will be started new for the new item and any data in local variables will be lost. The same is true for individual data like health, number of usage, magical charge. Buying or selling or the normal process of picking up or dropping an item do not have that problem.
Bugs
Calling AddItem with a count of 0 will create an error at runtime. Since scripts only accept literals this is only a problem, if you add items in a dialog using a global variable. Make sure the variable is not 0.
Using a variable for count in a script may even compile, but will result in a runtime error.
Adding a negative amount of items to the players inventory is bad. The player will receive a positive number of items, but the weight is subtracted. Bad, bad, bad... (Makes a nice encumbrance cheat, though...)
Not a Bug, but could lead to one in your mod: leveled items are only calculated before the player manipulates the content a container. Therefore you should add leveled item only to containers that have not been touched by the player. Otherwise the container will hold some unusable item with the name of your leveled list.
Related Functions
RemoveItem, GetItemCount (normal item handling)
AddSoulGem (adding filled soul gems)
Activate (pick up items)
OnActivate, OnPCAdd (react to the process of acquiring an item)
|
122
| 1,388
|
https://en.uesp.net/wiki/Tes3Mod:RemoveItem
|
Tes3Mod:RemoveItem
|
{{Morrowind Modding Functions Trail}}
'''RemoveItem'''
<pre>
RemoveItem, ObjectID, Count
Where: ObjectID = Object to remove from the calling item's inventory.
Count = Number of the object to remove (short).
Type: Object
Returns: none
Example: Player->RemoveItem, "Daedric_special", 1
Fargoth->RemoveItem, "ring_keley", 1
Scripts: lookoutScript
MagasScript
</pre>
Removes the given number of the item from the calling object but does not drop it. There is a potential for crashing the game
if you attempt to remove an item within its own script, i.e.,
<pre>
begin test_CrashScript
if (OnActivate == 1)
MessageBox "The item disappears before your eyes"
player->RemoveItem, "some_unique_item", 1
endif
end
</pre>
If this script was attached to the ''some_unique_item'' and the only instance of it was removed from the player's inventory, the game would crash. In order to successfully remove the item you will have to use a global script or from another object. You can successfully remove items that do not exist in the calling object's inventory. The RemoveItem function accepts a short count value which limits the number of items you can remove at a time to 65535 (or possibly 65534).
It appears that if you use RemoveItem from the player, the player's encumbrance is modified, whether or not they actually have the object. An interesting way to modify the amount the player can carry, especially in situations where uninstalled mods have caused the player to carry around 'missing items' (i.e., the player's encumbrance does not reach 0 when naked). Generally, though, you will not want to modify the player's encumbrance so check for the existence of items with the [[Morrowind Mod:GetItemCount|GetItemCount]] before you remove them.
There is a bug related to this function when adding/removing items from a container causing the container's contents to not be updated the second time items are added/removed. See [[Morrowind Mod:AddItem|AddItem]] for information on this.
Note that this function does accept global variables but only in dialogue results, not scripts.
See Also: [[Morrowind Mod:AddItem|AddItem]]
| 2,307,446
|
2021-01-07T23:46:26Z
|
HoodBot
|
RemoveItem
Removes the given number of the item from the calling object but does not drop it. There is a potential for crashing the game
if you attempt to remove an item within its own script, i.e.,
If this script was attached to the some_unique_item and the only instance of it was removed from the player's inventory, the game would crash. In order to successfully remove the item you will have to use a global script or from another object. You can successfully remove items that do not exist in the calling object's inventory. The RemoveItem function accepts a short count value which limits the number of items you can remove at a time to 65535 (or possibly 65534).
It appears that if you use RemoveItem from the player, the player's encumbrance is modified, whether or not they actually have the object. An interesting way to modify the amount the player can carry, especially in situations where uninstalled mods have caused the player to carry around 'missing items' (i.e., the player's encumbrance does not reach 0 when naked). Generally, though, you will not want to modify the player's encumbrance so check for the existence of items with the GetItemCount before you remove them.
There is a bug related to this function when adding/removing items from a container causing the container's contents to not be updated the second time items are added/removed. See AddItem for information on this.
Note that this function does accept global variables but only in dialogue results, not scripts.
See Also: AddItem
|
122
| 1,389
|
https://en.uesp.net/wiki/Tes3Mod:GetItemCount
|
Tes3Mod:GetItemCount
|
{{Morrowind Modding Functions Trail}}
'''GetItemCount'''
<pre>
GetItemCount, ObjectID
Where: ObjectID = ID of object to get the count for
Type: Object
Returns: short?
Example: if ( player->GetItemCount, "gold_001" == 11171 )
if ( GetItemCount, "blessed_shield" > 0 )
short ObjectCount
set ObjectCount to ( Player->GetItemCount, "wraithguard" )
Scripts: blueScript
DagothTaunt_1
</pre>
Returns the number of the objectID contained in the calling object. May not work correctly if the calling object has more than 32267 of the given item (unconfirmed).
There is a bug with this function when used on containers (possibly related to the [[Morrowind Mod:AddItem|AddItem]]/[[Morrowind Mod:RemoveItem|RemoveItem]] bug). If the player chooses the ''Take All'' button on the container then subsequent '''GetItemCount''' calls on the container will return the number of items in the container before the player took everything.
One way to get around this bug is to set the chest as persistant and use a temporary persistant ingredient in the chest. The persistant ingredient is hidden in the sense that it is added initially to the chest from a script, removed when the player opens the container, and added back again when the container is closed. See the below script for an example:
<pre>
begin HidePersistant
short doOnce
if ( onActivate == 1 )
RemoveItem, "PersistantIngredient", 1
set doOnce to 1
endif
if ( doOnce == 1 )
If ( onActivate == 1 )
; do nothing
elseif ( Activate == 1 )
; do nothing
elseif ( MenuMode == 1 )
; do nothing
else
AddItem, "PersistantIngredient", 1
Set doOnce to 0
return
endif
endif
end
</pre>
====bugs====
'''note:''' the following code in a global script causes crashes in my game as of 2005-04-11
<pre>
short grn
set grn to ( player->getitemcount, "misc_soulgem_grand" )
</pre>
however, this works (note the lack of a comma following getitemcount)
<pre>
short grn
set grn to ( player->getitemcount "misc_soulgem_grand" )
</pre>
--[[User:Halo112358|Halo112358]] 22:48, 11 Apr 2005 (EDT)
| 2,307,157
|
2021-01-07T23:44:18Z
|
HoodBot
|
GetItemCount
Returns the number of the objectID contained in the calling object. May not work correctly if the calling object has more than 32267 of the given item (unconfirmed).
There is a bug with this function when used on containers (possibly related to the AddItem/RemoveItem bug). If the player chooses the Take All button on the container then subsequent GetItemCount calls on the container will return the number of items in the container before the player took everything.
One way to get around this bug is to set the chest as persistant and use a temporary persistant ingredient in the chest. The persistant ingredient is hidden in the sense that it is added initially to the chest from a script, removed when the player opens the container, and added back again when the container is closed. See the below script for an example:
bugs
note: the following code in a global script causes crashes in my game as of 2005-04-11
however, this works (note the lack of a comma following getitemcount)
--Halo112358 22:48, 11 Apr 2005 (EDT)
|
122
| 1,390
|
https://en.uesp.net/wiki/Tes3Mod:Year
|
Tes3Mod:Year
|
{{Morrowind Modding Functions Trail}}
'''Year'''
<pre>
Year
Type: Time, Global
Returns: short
Example: if ( Year == 427 )
set sValue to ( OrigYear + Year )
Scripts:
</pre>
Global short variable which returns the current year in the game. The game starts in the year 427 (of the 3rd era of Tamriel, or 3E 427).
See Also: [[Morrowind Mod:Day|Day]], [[Morrowind Mod:GameHour|GameHour]], [[Morrowind Mod:Month|Month]]
| 2,307,791
|
2021-01-07T23:49:10Z
|
HoodBot
|
Year
Global short variable which returns the current year in the game. The game starts in the year 427 (of the 3rd era of Tamriel, or 3E 427).
See Also: Day, GameHour, Month
|
122
| 1,391
|
https://en.uesp.net/wiki/Tes3Mod:Month
|
Tes3Mod:Month
|
{{Morrowind Modding Functions Trail}}
'''Month'''
<pre>
Month
Type: Global, Time
Returns: short
Example: set CurrentMonth to Month
Scripts:
</pre>
Presumably the current month which ranges from 0 to 11. You can use the SET command to change the current month.
The Month variable ranges from 0-11, where 0 is the first month of the year (Morning Star), 1 is the second month of the year (Sun's Dawn), etc. The game starts in Last Seed, which is month 7 (the eighth month of the year).
Morrowind does have a bug where after a year ends, the month is rolled over to 1 (which is the second month of the year). There is a plugin-based fix for it, which you can download off of
[http://www.rpgplanet.com/morrowind/ Morrowind Summit], but of course the best fix is for Bethesda to repair the problem.
See Also: [[Morrowind Mod:Day|Day]], [[Morrowind Mod:GameHour|GameHour]], [[Morrowind Mod:Year|Year]]
| 2,307,362
|
2021-01-07T23:45:51Z
|
HoodBot
|
Month
Presumably the current month which ranges from 0 to 11. You can use the SET command to change the current month.
The Month variable ranges from 0-11, where 0 is the first month of the year (Morning Star), 1 is the second month of the year (Sun's Dawn), etc. The game starts in Last Seed, which is month 7 (the eighth month of the year).
Morrowind does have a bug where after a year ends, the month is rolled over to 1 (which is the second month of the year). There is a plugin-based fix for it, which you can download off of
Morrowind Summit, but of course the best fix is for Bethesda to repair the problem.
See Also: Day, GameHour, Year
|
122
| 1,392
|
https://en.uesp.net/wiki/Tes3Mod:Day
|
Tes3Mod:Day
|
{{Morrowind Modding Functions Trail}}
'''Day'''
<pre>
Day
Type: Time, Global
Returns: short
Example: if ( Day > 10 )
set sValue to ( OrigDay + Day )
Scripts: expelledMG
fraldScript
</pre>
Global short variable which returns the current day of the month in the game. This value can be modified using the SET command to change the day.
See Also: [[Morrowind Mod:DaysPassed|DaysPassed]], [[Morrowind Mod:GameHour|GameHour]], [[Morrowind Mod:Month|Month]], [[Morrowind Mod:Year|Year]]
| 2,307,037
|
2021-01-07T23:43:25Z
|
HoodBot
|
Day
Global short variable which returns the current day of the month in the game. This value can be modified using the SET command to change the day.
See Also: DaysPassed, GameHour, Month, Year
|
122
| 1,393
|
https://en.uesp.net/wiki/Tes3Mod:GameHour
|
Tes3Mod:GameHour
|
{{Morrowind Modding Functions Trail}}
'''GameHour'''
<pre>
GameHour
Type: Time
Returns: float
Example: if ( GameHour >= 18 )
set fValue to GameHour
Scripts: anoScript
sleeperScript
</pre>
Returns the current hour of the day in the game's time. The value is a floating point value that will be increased slightly on each frame. Game hour can be modified using the SET command to change the game time.
My favorite usage is on an item I created -- the Ring of Eternal Midnight -- which causes the GameHour to be set to 0.001 constantly once the day changes -- thus, once it becomes midnight, the ring will keep the game frozen at midnight until you remove it. When you do remove it, time will advance normally (even if you put the ring on again) until midnight is again reached.
Another good usage of setting GameHour directly is to make time pass. 'set GameHour to GameHour + 0.5' makes time advance a half-hour instantaneously. It correctly identifies new days, but I haven't yet tested whether or not it also correctly identifies time passed beyond a new day -- that is, if it is currently 11:59 PM, whether or not adding a half hour will make it 12:29 AM or simply 12:00 AM.
| 1,195,327
|
2013-05-28T16:24:24Z
|
Jeancey
|
GameHour
Returns the current hour of the day in the game's time. The value is a floating point value that will be increased slightly on each frame. Game hour can be modified using the SET command to change the game time.
My favorite usage is on an item I created -- the Ring of Eternal Midnight -- which causes the GameHour to be set to 0.001 constantly once the day changes -- thus, once it becomes midnight, the ring will keep the game frozen at midnight until you remove it. When you do remove it, time will advance normally (even if you put the ring on again) until midnight is again reached.
Another good usage of setting GameHour directly is to make time pass. 'set GameHour to GameHour + 0.5' makes time advance a half-hour instantaneously. It correctly identifies new days, but I haven't yet tested whether or not it also correctly identifies time passed beyond a new day -- that is, if it is currently 11:59 PM, whether or not adding a half hour will make it 12:29 AM or simply 12:00 AM.
|
122
| 1,394
|
https://en.uesp.net/wiki/Tes3Mod:DaysPassed
|
Tes3Mod:DaysPassed
|
{{Morrowind Modding Functions Trail}}
'''DaysPassed'''
<pre>
DaysPassed
Type: Time, Global, Tribunal
Returns: short
Example: if ( DaysPassed > 10 )
set sValue to ( OrigDay + DaysPassed )
Scripts: barAssScript
karrodMovement
</pre>
Global short variable which returns the total number of game days since the start of the game.
See Also: [[Morrowind Mod:Day|Day]], [[Morrowind Mod:GameHour|GameHour]], [[Morrowind Mod:Month|Month]], [[Morrowind Mod:Year|Year]]
| 2,307,038
|
2021-01-07T23:43:26Z
|
HoodBot
|
DaysPassed
Global short variable which returns the total number of game days since the start of the game.
See Also: Day, GameHour, Month, Year
|
122
| 1,395
|
https://en.uesp.net/wiki/Tes3Mod:AddSoulGem
|
Tes3Mod:AddSoulGem
|
{{Morrowind Modding Functions Trail}}
'''AddSoulGem'''
<pre>
AddSoulGem, CreatureID, SoulGemID
Where CreatureID = Creature whose soul you wish to add
SoulgemID = Type of soulgem to create. The game's soulgem IDs are
Misc_SoulGem_Azura
Misc_SoulGem_Grand
Misc_SoulGem_Greater
Misc_SoulGem_Common
Misc_SoulGem_Lesser
Misc_SoulGem_Petty
Type: Magic
Returns: none
Example: player->AddSoulGem, "golden saint", Misc_SoulGem_Grand
Scripts: Not Used
</pre>
Adds a filled soulgem to the calling object's inventory using the given creature and soulgem types.
See Also: [[Morrowind Mod:DropSoulGem|DropSoulGem]]
| 2,306,998
|
2021-01-07T23:42:59Z
|
HoodBot
|
AddSoulGem
Adds a filled soulgem to the calling object's inventory using the given creature and soulgem types.
See Also: DropSoulGem
|
122
| 1,396
|
https://en.uesp.net/wiki/Tes3Mod:DropSoulGem
|
Tes3Mod:DropSoulGem
|
{{Morrowind Modding Functions Trail}}
'''DropSoulGem'''
<pre>
DropSoulGem, CreatureID
Where: CreatureID = Creature to fill the soulgem with
Type: Magic
Returns: none
Example: DropSoulGem, "atronach_flame"
Scripts: Not Used
</pre>
Presumably causes the calling object to drop a filled soulgem with the given creature's soul. Presumably the type of soulgem is calculated automatically from the value of the creature's soul.
See Also: [[Morrowind Mod:AddSoulGem|AddSoulGem]]
| 2,307,055
|
2021-01-07T23:43:33Z
|
HoodBot
|
DropSoulGem
Presumably causes the calling object to drop a filled soulgem with the given creature's soul. Presumably the type of soulgem is calculated automatically from the value of the creature's soul.
See Also: AddSoulGem
|
156
| 1,398
|
https://en.uesp.net/wiki/Tes2Mod:DFRemake
|
Tes2Mod:DFRemake
|
{{Trail|DFRemake}}[[Category:Daggerfall Mod-Mods]]__NOTOC__
{{cleanup|Needs proper description and updating}}
This is the home page containing various design documents for the DarkBasic remake of Daggerfall. See the [http://dfworkshop.net/ Project Home Page] for more information.
== General Design ==
*[[Daggerfall:DFRemake/Roadmap|Roadmap]]
*[[Daggerfall:DFRemake/Gameplay Changes|Gameplay Changes]]
*[[Daggerfall:DFRemake/Definitions|Definitions]]
== DFELibrary ==
*[[Daggerfall:DFRemake/DFELibrary - 3d Objects|3d Objects]]
*[[Daggerfall:DFRemake/DFELibrary - BSA Files|BSA Files]]
== Resource Manager ==
*[[Daggerfall:DFRemake/Resource - Storing Data|Storing Data]]
*[[Daggerfall:DFRemake/Resource - Images|Images]]
*[[Daggerfall:DFRemake/Resource - Objects|3d Objects]]
*[[Daggerfall:DFRemake/Resource - Dungeon|Dungeon]]
*[[Daggerfall:DFRemake/Resource - Regions|Regions]]
== World Creation ==
*[[Daggerfall:DFRemake/Coordinate System|Coordinate System]]
*[[Daggerfall:DFRemake/Dungeon Building|Dungeon Building]]
*[[Daggerfall:DFRemake/Exterior Water|Exterior Water]]
*[[Daggerfall:DFRemake/Fractal Roads|Fractal Roads]]
*[[Daggerfall:DFRemake/Items|Items]]
== DarkBasic ==
*[[Daggerfall:DFRemake/DarkBasic Bugs|Bugs]]
*[[Daggerfall:DFRemake/DarkBasic Tips|Tips]]
*[[Daggerfall:DFRemake/DarkBasic Wishlist|Wishlist]]
*[[Daggerfall:DFRemake/DarkBasic Issues|Issues]]
| 2,439,342
|
2021-07-12T20:42:54Z
|
Dcsg
|
This is the home page containing various design documents for the DarkBasic remake of Daggerfall. See the Project Home Page for more information.
General Design
Roadmap
Gameplay Changes
Definitions
DFELibrary
3d Objects
BSA Files
Resource Manager
Storing Data
Images
3d Objects
Dungeon
Regions
World Creation
Coordinate System
Dungeon Building
Exterior Water
Fractal Roads
Items
DarkBasic
Bugs
Tips
Wishlist
Issues
|
156
| 1,399
|
https://en.uesp.net/wiki/Tes2Mod:DFRemake/Dungeon_Building
|
Tes2Mod:DFRemake/Dungeon Building
|
{{Trail|DFRemake}}
== Basic Information ==
Dungeons are composed of the following objects:
*3D Objects (from Arch3d.bsa)
*Dungeon Blocks (RDB files from Blocks.bsa)
*Dungeons (MapDItem files from Maps.bsa)
Objects and other dungeon data can be classified into the following categories:
*Static Objects (walls, rooms, etc...)
*Action Objects (anything that can move including doors, switches, platforms, etc...)
*Flat Objects (i.e. 2D sprites), though these may technically be included with Static Objects
*Actors (any NPC or monster in the dungeon, whether movable or not)
*Lights
*Exit Location(s) (unsure how exits are stored in the original DF data, but likely will need to be seperately stored in DB)
*Items (any item that can be picked up)
*Quest Locations (depending on the quest system design, may be included with items)
== Design Notes ==
*One dungeon can be loaded at a time within DB.
*The current dungeon will stay in memory until the next dungeon is needed. This will let players quickly re-enter a dungeon multiple times without needing to reload the dungeon data.
*The current dungeon will be hidden/disabled when the player is not inside it (there shouldn't be any performance issues doing this though we should check to confirm).
*If system resources (memory) are low, the current dungeon data can be cleared if not being used.
*Arrays of the basic objects (using custom types) will hold the various dungeon data (as listed above).
*Dungeons and dungeon blocks will not be cached but created as needed. Some speed tests need to be done concerning this but it seems not to be worth caching anything larger than 3d objects. Some time can be saved by caching blocks but at a significant expense of memory. There are also potential implementation issues regarding block caching that make it simpler to just not cache them.
*Dungeons and dungeon blocks will be composed of individual objects as opposed to using limbs. Using individual objects makes it easier to iterate through objects, especially for animation purpose. The only real advantage to using limbs is to retain the heirarchal structure of dungeon blocks which is only needed during the dungeon creation.
*Dungeon and block data will be first loaded within the DFELibrary and then passed onto DarkBasic as requested.
*State of action objects will need to be saved/restored between dungeon loads.
*Position of actors will need to be saved/restored between loads.
*Items will need to be saved/restored between loads.
*Player save games will have to include the action/actor/item states. A temporary 'save game' can be used during game play to store dungeon states as needed (if memory allows it could be stored in RAM, but since its only needed when entering a dungeon it may be a waste of resources).
*Creatures will respawn in visited dungeons over time (exact time to be determined).
*The first time a player visits a dungeon all the random monsters/items will be created within in. This is slightly different than DF which created random items the first time you viewed the item 'pile'. This reduces the exploit of saving/reloading to change the random items for an item pile. This does slightly increase the size needed for the dungeon state.
*Dungeons will be accessed by region index (0-60) and dungeon index. Must confirm how doors into dungeons reference the location in the original DF data. It could also be referenced by the location ID instead of index.
== ToDo ==
*How are we doing collision? I tried activating collision with dungeon objects and the camera but it didn't work.
*Must check how many lights are allowed at once (DB documentation says 7 which is far too few).
*How will creature respawn time be set? A global respawn time for all creatures or specific times for different creature types?
*Estimate amount of memory required to save the dungeon state. If the player visits 1000s of dungeons, how big will the save game get?
== Rough Timing ==
The following are some general times to load/create dungeon. Note that times were obtained in a debug/test build and are for rough comparison only.
<center>
{| border = "1" cellspacing = "0" cellpadding = "2"
|-
! style="background:#999999;" | '''Test'''
! style="background:#999999;" |'''Time'''
|-
|Complete Dungeon Load, including all objects and images
|850 ms
|-
|Complete Dungeon Load, reusing objects/images in cache
|350 ms
|-
|Load all Dungeon Records in a Region
|3 ms
|-
|Load a Dungeon Block
|2 - 3 ms
|-
|Create Objects from a Loaded Dungeon Block
|20 - 300 ms
|}
</center>
It seems the majority of time is spent actually creating the dungeon objects with little time required for low-level loading.
| 2,439,197
|
2021-07-12T20:33:43Z
|
Dcsg
|
Basic Information
Dungeons are composed of the following objects:
3D Objects (from Arch3d.bsa)
Dungeon Blocks (RDB files from Blocks.bsa)
Dungeons (MapDItem files from Maps.bsa)
Objects and other dungeon data can be classified into the following categories:
Static Objects (walls, rooms, etc...)
Action Objects (anything that can move including doors, switches, platforms, etc...)
Flat Objects (i.e. 2D sprites), though these may technically be included with Static Objects
Actors (any NPC or monster in the dungeon, whether movable or not)
Lights
Exit Location(s) (unsure how exits are stored in the original DF data, but likely will need to be seperately stored in DB)
Items (any item that can be picked up)
Quest Locations (depending on the quest system design, may be included with items)
Design Notes
One dungeon can be loaded at a time within DB.
The current dungeon will stay in memory until the next dungeon is needed. This will let players quickly re-enter a dungeon multiple times without needing to reload the dungeon data.
The current dungeon will be hidden/disabled when the player is not inside it (there shouldn't be any performance issues doing this though we should check to confirm).
If system resources (memory) are low, the current dungeon data can be cleared if not being used.
Arrays of the basic objects (using custom types) will hold the various dungeon data (as listed above).
Dungeons and dungeon blocks will not be cached but created as needed. Some speed tests need to be done concerning this but it seems not to be worth caching anything larger than 3d objects. Some time can be saved by caching blocks but at a significant expense of memory. There are also potential implementation issues regarding block caching that make it simpler to just not cache them.
Dungeons and dungeon blocks will be composed of individual objects as opposed to using limbs. Using individual objects makes it easier to iterate through objects, especially for animation purpose. The only real advantage to using limbs is to retain the heirarchal structure of dungeon blocks which is only needed during the dungeon creation.
Dungeon and block data will be first loaded within the DFELibrary and then passed onto DarkBasic as requested.
State of action objects will need to be saved/restored between dungeon loads.
Position of actors will need to be saved/restored between loads.
Items will need to be saved/restored between loads.
Player save games will have to include the action/actor/item states. A temporary 'save game' can be used during game play to store dungeon states as needed (if memory allows it could be stored in RAM, but since its only needed when entering a dungeon it may be a waste of resources).
Creatures will respawn in visited dungeons over time (exact time to be determined).
The first time a player visits a dungeon all the random monsters/items will be created within in. This is slightly different than DF which created random items the first time you viewed the item 'pile'. This reduces the exploit of saving/reloading to change the random items for an item pile. This does slightly increase the size needed for the dungeon state.
Dungeons will be accessed by region index (0-60) and dungeon index. Must confirm how doors into dungeons reference the location in the original DF data. It could also be referenced by the location ID instead of index.
ToDo
How are we doing collision? I tried activating collision with dungeon objects and the camera but it didn't work.
Must check how many lights are allowed at once (DB documentation says 7 which is far too few).
How will creature respawn time be set? A global respawn time for all creatures or specific times for different creature types?
Estimate amount of memory required to save the dungeon state. If the player visits 1000s of dungeons, how big will the save game get?
Rough Timing
The following are some general times to load/create dungeon. Note that times were obtained in a debug/test build and are for rough comparison only.
It seems the majority of time is spent actually creating the dungeon objects with little time required for low-level loading.
|
156
| 1,400
|
https://en.uesp.net/wiki/Tes2Mod:DFRemake/Roadmap
|
Tes2Mod:DFRemake/Roadmap
|
{{Trail|DFRemake}}
The following is a basic development roadmap, without any time estimates, of how we see the project being done. Keep in mind that this is currently a rough guide only and subject to change.
== v0.1 ==
'''Goal:''' Playable exploration of a dungeon spanning multiple blocks, with collision, water, sound, and scripted objects such as elevators. No equipment, inventory, chargen, enemies, etc.
'''Assets:'''
*Loading of a Daggerfall dungeon with 3d objects, sprites (flats), lights, and water data.
*Collision functioning on dynamically selected world objects.
*World block handling system (loading and dropping dungeon blocks as necessary).
*Dynamic lighting system.
*Rudimentary scripting system handling dynamic objects (elevators).
*Water physics as with Daggerfall.
*Sounds for footsteps and swimming; dynamic dungeon sounds, etc; possibly EAX implemented.
*Doors.
*Wide variety of display options, remappable controls, etc.
*Climbing (not skill controlled).
== v0.2 ==
'''Goal:''' Playable exploration of a dungeon as before with character generation, statistics and skills, inventory, equipment, item piles, and damage from falling and drowning.
'''Assets:'''
*Character generation with all races, appearances, allotted items, etc.
*Item system, including leveled random item generation, gold, equipment, and tracking pregenerated items out of active world range.
*Statistics and skills affecting gameplay, as with speed and running dictating movement speed, jumping controlling jump height and distance, etc.
*Health and stamina dynamic loss and recovery with resting.
== v0.3 ==
'''Goal:''' Playable exploration and combat in a dungeon, as before with enemies, weapons, stealth, working combat skills, and skill increases with leveling.
'''Assets:'''
*"Enemy-class" dynamic sprites loading and displaying in the world.
*AI working for multiple enemies at once, with path finding, LOD, vision range, etc.
*Stealth based on movement speed, stealth skill and lighting.
*All weapon classes, including bows, functioning in the game world.
*Backstabs, critical strikes, blocking, dodging, and all other combat-oriented skills working.
*All skills increase with use; leveling up with allotting statistics implemented.
== v0.4 ==
'''Goal:''' Playable dungeon as before, with spellmaking, enchanted items, enemy casting and magical effects, item enchanting, and game saving/loading.
'''Assets:'''
*Most to all spell effects planned working and able to be used in the spellmaker, including soul trapping, mark and recall, etc.
*Enchanting system with all enchantment effects and support for soul gems.
*Use of magic items and casting affected by spell skills.
*Enemy AI takes into account magic and uses it.
*Enemies use magic system effects such as spider's paralysis.
*Saving and loading of games, ideally in a modular system that can be supported by later versions.
== v0.5 ==
'''Goal:''' Complete exploration of the game world with fast travel, overland and dungeons, without cities, taverns, temples or covens.
'''Assets:'''
*Dynamic world system with support for climate-based decals, textures and height and dungeon entrances.
*Day/night and year cycles affecting the sky, fog, ambience, and weather.
*Fast travel map allowing travel to any location in the game world instead of sites.
*Climate-based overland enemy generation.
*Memory and save system handling the entire world.
== v0.6 ==
'''Goal:''' As before with all sites and 'flat' NPCs with dialogue and working shops, banks, and trainers, spellmakers and enchanters; no guild system, exterior 'walking NPCs', or justice system.
'''Assets:'''
*Loading of exterior world cells such as cities with 3d objects and flats.
*Fast movement between interiors of houses and the exterior game world.
*Fast travel to specific sites.
*Basic dialogue including asking about places and rumors, affected by persuasion skills and reputations.
*Buying and selling of items through store shelves and merchants, calculating shop quality.
*Full working bank system, including letters of credit.
== v0.7 ==
'''Goal:''' Addition of exterior NPCs, taverns, guards and a justice system and basic dungeon quests.
'''Assets:'''
*Affiliations with guilds, with advancement and quests given; access must now be earned to guild assets.
*Dungeons are now hidden by default.
*Scripting system to handle basic quests revealing dungeon locations with item and monster goals.
*Quest objects supported by the inventory.
*Exterior NPCs with very basic AI, guards, and PC crime level.
*City gates close at night, loitering is a crime.
*Inn rooms can be rented.
== v0.8 ==
'''Goal:''' Addition of general quests from commonfolk and nobility, a complete scripting system with all types of quests from guilds supported, guild affiliations affecting NPC reactions, and complete NPC memory.
'''Assets:'''
*Support for asking after work in dialogue.
*Quests from general and noble types.
*Solid scripting system capable of very complex quests.
*Area-based reactions and individual memory for NPC memory make NPC reactions as in the final game.
*Rumor system.
*Logbook and notebook working as in the final game.
== v0.9 ==
'''Goal:''' "Feature Complete" working game.
'''Assets:'''
*Lycanthropy and vampirism with cinematics, gameplay effects, quests, etc.
*Daedra summoning with requisite quests and artifacts.
*All artifacts implemented into the game.
*Main quest complete to finish.
== v1.0 ==
'''Goal:''' Complete, stable, modifiable game, ideally with prepared translated versions.
'''Assets:'''
*A lot of testing and fixing.
__NOTOC__
| 2,439,261
|
2021-07-12T20:33:47Z
|
Dcsg
|
The following is a basic development roadmap, without any time estimates, of how we see the project being done. Keep in mind that this is currently a rough guide only and subject to change.
v0.1
Goal: Playable exploration of a dungeon spanning multiple blocks, with collision, water, sound, and scripted objects such as elevators. No equipment, inventory, chargen, enemies, etc.
Assets:
Loading of a Daggerfall dungeon with 3d objects, sprites (flats), lights, and water data.
Collision functioning on dynamically selected world objects.
World block handling system (loading and dropping dungeon blocks as necessary).
Dynamic lighting system.
Rudimentary scripting system handling dynamic objects (elevators).
Water physics as with Daggerfall.
Sounds for footsteps and swimming; dynamic dungeon sounds, etc; possibly EAX implemented.
Doors.
Wide variety of display options, remappable controls, etc.
Climbing (not skill controlled).
v0.2
Goal: Playable exploration of a dungeon as before with character generation, statistics and skills, inventory, equipment, item piles, and damage from falling and drowning.
Assets:
Character generation with all races, appearances, allotted items, etc.
Item system, including leveled random item generation, gold, equipment, and tracking pregenerated items out of active world range.
Statistics and skills affecting gameplay, as with speed and running dictating movement speed, jumping controlling jump height and distance, etc.
Health and stamina dynamic loss and recovery with resting.
v0.3
Goal: Playable exploration and combat in a dungeon, as before with enemies, weapons, stealth, working combat skills, and skill increases with leveling.
Assets:
"Enemy-class" dynamic sprites loading and displaying in the world.
AI working for multiple enemies at once, with path finding, LOD, vision range, etc.
Stealth based on movement speed, stealth skill and lighting.
All weapon classes, including bows, functioning in the game world.
Backstabs, critical strikes, blocking, dodging, and all other combat-oriented skills working.
All skills increase with use; leveling up with allotting statistics implemented.
v0.4
Goal: Playable dungeon as before, with spellmaking, enchanted items, enemy casting and magical effects, item enchanting, and game saving/loading.
Assets:
Most to all spell effects planned working and able to be used in the spellmaker, including soul trapping, mark and recall, etc.
Enchanting system with all enchantment effects and support for soul gems.
Use of magic items and casting affected by spell skills.
Enemy AI takes into account magic and uses it.
Enemies use magic system effects such as spider's paralysis.
Saving and loading of games, ideally in a modular system that can be supported by later versions.
v0.5
Goal: Complete exploration of the game world with fast travel, overland and dungeons, without cities, taverns, temples or covens.
Assets:
Dynamic world system with support for climate-based decals, textures and height and dungeon entrances.
Day/night and year cycles affecting the sky, fog, ambience, and weather.
Fast travel map allowing travel to any location in the game world instead of sites.
Climate-based overland enemy generation.
Memory and save system handling the entire world.
v0.6
Goal: As before with all sites and 'flat' NPCs with dialogue and working shops, banks, and trainers, spellmakers and enchanters; no guild system, exterior 'walking NPCs', or justice system.
Assets:
Loading of exterior world cells such as cities with 3d objects and flats.
Fast movement between interiors of houses and the exterior game world.
Fast travel to specific sites.
Basic dialogue including asking about places and rumors, affected by persuasion skills and reputations.
Buying and selling of items through store shelves and merchants, calculating shop quality.
Full working bank system, including letters of credit.
v0.7
Goal: Addition of exterior NPCs, taverns, guards and a justice system and basic dungeon quests.
Assets:
Affiliations with guilds, with advancement and quests given; access must now be earned to guild assets.
Dungeons are now hidden by default.
Scripting system to handle basic quests revealing dungeon locations with item and monster goals.
Quest objects supported by the inventory.
Exterior NPCs with very basic AI, guards, and PC crime level.
City gates close at night, loitering is a crime.
Inn rooms can be rented.
v0.8
Goal: Addition of general quests from commonfolk and nobility, a complete scripting system with all types of quests from guilds supported, guild affiliations affecting NPC reactions, and complete NPC memory.
Assets:
Support for asking after work in dialogue.
Quests from general and noble types.
Solid scripting system capable of very complex quests.
Area-based reactions and individual memory for NPC memory make NPC reactions as in the final game.
Rumor system.
Logbook and notebook working as in the final game.
v0.9
Goal: "Feature Complete" working game.
Assets:
Lycanthropy and vampirism with cinematics, gameplay effects, quests, etc.
Daedra summoning with requisite quests and artifacts.
All artifacts implemented into the game.
Main quest complete to finish.
v1.0
Goal: Complete, stable, modifiable game, ideally with prepared translated versions.
Assets:
A lot of testing and fixing.
|
156
| 1,401
|
https://en.uesp.net/wiki/Tes2Mod:DFRemake/Gameplay_Changes
|
Tes2Mod:DFRemake/Gameplay Changes
|
{{Trail|DFRemake}}
This page lists the major changes in design and gameplay from the original game. While we don't wish to change the gameplay too much, there are a number of improvements that can be done.
== Dialogue ==
*NPCs will not be able to point the way to Thieves Guild's or Dark Brotherhoods related to quests (which will already be marked on the player's map anyways).
*NPCs' knowledge of quest goal players or houses will be based on their faction affiliations.
== Dungeons ==
*Dungeons will not 'regenerate' when re-entered after having been explored. Monsters will respawn after a certain duration of time.
*Dungeon auto-maps will not be lost after leaving them.
== Character Creation ==
*Characters can not chose more than one 'lower/no magic ability in <>' disadvantage.
== Crime ==
*House doors in cities use 'real' locks with difficulty levels rather than being opened by any successful lockpicking roll.
*Lockpicking takes time to attempt, but can be used infinite times on doorways to try to open them. Players are informed when they have a 0% chance of success.
*Players will be kicked out of shops if they loiter past their closing hours.
*Players are simply not allowed to loiter in a city rather than having guards set after them for it.
*Bashing or lockpicking your own ship or house door is no longer a crime.
*Players will go to court with the crime of resisting arrest instead of dying when defeated by guards (as it occassionaly happened in the original game).
== Enemies ==
*Spriggans will ressurect themselves twice as documented in the manual.
*Atronach will have elemental auras as in the manual.
*Undead take damage from sunlight as in the manual and partially in the game. This will also have the effect of making the Daggerfall undead dissapear at the appropriate time.
== General ==
*Monsters encountered in the wilderness will not always appear directly in front of the player.
*General stores will have only one horse and cart each for game balance purposes when broken into.
*Your house contains hold and keep items.
*Map annotations will appear in the form of nodes which show text when moused over, as in Morrowind, making the automap more managable.
*The timer for equipping weapons does not run when the game is paused.
*Daedra Lords will not ask to be summoned again when they can not offer another quest; nor will they grant a quest with a goal of an artifact the player has already found.
*Banks will set a local crime level on a player and send out bounty hunters all over the Illiac Bay for defaulting on a loan.
*The bank 'trust' system will be somehow tweaked so that so that vast amounts of money cannot be immediatly loaned from countries the player has just visited.
== Guilds ==
*The Warrior's Guild will be open at all hours, making its 24-hour room and board actually useful.
*Guilds give an overview of all available resources when you request to join.
== Law and Order ==
*Commiting a crime when any NPC can see you instantly puts a bounty on your head, instead of only being calculated when a guard catches you.
*Guards have to come within a certain distance of the player to threaten to arrest them, rather than doing so when the player takes any kind of damage and is being chased by guards.
*Crimes stack on top of each other rather than replacing each other and are all taken into account in jail time or fines.
*Killing guards is a huge crime.
*Anyone considered 'scum' by a region has guards set after them immediatly.
== Spells ==
*Create Item will create temporary items as in the manual.
*The light spell will not go through objects when you get too close to them.
| 2,439,203
|
2021-07-12T20:33:43Z
|
Dcsg
|
This page lists the major changes in design and gameplay from the original game. While we don't wish to change the gameplay too much, there are a number of improvements that can be done.
Dialogue
NPCs will not be able to point the way to Thieves Guild's or Dark Brotherhoods related to quests (which will already be marked on the player's map anyways).
NPCs' knowledge of quest goal players or houses will be based on their faction affiliations.
Dungeons
Dungeons will not 'regenerate' when re-entered after having been explored. Monsters will respawn after a certain duration of time.
Dungeon auto-maps will not be lost after leaving them.
Character Creation
Characters can not chose more than one 'lower/no magic ability in <>' disadvantage.
Crime
House doors in cities use 'real' locks with difficulty levels rather than being opened by any successful lockpicking roll.
Lockpicking takes time to attempt, but can be used infinite times on doorways to try to open them. Players are informed when they have a 0% chance of success.
Players will be kicked out of shops if they loiter past their closing hours.
Players are simply not allowed to loiter in a city rather than having guards set after them for it.
Bashing or lockpicking your own ship or house door is no longer a crime.
Players will go to court with the crime of resisting arrest instead of dying when defeated by guards (as it occassionaly happened in the original game).
Enemies
Spriggans will ressurect themselves twice as documented in the manual.
Atronach will have elemental auras as in the manual.
Undead take damage from sunlight as in the manual and partially in the game. This will also have the effect of making the Daggerfall undead dissapear at the appropriate time.
General
Monsters encountered in the wilderness will not always appear directly in front of the player.
General stores will have only one horse and cart each for game balance purposes when broken into.
Your house contains hold and keep items.
Map annotations will appear in the form of nodes which show text when moused over, as in Morrowind, making the automap more managable.
The timer for equipping weapons does not run when the game is paused.
Daedra Lords will not ask to be summoned again when they can not offer another quest; nor will they grant a quest with a goal of an artifact the player has already found.
Banks will set a local crime level on a player and send out bounty hunters all over the Illiac Bay for defaulting on a loan.
The bank 'trust' system will be somehow tweaked so that so that vast amounts of money cannot be immediatly loaned from countries the player has just visited.
Guilds
The Warrior's Guild will be open at all hours, making its 24-hour room and board actually useful.
Guilds give an overview of all available resources when you request to join.
Law and Order
Commiting a crime when any NPC can see you instantly puts a bounty on your head, instead of only being calculated when a guard catches you.
Guards have to come within a certain distance of the player to threaten to arrest them, rather than doing so when the player takes any kind of damage and is being chased by guards.
Crimes stack on top of each other rather than replacing each other and are all taken into account in jail time or fines.
Killing guards is a huge crime.
Anyone considered 'scum' by a region has guards set after them immediatly.
Spells
Create Item will create temporary items as in the manual.
The light spell will not go through objects when you get too close to them.
|
156
| 1,403
|
https://en.uesp.net/wiki/Tes2Mod:DFRemake/DFELibrary_-_BSA_Files
|
Tes2Mod:DFRemake/DFELibrary - BSA Files
|
{{Trail|DFRemake}}
*[[Daggerfall:DFRemake/DFELibrary - General BSA|General BSA]]
*[[Daggerfall:DFRemake/DFELibrary - Arch3d.bsa|Arch3d.bsa]]
*[[Daggerfall:DFRemake/DFELibrary - Blocks.bsa|Blocks.bsa]]
*[[Daggerfall:DFRemake/DFELibrary - Maps.bsa|Maps.bsa]]
| 2,439,173
|
2021-07-12T20:33:38Z
|
Dcsg
|
General BSA
Arch3d.bsa
Blocks.bsa
Maps.bsa
|
156
| 1,404
|
https://en.uesp.net/wiki/Tes2Mod:DFRemake/DFELibrary_-_General_BSA
|
Tes2Mod:DFRemake/DFELibrary - General BSA
|
{{Trail|DFRemake}}
== General Design Notes ==
There are a number of BSA files used in Daggerfall that all have the same basic structure, though containing different data. These include:
*[[Daggerfall:DFRemake/DFELibrary - Arch3d.bsa|Arch3d.bsa]]: 3d objects
*[[Daggerfall:DFRemake/DFELibrary - Blocks.bsa|Blocks.bsa]]: Block information (tells how objects are combined into larger block structures)
*[[Daggerfall:DFRemake/DFELibrary - Maps.bsa|Maps.bsa]]: Overall town/dungeon maps (tells how blocks are combined to make a single location)
*Dagger.snd: Sound data (is a BSA even though the extension is different)
== Exported Functions ==
There are no general BSA exported functions in the library.
== Error Codes ==
The following table lists the general BSA error codes:
{| border="1" cellpadding="1" cellspacing="0" align="center"
|-
! style="background:#999999;" |'''Error Code'''
! style="background:#999999;" |'''Value'''
! style="background:#999999;" |'''Description'''
|-
|DFERR_BSABADDIRTYPE
| -601
|Invalid directory type found in the BSA file.
|-
|DFERR_BSANOTFOUND
| -602
|A BSA entry was not found.
|-
|DFERR_BSAREADONLY
| -603
|BSA files must be opened for reading. Writing BSA files is not currently supported.
|-
|DFERR_BSANUMFILES
| -604
|Invalid number of files in the given BSA.
|}
| 2,439,177
|
2021-07-12T20:33:39Z
|
Dcsg
|
General Design Notes
There are a number of BSA files used in Daggerfall that all have the same basic structure, though containing different data. These include:
Arch3d.bsa: 3d objects
Blocks.bsa: Block information (tells how objects are combined into larger block structures)
Maps.bsa: Overall town/dungeon maps (tells how blocks are combined to make a single location)
Dagger.snd: Sound data (is a BSA even though the extension is different)
Exported Functions
There are no general BSA exported functions in the library.
Error Codes
The following table lists the general BSA error codes:
|
156
| 1,405
|
https://en.uesp.net/wiki/Tes2Mod:DFRemake/DFELibrary_-_Arch3d.bsa
|
Tes2Mod:DFRemake/DFELibrary - Arch3d.bsa
|
{{Trail|DFRemake}}
Arch3d.bsa contains 10251 3d object files which are used to build dungeon/location blocks.
== General Design Notes ==
*The arch3d file directory will be loaded the first time a 3d object is requested.
*One 3d object will be loaded at a time.
*Objects will be accessed/loaded by their directory value (DWORD).
== Error Codes ==
The following table lists the Arch3d.bsa related error codes:
{| border="1" cellpadding="1" cellspacing="0" align="center"
|-
! style="background:#999999;" | Error Code
! style="background:#999999;" | Value
! style="background:#999999;" | Description
|-
|DFERR_BAD3DOBJECT
| -701
|The given 3D object file has an invalid format.
|-
|DFERR_NO3DOBJECT
| -702
|There is no current 3d object loaded!
|}
== Functions ==
*[[Daggerfall:DFRemake/DFELoad3dObject|DFELoad3dObject]] : Main function to load a 3d object.
*[[Daggerfall:DFRemake/DFEHas3dObject|DFEHas3dObject]] : Checks for a currently loaded 3d object
*[[Daggerfall:DFRemake/DFEGetFirst3dObject|DFEGetFirst3dObject]] : Start iterating through all objects in arch3d.bsa.
*[[Daggerfall:DFRemake/DFEGetNext3dObject|DFEGetNext3dObject]] : Continue iterating through all objects in arch3d.bsa.
*[[Daggerfall:DFRemake/DFEGet3dObjectSize|DFEGet3dObjectSize]] : Get the memblock size in bytes for object conversion.
*[[Daggerfall:DFRemake/DFEGetFirst3dTexture|DFEGetFirst3dTexture]] : Start iterating through all textures in the current 3d object.
*[[Daggerfall:DFRemake/DFEGetNext3dTexture|DFEGetNext3dTexture]] : Continue iterating through all textures in the current 3d object.
*[[Daggerfall:DFRemake/DFEGet3dObjectMesh|DFEGet3dObjectMesh]] : Convert the current 3d object into a single DB mesh (no textures).
*[[Daggerfall:DFRemake/DFEGetFirst3dMemblock|DFEGetFirst3dMemblock]] : Start converting faces with the same texture to DB objects.
*[[Daggerfall:DFRemake/DFEGetNext3dMemblock|DFEGetNext3dMemblock]] : Continue converting faces with the same texture to DB objects.
| 2,439,171
|
2021-07-12T20:33:38Z
|
Dcsg
|
Arch3d.bsa contains 10251 3d object files which are used to build dungeon/location blocks.
General Design Notes
The arch3d file directory will be loaded the first time a 3d object is requested.
One 3d object will be loaded at a time.
Objects will be accessed/loaded by their directory value (DWORD).
Error Codes
The following table lists the Arch3d.bsa related error codes:
Functions
DFELoad3dObject : Main function to load a 3d object.
DFEHas3dObject : Checks for a currently loaded 3d object
DFEGetFirst3dObject : Start iterating through all objects in arch3d.bsa.
DFEGetNext3dObject : Continue iterating through all objects in arch3d.bsa.
DFEGet3dObjectSize : Get the memblock size in bytes for object conversion.
DFEGetFirst3dTexture : Start iterating through all textures in the current 3d object.
DFEGetNext3dTexture : Continue iterating through all textures in the current 3d object.
DFEGet3dObjectMesh : Convert the current 3d object into a single DB mesh (no textures).
DFEGetFirst3dMemblock : Start converting faces with the same texture to DB objects.
DFEGetNext3dMemblock : Continue converting faces with the same texture to DB objects.
|
156
| 1,406
|
https://en.uesp.net/wiki/Tes2Mod:File_Formats
|
Tes2Mod:File Formats
|
{{trail}}
{{Bullet Link|Text Record Format|Description of the format used for the text records used in the game.}}
:{{Bullet Link|TEXT.RSC format|Describes the structure of the file TEXT.RSC (uses Text Record Format).}}
::{{Bullet Link|TEXT.RSC indices|Lists the indices of texts in the TEXT.RSC file.}}
:{{Bullet Link|Book format|The almost complete format to the book files found in the ARENA2\BOOKS directory (uses Text Record Format).}}
{{Bullet Link|Quest hacking guide|A text file detailing the formats of the QRC and QBN files which contain the quest data (uses Text Record Format).}}
:{{Bullet Link|Quest pseudo-codes|Lengthy description of the OpCodes section used in the QBN quest files to script the game engine.}}
:{{Bullet Link|Building types|List of town building type codes (used by MAPS.BSA and BLOCKS.BSA, as well as the Quest hacking guide).}}
:{{Bullet Link|Mobile types|The list of all (known) type codes for the mobiles found in Daggerfall.}}
:{{Bullet Link|Text Variable Hashes|The list of all (known) text variables ("_<var>string</var>_" through "____<var>string</var>_") and their associated hash.}}
{{Bullet Link|BSA file formats|Description of the various BSA files, which contain most of the map and 3D object information for the game.}}
:{{Bullet Link|ARCH3D.BSA|Description of the 3D objects database used by the game to generate the scene.}}
::{{Bullet Link|UV texture coordinates|Description of how Daggerfall works with textures on the various models and meshes.}}
:{{Bullet Link|BLOCKS.BSA|Description of the "prefabs" used to create the towns and dungeons in the game.}}
::{{Bullet Link|BLOCKS.BSA/Map Block Records|Description of exterior data records.}}
::{{Bullet Link|BLOCKS.BSA/Dungeon Block Records|Description of dungeon interior data records.}}
::{{Bullet Link|Angle Mathematics|Description of how Daggerfall stores and works with angles.}}
:{{Bullet Link|MAPS.BSA|Description of the overland map database, which is the "world map" of the game.}}
::{{Bullet Link|Region Numbers|List of all overland map areas and their indices used in the game (used by MAPS.BSA).}}
::{{Bullet Link|Location types|List of overland map location type codes(used by MAPS.BSA, and the Quest hacking guide).}}
::{{Bullet Link|Block Record Indexes|Logic used for determining which records from [[Daggerfall Mod:BLOCKS.BSA|BLOCKS.BSA]] to load.}}
{{Bullet Link|WOODS.WLD format|Description of the WOODS.WLD format which appears to give information about the creation of landscape within the game.}}
{{Bullet Link|PAK file formats|Describes the PAK compression algorithm and lists the files which make use of it.}}
:{{Bullet Link|CLIMATE.PAK|Description of the format and purpose of the CLIMATE.PAK file, which determines the textures used for overland locations.}}
:{{Bullet Link|POLITIC.PAK|Description of the format and purpose of the POLITIC.PAK file, which determines which factions own which areas of the Iliac Bay.}}
{{Bullet Link|Image formats|Close to complete formats for all of the [[Daggerfall Mod:Image formats/Palette|Palette]], [[Daggerfall Mod:Image formats/Colour Translation|Colour Translation]], [[Daggerfall Mod:Image formats/RCI|RCI]], [[Daggerfall Mod:Image formats/SKY|SKY]], [[Daggerfall Mod:Image formats/IMG|IMG]], [[Daggerfall Mod:Image formats/CIF|CIF]], and [[Daggerfall Mod:Image formats/Texture|Texture]] files.}}
{{Bullet Link|BIOG??T0.TXT Files|A compendium of information on how to edit those files which affect the character creation process.}}
{{Bullet Link|SAVEGAME.DAT description|A good partially complete description of the format and structure of the save game file.}}
:{{Bullet Link|Save Game Offsets|A close to complete listing of hex offsets and their description in save games.}}
{{Bullet Link|MAGIC.DEF indices|Index and analysis for this file.}}
:{{Bullet Link|Custom Artifacts|Information on the format of the MAGIC.DEF and how to add artifacts into the game.}}
{{Bullet Link|SPELLS.STD indices|Index codes for the spells in the game.}}
{{Bullet Link|Hacking FALL.EXE|How to allow attributes and skills to exceed 100 by hacking the v1.07.213 FALL.EXE file.}}
:{{Bullet Link|Hacking Items|A very complete guide telling one how to change around item images to those not normally seen in the game.}}
{{Bullet Link|FACTION.TXT/Ruler|{{huh}}}}
{{Bullet Link|SaveTree.Dat|{{huh}}}}
{{Bullet Link|FLATS.CFG|{{huh}}}}
| 2,309,157
|
2021-01-08T00:01:31Z
|
HoodBot
|
:
::
:
:
:
:
:
:
::
:
::
::
::
:
::
::
::
:
:
:
:
:
|
122
| 1,407
|
https://en.uesp.net/wiki/Tes3Mod:AddSpell
|
Tes3Mod:AddSpell
|
{{Morrowind Modding Functions Trail}}
'''AddSpell'''
<pre>
AddSpell, SpellID
Where SpellID = Spell you wish to add to the target (known or affect spells).
Type: Magic
Returns: none
Example: player->AddSpell, "alit bite" (add to known spell list)
AddSpell, "ash woe blight" (add curse to spells affecting target)
"adairan lalansour"->AddSpell, "Ogrul's_Lucky_Again"
Scripts: CorprusOnPC
diseaseChills
</pre>
This function adds the given spell to the calling object. If the spell is a normal spell, it will be added to the list of the actor's known spells. If the spell is a curse/disease it will be added to the list of spells currently affecting the calling actor. Use RemoveSpell to remove spells added by AddSpell.
A bug related to this function is that if you add a curse type spell to a creature, then any other creature of that type you encounter from that point on will also be affected by that curse. To fix this simply call [[Morrowind Mod:RemoveSpell|RemoveSpell]] in an [[Morrowind Mod:OnDeath|OnDeath]] clause in a script attached to the creature. The fact that this happens in the first place suggests that the spell is added to the creature definition, and not just that particular instance of the creature.
See Also: [[Morrowind Mod:RemoveSpell|RemoveSpell]]
| 2,306,999
|
2021-01-07T23:42:59Z
|
HoodBot
|
AddSpell
This function adds the given spell to the calling object. If the spell is a normal spell, it will be added to the list of the actor's known spells. If the spell is a curse/disease it will be added to the list of spells currently affecting the calling actor. Use RemoveSpell to remove spells added by AddSpell.
A bug related to this function is that if you add a curse type spell to a creature, then any other creature of that type you encounter from that point on will also be affected by that curse. To fix this simply call RemoveSpell in an OnDeath clause in a script attached to the creature. The fact that this happens in the first place suggests that the spell is added to the creature definition, and not just that particular instance of the creature.
See Also: RemoveSpell
|
156
| 1,408
|
https://en.uesp.net/wiki/Tes2Mod:DFRemake/DFELibrary_-_3d_Objects
|
Tes2Mod:DFRemake/DFELibrary - 3d Objects
|
{{Trail|DFRemake}}
See [[Daggerfall:DFRemake/DFELibrary - Arch3d.bsa|Arch3d.bsa]] for more information.
== Error Codes ==
The following are the 3d object specific error codes. Note that these errors may be superceded by the Arch3d error DFERR_BAD3DOBJECT.
{| border="1" cellpadding="1" cellspacing="0" align="center"
|-
! style="background:#999999;" | Error
! style="background:#999999;" | Code
! style="background:#999999;" | Description
|-
|DFERR_3D_READPASTEND
| -801
|Read past the end of the 3d object.
|-
|DFERR_3D_READPASTSTART
| -802
|Read past the start of the 3d object.
|-
|DFERR_3D_DATA2SUBRECORD
| -803
|Invalid data2 sub-record offset found.
|-
|DFERR_3D_BADVERSION
| -804
|Unknown 3D object version. Only 2.5, 2.6 and 2.7 object versions are supported.
|-
|DFERR_3D_BADHEADER
| -805
|Failed to read the 3d object header.
|-
|DFERR_3D_BADPOINTS
| -806
|Failed to read the 3d object point data.
|-
|DFERR_3D_BADFACES
| -807
|Failed to read the 3d object face data.
|-
|DFERR_3D_BADNORMALS
| -808
|Failed to read the 3d object normal data.
|-
|DFERR_3D_BADDATA1
| -809
|Failed to read the 3d object data1 data.
|-
|DFERR_3D_BADDATA2
| -810
|Failed to read the 3d object data2 data.
|}
| 2,439,169
|
2021-07-12T20:33:38Z
|
Dcsg
|
See Arch3d.bsa for more information.
Error Codes
The following are the 3d object specific error codes. Note that these errors may be superceded by the Arch3d error DFERR_BAD3DOBJECT.
|
122
| 1,409
|
https://en.uesp.net/wiki/Tes3Mod:RemoveSpell
|
Tes3Mod:RemoveSpell
|
{{Morrowind Modding Functions Trail}}
'''RemoveSpell'''
<pre>
RemoveSpell, SpellID
Where SpellID = Spell to remove
Type: Magic
Returns: none
Example: Player->RemoveSpell, "Vampire Attributes"
RemoveSpell, stamina
Scripts: Vampire_Cure_PC
diseaseAshChancre
</pre>
Removes the spell from the calling actors known spell list or affecting spells. If the spell is a normal spell, it is removed from the actor's list of known spells. If the spell is a curse/disease it is removed from the list of spells currently affecting the actor.
A bug vaguely related to this function is that if a creature dies with a curse type spell on it, then any other creature of that type you encounter from that point on will also be affected by that curse. To fix this simply call RemoveSpell in an [[Morrowind Mod:OnDeath|OnDeath]] clause in a script attached to the creature. The fact that this happens in the first place suggests that the spell is added to the creature definition, and not just that particular instance of the creature.
See Also: [[Morrowind Mod:RemoveEffects|RemoveEffects]], [[Morrowind Mod:RemoveSpellEffects|RemoveSpellEffects]]
| 2,307,447
|
2021-01-07T23:46:26Z
|
HoodBot
|
RemoveSpell
Removes the spell from the calling actors known spell list or affecting spells. If the spell is a normal spell, it is removed from the actor's list of known spells. If the spell is a curse/disease it is removed from the list of spells currently affecting the actor.
A bug vaguely related to this function is that if a creature dies with a curse type spell on it, then any other creature of that type you encounter from that point on will also be affected by that curse. To fix this simply call RemoveSpell in an OnDeath clause in a script attached to the creature. The fact that this happens in the first place suggests that the spell is added to the creature definition, and not just that particular instance of the creature.
See Also: RemoveEffects, RemoveSpellEffects
|
122
| 1,410
|
https://en.uesp.net/wiki/Tes3Mod:RemoveSpellEffects
|
Tes3Mod:RemoveSpellEffects
|
{{Morrowind Modding Functions Trail}}
'''RemoveSpellEffects'''
<pre>
RemoveSpellEffects, SpellID
Where SpellID = Spell to remove
Type: Magic
Returns: none
Example: Player->>RemoveSpellEffects, "shock shield"
RemoveSpellEffects, shield
Scripts: Not Used
</pre>
Removes the spell from the calling actors list of affecting spells.
See Also: [[Morrowind Mod:RemoveEffects|RemoveEffects]], [[Morrowind Mod:RemoveSpell|RemoveSpell]]
| 2,307,448
|
2021-01-07T23:46:27Z
|
HoodBot
|
RemoveSpellEffects
Removes the spell from the calling actors list of affecting spells.
See Also: RemoveEffects, RemoveSpell
|
156
| 1,411
|
https://en.uesp.net/wiki/Tes2Mod:DFRemake/Coordinate_System
|
Tes2Mod:DFRemake/Coordinate System
|
{{Trail|DFRemake}}
Daggerfall Coordinates ==
*+X is 'East' (towards the right on the overhead map)
*+Z is 'North' (towards the top of the overhead map)
*-Y is up
*Overall system is right-handed
== DarkBasic Coordinates ==
*Overall system is left-handed
== Game Coordinates ==
Since we must use the left-handed system in DarkBasic, we must convert the DF coordinates slightly:
*DB.X = DF.X (Same, +X is East)
*DB.Y = DF.Z (+Y is North)
*DB.Z = -DF.Y (Same, +Z is Up)
| 2,439,129
|
2021-07-12T20:33:35Z
|
Dcsg
|
Daggerfall Coordinates ==
+X is 'East' (towards the right on the overhead map)
+Z is 'North' (towards the top of the overhead map)
-Y is up
Overall system is right-handed
DarkBasic Coordinates
Overall system is left-handed
Game Coordinates
Since we must use the left-handed system in DarkBasic, we must convert the DF coordinates slightly:
DB.X = DF.X (Same, +X is East)
DB.Y = DF.Z (+Y is North)
DB.Z = -DF.Y (Same, +Z is Up)
|
122
| 1,413
|
https://en.uesp.net/wiki/Tes3Mod:RemoveEffects
|
Tes3Mod:RemoveEffects
|
{{Morrowind Modding Functions Trail}}
'''RemoveEffects'''
<pre>
RemoveEffects, EffectID
Where: EffectID = Magic effect to remove, use the following number values:
85 = sEffectAbsorbAttribute 20 = sEffectDrainFatigue 77 = sEffectRestoreFatigue
88 = sEffectAbsorbFatigue 18 = sEffectDrainHealth 75 = sEffectRestoreHealth
86 = sEffectAbsorbHealth 21 = sEffectDrainSkill 78 = sEffectRestoreSkill
89 = sEffectAbsorbSkill 19 = sEffectDrainSpellpoints 76 = sEffectRestoreSpellPoints
87 = sEffectAbsorbSpellPoints 126 = sEffectExtraSpell 42 = sEffectSanctuary
63 = sEffectAlmsiviIntervention 8 = sEffectFeather 3 = sEffectShield
47 = sEffectBlind 14 = sEffectFireDamage 15 = sEffectShockDamage
123 = sEffectBoundBattleAxe 4 = sEffectFireShield 46 = sEffectSilence
129 = sEffectBoundBoots 117 = sEffectFortifyAttackBonus 11 = sEffectSlowFall
127 = sEffectBoundCuirass 79 = sEffectFortifyAttribute 58 = sEffectSoultrap
120 = sEffectBoundDagger 82 = sEffectFortifyFatigue 48 = sEffectSound
131 = sEffectBoundGloves 80 = sEffectFortifyHealth 67 = sEffectSpellAbsorption
128 = sEffectBoundHelm 84 = sEffectFortifyMagickaMultiplier 136 = sEffectStuntedMagicka
125 = sEffectBoundLongbow 83 = sEffectFortifySkill 106 = sEffectSummonAncestralGhost
121 = sEffectBoundLongsword 81 = sEffectFortifySpellpoints 110 = sEffectSummonBonelord
122 = sEffectBoundMace 52 = sEffectFrenzyCreature 134 = sEffectSummonCenturionSphere
130 = sEffectBoundShield 51 = sEffectFrenzyHumanoid 103 = sEffectSummonClannfear
124 = sEffectBoundSpear 16 = sEffectFrostDamage 104 = sEffectSummonDaedroth
7 = sEffectBurden 6 = sEffectFrostShield 105 = sEffectSummonDremora
50 = sEffectCalmCreature 39 = sEffectInvisibility 114 = sEffectSummonFlameAtronach
49 = sEffectCalmHumanoid 9 = sEffectJump 115 = sEffectSummonFrostAtronach
40 = sEffectChameleon 10 = sEffectLevitate 113 = sEffectSummonGoldensaint
44 = sEffectCharm 41 = sEffectLight 109 = sEffectSummonGreaterBonewalker
118 = sEffectCommandCreatures 5 = sEffectLightningShield 112 = sEffectSummonHunger
119 = sEffectCommandHumanoids 12 = sEffectLock 108 = sEffectSummonLeastBonewalker
132 = sEffectCorpus 60 = sEffectMark 102 = sEffectSummonScamp
70 = sEffectCureBlightDisease 43 = sEffectNightEye 107 = sEffectSummonSkeletalMinion
69 = sEffectCureCommonDisease 13 = sEffectOpen 116 = sEffectSummonStormAtronach
71 = sEffectCureCorprusDisease 45 = sEffectParalyze 111 = sEffectSummonWingedTwilight
73 = sEffectCureParalyzation 27 = sEffectPoison 135 = sEffectSunDamage
72 = sEffectCurePoison 56 = sEffectRallyCreature 1 = sEffectSwiftSwim
22 = sEffectDamageAttribute 55 = sEffectRallyHumanoid 59 = sEffectTelekinesis
25 = sEffectDamageFatigue 61 = sEffectRecall 101 = sEffectTurnUndead
23 = sEffectDamageHealth 68 = sEffectReflect 133 = sEffectVampirism
24 = sEffectDamageMagicka 100 = sEffectRemoveCurse 0 = sEffectWaterBreathing
26 = sEffectDamageSkill 95 = sEffectResistBlightDisease 2 = sEffectWaterWalking
54 = sEffectDemoralizeCreature 94 = sEffectResistCommonDisease 33 = sEffectWeaknessToBlightDisease
53 = sEffectDemoralizeHumanoid 96 = sEffectResistCorprusDisease 32 = sEffectWeaknessToCommonDisease
64 = sEffectDetectAnimal 90 = sEffectResistFire 34 = sEffectWeaknessToCorprusDisease
65 = sEffectDetectEnchantment 91 = sEffectResistFrost 28 = sEffectWeaknessToFire
66 = sEffectDetectKey 93 = sEffectResistMagicka 29 = sEffectWeaknessToFrost
38 = sEffectDisintegrateArmor 98 = sEffectResistNormalWeapons 31 = sEffectWeaknessToMagicka
37 = sEffectDisintegrateWeapon 99 = sEffectResistParalysis 36 = sEffectWeaknessToNormalWeapons
57 = sEffectDispel 97 = sEffectResistPoison 35 = sEffectWeaknessToPoison
62 = sEffectDivineIntervention 92 = sEffectResistShock 30 = sEffectWeaknessToShock
17 = sEffectDrainAttribute 74 = sEffectRestoreAttribute
Type: Magic
Returns: none
Example: RemoveEffects, 56
player->RemoveEffects, 1
Scripts: Not Used
</pre>
Removes all spells currently affecting the calling actor that include the given effect. Note that this is slightly different from the [[Morrowind Mod:GetEffect|GetEffect]] function which accepts the sEffect___ ID rather than the numeric value.
See Also: [[Morrowind Mod:GetEffect|GetEffect]], [[Morrowind Mod:RemoveSpell|RemoveSpell]], [[Morrowind Mod:RemoveSpellEffects|RemoveSpellEffects]]
| 2,307,442
|
2021-01-07T23:46:24Z
|
HoodBot
|
RemoveEffects
Removes all spells currently affecting the calling actor that include the given effect. Note that this is slightly different from the GetEffect function which accepts the sEffect___ ID rather than the numeric value.
See Also: GetEffect, RemoveSpell, RemoveSpellEffects
|
156
| 1,415
|
https://en.uesp.net/wiki/Tes2Mod:WOODS.WLD_format
|
Tes2Mod:WOODS.WLD format
|
{{Trail|File Formats}}
This is a description of the format of the WOODS.WLD file found in the ARENA2 directory of Elder Scrolls: Daggerfall by Bethesda. The information here is not complete or 100% percent accurate, although the basic format appears to be well understood.
[[Image:DF-WOODS.WLD.small.png|thumb|500px|250px|False-colour output of WOODS.WLD]]
==Header==
The first 0x90 (144) bytes of the file are composed of a Header structure.
{| class="wikitable"
|+ Header Structure
!Offset
!Type
!Name
!Description
|-
!0-3
| UInt32
| OffsetSize
| This is the size of the offset list which immediately follows the header. Since each element is 4 bytes long, ( Width * Height ) should equal ( OffsetSize ÷ 4 ).
|-
!4-7
| UInt32
| Width
| This indicates the width of the Elevation Map. This should be 1000.
|-
!8-11
| UInt32
| Height
| This indicates the height of the Elevation Map. This should be 500.
|-
!12-15
| UInt32
| NullValue1
| This value should be 0x00000000.
|-
!16-19
| UInt32
| DataSectionOneOffset
| This is the offset to the Data Section 1 section, relative to the start of the file.
|-
!20-23
| UInt32
| Constant1
| Should be 1 (0x1). Does not appear to have any impact on the game.
|-
!24-27
| UInt32
| Constant2
| Should be 22 (0x16). Does not appear to have any impact on the game.
|-
!28-31
| UInt32
| ElevationMapOffset
| This is the offset to the Elevation Map section, relative to the start of the file.
|-
!32-143
| UInt32[ 28 ]
| NullValue2
| Each element of this array should be 0x00000000.
|}
==Data Offsets==
Immediately following the Header, is a contiguous list of UInt32 values. There should be Header.Width * Header.Height (500000) elements. Each element is an offset (relative to the start of the file) to a PixelData structure. Each element corresponds by ordinal to an Elevation Map element; that is to say the tenth offset in this contiguous list describes the tenth pixel in the Elevation Map array. Daggerfall expects these elements to be stored in left-to-right, top-to-bottom order. Editors should follow this convention. This does not mean element <var>n</var> must specify a disk location which precedes <var>n+1</var>; it merely means element <var>n</var> specifies a row which is "above" row <var>n+1</var> in the output bitmap.
==Data Section 1==
This section contains unknown data. It may be related to the Elevation Map Data. The section is 1024 bytes in size (0x0400).
{| class="wikitable"
|+ DataSectionOne Structure
!Offset
!Type
!Name
!Description
|-
!0-15
| UInt8[ 16 ]
| Unknown
| Unknown Purpose
|-
!16-1023
| UInt8[ 252 ]
| NullValue
| Each element should be 0x00.
|}
==Elevation Map==
As the name suggests, this section contains elevation data for a small, 1000x500 pixel, map of the [[Lore:Iliac Bay|Iliac Bay]]. Each byte represents one pixel, with Header.Width * Header.Height pixels in total. Low values are low elevations, high values are high elevations, with 0x00 through 0x02 considered water. There are no pixels with an elevation of 0x03.
These values are further modified by the PixelData.ElevationNoise array, which (if considered) expands the map into 5000x2500 pixels.
The values are stored in left-to-right, top-to-bottom order. That is to say the first 1000 elements describe the first (top-most) row of the map, and the second 1000 elements describe the second row of the map, and so on.
==Pixel Data==
For each of the pixels in the Elevation Map, there is a corresponding PixelData element (0x2F, 47 bytes in size). Offsets to each PixelData structure is found immediately following the Header as a contiguous list of UInt32 offsets.
{| class="wikitable"
|+ PixelData structure
!Offset
!Type
!Name
!Description
|-
!0-1
| UInt16
| Unknown1
| Unknown Purpose.
|-
!2-5
| UInt32
| NullValue1
| Always 0x00000000.
|-
!6-7
| UInt16
| FileIndex
| Valid values are defined by the FileIndex Enumeration, below.
|-
!8
| UInt8
| Climate
| Valid values are defined by the Climate Enumeration, below.
|-
!9
| UInt8
| ClimateNoise
| This field is used to provide variance to the weather specific to that pixel. Observed values are {0x20, 0x40, 0x60, 0x80, 0xa0, 0xc0}.
|-
!10-21
| UInt32[ 3 ]
| NullValue2
| Each element is always 0x00000000.
|-
!22-46
| Int8[ 5 ][ 5 ]
| ElevationNoise
| Each signed byte element of this two-dimensional array provides noise for the pixel's Elevation field, thus giving the overland hills, valleys, etc. For some reason the resultant 5000x2500 pixel map has a strange grid-like pattern imposed on it by this field. The ElevationNoise elements are stored in left-to-right, top-to-bottom order.
|}
===FileIndex Enumeration===
The FileIndex enumeration does '''not''' identify the texture file to use when displaying the ground for that specific map pixel. It is a decoy. This data is actually in [[Daggerfall:CLIMATE.PAK|CLIMATE.PAK]].
{| class="wikitable"
|+ FileIndex enumeration
!Value
!Description
!Texture File
|-
!2
| Desert
| TEXTURE.002
|-
!102
| Mountain
| TEXTURE.102
|-
!302
| Temperate
| TEXTURE.302
|-
!402
| Jungle
| TEXTURE.402
|}
===Climate Enumeration===
The Climate enumeration is '''not''' used by Daggerfall when generating weather and seasons for the pixel. Weather and seasons are determined by the data within the [[Daggerfall:CLIMATE.PAK|CLIMATE.PAK]] file.
{| class="wikitable"
|+ Climate Enumeration
!Value
!Description
|-
!0
| Temperate/Jungle
|-
!1
| Mountain
|-
!2
| Desert
|}
==Working with WOODS.WLD==
Everything one needs to create the Iliac Bay in a 3D environment, such as DirectX or OpenGL, is present.
===Building the Map===
One can use the data present in WOODS.WLD to generate an almost complete map for the Iliac Bay. This documentation will assume the standard 3D coordinate format of (X, Y, Z), where X represents the east-west axis, Y represents the elevation axis, and Z represents the north-south axis. Daggerfall World Units are proportionate to the United States Inch, and the valid domain for each axis is defined as: Dom(X) ≡ (51200, 32753664), Dom(Y) ≡ (-80, 1228), and Dom(Z) ≡ (16384, 16367616).
First one reads the ElevationMap to retrieve the base elevation for the location. Each element within the ElevationMap refers to a PixelData element, so one must then next read the PixelData. One then adds to each element of the PixelData.ElevationNoise array the value reported by the pixel's corresponding entry in the ElevationMap. One now has the base elevation for every location within the game.
The next step is a matter of scaling. Each pixel in this resultant 5000 x 2500 bitmap equal to 6467.584 inches by 6516.736 inches. This places the Iliac Bay's total area at 135240.22691037170846039793070852 square miles (between California and Nevada in total size, with the defined land area about 1.6 times that of England).
===Adding Locations===
To determine which of these map pixels a Location from [[Daggerfall:MAPS.BSA|MAPS.BSA]] (or the player's character for that matter) occupies one must simply translate from Daggerfall World Units to the above Map Units.
First, one must subtract 51200 from the location's X coordinate, and 16384 from the location's Y coordinate. The next step is then to divide the X coordinate by 32702.464 and divide the Y coordinate by 32702.464. One now has the specific pixel location in 1000x500 scale.
At this point one has the location for the lower-left corner of the location's first [[Daggerfall:BLOCKS.BSA/Map Block Records|Block]], as defined by the location's [[Daggerfall:MAPS.BSA#ExteriorData|ExteriorData]] Block* arrays. Blocks are stored in west-to-east, south-to-north order. Each Block has a uniform size.
===Textures===
The specific textures to load for the ground planes, the flats, and the structures is determined by the [[Daggerfall:CLIMATE.PAK|CLIMATE.PAK]] file.
==See Also==
# [[Daggerfall:Land creation notes|Land creation notes]]
| 2,558,741
|
2022-01-18T07:01:02Z
|
Username1
|
This is a description of the format of the WOODS.WLD file found in the ARENA2 directory of Elder Scrolls: Daggerfall by Bethesda. The information here is not complete or 100% percent accurate, although the basic format appears to be well understood.
thumb|500px|250px|False-colour output of WOODS.WLD
Header
The first 0x90 (144) bytes of the file are composed of a Header structure.
Data Offsets
Immediately following the Header, is a contiguous list of UInt32 values. There should be Header.Width * Header.Height (500000) elements. Each element is an offset (relative to the start of the file) to a PixelData structure. Each element corresponds by ordinal to an Elevation Map element; that is to say the tenth offset in this contiguous list describes the tenth pixel in the Elevation Map array. Daggerfall expects these elements to be stored in left-to-right, top-to-bottom order. Editors should follow this convention. This does not mean element must specify a disk location which precedes ; it merely means element specifies a row which is "above" row in the output bitmap.
Data Section 1
This section contains unknown data. It may be related to the Elevation Map Data. The section is 1024 bytes in size (0x0400).
Elevation Map
As the name suggests, this section contains elevation data for a small, 1000x500 pixel, map of the Iliac Bay. Each byte represents one pixel, with Header.Width * Header.Height pixels in total. Low values are low elevations, high values are high elevations, with 0x00 through 0x02 considered water. There are no pixels with an elevation of 0x03.
These values are further modified by the PixelData.ElevationNoise array, which (if considered) expands the map into 5000x2500 pixels.
The values are stored in left-to-right, top-to-bottom order. That is to say the first 1000 elements describe the first (top-most) row of the map, and the second 1000 elements describe the second row of the map, and so on.
Pixel Data
For each of the pixels in the Elevation Map, there is a corresponding PixelData element (0x2F, 47 bytes in size). Offsets to each PixelData structure is found immediately following the Header as a contiguous list of UInt32 offsets.
{| class="wikitable"
|+ PixelData structure
!Offset
!Type
!Name
!Description
|-
!0-1
| UInt16
| Unknown1
| Unknown Purpose.
|-
!2-5
| UInt32
| NullValue1
| Always 0x00000000.
|-
!6-7
| UInt16
| FileIndex
| Valid values are defined by the FileIndex Enumeration, below.
|-
!8
| UInt8
| Climate
| Valid values are defined by the Climate Enumeration, below.
|-
!9
| UInt8
| ClimateNoise
| This field is used to provide variance to the weather specific to that pixel. Observed values are {0x20, 0x40, 0x60, 0x80, 0xa0, 0xc0}.
|-
!10-21
| UInt32[ 3 ]
| NullValue2
| Each element is always 0x00000000.
|-
!22-46
| Int8[ 5 ][ 5 ]
| ElevationNoise
| Each signed byte element of this two-dimensional array provides noise for the pixel's Elevation field, thus giving the overland hills, valleys, etc. For some reason the resultant 5000x2500 pixel map has a strange grid-like pattern imposed on it by this field. The ElevationNoise elements are stored in left-to-right, top-to-bottom order.
|}
FileIndex Enumeration
The FileIndex enumeration does not identify the texture file to use when displaying the ground for that specific map pixel. It is a decoy. This data is actually in CLIMATE.PAK.
Climate Enumeration
The Climate enumeration is not used by Daggerfall when generating weather and seasons for the pixel. Weather and seasons are determined by the data within the CLIMATE.PAK file.
Working with WOODS.WLD
Everything one needs to create the Iliac Bay in a 3D environment, such as DirectX or OpenGL, is present.
Building the Map
One can use the data present in WOODS.WLD to generate an almost complete map for the Iliac Bay. This documentation will assume the standard 3D coordinate format of (X, Y, Z), where X represents the east-west axis, Y represents the elevation axis, and Z represents the north-south axis. Daggerfall World Units are proportionate to the United States Inch, and the valid domain for each axis is defined as: Dom(X) ≡ (51200, 32753664), Dom(Y) ≡ (-80, 1228), and Dom(Z) ≡ (16384, 16367616).
First one reads the ElevationMap to retrieve the base elevation for the location. Each element within the ElevationMap refers to a PixelData element, so one must then next read the PixelData. One then adds to each element of the PixelData.ElevationNoise array the value reported by the pixel's corresponding entry in the ElevationMap. One now has the base elevation for every location within the game.
The next step is a matter of scaling. Each pixel in this resultant 5000 x 2500 bitmap equal to 6467.584 inches by 6516.736 inches. This places the Iliac Bay's total area at 135240.22691037170846039793070852 square miles (between California and Nevada in total size, with the defined land area about 1.6 times that of England).
Adding Locations
To determine which of these map pixels a Location from MAPS.BSA (or the player's character for that matter) occupies one must simply translate from Daggerfall World Units to the above Map Units.
First, one must subtract 51200 from the location's X coordinate, and 16384 from the location's Y coordinate. The next step is then to divide the X coordinate by 32702.464 and divide the Y coordinate by 32702.464. One now has the specific pixel location in 1000x500 scale.
At this point one has the location for the lower-left corner of the location's first Block, as defined by the location's ExteriorData Block* arrays. Blocks are stored in west-to-east, south-to-north order. Each Block has a uniform size.
Textures
The specific textures to load for the ground planes, the flats, and the structures is determined by the CLIMATE.PAK file.
See Also
# Land creation notes
|
156
| 1,416
|
https://en.uesp.net/wiki/Tes2Mod:DFRemake/DFELoad3dObject
|
Tes2Mod:DFRemake/DFELoad3dObject
|
{{Trail|DFRemake}}
== integer DFELoad3dObject (DWORD ObjectValue) ==
=== Inputs ===
*'''ObjectValue''' - The object value from the Arch3d.Bsa directory that you wish to load.
=== Outputs ===
Returns the error code from the operation, or DFERR_SUCCESS on success.
=== Description ===
Attempts to load the given object from the arch3d.bsa file. The BSA directory is read if it has not yet been input. On success the current 3d object will be the given object.
=== Notes ===
=== Example ===
Local ErrResult as integer
ErrResult = DFELoad3dObject(456)
if (ErrResult <> DFERR_SUCCESS) then End
__NOTOC__
| 2,439,181
|
2021-07-12T20:33:39Z
|
Dcsg
|
integer DFELoad3dObject (DWORD ObjectValue)
Inputs
ObjectValue - The object value from the Arch3d.Bsa directory that you wish to load.
Outputs
Returns the error code from the operation, or DFERR_SUCCESS on success.
Description
Attempts to load the given object from the arch3d.bsa file. The BSA directory is read if it has not yet been input. On success the current 3d object will be the given object.
Notes
Example
Local ErrResult as integer
ErrResult = DFELoad3dObject(456)
if (ErrResult <> DFERR_SUCCESS) then End
|
156
| 1,417
|
https://en.uesp.net/wiki/Tes2Mod:DFRemake/DFEHas3dObject
|
Tes2Mod:DFRemake/DFEHas3dObject
|
{{Trail|DFRemake}}
== integer DFEHas3dObject ( ) ==
=== Inputs ===
None
=== Outputs ===
Returns 1 if there is a valid current 3d object file loaded, and 0 otherwise.
=== Description ===
Use this function to check if there a current 3d object file loaded.
=== Example ===
if ( DFEHas3dObject() )
`Do stuff
endif
__NOTOC__
| 2,439,165
|
2021-07-12T20:33:38Z
|
Dcsg
|
integer DFEHas3dObject ( )
Inputs
None
Outputs
Returns 1 if there is a valid current 3d object file loaded, and 0 otherwise.
Description
Use this function to check if there a current 3d object file loaded.
Example
if ( DFEHas3dObject() )
`Do stuff
endif
|
156
| 1,418
|
https://en.uesp.net/wiki/Tes2Mod:DFRemake/DFEGetFirst3dObject
|
Tes2Mod:DFRemake/DFEGetFirst3dObject
|
{{Trail|DFRemake}}
== integer DFEGetFirst3dObject ( ) ==
=== Inputs ===
None
=== Outputs ===
Returns 1 on success and 0 if there are no objects to iterate through.
=== Description ===
Use this function to start iterating through all 3d objects in the arch3d.bas file. The Bsa directory is read if it has not yet been input. See [[Daggerfall:DFRemake/DFEGetNext3dObject|DFEGetNext3dObject]] for more information.
=== Example ===
Local ErrResult as integer
ErrResult = DFEGetFirst3dObject()
__NOTOC__
| 2,439,137
|
2021-07-12T20:33:36Z
|
Dcsg
|
integer DFEGetFirst3dObject ( )
Inputs
None
Outputs
Returns 1 on success and 0 if there are no objects to iterate through.
Description
Use this function to start iterating through all 3d objects in the arch3d.bas file. The Bsa directory is read if it has not yet been input. See DFEGetNext3dObject for more information.
Example
Local ErrResult as integer
ErrResult = DFEGetFirst3dObject()
|
156
| 1,419
|
https://en.uesp.net/wiki/Tes2Mod:DFRemake/DFEGetNext3dObject
|
Tes2Mod:DFRemake/DFEGetNext3dObject
|
{{Trail|DFRemake}}
== integer DFEGetNext3dObject ( ) ==
=== Inputs ===
None
=== Outputs ===
Returns 1 on success and 0 if there are no objects left to iterate through.
=== Description ===
Use this function to continue iterating through all 3d objects in the arch3d.bas file after an initial call to [[Daggerfall:DFRemake/DFEGetFirst3dObject|DFEGetFirst3dObject]].
=== Example ===
Local ErrResult as integer
Local Count as DWORD
ErrResult = DFEGetFirst3dObject()
Count = 0
while ( ErrResult )
inc Count
print "Found object #", Count
ErrResult = DFEGetNext3dObject()
endwhile
__NOTOC__
| 2,439,151
|
2021-07-12T20:33:37Z
|
Dcsg
|
integer DFEGetNext3dObject ( )
Inputs
None
Outputs
Returns 1 on success and 0 if there are no objects left to iterate through.
Description
Use this function to continue iterating through all 3d objects in the arch3d.bas file after an initial call to DFEGetFirst3dObject.
Example
Local ErrResult as integer
Local Count as DWORD
ErrResult = DFEGetFirst3dObject()
Count = 0
while ( ErrResult )
inc Count
print "Found object #", Count
ErrResult = DFEGetNext3dObject()
endwhile
|
156
| 1,420
|
https://en.uesp.net/wiki/Tes2Mod:DFRemake/DFEGet3dObjectSize
|
Tes2Mod:DFRemake/DFEGet3dObjectSize
|
{{Trail|DFRemake}}
== DWORD DFEGet3dObjectSize ( ) ==
=== Inputs ===
None
=== Outputs ===
Returns the size in bytes needed for the memblock to store the current 3d object.
=== Description ===
Use this function to get the size needed for a memblock allocation in order to convert the currently loaded object into a DarkBasic object (FVF format 338 currently). Returns 0 if there is no current object loaded.
=== Example ===
Size = DFEGet3dObjectSize()
if ( Size > 0 )
make memblock 1, Size
endif
__NOTOC__
| 2,439,133
|
2021-07-12T20:33:36Z
|
Dcsg
|
DWORD DFEGet3dObjectSize ( )
Inputs
None
Outputs
Returns the size in bytes needed for the memblock to store the current 3d object.
Description
Use this function to get the size needed for a memblock allocation in order to convert the currently loaded object into a DarkBasic object (FVF format 338 currently). Returns 0 if there is no current object loaded.
Example
Size = DFEGet3dObjectSize()
if ( Size > 0 )
make memblock 1, Size
endif
|
156
| 1,421
|
https://en.uesp.net/wiki/Tes2Mod:DFRemake/DFEGetFirst3dTexture
|
Tes2Mod:DFRemake/DFEGetFirst3dTexture
|
{{Trail|DFRemake}}
== integer DFEGetFirst3dTexture ( ) ==
=== Inputs ===
None
=== Outputs ===
Returns -1 if there are no textures to iterate through in the current object. On success it returns the combined texture and image index (see [[Daggerfall:DFRemake/DFEGetNext3dTexture|DFEGetNext3dTexture]] for details).
=== Description ===
Use this function to begin iterating through all different textures in the currently loaded 3d object.
=== Example ===
Local TexValue as integer
TexValue = DFEGetFirst3dTexture()
if (TexValue = -1) then End
__NOTOC__
| 2,439,139
|
2021-07-12T20:33:36Z
|
Dcsg
|
integer DFEGetFirst3dTexture ( )
Inputs
None
Outputs
Returns -1 if there are no textures to iterate through in the current object. On success it returns the combined texture and image index (see DFEGetNext3dTexture for details).
Description
Use this function to begin iterating through all different textures in the currently loaded 3d object.
Example
Local TexValue as integer
TexValue = DFEGetFirst3dTexture()
if (TexValue = -1) then End
|
156
| 1,422
|
https://en.uesp.net/wiki/Tes2Mod:DFRemake/DFEGetNext3dTexture
|
Tes2Mod:DFRemake/DFEGetNext3dTexture
|
{{Trail|DFRemake}}
== integer DFEGetNext3dTexture ( ) ==
=== Inputs ===
None
=== Outputs ===
Returns -1 if there are no textures left to iterate through in the current object. On success the combined texture and image indices are returned in the format:
Bytes 0-1: ImageIndex
Bytes 2-3: TextureIndex
=== Description ===
Use this function to continue iterating through all textures in the current 3d object file after an initial call to [[Daggerfall:DFRemake/DFEGetFirst3dTexture|DFEGetFirst3dTexture]]. These functions can be used to pre-load the textures used in a DF object.
=== Notes ===
These two functions are used since it is impossible/difficult to construct a single object using multiple diffuse textures in DarkBasic. To get around this, 3d objects in DB are constructed using a base object for the first texture, and then limbs for each additional texture used in the object. This lets the model be handled as a single object but easily allow multiple textures.
=== Example ===
Local TexValue as integer
Local TexIndex as DWORD
Local ImageIndex as DWORD
TexValue = DFEGetFirst3dTexture()
while ( TexValue <> -1)
TexIndex = TexValue >> 16
ImageIndex = TexValue && 65535
print "Object uses texture ", TexIndex, " image ", ImageIndex
TexValue = DFEGetNext3dTexture()
endwhile
__NOTOC__
| 2,439,153
|
2021-07-12T20:33:37Z
|
Dcsg
|
integer DFEGetNext3dTexture ( )
Inputs
None
Outputs
Returns -1 if there are no textures left to iterate through in the current object. On success the combined texture and image indices are returned in the format:
Bytes 0-1: ImageIndex
Bytes 2-3: TextureIndex
Description
Use this function to continue iterating through all textures in the current 3d object file after an initial call to DFEGetFirst3dTexture. These functions can be used to pre-load the textures used in a DF object.
Notes
These two functions are used since it is impossible/difficult to construct a single object using multiple diffuse textures in DarkBasic. To get around this, 3d objects in DB are constructed using a base object for the first texture, and then limbs for each additional texture used in the object. This lets the model be handled as a single object but easily allow multiple textures.
Example
Local TexValue as integer
Local TexIndex as DWORD
Local ImageIndex as DWORD
TexValue = DFEGetFirst3dTexture()
while ( TexValue <> -1)
TexIndex = TexValue >> 16
ImageIndex = TexValue && 65535
print "Object uses texture ", TexIndex, " image ", ImageIndex
TexValue = DFEGetNext3dTexture()
endwhile
|
156
| 1,423
|
https://en.uesp.net/wiki/Tes2Mod:DFRemake/DFEGet3dObjectMesh
|
Tes2Mod:DFRemake/DFEGet3dObjectMesh
|
{{Trail|DFRemake}}
== integer DFEGet3dObjectMesh ( DWORD MemblockPtr ) ==
=== Inputs ===
*'''MemblockPtr''': The pointer to the memblock from the ''GET MEMBLOCK PTR'' command.
=== Outputs ===
Returns DFERR_SUCCESS on success and the appropriate error code on failure.
=== Description ===
This function creates a memblock object from the currently loaded DF 3d object. Use [[Daggerfall:DFRemake/DFEGet3dObjectSize|DFEGet3dObjectSize]] to allocate a memblock of the required size.
=== Notes ===
This function does not create objects with textures but it can be used for wireframe model testing. It is much simpler than the other functions for object creation which require multiple calls and limb assembly.
=== Example ===
Local ErrResult as integer
make memblock 1, DFEGet3dObjectSize()
ErrResult = DFEGet3dObjectMesh(get memblock ptr(1))
if (ErrResult <> DFERR_SUCCESS) then End
__NOTOC__
| 2,439,131
|
2021-07-12T20:33:35Z
|
Dcsg
|
integer DFEGet3dObjectMesh ( DWORD MemblockPtr )
Inputs
MemblockPtr: The pointer to the memblock from the GET MEMBLOCK PTR command.
Outputs
Returns DFERR_SUCCESS on success and the appropriate error code on failure.
Description
This function creates a memblock object from the currently loaded DF 3d object. Use DFEGet3dObjectSize to allocate a memblock of the required size.
Notes
This function does not create objects with textures but it can be used for wireframe model testing. It is much simpler than the other functions for object creation which require multiple calls and limb assembly.
Example
Local ErrResult as integer
make memblock 1, DFEGet3dObjectSize()
ErrResult = DFEGet3dObjectMesh(get memblock ptr(1))
if (ErrResult <> DFERR_SUCCESS) then End
|
156
| 1,424
|
https://en.uesp.net/wiki/Tes2Mod:DFRemake/DFEGetNext3dMemblock
|
Tes2Mod:DFRemake/DFEGetNext3dMemblock
|
{{Trail|DFRemake}}
== integer DFEGetNext3dMemblock ( DWORD MemblockPtr ) ==
=== Inputs ===
*'''MemblockPtr''': The pointer to a memblock from the ''GET MEMBLOCK PTR'' command.
=== Outputs ===
Returns -1 if there are no objects left to iterate through. On success the result is a combination of the texture and image indices:
Bytes 0-1: ImageIndex
Bytes 2-3: TextureIndex
=== Description ===
Use this function to continue iterating through all faces with the same texture in the current 3d object after an initial call to [[Daggerfall:DFRemake/DFEGetFirst3dMemblock|DFEGetFirst3dMemblock]]. On success, the given memblock will contain object data for all faces with the same texture image. Memblocks should be allocated with the DFEGet3dSize() function (which will over-allocate which is fine).
=== Example ===
Local ErrResult as integer
Local Size as DWORD
Local MemblockID as DWORD
Local MeshID as DWORD
Local LimbIndex as DWORD
Local Index as DWORD
Size = DFEGet3dObjectSize()
make memblock 1, Size
TexValue = DFEGetFirst3dMemblock(get memblock ptr(1))
TexIndex = TexValue >> 16
ImageIndex = TexValue && 65535
make mesh from memblock 2, 1
make object 3, 2, 0
delete mesh 2
LimbIndex = 1
`Add all limbs with alternate textures
for Index = 0 to 1024
TexValue = DFEGetNext3dMemblock(get memblock ptr(1))
if (TexValue < 0) then Exit
TexIndex = TexValue >> 16
ImageIndex = TexValue && 65535
print "Texture Limb: " + str$(TexIndex) + ", " + str$(ImageIndex)
make mesh from memblock 2, 1
add limb 3, LimbIndex, 2
delete mesh 2
Inc LimbIndex
next Index
delete memblock 1
__NOTOC__
| 2,439,149
|
2021-07-12T20:33:37Z
|
Dcsg
|
integer DFEGetNext3dMemblock ( DWORD MemblockPtr )
Inputs
MemblockPtr: The pointer to a memblock from the GET MEMBLOCK PTR command.
Outputs
Returns -1 if there are no objects left to iterate through. On success the result is a combination of the texture and image indices:
Bytes 0-1: ImageIndex
Bytes 2-3: TextureIndex
Description
Use this function to continue iterating through all faces with the same texture in the current 3d object after an initial call to DFEGetFirst3dMemblock. On success, the given memblock will contain object data for all faces with the same texture image. Memblocks should be allocated with the DFEGet3dSize() function (which will over-allocate which is fine).
Example
Local ErrResult as integer
Local Size as DWORD
Local MemblockID as DWORD
Local MeshID as DWORD
Local LimbIndex as DWORD
Local Index as DWORD
Size = DFEGet3dObjectSize()
make memblock 1, Size
TexValue = DFEGetFirst3dMemblock(get memblock ptr(1))
TexIndex = TexValue >> 16
ImageIndex = TexValue && 65535
make mesh from memblock 2, 1
make object 3, 2, 0
delete mesh 2
LimbIndex = 1
`Add all limbs with alternate textures
for Index = 0 to 1024
TexValue = DFEGetNext3dMemblock(get memblock ptr(1))
if (TexValue > 16
ImageIndex = TexValue && 65535
print "Texture Limb: " + str$(TexIndex) + ", " + str$(ImageIndex)
make mesh from memblock 2, 1
add limb 3, LimbIndex, 2
delete mesh 2
Inc LimbIndex
next Index
delete memblock 1
|
156
| 1,425
|
https://en.uesp.net/wiki/Tes2Mod:DFRemake/DFEGetFirst3dMemblock
|
Tes2Mod:DFRemake/DFEGetFirst3dMemblock
|
{{Trail|DFRemake}}
== integer DFEGetFirst3dMemblock ( DWORD MemblockPtr ) ==
=== Inputs ===
*'''MemblockPtr''': The pointer to a memblock from the ''GET MEMBLOCK PTR'' command.
=== Outputs ===
Returns -1 if there are no objects to iterate through. On success the result is a combination of the texture and image indices:
Bytes 0-1: ImageIndex
Bytes 2-3: TextureIndex
=== Description ===
Use this function to start iterating through all faces with the same texture in the current 3d object. On success, the given memblock will contain object data for all faces with the same texture image. Memblocks should be allocated with the DFEGet3dSize() function (which will over-allocate which is fine). See [[Daggerfall:DFRemake/DFEGetNext3dMemblock|DFEGetNext3dMemblock]] for more information.
=== Example ===
Local ErrResult as integer
Local Size as DWORD
local TexValue as integer
Local TexIndex as DWORD
Local ImageIndex as DWORD
Size = DFEGet3dObjectSize()
make memblock 1, Size
TexValue = DFEGetFirst3dMemblock(get memblock ptr(1))
if (TexValue = 1) then End
TexIndex = TexValue >> 16
ImageIndex = TexValue && 65535
__NOTOC__
| 2,439,135
|
2021-07-12T20:33:36Z
|
Dcsg
|
integer DFEGetFirst3dMemblock ( DWORD MemblockPtr )
Inputs
MemblockPtr: The pointer to a memblock from the GET MEMBLOCK PTR command.
Outputs
Returns -1 if there are no objects to iterate through. On success the result is a combination of the texture and image indices:
Bytes 0-1: ImageIndex
Bytes 2-3: TextureIndex
Description
Use this function to start iterating through all faces with the same texture in the current 3d object. On success, the given memblock will contain object data for all faces with the same texture image. Memblocks should be allocated with the DFEGet3dSize() function (which will over-allocate which is fine). See DFEGetNext3dMemblock for more information.
Example
Local ErrResult as integer
Local Size as DWORD
local TexValue as integer
Local TexIndex as DWORD
Local ImageIndex as DWORD
Size = DFEGet3dObjectSize()
make memblock 1, Size
TexValue = DFEGetFirst3dMemblock(get memblock ptr(1))
if (TexValue = 1) then End
TexIndex = TexValue >> 16
ImageIndex = TexValue && 65535
|
156
| 1,426
|
https://en.uesp.net/wiki/Tes2Mod:DFRemake/DFELibrary_-_Maps.bsa
|
Tes2Mod:DFRemake/DFELibrary - Maps.bsa
|
{{Trail|DFRemake}}
Maps.bsa contains information to build complete locations (towns, dungeons, interior houses, etc...) from the component blocks.
== General Design ==
*The location table (MapTable, MapNames) will be loaded and stored for all regions. This requires 40 bytes per location (slightly less if allocated strings are used) which requires ~500kB for the ~11,000 exterior locations. If memory is a concern this can be reduced to ~8 bytes per record (100 kb total) if the location name is not stored. Alternatively, the records can be loaded from the file as needed (the data is in fixed array format for each region so access time is relatively fast).
*The full record data (MapDItem, MapPItem) will be loaded for a region at a time as needed.
*Regions will be accessed by number, 0-60.
*Information will be transferred to DB by custom formatted memblocks.
== Error Codes ==
The following table lists the Maps.Bsa related error codes:
{| border="1" cellpadding="1" cellspacing="0" align="center"
|-
! style="background:#999999;" | Error Code
! style="background:#999999;" | Value
! style="background:#999999;" | Description
|-
|DFERR_BADMAPDITEM
| -1101
|Failed to read the MapDItem file for the specified region!
|-
|DFERR_BADREGION
| -1102
|The given region number is not valid!
|}
== Exported Functions ==
*[[Daggerfall:DFRemake/DFEIsValidRegion|DFEIsValidRegion]] : Checks if a given region index is valid.
*[[Daggerfall:DFRemake/DFEGetRegionName|DFEGetRegionName]] : Returns a region name from its index.
*[[Daggerfall:DFRemake/DFEGetFirstRegionLocation|DFEGetFirstRegionLocation]] : Starts interating through exterior locations in a region.
*[[Daggerfall:DFRemake/DFEGetNextRegionLocation|DFEGetNextRegionLocation]] : Continues interating through exterior locations in a region.
*[[Daggerfall:DFRemake/DFEGetFirstRegionDungeon|DFEGetFirstRegionDungeon]] : Starts interating through dungeons in a region.
*[[Daggerfall:DFRemake/DFEGetNextRegionDungeon|DFEGetNextRegionDungeon]] : Continues interating through dungeons in a region.
*[[Daggerfall:DFRemake/DFELoadRegion|DFELoadRegion]] : Loads the location (MapPItem) and dungeon (MapDItem) data for the given region.
*[[Daggerfall:DFRemake/DFEGetFirstDungeonBlock|DFEGetFirstDungeonBlock]] : Start iterating through block data in the currently selected dungeon.
*[[Daggerfall:DFRemake/DFEGetNextDungeonBlock|DFEGetNextDungeonBlock]] : Continue iterating through block data in the currently selected dungeon.
| 2,439,179
|
2021-07-12T20:33:39Z
|
Dcsg
|
Maps.bsa contains information to build complete locations (towns, dungeons, interior houses, etc...) from the component blocks.
General Design
The location table (MapTable, MapNames) will be loaded and stored for all regions. This requires 40 bytes per location (slightly less if allocated strings are used) which requires ~500kB for the ~11,000 exterior locations. If memory is a concern this can be reduced to ~8 bytes per record (100 kb total) if the location name is not stored. Alternatively, the records can be loaded from the file as needed (the data is in fixed array format for each region so access time is relatively fast).
The full record data (MapDItem, MapPItem) will be loaded for a region at a time as needed.
Regions will be accessed by number, 0-60.
Information will be transferred to DB by custom formatted memblocks.
Error Codes
The following table lists the Maps.Bsa related error codes:
Exported Functions
DFEIsValidRegion : Checks if a given region index is valid.
DFEGetRegionName : Returns a region name from its index.
DFEGetFirstRegionLocation : Starts interating through exterior locations in a region.
DFEGetNextRegionLocation : Continues interating through exterior locations in a region.
DFEGetFirstRegionDungeon : Starts interating through dungeons in a region.
DFEGetNextRegionDungeon : Continues interating through dungeons in a region.
DFELoadRegion : Loads the location (MapPItem) and dungeon (MapDItem) data for the given region.
DFEGetFirstDungeonBlock : Start iterating through block data in the currently selected dungeon.
DFEGetNextDungeonBlock : Continue iterating through block data in the currently selected dungeon.
|
156
| 1,427
|
https://en.uesp.net/wiki/Tes2Mod:DFRemake/DFELibrary_-_Blocks.bsa
|
Tes2Mod:DFRemake/DFELibrary - Blocks.bsa
|
{{Trail|DFRemake}}
Blocks.bsa contains information on building dungeon and location blocks from the component 3d objects. Within the Bsa file there are several differet file formats:
*'''RDB''': Hold dungeon block data (Random Dungeon Block?)
*'''RMB''': Hold location block data (towns, etc...) (Random Map Block?)
*'''RDI''': Related to dungeons (Random Dungeon Information?) but currently unknown.
== General Design ==
*The Blocks.bsa directory will be read the first time it is needed (when a RDB/RMB file is loaded or at the start of an iteration request).
*One RDB/RMB file will be loaded at a time.
*RDB/RMB files will be accessed/loaded according to their filename (8.3 format).
*Information will be passed onto DarkBasic using memblocks with user defined structures (will required manual extraction in DB).
*Object angles in dungeon blocks can be converted to degrees by multiplying by 540/1024. This results in some angles that are very large but (>360) it seems to work fine.
== Error Codes ==
The following table lists the Blocks.bsa related error codes:
{| border="1" cellpadding="1" cellspacing="0" align="center"
|-
! style="background:#999999;" | Error Code
! style="background:#999999;" | Value
! style="background:#999999;" | Description
|-
|DFERR_RDB_NUMOBJECTS
| -901
|Invalid number of objects contained in the RDB file.
|-
|DFERR_BLOCKS_NOTRMB
| -1001
|The specified file is not a RMB format.
|-
|DFERR_BLOCKS_NOTRDI
| -1002
|The specified file is not a RDI format.
|-
|DFERR_BLOCKS_NOTRDB
| -1003
|The specified file is not a RDB format.
|}
== Functions ==
*[[Daggerfall:DFRemake/DFELoadDungeonBlock|DFELoadDungeonBlock]] : Load a dungeon block (RDB) according to its filename.
*[[Daggerfall:DFRemake/DFEGetFirstDungeonObject|DFEGetFirstDungeonObject]] : Start iterating through pieces in the current dungeon block.
*[[Daggerfall:DFRemake/DFEGetNextDungeonObject|DFEGetNextDungeonObject]] : Continue iterating through pieces in the current dungeon block.
| 2,439,175
|
2021-07-12T20:33:39Z
|
Dcsg
|
Blocks.bsa contains information on building dungeon and location blocks from the component 3d objects. Within the Bsa file there are several differet file formats:
RDB: Hold dungeon block data (Random Dungeon Block?)
RMB: Hold location block data (towns, etc...) (Random Map Block?)
RDI: Related to dungeons (Random Dungeon Information?) but currently unknown.
General Design
The Blocks.bsa directory will be read the first time it is needed (when a RDB/RMB file is loaded or at the start of an iteration request).
One RDB/RMB file will be loaded at a time.
RDB/RMB files will be accessed/loaded according to their filename (8.3 format).
Information will be passed onto DarkBasic using memblocks with user defined structures (will required manual extraction in DB).
Object angles in dungeon blocks can be converted to degrees by multiplying by 540/1024. This results in some angles that are very large but (>360) it seems to work fine.
Error Codes
The following table lists the Blocks.bsa related error codes:
Functions
DFELoadDungeonBlock : Load a dungeon block (RDB) according to its filename.
DFEGetFirstDungeonObject : Start iterating through pieces in the current dungeon block.
DFEGetNextDungeonObject : Continue iterating through pieces in the current dungeon block.
|
156
| 1,428
|
https://en.uesp.net/wiki/Tes2Mod:DFRemake/DFELoadDungeonBlock
|
Tes2Mod:DFRemake/DFELoadDungeonBlock
|
{{Trail|DFRemake}}
== integer DFELoadDungeonBlock ( LPSTR Filename ) ==
=== Inputs ===
*'''Filename''': The RDB file to load, ex: "N0000019.RDB". Not case sensitive.
=== Outputs ===
Returns DFERR_SUCCESS on success or the error code on any error.
=== Description ===
Attempt to load a RDB dungeon block from the blocks.bsa file.
=== Example ===
Local ErrResult as integer
ErrResult = DFELoadDungeonBlock("N0000019.RDB")
if (ErrResult <> DFERR_SUCCESS) then End
__NOTOC__
| 2,439,183
|
2021-07-12T20:33:39Z
|
Dcsg
|
integer DFELoadDungeonBlock ( LPSTR Filename )
Inputs
Filename: The RDB file to load, ex: "N0000019.RDB". Not case sensitive.
Outputs
Returns DFERR_SUCCESS on success or the error code on any error.
Description
Attempt to load a RDB dungeon block from the blocks.bsa file.
Example
Local ErrResult as integer
ErrResult = DFELoadDungeonBlock("N0000019.RDB")
if (ErrResult <> DFERR_SUCCESS) then End
|
156
| 1,429
|
https://en.uesp.net/wiki/Tes2Mod:DFRemake/DFEGetFirstDungeonObject
|
Tes2Mod:DFRemake/DFEGetFirstDungeonObject
|
{{Trail|DFRemake}}
== integer DFEGetFirstDungeonObject ( DWORD MemblockPtr ) ==
=== Inputs ===
*'''MemblockPtr''': The pointer to a memblock from the ''GET MEMBLOCK PTR'' command.
=== Outputs ===
Returns 0 if there are no objects in the current block to iterate through or 1 on success.
=== Description ===
Begins iterating through all objects in the current dungeon block, storing information in the given memblock. Memblocks should be allocated with 256 bytes. See [[Daggerfall:DFRemake/DFEGetNextDungeonObject|DFEGetNextDungeonObject]] for more information including the format of memblock data.
=== Example ===
Local Result as Integer
make memblock 1, 256
Result = DFEGetFirstDungeonObject(get memblock ptr(1))
__NOTOC__
| 2,439,143
|
2021-07-12T20:33:36Z
|
Dcsg
|
integer DFEGetFirstDungeonObject ( DWORD MemblockPtr )
Inputs
MemblockPtr: The pointer to a memblock from the GET MEMBLOCK PTR command.
Outputs
Returns 0 if there are no objects in the current block to iterate through or 1 on success.
Description
Begins iterating through all objects in the current dungeon block, storing information in the given memblock. Memblocks should be allocated with 256 bytes. See DFEGetNextDungeonObject for more information including the format of memblock data.
Example
Local Result as Integer
make memblock 1, 256
Result = DFEGetFirstDungeonObject(get memblock ptr(1))
|
156
| 1,430
|
https://en.uesp.net/wiki/Tes2Mod:DFRemake/DFEGetNextDungeonObject
|
Tes2Mod:DFRemake/DFEGetNextDungeonObject
|
{{Trail|DFRemake}}
== integer DFEGetNextDungeonObject ( DWORD MemblockPtr ) ==
=== Inputs ===
*'''MemblockPtr''': The pointer to a memblock from the ''GET MEMBLOCK PTR'' command.
=== Outputs ===
Returns 0 if there are no objects left in the current block to iterate through or 1 on success.
=== Description ===
Continues iterating through objects in the current dungeon block, storing information in the given memblock, after an initial call to [[Daggerfall:DFRemake/DFEGetFirstDungeonObject|DFEGetFirstDungeonObject]]. Memblocks should be allocated with 256 bytes. The memblock structure is as follows:
DWORD ObjectValue; /* The object used (from arch3d.bsa) */
float XPos; /* Position of object in block */
float YPos;
float ZPos;
float XAngle; /* Angle of object in block */
float YAngle;
float ZAngle;
DWORD GridX; /* Dungeon grid, most likely not needed */
DWORD GridY;
The format will likely be extended as fields as needed.
=== Example ===
Local Result as Integer
Local Object as DWORD
Local XPos as float
Local YPos as float
Local ZPos as float
make memblock 1, 256
Result = DFEGetFirstDungeonObject(get memblock ptr(1))
while ( Result )
Object = memblock dword(1, 0)
XPos = memblock float(1, 4)
YPos = memblock float(1, 8)
ZPos = memblock float(1, 12)
Print "Dungeon block as object #", ObjectValue, " at position: ", XPos, ", ", YPos, ", ", ZPos
Result = DFEGetNextDungeonObject(get memblock ptr(1))
endwhile
delete memblock 1
__NOTOC__
| 2,439,157
|
2021-07-12T20:33:37Z
|
Dcsg
|
integer DFEGetNextDungeonObject ( DWORD MemblockPtr )
Inputs
MemblockPtr: The pointer to a memblock from the GET MEMBLOCK PTR command.
Outputs
Returns 0 if there are no objects left in the current block to iterate through or 1 on success.
Description
Continues iterating through objects in the current dungeon block, storing information in the given memblock, after an initial call to DFEGetFirstDungeonObject. Memblocks should be allocated with 256 bytes. The memblock structure is as follows:
DWORD ObjectValue; /* The object used (from arch3d.bsa) */
float XPos; /* Position of object in block */
float YPos;
float ZPos;
float XAngle; /* Angle of object in block */
float YAngle;
float ZAngle;
DWORD GridX; /* Dungeon grid, most likely not needed */
DWORD GridY;
The format will likely be extended as fields as needed.
Example
Local Result as Integer
Local Object as DWORD
Local XPos as float
Local YPos as float
Local ZPos as float
make memblock 1, 256
Result = DFEGetFirstDungeonObject(get memblock ptr(1))
while ( Result )
Object = memblock dword(1, 0)
XPos = memblock float(1, 4)
YPos = memblock float(1, 8)
ZPos = memblock float(1, 12)
Print "Dungeon block as object #", ObjectValue, " at position: ", XPos, ", ", YPos, ", ", ZPos
Result = DFEGetNextDungeonObject(get memblock ptr(1))
endwhile
delete memblock 1
|
156
| 1,431
|
https://en.uesp.net/wiki/Tes2Mod:DFRemake/Resource_-_Objects
|
Tes2Mod:DFRemake/Resource - Objects
|
{{Trail|DFRemake}}
This page describes the part of the Resource Manager dedicated to loading and caching 3d objects (arch3d.bsa).
== General Design ==
== RMObjects() List ==
[[Daggerfall:DFRemake/Resource - RMObjects|RMObjects()]] is a global list containing all the currently cached objects. The list should only be accessed read only for object info (don't manually write data in the list unless you are familiar with things). Use the available functions for adding/removing objects from the cache.
== Public Functions ==
The following are the publically available object resource manager functions can be used.
*[[Daggerfall:DFRemake/Resource - RMInitObjects|RMInitObjects]] : Initializes the object part of the resource manager.
*[[Daggerfall:DFRemake/Resource - RMDestroyObjects|RMDestroyObjects]] : Destroys the object part of the resource manager.
*[[Daggerfall:DFRemake/Resource - RMClearObjectCache|RMClearObjectCache]] : Deletes all regular objects currently in the cache.
*[[Daggerfall:DFRemake/Resource - RMGetFreeObjectID|RMGetFreeObjectID]] : Returns the next available object ID.
*[[Daggerfall:DFRemake/Resource - RMGetFreeMeshID|RMGetFreeMeshID]] : Returns the next available mesh ID.
*[[Daggerfall:DFRemake/Resource - RMGet3dObject|RMGet3dObject]] : Access/load an object record.
*[[Daggerfall:DFRemake/Resource - RMGet3dObjectInstance|RMGet3dObjectInstance]] : Create an instance of the given object.
*[[Daggerfall:DFRemake/Resource - RMGet3dObjectCopy|RMGet3dObjectCopy]] : Create a new copy of the given object.
*[[Daggerfall:DFRemake/Resource - RMDumpObjects|RMDumpObjects]] : Outputs info about all objects in the cache to the log file.
*[[Daggerfall:DFRemake/Resource - RMDeferenceObject|RMDereferenceObject]] : Decreases the reference count of the given object.
| 2,439,215
|
2021-07-12T20:33:44Z
|
Dcsg
|
This page describes the part of the Resource Manager dedicated to loading and caching 3d objects (arch3d.bsa).
General Design
RMObjects() List
RMObjects() is a global list containing all the currently cached objects. The list should only be accessed read only for object info (don't manually write data in the list unless you are familiar with things). Use the available functions for adding/removing objects from the cache.
Public Functions
The following are the publically available object resource manager functions can be used.
RMInitObjects : Initializes the object part of the resource manager.
RMDestroyObjects : Destroys the object part of the resource manager.
RMClearObjectCache : Deletes all regular objects currently in the cache.
RMGetFreeObjectID : Returns the next available object ID.
RMGetFreeMeshID : Returns the next available mesh ID.
RMGet3dObject : Access/load an object record.
RMGet3dObjectInstance : Create an instance of the given object.
RMGet3dObjectCopy : Create a new copy of the given object.
RMDumpObjects : Outputs info about all objects in the cache to the log file.
RMDereferenceObject : Decreases the reference count of the given object.
|
156
| 1,432
|
https://en.uesp.net/wiki/Tes2Mod:DFRemake/Resource_-_RMGetFreeObjectID
|
Tes2Mod:DFRemake/Resource - RMGetFreeObjectID
|
{{Trail|DFRemake}}
== DWORD RMGetFreeObjectID ( ) ==
=== Inputs ===
None
=== Outputs ===
Returns the next available object ID. The ID is guaranteed to be valid and not currently in use.
=== Description ===
Use this function to obtain a free object ID used for object creation.
=== Notes ===
The only way this function can fail to return a valid object ID is if all IDs are currently in use. Since object IDs range from 1000 to 1 million, this is unlikely to occur. Object IDs returned by this function start at 1000 leaving the lower IDs available for special purposes. IDs are limited to 1 million since large object IDs seem to require too much memory and slow down the system.
Typical access time for this function is < 0.004 ms for the first 999,000 objects created.
=== Example ===
Local NewID as DWORD
NewID = RMGetFreeObjectID()
make object box NewID, 10, 10, 10
__NOTOC__
| 2,439,243
|
2021-07-12T20:33:46Z
|
Dcsg
|
DWORD RMGetFreeObjectID ( )
Inputs
None
Outputs
Returns the next available object ID. The ID is guaranteed to be valid and not currently in use.
Description
Use this function to obtain a free object ID used for object creation.
Notes
The only way this function can fail to return a valid object ID is if all IDs are currently in use. Since object IDs range from 1000 to 1 million, this is unlikely to occur. Object IDs returned by this function start at 1000 leaving the lower IDs available for special purposes. IDs are limited to 1 million since large object IDs seem to require too much memory and slow down the system.
Typical access time for this function is < 0.004 ms for the first 999,000 objects created.
Example
Local NewID as DWORD
NewID = RMGetFreeObjectID()
make object box NewID, 10, 10, 10
|
156
| 1,433
|
https://en.uesp.net/wiki/Tes2Mod:DFRemake/Resource_-_RMGet3dObject
|
Tes2Mod:DFRemake/Resource - RMGet3dObject
|
{{Trail|DFRemake}}
== integer RMGetObject ( DWORD ObjectValue ) ==
=== Inputs ===
*'''ObjectValue''': The object value (from the Arch3d directory) that you wish to load/access.
=== Outputs ===
Returns 1 on success and the global RMObjects() list is set to the given object. On failure 0 is returned and the RMObjects() list is set to the NULL object.
=== Description ===
This function accesses, or loads, the specified object, setting the RMObjects() list to the given object. If the object currently exists in the cache, it is merely accessed. If it doesn't exist, the object is loaded and added to the cache. If the object cannot be loaded the RMObjects() list is set to the NULL object to ensure a valid object is available.
New objects are hidden and moved far from the origin (negative direction). The intent is to never use the copy of the object in the cache, but instead to make instances and copies of the object and place them into the world as needed.
=== Notes ===
Need rough access times...
=== Example ===
Local Result as integer
Result = RMGetObject(456)
if (not Result) then End
print "Object 456 found using ID #", RMObjects().ObjectID
__NOTOC__
| 2,439,235
|
2021-07-12T20:33:45Z
|
Dcsg
|
integer RMGetObject ( DWORD ObjectValue )
Inputs
ObjectValue: The object value (from the Arch3d directory) that you wish to load/access.
Outputs
Returns 1 on success and the global RMObjects() list is set to the given object. On failure 0 is returned and the RMObjects() list is set to the NULL object.
Description
This function accesses, or loads, the specified object, setting the RMObjects() list to the given object. If the object currently exists in the cache, it is merely accessed. If it doesn't exist, the object is loaded and added to the cache. If the object cannot be loaded the RMObjects() list is set to the NULL object to ensure a valid object is available.
New objects are hidden and moved far from the origin (negative direction). The intent is to never use the copy of the object in the cache, but instead to make instances and copies of the object and place them into the world as needed.
Notes
Need rough access times...
Example
Local Result as integer
Result = RMGetObject(456)
if (not Result) then End
print "Object 456 found using ID #", RMObjects().ObjectID
|
156
| 1,434
|
https://en.uesp.net/wiki/Tes2Mod:DFRemake/Resource_-_RMGet3dObjectInstance
|
Tes2Mod:DFRemake/Resource - RMGet3dObjectInstance
|
{{Trail|DFRemake}}
== DWORD RMGetObjectInstance ( DWORD ObjectValue ) ==
=== Inputs ===
*'''ObjectValue''': The object value (from the Arch3d directory) that you wish to create an instance of.
=== Outputs ===
Returns the object ID of the newly created object instance.
=== Description ===
Use this function to create an instance of the given object (object value from the Arch3d directory). An instanced object shares much of its data with the original object but can be moved, rotated, and animated seperately.
=== Notes ===
This function should never fail but will return 0 if it does. It can only fail if the NULL object does not exist (meaning an invalid object cache state).
=== Example ===
Local NewID as DWORD
NewID = RMGetObjectInstance(456)
Position Object NewID, 10, 30, 20
__NOTOC__
| 2,439,239
|
2021-07-12T20:33:46Z
|
Dcsg
|
DWORD RMGetObjectInstance ( DWORD ObjectValue )
Inputs
ObjectValue: The object value (from the Arch3d directory) that you wish to create an instance of.
Outputs
Returns the object ID of the newly created object instance.
Description
Use this function to create an instance of the given object (object value from the Arch3d directory). An instanced object shares much of its data with the original object but can be moved, rotated, and animated seperately.
Notes
This function should never fail but will return 0 if it does. It can only fail if the NULL object does not exist (meaning an invalid object cache state).
Example
Local NewID as DWORD
NewID = RMGetObjectInstance(456)
Position Object NewID, 10, 30, 20
|
156
| 1,435
|
https://en.uesp.net/wiki/Tes2Mod:DFRemake/Resource_-_RMGet3dObjectCopy
|
Tes2Mod:DFRemake/Resource - RMGet3dObjectCopy
|
{{Trail|DFRemake}}
== DWORD RMGetObjectCopy ( DWORD ObjectValue ) ==
=== Inputs ===
*'''ObjectValue''': The object value (from the Arch3d directory) that you wish to create a copy of
=== Outputs ===
Returns the object ID of the newly created object.
=== Description ===
Use this function to create a new copy of the given object (object value from the Arch3d directory).
=== Notes ===
This function should never fail but will return 0 if it does. It can only fail if the NULL object does not exist (meaning an invalid object cache state).
=== Example ===
Local NewID as DWORD
NewID = RMGetObjectCopy(456)
Position Object NewID, 10, 30, 20
__NOTOC__
| 2,439,237
|
2021-07-12T20:33:46Z
|
Dcsg
|
DWORD RMGetObjectCopy ( DWORD ObjectValue )
Inputs
ObjectValue: The object value (from the Arch3d directory) that you wish to create a copy of
Outputs
Returns the object ID of the newly created object.
Description
Use this function to create a new copy of the given object (object value from the Arch3d directory).
Notes
This function should never fail but will return 0 if it does. It can only fail if the NULL object does not exist (meaning an invalid object cache state).
Example
Local NewID as DWORD
NewID = RMGetObjectCopy(456)
Position Object NewID, 10, 30, 20
|
156
| 1,436
|
https://en.uesp.net/wiki/Tes2Mod:DFRemake/Resource_-_RMInitObjects
|
Tes2Mod:DFRemake/Resource - RMInitObjects
|
{{Trail|DFRemake}}
== integer RMInitObjects ( ) ==
=== Inputs ===
None
=== Outputs ===
Returns 1 on success and 0 on failure. On failure the program should be aborted.
=== Description ===
Call this program once at startup to initialize the object resource manager.
=== Example ===
Local Result as integer
Result = RMInitObjects()
if (not Result) then End
__NOTOC__
| 2,439,247
|
2021-07-12T20:33:46Z
|
Dcsg
|
integer RMInitObjects ( )
Inputs
None
Outputs
Returns 1 on success and 0 on failure. On failure the program should be aborted.
Description
Call this program once at startup to initialize the object resource manager.
Example
Local Result as integer
Result = RMInitObjects()
if (not Result) then End
|
156
| 1,437
|
https://en.uesp.net/wiki/Tes2Mod:DFRemake/Resource_-_RMDestroyObjects
|
Tes2Mod:DFRemake/Resource - RMDestroyObjects
|
{{Trail|DFRemake}}
== RMDestroyObjects ( ) ==
=== Inputs ===
None
=== Outputs ===
None
=== Description ===
Call this program once at the end of the program to destroy the object resource manager. Do not use this function during the program execution to clear the cache (use [[Daggerfall:DFRemake/Resource - RMClearObjectCache|RMClearObjectCache]] instead).
=== Example ===
RMDestroyObjects()
__NOTOC__
| 2,439,225
|
2021-07-12T20:33:45Z
|
Dcsg
|
RMDestroyObjects ( )
Inputs
None
Outputs
None
Description
Call this program once at the end of the program to destroy the object resource manager. Do not use this function during the program execution to clear the cache (use RMClearObjectCache instead).
Example
RMDestroyObjects()
|
156
| 1,438
|
https://en.uesp.net/wiki/Tes2Mod:DFRemake/Resource_-_RMClearObjectCache
|
Tes2Mod:DFRemake/Resource - RMClearObjectCache
|
{{Trail|DFRemake}}
== RMClearObjectCache ( ) ==
=== Inputs ===
None
=== Outputs ===
None
=== Description ===
Use this function to delete all objects currently in the object cache. Special objects (like the NULL object) will not be deleted.
=== Example ===
RMClearObjectCache()
__NOTOC__
| 2,439,217
|
2021-07-12T20:33:44Z
|
Dcsg
|
RMClearObjectCache ( )
Inputs
None
Outputs
None
Description
Use this function to delete all objects currently in the object cache. Special objects (like the NULL object) will not be deleted.
Example
RMClearObjectCache()
|
156
| 1,440
|
https://en.uesp.net/wiki/Tes2Mod:DFRemake/Resource_-_RMObjects
|
Tes2Mod:DFRemake/Resource - RMObjects
|
{{Trail|DFRemake}}
RMObjects() is a global list, user defined type ''rmobjects_t'', that holds all cached 3d objects.
== Fields ==
The following table lists the RMObjects() fields.
{| border="1" align="center" cellpadding="1" cellspacing="0"
|-
! style="background: #999999;" |Field
! style="background: #999999;" |Type
! style="background: #999999;" |Description
|-
|ObjectID
|DWORD
|The DarkBasic object ID.
|-
|ObjectValue
|DWORD
|The Daggerfall object value from the Arch3d directory.
|-
|Flags
|DWORD
|Various object parameters.
|-
|Size
|DWORD
|The estimated size of the object in bytes.
|-
|Hash
|DWORD
|The hash value of the object (may be used to help speed up finding objects).
|-
|LastAccessTime
|double float
|The last time the object was accessed. From DFEGetTimerMS().
|-
|NumAccesses
|DWORD
|The total number of times the object has been accessed.
|-
|NumReferences
|DWORD
|The current number of references using the object in the world.
|-
|}
| 2,439,253
|
2021-07-12T20:33:46Z
|
Dcsg
|
RMObjects() is a global list, user defined type rmobjects_t, that holds all cached 3d objects.
Fields
The following table lists the RMObjects() fields.
|
156
| 1,441
|
https://en.uesp.net/wiki/Tes2Mod:DFRemake/Resource_-_Dungeon
|
Tes2Mod:DFRemake/Resource - Dungeon
|
{{Trail|DFRemake}}
The resource manager will hold the needed information for one dungeon at a time.
== Design Notes ==
*Although in DF, a Dungeon is composed of multiple blocks, here a Dungeon is a collection of objects (and other records). Blocks are only needed during dungeon creation and it will be easier to store the objects individually.
*Dungeon objects will be hidden/disabled when the player is not in the dungeon.
== Objects ==
Objects within the dungeon include any static 3d object such as walls, rooms, furniture, etc.... Dungeon objects will be stored in one list, RMDungeonObjects() with the following fields.
*'''DWORD ObjectID''': The DarkBasic object ID.
*'''DWORD RefObjectID''': The referenced object ID (dungeon objects will be instanced). The referenced ID is stored so that it can be
properly dereferenced once the dungeon is destroyed (for reference counting).
*DWORD Flags: Various object parameters.
== Flats ==
Flats will be stored in a separate list, RMDungeonFlats(), so they can be quickly accessed. They will use the same fields as objects.
== Actions ==
Actions include things like switches, levers, and platforms that can move. Doors do not use action records.
*'''DWORD ActionID''': The unique value for this action.
*'''DWORD SourceObjectID''': The object that triggers this action.
*'''DWORD TargetObjectID''': This value is 0 if the action has no target object.
*BYTE ActionType: Type of action to perform (translation, rotation, etc...)
*DWORD Flags: Various flags depending on the action type.
*float Duration: How long to perform the action (seconds).
*float Delta: How much action to perform over the duration (depends on the action type).
== Lights ==
The list of lights in the dungeon, RMDungeonLights(), with the following fields.
*'''DWORD LightID''': The DarkBasic light identifier value.
*DWORD Flags: Holds various light parameters.
== Exits ==
A list of dungeon exits, RMDungeonExits(). Although there is usually only one exit in a dungeon, we'll use a list for flexability.
*ObjectID?
*Destination information (exterior location, X/Y/Z?)
== Functions ==
*[[Daggerfall:DFRemake/Resource - RMInitDungeon|RMInitDungeon]] : Initializes the dungeon resource manager at startup.
*[[Daggerfall:DFRemake/Resource - RMDestroyDungeon|RMDestroyDungeon]] : Destroys the dungeon resource manager at program end.
*[[Daggerfall:DFRemake/Resource - RMResetDungeon|RMResetDungeon]] : Clears the current dungeon information.
*[[Daggerfall:DFRemake/Resource - RMLoadDungeonBlock|RMLoadDungeonBlock]] : Loads a dungeon block file and adds it to the current dungeon.
*[[Daggerfall:DFRemake/Resource - RMFindDungeonObjectID|RMFindDungeonObjectID]] : Searches dungeon objects for the given object.
*[[Daggerfall:DFRemake/Resource - RMMakeDungeonBlockFilename|RMMakeDungeonBlockFilename]] : Create a dungeon block filename for loading from Blocks.bsa.
*[[Daggerfall:DFRemake/Resource - RMCreateDungeon|RMCreateDungeon]] : Creates the current dungeon (as set in DFELibrary).
*[[Daggerfall:DFRemake/Resource - RMEnableDungeon|RMEnableDungeon]] : Enables and displays the current dungeon.
*[[Daggerfall:DFRemake/Resource - RMDisableDungeon|RMDisableDungeon]] : Disables and hides the current dungeon.
| 2,439,209
|
2021-07-12T20:33:44Z
|
Dcsg
|
The resource manager will hold the needed information for one dungeon at a time.
Design Notes
Although in DF, a Dungeon is composed of multiple blocks, here a Dungeon is a collection of objects (and other records). Blocks are only needed during dungeon creation and it will be easier to store the objects individually.
Dungeon objects will be hidden/disabled when the player is not in the dungeon.
Objects
Objects within the dungeon include any static 3d object such as walls, rooms, furniture, etc.... Dungeon objects will be stored in one list, RMDungeonObjects() with the following fields.
DWORD ObjectID: The DarkBasic object ID.
DWORD RefObjectID: The referenced object ID (dungeon objects will be instanced). The referenced ID is stored so that it can be
properly dereferenced once the dungeon is destroyed (for reference counting).
DWORD Flags: Various object parameters.
Flats
Flats will be stored in a separate list, RMDungeonFlats(), so they can be quickly accessed. They will use the same fields as objects.
Actions
Actions include things like switches, levers, and platforms that can move. Doors do not use action records.
DWORD ActionID: The unique value for this action.
DWORD SourceObjectID: The object that triggers this action.
DWORD TargetObjectID: This value is 0 if the action has no target object.
BYTE ActionType: Type of action to perform (translation, rotation, etc...)
DWORD Flags: Various flags depending on the action type.
float Duration: How long to perform the action (seconds).
float Delta: How much action to perform over the duration (depends on the action type).
Lights
The list of lights in the dungeon, RMDungeonLights(), with the following fields.
DWORD LightID: The DarkBasic light identifier value.
DWORD Flags: Holds various light parameters.
Exits
A list of dungeon exits, RMDungeonExits(). Although there is usually only one exit in a dungeon, we'll use a list for flexability.
ObjectID?
Destination information (exterior location, X/Y/Z?)
Functions
RMInitDungeon : Initializes the dungeon resource manager at startup.
RMDestroyDungeon : Destroys the dungeon resource manager at program end.
RMResetDungeon : Clears the current dungeon information.
RMLoadDungeonBlock : Loads a dungeon block file and adds it to the current dungeon.
RMFindDungeonObjectID : Searches dungeon objects for the given object.
RMMakeDungeonBlockFilename : Create a dungeon block filename for loading from Blocks.bsa.
RMCreateDungeon : Creates the current dungeon (as set in DFELibrary).
RMEnableDungeon : Enables and displays the current dungeon.
RMDisableDungeon : Disables and hides the current dungeon.
|
156
| 1,442
|
https://en.uesp.net/wiki/Tes2Mod:DFRemake/DarkBasic_Bugs
|
Tes2Mod:DFRemake/DarkBasic Bugs
|
{{Trail|DFRemake}}
This page contains a list of possible bugs we've encountered in DarkBasic Pro. Where available, the DB version should be included as well as in which version the bug was fixed in.
*'''IDE Crash''' (v5.4): Rarely crashes when trying to copy text in the IDE (only happened a few times).
*'''DLL Parameter Mismatch''' (v5.4): There is some sort of parameter mismatch when calling a DLL function that takes a DWORD and returns a string. If we have the string table definition ''SomeFunc[%SD%SomeFunc%SomeFunc'' with the export definition ''DWORD SomeFunc(DWORD Value)'' then the input Value is always 0. If, however, we change the export definition to "''DWORD SomeFunc(DWORD Value1, DWORD Value2)'' and call it in DB with ''Name$ = SomeFunc(123, 456)'' then Value1 is still 0 and Value2 is set to 123. This doesn't seem to happen with functions that return other types.
*'''Constant Strings''' (v5.7): There is something wrong with constant string values, for example:
#CONSTANT DF_GAME_PATH = "e:\dagger\"
Result = DFESetGamePath(DF_GAME_PATH)
results in the compile-time error "Must close speech marks" (speech marks?). DFESetGamePath here is an external DLL function call.
*'''IDE Function Completion''' (v5.7): A minor bug with the function help displayed in the status bar while you type in the IDE. For example, if you type "TESTLOG" the function popup will show the LOG function.
| 2,439,187
|
2021-07-12T20:33:40Z
|
Dcsg
|
This page contains a list of possible bugs we've encountered in DarkBasic Pro. Where available, the DB version should be included as well as in which version the bug was fixed in.
IDE Crash (v5.4): Rarely crashes when trying to copy text in the IDE (only happened a few times).
DLL Parameter Mismatch (v5.4): There is some sort of parameter mismatch when calling a DLL function that takes a DWORD and returns a string. If we have the string table definition SomeFunc[%SD%SomeFunc%SomeFunc with the export definition DWORD SomeFunc(DWORD Value) then the input Value is always 0. If, however, we change the export definition to "DWORD SomeFunc(DWORD Value1, DWORD Value2) and call it in DB with Name$ = SomeFunc(123, 456) then Value1 is still 0 and Value2 is set to 123. This doesn't seem to happen with functions that return other types.
Constant Strings (v5.7): There is something wrong with constant string values, for example:
#CONSTANT DF_GAME_PATH = "e:\dagger\"
Result = DFESetGamePath(DF_GAME_PATH)
results in the compile-time error "Must close speech marks" (speech marks?). DFESetGamePath here is an external DLL function call.
IDE Function Completion (v5.7): A minor bug with the function help displayed in the status bar while you type in the IDE. For example, if you type "TESTLOG" the function popup will show the LOG function.
|
156
| 1,443
|
https://en.uesp.net/wiki/Tes2Mod:DFRemake/DarkBasic_Tips
|
Tes2Mod:DFRemake/DarkBasic Tips
|
{{Trail|DFRemake}}
This page contains general tips to help one get the most out of DarkBasic. This includes a number of things in DB that are counter-intuitive or different from other common programming languages.
== General ==
*Using very large object IDs (10-100 million) results in a very slow execution time as well as greatly increased memory usage.
== Functions ==
*All input parameters are passed by value (no such thing as pass-by-reference).
*Cannot return user defined types.
*Do accept arrays as input parameters. The syntax ''Function TestFunc(dim array(100) as dword)'' does compile but you get an error if you try to access the array in the function.
*Cannot return arrays.
== Variable Types ==
*UDTs cannot be returned by functions
*UDTs cannot be passed into DLLs (not directly or very easily at any rate)
*UDTs cannot contain arrays
*Beware of mixing DWORDs with the ABS() command. For example, ''Value3 = ABS(Value1 - Value2)'' may not return what you think it should if all the values are DWORDs.
== Arrays/Lists ==
*The time taken to add elements to lists seems to be non-linear and increases dramatically as the list grows. For example, adding 100 elements takes 0.25 ms, 1000 takes 15 ms, 10000 takes 1500 ms. Deleting elements roughly follows the same trend.
| 2,439,191
|
2021-07-12T20:33:43Z
|
Dcsg
|
This page contains general tips to help one get the most out of DarkBasic. This includes a number of things in DB that are counter-intuitive or different from other common programming languages.
General
Using very large object IDs (10-100 million) results in a very slow execution time as well as greatly increased memory usage.
Functions
All input parameters are passed by value (no such thing as pass-by-reference).
Cannot return user defined types.
Do accept arrays as input parameters. The syntax Function TestFunc(dim array(100) as dword) does compile but you get an error if you try to access the array in the function.
Cannot return arrays.
Variable Types
UDTs cannot be returned by functions
UDTs cannot be passed into DLLs (not directly or very easily at any rate)
UDTs cannot contain arrays
Beware of mixing DWORDs with the ABS() command. For example, Value3 = ABS(Value1 - Value2) may not return what you think it should if all the values are DWORDs.
Arrays/Lists
The time taken to add elements to lists seems to be non-linear and increases dramatically as the list grows. For example, adding 100 elements takes 0.25 ms, 1000 takes 15 ms, 10000 takes 1500 ms. Deleting elements roughly follows the same trend.
|
156
| 1,444
|
https://en.uesp.net/wiki/Tes2Mod:DFRemake/DarkBasic_Wishlist
|
Tes2Mod:DFRemake/DarkBasic Wishlist
|
{{Trail|DFRemake}}
This page lists all the features and improvements we'd like to see added to DarkBasic.
*'''Consistant Command Naming''': For example ''SET LIGHT RANGE'' and ''COLOR LIGHT'' (why isn't it ''SET LIGHT COLOR''?). Makes it harder to guess commands (fortunately the coloring of commands in the IDE helps).
*'''Type Conversions''': Make it easier to define implicit type conversions. For example, if I divide 2 integers and assign the value to a float, it should not truncate the factions. Currently in order to do this I have to define one or more temporary float values.
*'''Built-In String Formatting''': There needs to be some way of created nicely formatted strings from numbers, like what you can do with the C printf() function. Something like ''StrFormat$(Value, Width, Decimals, Flags)'' would do.
*'''Compile Progress''': The current compile progress bar is difficult to gauge the overall progess of the compile (assumably it goes from 0-100 for each file?). A slightly improved progress dialog including current file and overall progress would be appreciated.
| 2,439,193
|
2021-07-12T20:33:43Z
|
Dcsg
|
This page lists all the features and improvements we'd like to see added to DarkBasic.
Consistant Command Naming: For example SET LIGHT RANGE and COLOR LIGHT (why isn't it SET LIGHT COLOR?). Makes it harder to guess commands (fortunately the coloring of commands in the IDE helps).
Type Conversions: Make it easier to define implicit type conversions. For example, if I divide 2 integers and assign the value to a float, it should not truncate the factions. Currently in order to do this I have to define one or more temporary float values.
Built-In String Formatting: There needs to be some way of created nicely formatted strings from numbers, like what you can do with the C printf() function. Something like StrFormat$(Value, Width, Decimals, Flags) would do.
Compile Progress: The current compile progress bar is difficult to gauge the overall progess of the compile (assumably it goes from 0-100 for each file?). A slightly improved progress dialog including current file and overall progress would be appreciated.
|
156
| 1,445
|
https://en.uesp.net/wiki/Tes2Mod:TEXT.RSC_format
|
Tes2Mod:TEXT.RSC format
|
{{Trail|File Formats|Text Record Format}}
The '''structure of the TEXT.RSC file''' is trivial. The TEXT.RSC file is nothing more than a [[Daggerfall:Text Record Format|Text Record Database]]; there are no other data elements. In brief, it consists solely of a [[Daggerfall:Text Record Format#Text Record Database Header|TextRecordDatabaseHeader]] element, a [[Daggerfall:Text Record Format#Text Record Header List|TextRecordHeaderList]] element, and the remainder of the file consists of [[Daggerfall:Text Record Format#Text Record|TextRecord]] elements.
The file contains no other data, and the TextRecordDatabase structure begins at the file's start (Byte 0). All records conform to the [[Daggerfall:Text Record Format|Text Record Format]] specification.
==Example Records==
Example from TextRecord #5404: <blockquote title="Example from TEXT.RSC, TextRecordId #5404"><pre>
Greetings, %pcn.[0xfd]
You dare much by intruding here.[0xfd]
Nevertheless, I will allow you[0xfd]
to proceed, provided you prove as[0xfd]
perceptive as rumor reports.[0xfd]
You may be aware that I am a[0xfd]
master of the blade. But what[0xfd]
is my other favored weapon?[0xfd]
Answer correctly, then arm yourself.[0xfd][0xfe]
</pre></blockquote>
Here we see a TextRecord composed of a single TextSubrecord, which contains several centered lines.
Example from TextRecord #200: <blockquote title="Example from TEXT.RSC, TextRecordId #200"><pre>
Why did the %ra put the letters 'T.G.I.F.' on his boots? To remind himself - Toes Go In First![0xff]
Most %ra family trees don't fork![0xff]
What do a %ra and a bottle of port have in common? They're both empty from the neck up![0xff]
You know, you might be a %ra if you have grease under your toenails![0xff]
How do you get a %ra's eyes to sparkle? Put a torch in his ear![0xff]
You know, you might be a %ra if it's impossible to see food stains on your armor![0xff]
What did the %ra girl say after someone blew in her ear? 'Thanks for the refill!'[0xff]
What do you call a %ra with half a brain? Gifted![0xff]
Why do %ra women wear undergarments? To keep their ankles warm![0xff]
How do you make a %ra laugh on Morndas? Tell him a joke on Fredas![0xff]
You know, it only takes one drink to get a %ra drunk. I can't remember if it's the thirteenth or the fourteenth.[0xff]
What do you call a basement with more than one %ra? A WHINE cellar![0xff]
Over at the %nt, spitting will cost you a copper piece. But you can throw up for free![0xff]
What do a smart %ra and an orcoblin have in common? They're both extinct![0xff]
You know, lots of people say that %ra kids procrastinate too much. Well, just you wait![0xff]
What is a %ra doing when he holds his hands tight over his ears? Trying to holda thought![0xff]
How can you tell if a %ra is lying? His lips are moving![0xff]
What do you say to a %ra woman to convince her to go to bed with you? Have another ale![0xff]
Why is it %cn has the most %ra adventurers, and %cn2 has the most goblins? %cn2 had the first choice![0xff]
What is the first thing a %ra woman does in the morning? Walk home![0xff]
What did the %ra woman say after she was told she was pregnant? 'Is it mine?'![0xff]
What a %ra lacks in intelligence, he makes up for in stupidity.[0xff]
I won't eat anything that has intelligent life, but I will happily eat a politician or a %ra.[0xff][0xfe]
</pre></blockquote>
In this example, we see several TextSubrecords in this single TextRecord, none of which have any formatting information. When required, the game will select one at random from the list. So, to generate a random joke (%jok), the engine loads TextRecord 200 from TEXT.RSC, then selects a TextSubrecord at random from the list, and then displays it. As seen above, there are %ra (character's race) macros which will need to be resolved when the TextSubrecord is displayed.
| 2,214,217
|
2020-09-21T23:14:56Z
|
Dcsg
|
The structure of the TEXT.RSC file is trivial. The TEXT.RSC file is nothing more than a Text Record Database; there are no other data elements. In brief, it consists solely of a TextRecordDatabaseHeader element, a TextRecordHeaderList element, and the remainder of the file consists of TextRecord elements.
The file contains no other data, and the TextRecordDatabase structure begins at the file's start (Byte 0). All records conform to the Text Record Format specification.
Example Records
Example from TextRecord #5404:
Here we see a TextRecord composed of a single TextSubrecord, which contains several centered lines.
Example from TextRecord #200:
In this example, we see several TextSubrecords in this single TextRecord, none of which have any formatting information. When required, the game will select one at random from the list. So, to generate a random joke (%jok), the engine loads TextRecord 200 from TEXT.RSC, then selects a TextSubrecord at random from the list, and then displays it. As seen above, there are %ra (character's race) macros which will need to be resolved when the TextSubrecord is displayed.
|
156
| 1,446
|
https://en.uesp.net/wiki/Tes2Mod:Book_format
|
Tes2Mod:Book format
|
{{Trail|File Formats|Text Record Format}}
To properly understand [[Daggerfall:Daggerfall|Daggerfall's]] '''Book Format''', there are a few other topics one must learn. First, the Book Format makes extensive use of the [[Daggerfall:Text Record Format#Text Record|Text Record Format]] for storing the book's text, organized as a [[Daggerfall:Text Record Format#Text Record Database|Text Record Database]]. Secondly, the Book Format also introduces a few new records. Assuming the reader is familiar with the [[Daggerfall:Text Record Format|Text Record Format]] we shall begin.
Where appropriate, this author makes use of [ftp://ftp.rfc-editor.org/in-notes/std/std68.txt ABNF] to describe various structures.
==Book Header==
Now we are in a position to discus the Book Header structure.
The BookHeader structure defines the values and attributes which apply to the book as a whole, such as authorship or market price.
The BookHeader structure is a fairly simple format.
;BookHeader
:;[Bytes 0x00-3f] 7-bit ASCII char[64] (String[64]) Title
:: This field identifies the book's Title within the engine
:;[Bytes 0x40-7f] 7-bit ASCII char[64] (String[64]) Author
:: Identifies the book's Author within the engine
:;[Bytes 0x80-87] 7-bit ASCII char[8] (String[8]) IsNaughty
:: Valid values are the literal string "naughty " (6E 61 75 67 68 74 79 20) and a null string (00 00 00 00 00 00 00 00).
:: This may be treated as a boolean, where "naughty " is considered TRUE and a null-string is considered FALSE.
:: The <var>isNaughty</var> flag indicates if the book contains what some might view as "obscene sexual content", or otherwise inappropriate material.
:: It is unknown if this is integrated with the parental controls.
:;[Bytes 0x88-df] unsigned char (UInt8) Null1
:: Always 0x00 each.
:;[Bytes 0xe0-e3] unsigned long (UInt32) Price
:: This field impacts the book's market price.
:: Observed values range 0x0000000a, 0x0000012c, 0x00000190, 0x000003e8, 0x00001388, and 0x00002710.
:: Most books have a <var>price</var> of 0x000003e8.
:;[Bytes 0xe4-e5] unsigned short (UInt16) Rarity
:: The more this value is, the rarer this book is. (Usually 1 to 4).
:;[Bytes 0xe6-e7] unsigned short (UInt16) Unknown2
:: Unknown value which is 0x04d2 (1234) in all but BOK00100.TXT, where it is 0x4d3 (1235).
:;[Bytes 0xe8-e9] unsigned short (UInt16) Unknown3
:: Unknown value which is 0x0929 (2345) in all but BOK00100.TXT, where it is 0x092a (2346).
:;[Bytes 0xea-eb] unsigned short (UInt16) BookPageCount
:: This field indicates the count of BookPageRecord structures contained within the file.
:;[Bytes 0xec-(0xec + <var>bookPageCount</var>)] unsigned long[<var>bookPageCount</var>] (UInt32[<var>bookPageCount</var>]) BookPageOffset[<var>bookPageCount</var>]
:: Following the BookPageCount field is an array of offsets to the BookPageRecords.
:: The book is "read" from <var>bookPageOffset</var>[0] through <var>bookPageOffset</var>[<var>bookPageCount</var>].
:: Valid values for <var>bookPageOffset</var>[<var>x</var>] range from 0x00ec through 0xfffe.
:: BookPageRecords use the same definition as [[Daggerfall:Text Record Format#Text Subrecord|TextSubrecord]] structures, exceptiing they '''must''' each be terminated with an EndOfPage token.
==Book Page Records==
Each BookPageRecord structure is ''virtually'' identical to a [[Daggerfall:Text Record Format#Text Subrecord|TextSubrecord]] structure, excepting that it '''must''' be terminated with an EndOfPage token. Each <var>bookPageOffset</var>[<var>x</var>] element will point to the start of a page (which could be a formatting character) and will always be terminated with the EndOfPage token, thusly no length information is required to read a BookPageRecord structure (a simple Regular Expression would suffice).
In ABNF, we define the BookPageRecord as:
;BookPageRecord
:;Character
:: Character <nowiki>:=</nowiki> %x20-7f / PositionCode / FontCode
:;Text
:: Text <nowiki>:=</nowiki> 1*Character
:;TextLine
:: TextLine <nowiki>:=</nowiki> Text [ EndOfLine ]
:;BlankLine
:: BlankLine <nowiki>:=</nowiki> EndOfLine
:;PageLine
:: PageLine <nowiki>:=</nowiki> ( TextLine [ EndOfLine ] ) / EndOfLine ; a line can be blank, or it can contain text data.
:;BookPageRecord
:: BookPageRecord <nowiki>:=</nowiki> *PageLine EndOfPage ; a pagerecord can be a blank page, or multiple lines of text (which themselves could be blank), but alwasts terminates with the EndOfPage token.
==Deviations From Other Text Formats==
Books differ from [[Daggerfall:Text Record Format#Text Record Database|Text Record Databases]] in a few ways, but the differences are necessary. Books are meant to be read sequentially from the title page through to the end page. Therefore assigning an index number, like a TextRecordId, would be superfluous. There is no interface (with the engine as of v1.07.213) to skip to a specific page number, or open a book to a random page. Secondly, [[Daggerfall:Text Record Format#Text Records|TextRecord]] elements are meant to be accessed "randomly". By "randomly" we mean any of the records could be displayed at any time, independdently of any other records displayed or not displayed. For example, a specific TextRecord might be written to the player's log in response to a certain event (such as agreeing to a quest) on an "if and only if" logic, and there is no way to know ''a priori'' which TextRecords would be written to the log (or displayed on the screen). Furthermore many of these might not even enter into the game. The player might decline a quest. This necessitates they have some sort of unique identifier or "key"; the TextRecordId. In this way the engine can operate on logic such as "If event #23 happens, then display in a pop-up text #65".
That being said, the data contained in either are similar enough that it is speculated there is but a single text renderer within Daggerfall's engine responsible for translating the characters into the font bitmaps and parsing the formatting instructions, regardless if the text should ultimately be displayed against an NPC dialog pop-up or against a book UI.
==Caveats==
;The engine will not automatically break lines.
: PageLine elements which exceed 80 characters will simply "run off" the screen's edge. When editing and creating books, care should be taken to ensure that all PageRecord text is visible.
;EndOfPage token
;PositionCode token
;FontCode token
: The current source material (all the [[Daggerfall:Quest hacking guide#The QRC Files|QRC files]], all the book files, and the [[Daggerfall:TEXT.RSC format|TEXT.RSC file]]) indicates only books should inclulde the EndOfPage, PositionCode, and FontCode tokens within their text data. Pop-ups (such as NPC dialogs) were not meant to facilitate these tokens. [Ex: ''there are no "previous/next page" elements in the NPC dialog pop-ups.'' ]
| 2,214,222
|
2020-09-21T23:17:38Z
|
Dcsg
|
To properly understand Daggerfall's Book Format, there are a few other topics one must learn. First, the Book Format makes extensive use of the Text Record Format for storing the book's text, organized as a Text Record Database. Secondly, the Book Format also introduces a few new records. Assuming the reader is familiar with the Text Record Format we shall begin.
Where appropriate, this author makes use of [ftp://ftp.rfc-editor.org/in-notes/std/std68.txt ABNF] to describe various structures.
Book Header
Now we are in a position to discus the Book Header structure.
The BookHeader structure defines the values and attributes which apply to the book as a whole, such as authorship or market price.
The BookHeader structure is a fairly simple format.
;BookHeader
:;[Bytes 0x00-3f] 7-bit ASCII char[64] (String[64]) Title
:: This field identifies the book's Title within the engine
:;[Bytes 0x40-7f] 7-bit ASCII char[64] (String[64]) Author
:: Identifies the book's Author within the engine
:;[Bytes 0x80-87] 7-bit ASCII char[8] (String[8]) IsNaughty
:: Valid values are the literal string "naughty " (6E 61 75 67 68 74 79 20) and a null string (00 00 00 00 00 00 00 00).
:: This may be treated as a boolean, where "naughty " is considered TRUE and a null-string is considered FALSE.
:: The flag indicates if the book contains what some might view as "obscene sexual content", or otherwise inappropriate material.
:: It is unknown if this is integrated with the parental controls.
:;[Bytes 0x88-df] unsigned char (UInt8) Null1
:: Always 0x00 each.
:;[Bytes 0xe0-e3] unsigned long (UInt32) Price
:: This field impacts the book's market price.
:: Observed values range 0x0000000a, 0x0000012c, 0x00000190, 0x000003e8, 0x00001388, and 0x00002710.
:: Most books have a of 0x000003e8.
:;[Bytes 0xe4-e5] unsigned short (UInt16) Rarity
:: The more this value is, the rarer this book is. (Usually 1 to 4).
:;[Bytes 0xe6-e7] unsigned short (UInt16) Unknown2
:: Unknown value which is 0x04d2 (1234) in all but BOK00100.TXT, where it is 0x4d3 (1235).
:;[Bytes 0xe8-e9] unsigned short (UInt16) Unknown3
:: Unknown value which is 0x0929 (2345) in all but BOK00100.TXT, where it is 0x092a (2346).
:;[Bytes 0xea-eb] unsigned short (UInt16) BookPageCount
:: This field indicates the count of BookPageRecord structures contained within the file.
:;[Bytes 0xec-(0xec + )] unsigned long[ ] (UInt32[ ]) BookPageOffset[ ]
:: Following the BookPageCount field is an array of offsets to the BookPageRecords.
:: The book is "read" from [0] through [ ].
:: Valid values for [ ] range from 0x00ec through 0xfffe.
:: BookPageRecords use the same definition as TextSubrecord structures, exceptiing they must each be terminated with an EndOfPage token.
Book Page Records
Each BookPageRecord structure is virtually identical to a TextSubrecord structure, excepting that it must be terminated with an EndOfPage token. Each [ ] element will point to the start of a page (which could be a formatting character) and will always be terminated with the EndOfPage token, thusly no length information is required to read a BookPageRecord structure (a simple Regular Expression would suffice).
In ABNF, we define the BookPageRecord as:
;BookPageRecord
:;Character
:: Character %x20-7f / PositionCode / FontCode
:;Text
:: Text 1*Character
:;TextLine
:: TextLine Text [ EndOfLine ]
:;BlankLine
:: BlankLine EndOfLine
:;PageLine
:: PageLine ( TextLine [ EndOfLine ] ) / EndOfLine ; a line can be blank, or it can contain text data.
:;BookPageRecord
:: BookPageRecord *PageLine EndOfPage ; a pagerecord can be a blank page, or multiple lines of text (which themselves could be blank), but alwasts terminates with the EndOfPage token.
Deviations From Other Text Formats
Books differ from Text Record Databases in a few ways, but the differences are necessary. Books are meant to be read sequentially from the title page through to the end page. Therefore assigning an index number, like a TextRecordId, would be superfluous. There is no interface (with the engine as of v1.07.213) to skip to a specific page number, or open a book to a random page. Secondly, TextRecord elements are meant to be accessed "randomly". By "randomly" we mean any of the records could be displayed at any time, independdently of any other records displayed or not displayed. For example, a specific TextRecord might be written to the player's log in response to a certain event (such as agreeing to a quest) on an "if and only if" logic, and there is no way to know a priori which TextRecords would be written to the log (or displayed on the screen). Furthermore many of these might not even enter into the game. The player might decline a quest. This necessitates they have some sort of unique identifier or "key"; the TextRecordId. In this way the engine can operate on logic such as "If event #23 happens, then display in a pop-up text #65".
That being said, the data contained in either are similar enough that it is speculated there is but a single text renderer within Daggerfall's engine responsible for translating the characters into the font bitmaps and parsing the formatting instructions, regardless if the text should ultimately be displayed against an NPC dialog pop-up or against a book UI.
Caveats
;The engine will not automatically break lines.
: PageLine elements which exceed 80 characters will simply "run off" the screen's edge. When editing and creating books, care should be taken to ensure that all PageRecord text is visible.
;EndOfPage token
;PositionCode token
;FontCode token
: The current source material (all the QRC files, all the book files, and the TEXT.RSC file) indicates only books should inclulde the EndOfPage, PositionCode, and FontCode tokens within their text data. Pop-ups (such as NPC dialogs) were not meant to facilitate these tokens. [Ex: there are no "previous/next page" elements in the NPC dialog pop-ups. ]
|
156
| 1,450
|
https://en.uesp.net/wiki/Tes2Mod:DFRemake/Resource_-_RMGetFreeMeshID
|
Tes2Mod:DFRemake/Resource - RMGetFreeMeshID
|
{{Trail|DFRemake}}
== DWORD RMGetFreeMeshID ( ) ==
=== Inputs ===
None
=== Outputs ===
Returns the next available mesh ID. The ID is guaranteed to be valid and not currently in use.
=== Description ===
Use this function to obtain a free mesh ID used for mesh creation.
=== Notes ===
The only way this function can fail to return a valid mesh ID is if all IDs are currently in use. Since mesh IDs range from 1000 to 1 million, this is unlikely to occur. Mesh IDs returned by this function start at 1000 leaving the lower IDs available for special purposes.
=== Example ===
Local NewID as DWORD
NewID = RMGetFreeMeshID()
Load Mesh "somefile.x", NewID
__NOTOC__
| 2,439,241
|
2021-07-12T20:33:46Z
|
Dcsg
|
DWORD RMGetFreeMeshID ( )
Inputs
None
Outputs
Returns the next available mesh ID. The ID is guaranteed to be valid and not currently in use.
Description
Use this function to obtain a free mesh ID used for mesh creation.
Notes
The only way this function can fail to return a valid mesh ID is if all IDs are currently in use. Since mesh IDs range from 1000 to 1 million, this is unlikely to occur. Mesh IDs returned by this function start at 1000 leaving the lower IDs available for special purposes.
Example
Local NewID as DWORD
NewID = RMGetFreeMeshID()
Load Mesh "somefile.x", NewID
|
156
| 1,451
|
https://en.uesp.net/wiki/Tes2Mod:DFRemake/Resource_-_RMDumpObjects
|
Tes2Mod:DFRemake/Resource - RMDumpObjects
|
{{Trail|DFRemake}}
== RMDumpObjects ( ) ==
=== Inputs ===
None
=== Outputs ===
None
=== Description ===
Outputs basic information on all objects in the cache to the log file.
=== Example ===
RMDumpObjects()
__NOTOC__
| 2,439,229
|
2021-07-12T20:33:45Z
|
Dcsg
|
RMDumpObjects ( )
Inputs
None
Outputs
None
Description
Outputs basic information on all objects in the cache to the log file.
Example
RMDumpObjects()
|
156
| 1,452
|
https://en.uesp.net/wiki/Tes2Mod:DFRemake/Resource_-_Storing_Data
|
Tes2Mod:DFRemake/Resource - Storing Data
|
{{Trail|DFRemake}}
There are a few ways to store and access resources within DarkBasic.
== User Defined Types ==
It is important to note the limitations of user defined types (UDT) within DarkBasic.
*Like other types, UDTs are passed by value into functions
*UDTs cannot be returned by functions
*UDTs cannot be passed into DLLs (not directly or very easily at any rate)
*UDTs cannot contain arrays
== Lists ==
Lists, or dynamic arrays, are the obvious choice for storing resouce types. Given the limitations of how things can be passed to/from functions, they will need to be accessed globally (all arrays are global by default).
== Performance ==
*Although a while loop is ideal for iterating through lists, it is much slower (up to 6000 times slower) than for loops due to built-in sync/update code. For this reason one should always use for loops to iterate lists.
*Simple iteration/comparison takes roughly 1 ms per 10000 elements (roughly linear).
*Adding items at the bottom of the list appears to be non-linear as the number of elements in the list increases. For instance adding 100 elements takes 0.25 ms, 1000 takes 15 ms, 10000 takes 1500 ms.
*There appears to be no speed difference between adding items from the top or at the bottom.
*Time taken to add elements is based on their size ,especially for UDTs. For example, adding 10000 BYTEs takes 1300 ms, 10000 DWORDs takes 1500 ms, 10000 UDTs (1 field, 4 bytes total) takes 2100 ms, and 10000 UDTs (3 fields, 9 bytes total) takes 7000 ms.
*When iterating in a for loop, storing the ARRAY COUNT() in a local variable is slightly faster. For example, iterating 10000 DWORDS takes 0.86 ms with a local and 1.1 ms with the function (~25% slower).
*It is important to note that the ARRAY COUNT() command actually returns the last index in the list, as opposed to the number of elements. Since lists are 0-based this is a 1-record difference. Thus, in a for loop we must iterate from ''0 to ARRAY COUNT()'' rather than ''1 to ARRAY COUNT()'' or ''0 to ARRAY COUNT()-1''.
*Deleting elements takes about the same time as adding elements. For example, deleting 10000 DWORDS takes 1150 ms.
| 2,439,259
|
2021-07-12T20:33:47Z
|
Dcsg
|
There are a few ways to store and access resources within DarkBasic.
User Defined Types
It is important to note the limitations of user defined types (UDT) within DarkBasic.
Like other types, UDTs are passed by value into functions
UDTs cannot be returned by functions
UDTs cannot be passed into DLLs (not directly or very easily at any rate)
UDTs cannot contain arrays
Lists
Lists, or dynamic arrays, are the obvious choice for storing resouce types. Given the limitations of how things can be passed to/from functions, they will need to be accessed globally (all arrays are global by default).
Performance
Although a while loop is ideal for iterating through lists, it is much slower (up to 6000 times slower) than for loops due to built-in sync/update code. For this reason one should always use for loops to iterate lists.
Simple iteration/comparison takes roughly 1 ms per 10000 elements (roughly linear).
Adding items at the bottom of the list appears to be non-linear as the number of elements in the list increases. For instance adding 100 elements takes 0.25 ms, 1000 takes 15 ms, 10000 takes 1500 ms.
There appears to be no speed difference between adding items from the top or at the bottom.
Time taken to add elements is based on their size ,especially for UDTs. For example, adding 10000 BYTEs takes 1300 ms, 10000 DWORDs takes 1500 ms, 10000 UDTs (1 field, 4 bytes total) takes 2100 ms, and 10000 UDTs (3 fields, 9 bytes total) takes 7000 ms.
When iterating in a for loop, storing the ARRAY COUNT() in a local variable is slightly faster. For example, iterating 10000 DWORDS takes 0.86 ms with a local and 1.1 ms with the function (~25% slower).
It is important to note that the ARRAY COUNT() command actually returns the last index in the list, as opposed to the number of elements. Since lists are 0-based this is a 1-record difference. Thus, in a for loop we must iterate from 0 to ARRAY COUNT() rather than 1 to ARRAY COUNT() or 0 to ARRAY COUNT()-1.
Deleting elements takes about the same time as adding elements. For example, deleting 10000 DWORDS takes 1150 ms.
|
156
| 1,453
|
https://en.uesp.net/wiki/Tes2Mod:DFRemake/Resource_-_RMDeferenceObject
|
Tes2Mod:DFRemake/Resource - RMDeferenceObject
|
{{Trail|DFRemake}}
== RMDereferenceObject ( DWORD ObjectID ) ==
=== Inputs ===
*'''ObjectID''': The ID of the object in the cache to dereference.
=== Outputs ===
None
=== Description ===
Decreases the reference count of the given object in the cache.
=== Example ===
Result = RMDereferenceObject(1009)
__NOTOC__
| 2,439,221
|
2021-07-12T20:33:45Z
|
Dcsg
|
RMDereferenceObject ( DWORD ObjectID )
Inputs
ObjectID: The ID of the object in the cache to dereference.
Outputs
None
Description
Decreases the reference count of the given object in the cache.
Example
Result = RMDereferenceObject(1009)
|
156
| 1,454
|
https://en.uesp.net/wiki/Tes2Mod:DFRemake/Resource_-_RMInitDungeon
|
Tes2Mod:DFRemake/Resource - RMInitDungeon
|
{{Trail|DFRemake}}
== integer RMInitDungeon ( ) ==
=== Inputs ===
None
=== Outputs ===
Returns 1 on success, 0 on error.
=== Description ===
Initializes the dungeon resource manager. Call once at program startup. If the function returns failure the program should be aborted.
=== Example ===
Local Result as integer
Result = RMInitDungeon()
if (not Result) then End
__NOTOC__
| 2,439,245
|
2021-07-12T20:33:46Z
|
Dcsg
|
integer RMInitDungeon ( )
Inputs
None
Outputs
Returns 1 on success, 0 on error.
Description
Initializes the dungeon resource manager. Call once at program startup. If the function returns failure the program should be aborted.
Example
Local Result as integer
Result = RMInitDungeon()
if (not Result) then End
|
156
| 1,455
|
https://en.uesp.net/wiki/Tes2Mod:DFRemake/Resource_-_RMDestroyDungeon
|
Tes2Mod:DFRemake/Resource - RMDestroyDungeon
|
{{Trail|DFRemake}}
== RMDestroyDungeon ( ) ==
=== Inputs ===
None
=== Outputs ===
None
=== Description ===
Destroys the dungeon resource manager. Should be called once at program end. Do not use this function to clear dungeon data during the game. Use [[Daggerfall:DFRemake/Resource - RMResetDungeon|RMResetDungeon]] instead.
=== Example ===
RMDestroyDungeon()
__NOTOC__
| 2,439,223
|
2021-07-12T20:33:45Z
|
Dcsg
|
RMDestroyDungeon ( )
Inputs
None
Outputs
None
Description
Destroys the dungeon resource manager. Should be called once at program end. Do not use this function to clear dungeon data during the game. Use RMResetDungeon instead.
Example
RMDestroyDungeon()
|
156
| 1,456
|
https://en.uesp.net/wiki/Tes2Mod:DFRemake/Resource_-_RMResetDungeon
|
Tes2Mod:DFRemake/Resource - RMResetDungeon
|
{{Trail|DFRemake}}
== RMResetDungeon ( ) ==
=== Inputs ===
None
=== Outputs ===
None
=== Description ===
Clears the current dungeon information. Is used before loading a new dungeon.
=== Example ===
RMResetDungeon()
__NOTOC__
| 2,439,255
|
2021-07-12T20:33:46Z
|
Dcsg
|
RMResetDungeon ( )
Inputs
None
Outputs
None
Description
Clears the current dungeon information. Is used before loading a new dungeon.
Example
RMResetDungeon()
|
156
| 1,457
|
https://en.uesp.net/wiki/Tes2Mod:DFRemake/Resource_-_RMLoadDungeonBlock
|
Tes2Mod:DFRemake/Resource - RMLoadDungeonBlock
|
{{Trail|DFRemake}}
== integer RMLoadDungeonBlock ( Filename as String ) ==
=== Inputs ===
*'''Filename''': The dungeon block RDB file to load from Blocks.bsa.
=== Outputs ===
Returns 1 on success and 0 on any error.
=== Description ===
Loads the given dungeon block and adds it to the current dungeon.
=== Example ===
Local Result as integer
Result = RMLoadDungeonBlock("B0000002.rdb")
if (not Result) then ExitFunction
__NOTOC__
| 2,439,249
|
2021-07-12T20:33:46Z
|
Dcsg
|
integer RMLoadDungeonBlock ( Filename as String )
Inputs
Filename: The dungeon block RDB file to load from Blocks.bsa.
Outputs
Returns 1 on success and 0 on any error.
Description
Loads the given dungeon block and adds it to the current dungeon.
Example
Local Result as integer
Result = RMLoadDungeonBlock("B0000002.rdb")
if (not Result) then ExitFunction
|
156
| 1,458
|
https://en.uesp.net/wiki/Tes2Mod:DFRemake/Resource_-_RMFindDungeonObjectID
|
Tes2Mod:DFRemake/Resource - RMFindDungeonObjectID
|
{{Trail|DFRemake}}
== integer RMFindDungeonObjectID ( DWORD ObjectID ) ==
=== Inputs ===
*'''ObjectID''': The ID of the dungeon object to find.
=== Outputs ===
Returns 1 on success and sets the current element of RMDungeonObjects() to the given object. Returns 0 on any error.
=== Description ===
Attempts to find the given object in the list of current dungeon objects.
=== Example ===
Local Result as integer
Result = RMFindDungeonObjectID(1090)
if (Result)
print "Dungeon object #1090 has original reference object #", RMDungeonObjects().RefObjectID
endif
__NOTOC__
| 2,439,233
|
2021-07-12T20:33:45Z
|
Dcsg
|
integer RMFindDungeonObjectID ( DWORD ObjectID )
Inputs
ObjectID: The ID of the dungeon object to find.
Outputs
Returns 1 on success and sets the current element of RMDungeonObjects() to the given object. Returns 0 on any error.
Description
Attempts to find the given object in the list of current dungeon objects.
Example
Local Result as integer
Result = RMFindDungeonObjectID(1090)
if (Result)
print "Dungeon object #1090 has original reference object #", RMDungeonObjects().RefObjectID
endif
|
156
| 1,459
|
https://en.uesp.net/wiki/Tes2Mod:DFRemake/Resource_-_RMMakeDungeonBlockFilename
|
Tes2Mod:DFRemake/Resource - RMMakeDungeonBlockFilename
|
{{Trail|DFRemake}}
== string RMMakeDungeonBlockFilename ( DWORD BlockIndex, BYTE BlockChar ) ==
=== Inputs ===
*'''BlockIndex''': The dungeon block index (0-999).
*'''BlockChar''': The dungeon block character (N/W/L/S/B/M).
=== Outputs ===
Returns the created block filename. Returns an empty string on any error.
=== Description ===
Creates a dungeon block filename (RDB) found in the Blocks.bsa file.
=== Example ===
Filename$ = RMMakeDungeonBlockFilename(19, 'N')
__NOTOC__
| 2,439,251
|
2021-07-12T20:33:46Z
|
Dcsg
|
string RMMakeDungeonBlockFilename ( DWORD BlockIndex, BYTE BlockChar )
Inputs
BlockIndex: The dungeon block index (0-999).
BlockChar: The dungeon block character (N/W/L/S/B/M).
Outputs
Returns the created block filename. Returns an empty string on any error.
Description
Creates a dungeon block filename (RDB) found in the Blocks.bsa file.
Example
Filename$ = RMMakeDungeonBlockFilename(19, 'N')
|
156
| 1,460
|
https://en.uesp.net/wiki/Tes2Mod:DFRemake/Resource_-_RMCreateDungeon
|
Tes2Mod:DFRemake/Resource - RMCreateDungeon
|
{{Trail|DFRemake}}
== integer RMCreateDungeon ( ) ==
=== Inputs ===
Non3
=== Outputs ===
Returns 1 on success and 0 on any error.
=== Description ===
Creates the current dungeon as set/loaded in DFELibrary. The previous dungeon information is destroyed.
=== Example ===
Result = RMCreateDungeon()
__NOTOC__
| 2,439,219
|
2021-07-12T20:33:44Z
|
Dcsg
|
integer RMCreateDungeon ( )
Inputs
Non3
Outputs
Returns 1 on success and 0 on any error.
Description
Creates the current dungeon as set/loaded in DFELibrary. The previous dungeon information is destroyed.
Example
Result = RMCreateDungeon()
|
122
| 1,461
|
https://en.uesp.net/wiki/Tes3Mod:AddTopic
|
Tes3Mod:AddTopic
|
{{Morrowind Modding Functions Trail}}
'''AddTopic'''
<pre>
AddTopic, TopicID
Where TopicID = Dialogue ID to add to players known topics.
Type: Dialogue
Returns: none
Example: addtopic "Redoran councilors"
Scripts: eotScript
MoonandStar
</pre>
Adds the given dialogue topic to the players list of known topics. Known topics will appear when the player talks to NPCs that have that topic. When creating a new plugin with new dialogue topics, you will frequently want to add a few topics that the player already knows. To do this, create a temporary object near the related NPC and attach a script like the following:
<pre>
begin test_AddTopics
short DoOnce;
if ( DoOnce == 0 )
AddTopic "newtopic01"
AddTopic "newtopic02"
AddTopic "newtopic03"
set DoOnce to 1
endif
end
</pre>
| 531,566
|
2010-01-30T09:50:12Z
|
RoBoT
|
AddTopic
Adds the given dialogue topic to the players list of known topics. Known topics will appear when the player talks to NPCs that have that topic. When creating a new plugin with new dialogue topics, you will frequently want to add a few topics that the player already knows. To do this, create a temporary object near the related NPC and attach a script like the following:
|
122
| 1,462
|
https://en.uesp.net/wiki/Tes3Mod:AIActivate
|
Tes3Mod:AIActivate
|
{{Morrowind Modding Functions Trail}}
'''AIActivate'''
<pre>
AiActivate, ObjectID, [Reset]
Where ObjectID = Object to activate, required
[reset] = Optional parameter, unknown, may indicate whether the current AI
package is interrupted.
Type: AI
Returns: none
Example:
Scripts: Not Used
</pre>
Although this function is in the TES Construction Set help file it is never actually used in any of the official master files. It causes the referenced NPC/creature to attempt to activate the given object (such as an item, door, activator, etc...).
There is a known bug when using the optional Reset parameter with AiActivate (verified with Tribunal). It is therefore recommended to not include the reset parameter. Also, this function is mostly broken in the original Morrowind game, but has been significantly improved in Tribunal. The following actions have been tested and verified to work:
*Potion - NPC drinks it (works in original Morrowind as well)
*Item on Ground - NPC picks it up
*Door - Opens it
*Load Door - Teleports through it but only if the destination of the door is in the same cell or a currently loaded cell. Otherwise the game crashes.
*Activator - NPC activates it (such as a lever/button, etc...).
| 531,552
|
2010-01-30T09:49:39Z
|
RoBoT
|
AIActivate
Although this function is in the TES Construction Set help file it is never actually used in any of the official master files. It causes the referenced NPC/creature to attempt to activate the given object (such as an item, door, activator, etc...).
There is a known bug when using the optional Reset parameter with AiActivate (verified with Tribunal). It is therefore recommended to not include the reset parameter. Also, this function is mostly broken in the original Morrowind game, but has been significantly improved in Tribunal. The following actions have been tested and verified to work:
Potion - NPC drinks it (works in original Morrowind as well)
Item on Ground - NPC picks it up
Door - Opens it
Load Door - Teleports through it but only if the destination of the door is in the same cell or a currently loaded cell. Otherwise the game crashes.
Activator - NPC activates it (such as a lever/button, etc...).
|
122
| 1,463
|
https://en.uesp.net/wiki/Tes3Mod:Xbox
|
Tes3Mod:Xbox
|
{{Morrowind Modding Functions Trail}}
'''Xbox'''
<pre>
Xbox
Type: Misc
Returns: short
Example: if ( Xbox == 1 )
Scripts: CharGenBed
CharGenDagger
</pre>
Returns 1 if the game is being played on the Xbox, or 0 otherwise.
| 532,167
|
2010-01-30T10:18:30Z
|
RoBoT
|
Xbox
Returns 1 if the game is being played on the Xbox, or 0 otherwise.
|
122
| 1,464
|
https://en.uesp.net/wiki/Tes3Mod:WakeUpPC
|
Tes3Mod:WakeUpPC
|
{{Morrowind Modding Functions Trail}}
'''WakeUpPC'''
<pre>
WakeUpPC
Type: Player Sleeping
Returns: none
Example: WakeUpPC
Scripts: Sleepers
VampireCheck
</pre>
Wakes up the PC if they are sleeping. Use it to wake up the PC to notify them of some timed event.
| 532,164
|
2010-01-30T10:18:23Z
|
RoBoT
|
WakeUpPC
Wakes up the PC if they are sleeping. Use it to wake up the PC to notify them of some timed event.
|
122
| 1,465
|
https://en.uesp.net/wiki/Tes3Mod:UsedOnMe
|
Tes3Mod:UsedOnMe
|
{{Morrowind Modding Functions Trail}}
'''UsedOnMe'''
<pre>
UsedOnMe, ObjectID
Where: ObjectID = Object to test for use
Type: Object, Broken
Returns: short
Example: if ( UsedOnMe, Misc_pot_redware_01 == 1 )
Scripts: UsedOnMe (commented out saying it was crashing)
</pre>
Returns 1 if the given ObjectID is used on the calling object, or 0 otherwise. It appears that this function is currently broken. UsedOnMe is probably commented out because there's no way for an object to be used on another in the Morrowind engine. I suspect that it was early alpha stuff.
| 532,163
|
2010-01-30T10:18:21Z
|
RoBoT
|
UsedOnMe
Returns 1 if the given ObjectID is used on the calling object, or 0 otherwise. It appears that this function is currently broken. UsedOnMe is probably commented out because there's no way for an object to be used on another in the Morrowind engine. I suspect that it was early alpha stuff.
|
122
| 1,466
|
https://en.uesp.net/wiki/Tes3Mod:TurnMoon
|
Tes3Mod:TurnMoon
|
{{Morrowind Modding Functions Trail}}
'''TurnMoonRed'''<br>
'''TurnMoonWhite'''
<pre>
TurnMoonRed
TurnMoonWhite
Type: Weather, Bloodmoon
Returns: none
Example: TurnMoonRed
TurnMoonWhite
Scripts:
</pre>
Turns the moon(s) the given color for special Werewolf effects (unconfirmed).
| 532,158
|
2010-01-30T10:18:11Z
|
RoBoT
|
TurnMoonRed
TurnMoonWhite
Turns the moon(s) the given color for special Werewolf effects (unconfirmed).
|
122
| 1,467
|
https://en.uesp.net/wiki/Tes3Mod:UndoWerewolf
|
Tes3Mod:UndoWerewolf
|
{{Morrowind Modding Functions Trail}}
'''UndoWerewolf'''
<pre>
UndoWerewolf
Type: Werewolf, Bloodmoon
Returns: none
Example:
Scripts:
</pre>
Will undo the werewolf change brought on by the [[Morrowind Mod:BecomeWerewolf|BecomeWerewolf]] function. However, the NPC/creature will essentially be naked after the switch. They have to be told to re-equip (weapons are usually re-equipped if it occurs in combat).
Using Becomewerewolf and Undowerewolf can break your game. Some quests and variables depend solely on the use of these, so if you use one to toy around.... you may be asking for it.
See Also: [[Morrowind Mod:BecomeWerewolf|BecomeWerewolf]], [[Morrowind Mod:PCWerewolf|PCWerewolf]], [[Morrowind Mod:IsWerewolf|IsWerewolf]]
| 2,307,633
|
2021-01-07T23:47:55Z
|
HoodBot
|
UndoWerewolf
Will undo the werewolf change brought on by the BecomeWerewolf function. However, the NPC/creature will essentially be naked after the switch. They have to be told to re-equip (weapons are usually re-equipped if it occurs in combat).
Using Becomewerewolf and Undowerewolf can break your game. Some quests and variables depend solely on the use of these, so if you use one to toy around.... you may be asking for it.
See Also: BecomeWerewolf, PCWerewolf, IsWerewolf
|
122
| 1,468
|
https://en.uesp.net/wiki/Tes3Mod:BecomeWerewolf
|
Tes3Mod:BecomeWerewolf
|
{{Morrowind Modding Functions Trail}}
'''BecomeWerewolf'''
<pre>
BecomeWerewolf
Type: Werewolf, Bloodmoon
Returns: none
Example: player->BecomeWerewolf
Scripts:
</pre>
Turns the player, NPC, or creature immediately into a werewolf. Only works properly for NPCs, however, it can be used on creatures for some weird effects. Affected NPCs take on the werewolf mesh, removing all clothing and weapons, and retaining all AI settings. This means an NPC turned into a werewolf may not be able to talk, but he/she will have the same Idle, Fight, and Hello, settings, etc... (though they'll just track the PC on Hello triggers, no dialogue). Likewise, already attacking NPCs will simply keep attacking, albeit in a new form - scripts seem to continue to run fine, as the object ID seems to remain the same. I'm unsure if stats on
NPCs affected by this function call are changed or not - Speed is definitely not changed, so presumably it's only attack damage and/or hit chance that changes.
This command can be used on creatures, with varying effects - the creature NIF/appearance will NOT be swapped out, nor will their 'Name' tag say 'werewolf', as it does on NPCs - and it only seems to work for certain creatures, changing their attack sound and attack stats, if I'm not mistaken. Creatures with Weapon & Shield bone entries will unequip whatever they're holding and go hand-to-hand - and as I said the attack sound changes to a werewolf growl, but otherwise Idle and other sounds seem to remain the same. It's amusing when used on Rieklings - they become little snarling, boxing, midgets.
Also, The Werewolf transformation is handled almost exactly like the Vampire one, with the [[Morrowind Mod:PCWerewolf|PCWerewolf]] global being used. Using Becomewerewolf and Undowerewolf can break your game. Some quests and variables depend solely on the use of these, so if you use one to toy around.... you may be asking for it.
See Also: [[Morrowind Mod:IsWerewolf|IsWerewolf]], [[Morrowind Mod:PCWerewolf|PCWerewolf]], [[Morrowind Mod:SetWerewolfAcrobatics|SetWerewolfAcrobatics]], [[Morrowind Mod:UndoWerewolf|UndoWerewolf]]
| 2,307,012
|
2021-01-07T23:43:13Z
|
HoodBot
|
BecomeWerewolf
Turns the player, NPC, or creature immediately into a werewolf. Only works properly for NPCs, however, it can be used on creatures for some weird effects. Affected NPCs take on the werewolf mesh, removing all clothing and weapons, and retaining all AI settings. This means an NPC turned into a werewolf may not be able to talk, but he/she will have the same Idle, Fight, and Hello, settings, etc... (though they'll just track the PC on Hello triggers, no dialogue). Likewise, already attacking NPCs will simply keep attacking, albeit in a new form - scripts seem to continue to run fine, as the object ID seems to remain the same. I'm unsure if stats on
NPCs affected by this function call are changed or not - Speed is definitely not changed, so presumably it's only attack damage and/or hit chance that changes.
This command can be used on creatures, with varying effects - the creature NIF/appearance will NOT be swapped out, nor will their 'Name' tag say 'werewolf', as it does on NPCs - and it only seems to work for certain creatures, changing their attack sound and attack stats, if I'm not mistaken. Creatures with Weapon & Shield bone entries will unequip whatever they're holding and go hand-to-hand - and as I said the attack sound changes to a werewolf growl, but otherwise Idle and other sounds seem to remain the same. It's amusing when used on Rieklings - they become little snarling, boxing, midgets.
Also, The Werewolf transformation is handled almost exactly like the Vampire one, with the PCWerewolf global being used. Using Becomewerewolf and Undowerewolf can break your game. Some quests and variables depend solely on the use of these, so if you use one to toy around.... you may be asking for it.
See Also: IsWerewolf, PCWerewolf, SetWerewolfAcrobatics, UndoWerewolf
|
122
| 1,469
|
https://en.uesp.net/wiki/Tes3Mod:IsWerewolf
|
Tes3Mod:IsWerewolf
|
{{Morrowind Modding Functions Trail}}
'''IsWerewolf'''
<pre>
IsWerewolf
Type: Werewolf, Bloodmoon
Returns: short?
Example:
Scripts:
</pre>
Returns 1 if the player (or other NPC?) is currently in Werewolf form, or 0 otherwise.
See Also: [[Morrowind Mod:BecomeWerewolf|BecomeWerewolf]], [[Morrowind Mod:UndoWerewolf|UndoWerewolf]]
| 2,307,236
|
2021-01-07T23:44:47Z
|
HoodBot
|
IsWerewolf
Returns 1 if the player (or other NPC?) is currently in Werewolf form, or 0 otherwise.
See Also: BecomeWerewolf, UndoWerewolf
|
122
| 1,470
|
https://en.uesp.net/wiki/Tes3Mod:PCWerewolf
|
Tes3Mod:PCWerewolf
|
{{Morrowind Modding Functions Trail}}
'''PCWerewolf'''
<pre>
PCWerewolf
Type: Global, Bloodmoon
Returns: short
Example:
Scripts:
</pre>
A global variable that gives the state of the player's werewolf status.
<pre>
-1 = Has been cured (immune to lycanthropy)
0 = Not a Werewolf
1 = Currently a Werewolf
</pre>
| 531,940
|
2010-01-30T10:03:35Z
|
RoBoT
|
PCWerewolf
A global variable that gives the state of the player's werewolf status.
|
122
| 1,471
|
https://en.uesp.net/wiki/Tes3Mod:Unlock
|
Tes3Mod:Unlock
|
{{Morrowind Modding Functions Trail}}
'''Unlock'''
<pre>
Unlock
Type: Misc
Returns: none
Example: Unlock
"chest_ashurninibi_01"->Unlock
Scripts: GavisScript
Pub_Ghost_Dusk
</pre>
Unlocks the calling object.
See Also: [[Morrowind Mod:Lock|Lock]]
| 2,307,634
|
2021-01-07T23:47:56Z
|
HoodBot
|
Unlock
Unlocks the calling object.
See Also: Lock
|
122
| 1,472
|
https://en.uesp.net/wiki/Tes3Mod:Lock
|
Tes3Mod:Lock
|
{{Morrowind Modding Functions Trail}}
'''Lock'''
<pre>
Lock, Value
Where: Value = Level of the lock to set (0 to 100, shor)
Type: Misc
Returns: none
Example: Lock
"chest_ashurninibi_01"->Lock, 50
Scripts: OvisScript
Pub_Vivec_Black
</pre>
Locks the calling object to the given lock value.
See Also: [[Morrowind Mod:Unlock|Unlock]]
| 2,307,243
|
2021-01-07T23:44:51Z
|
HoodBot
|
Lock
Locks the calling object to the given lock value.
See Also: Unlock
|
122
| 1,473
|
https://en.uesp.net/wiki/Tes3Mod:SetWerewolfAcrobatics
|
Tes3Mod:SetWerewolfAcrobatics
|
{{Morrowind Modding Functions Trail}}
'''SetWerewolfAcrobatics'''
<pre>
SetWerewolfAcrobatics
Type: Statistic
Returns: none
Example:
Scripts:
</pre>
Sets the acrobatics skill value/bonus when the player is in Werewolf form (unconfirmed).
| 532,077
|
2010-01-30T10:14:57Z
|
RoBoT
|
SetWerewolfAcrobatics
Sets the acrobatics skill value/bonus when the player is in Werewolf form (unconfirmed).
|
122
| 1,474
|
https://en.uesp.net/wiki/Tes3Mod:While
|
Tes3Mod:While
|
{{Morrowind Modding Functions Trail}}
'''while'''<BR>
'''endwhile'''
<pre>
while ( LeftValue CompareOp RightValue )
< statements >
endwhile
Where: LeftValue = Local/global variable or function call
CompareOp = ==, <=, <, >, >=, !=
RightValue = Local/global variable or numeric literal value
Statements = Zero or more statements to execute
Type: System
Returns: none
Example: while ( GetStrength < 90 )
ModStrength, 1
endwhile
Scripts:
</pre>
The while is the only loop statement available in the scripting language. The while loop is executed within one frame until the condition is satisfied. This can cause an unwanted pause in the game if there are many loops required.
| 532,165
|
2010-01-30T10:18:25Z
|
RoBoT
|
while
endwhile
while ( LeftValue CompareOp RightValue )
endwhile
Where: LeftValue = Local/global variable or function call
CompareOp = ==, , >=, !=
RightValue = Local/global variable or numeric literal value
Statements = Zero or more statements to execute
Type: System
Returns: none
Example: while ( GetStrength
The while is the only loop statement available in the scripting language. The while loop is executed within one frame until the condition is satisfied. This can cause an unwanted pause in the game if there are many loops required.
|
122
| 1,475
|
https://en.uesp.net/wiki/Tes3Mod:TestCellsModels
|
Tes3Mod:TestCellsModels
|
{{Morrowind Modding Functions Trail}}
'''TestCells'''<BR>
'''TestInteriorCells'''<BR>
'''TestModels (T3D)'''<BR>
'''TestThreadCells'''
<pre>
TestCells
TestInteriorCells
TestModels (T3D)
TestThreadCells (undocumented)
Type: Console
Example:
Scripts:
</pre>
Presumably this console command tests various objects/locations in the game in some manner.
See Also: [[Morrowind Mod:StopCellTest|StopCellTest]]
| 2,307,576
|
2021-01-07T23:47:35Z
|
HoodBot
|
TestCells
TestInteriorCells
TestModels (T3D)
TestThreadCells
Presumably this console command tests various objects/locations in the game in some manner.
See Also: StopCellTest
|
122
| 1,476
|
https://en.uesp.net/wiki/Tes3Mod:StopCellTest
|
Tes3Mod:StopCellTest
|
{{Morrowind Modding Functions Trail}}
'''StopCellTest (SCT)'''
<pre>
StopCellTest
SCT
Type: Console
Example:
Scripts:
</pre>
Presumably this console command stops a cell test previously started by the [[Morrowind Mod:TestCellsModels|TestCells]] console command.
See Also: [[Morrowind Mod:TestCellsModels|TestCells]]
| 2,307,551
|
2021-01-07T23:47:14Z
|
HoodBot
|
StopCellTest (SCT)
Presumably this console command stops a cell test previously started by the TestCells console command.
See Also: TestCells
|
122
| 1,477
|
https://en.uesp.net/wiki/Tes3Mod:AddToLev
|
Tes3Mod:AddToLev
|
{{Morrowind Modding Functions Trail}}
'''AddToLevCreature'''<BR>
'''AddToLevItem'''
<pre>
AddToLevCreature, LevCreature, Creature, Level
AddToLevItem, LevItem, Item, Level
Where LevCreature = Levelled creature list ID to modify
LevItem = Levelled item list ID to modify
Creature = ActorID to add to levelled creature list
Item = ItemID to add to levelled item list
Level = Minimum level of player to activate the item/creature.
Type: Levelled Lists, Tribunal
Returns: none
Example: AddToLevCreature, "ex_azurascoast_sleep", "ash_ghoul", 25
AddToLevItem, "l_m_amulets", "amulet of 6th house", 15
Scripts: Not Used
</pre>
Allows the user to modify the levelled item/creature lists while the game is running. The functions will add the object/level pair to the levelled list (assuming that it doesn't already exist in the list).
See Also: [[Morrowind Mod:RemoveFromLev|RemoveFromLevCreature]], [[Morrowind Mod:RemoveFromLev|RemoveFromLevItem]]
| 2,307,000
|
2021-01-07T23:42:59Z
|
HoodBot
|
AddToLevCreature
AddToLevItem
Allows the user to modify the levelled item/creature lists while the game is running. The functions will add the object/level pair to the levelled list (assuming that it doesn't already exist in the list).
See Also: RemoveFromLevCreature, RemoveFromLevItem
|
122
| 1,478
|
https://en.uesp.net/wiki/Tes3Mod:RemoveFromLev
|
Tes3Mod:RemoveFromLev
|
{{Morrowind Modding Functions Trail}}
'''RemoveFromLevCreature'''<BR>
'''RemoveFromLevItem'''
<pre>
RemoveFromLevCreature, LevCreature, Creature, Level
RemoveFromLevItem, LevItem, Item, Level
Where LevCreature = Levelled creature list ID to modify
LevItem = Levelled item list ID to modify
Creature = ActorID to add to levelled creature list
Item = ItemID to add to levelled item list
Level = Minimum level of player to activate the item/creature.
Type: Levelled Lists, Tribunal
Returns: none
Example: RemoveFromLevCreature, "ex_azurascoast_sleep", "ash_ghoul", 25
RemoveFromLevItem, "l_m_amulets", "amulet of 6th house", 15
Scripts: Not Used
</pre>
Allows the user to modify the leveled item/creature lists while the game is running. The functions will remove the given object/level pair to the leveled list (assuming that it exists in the list).
See Also: [[Morrowind Mod:AddToLev|AddToLevCreature]], [[Morrowind Mod:AddToLev|AddToLevItem]]
| 2,307,443
|
2021-01-07T23:46:25Z
|
HoodBot
|
RemoveFromLevCreature
RemoveFromLevItem
Allows the user to modify the leveled item/creature lists while the game is running. The functions will remove the given object/level pair to the leveled list (assuming that it exists in the list).
See Also: AddToLevCreature, AddToLevItem
|
122
| 1,480
|
https://en.uesp.net/wiki/Tes3Mod:AIFollow
|
Tes3Mod:AIFollow
|
{{Morrowind Modding Functions Trail}}
'''AIFollow'''<BR>
'''AIFollowCell'''
<pre>
AIFollow, ActorID, Duration, X, Y, Z, [Reset]
AIFollowCell, ActorID, CellID, Duration, X, Y, Z, [Reset]
Where ActorID = The target NPC that the source NPC will be following.
CellID = Cell name where the source NPC will stop following.
Duration = The length of time (in hours) that the target NPC will be
following. A value of 0 indicates infinite time.
X,Y,Z = The position that the source NPC will stop following.
[Reset] = Optional parameter, unknown, may indicate whether the current
AI package is interrupted.
Type: AI
Returns: none
Example: "taren andoren"->AIFollow, "velyna seran" 0, 0, 0, 0
AIFollowCell, Player, "Balmora, Hecerinde's House", 0, 70685, 126106, 835, 0
Scripts: talenScript (AIFollow)
Not Used (AIFollowCell)
</pre>
Similar to AIFollow where the source NPC will be set to follow the target NPC (ActorID) for the given duration (in hours, 0 indicates infinite time) or until they reach the given position (AIFollow for exterior locations, AIFollowCell for interior locations). When an NPC uses AIFollow, the player gets to choose where he/she goes. The NPC will follow the player diligently the whole way.
As with other AI functions, issue this command only once or the results may not be as expected.
See Also: [[Morrowind Mod:AIEscort|AIEscort]], [[Morrowind Mod:GetAIPackageDone|GetAIPackageDone]], [[Morrowind Mod:GetCurrentAIPackage|GetCurrentAIPackage]]
| 2,307,005
|
2021-01-07T23:43:09Z
|
HoodBot
|
AIFollow
AIFollowCell
Similar to AIFollow where the source NPC will be set to follow the target NPC (ActorID) for the given duration (in hours, 0 indicates infinite time) or until they reach the given position (AIFollow for exterior locations, AIFollowCell for interior locations). When an NPC uses AIFollow, the player gets to choose where he/she goes. The NPC will follow the player diligently the whole way.
As with other AI functions, issue this command only once or the results may not be as expected.
See Also: AIEscort, GetAIPackageDone, GetCurrentAIPackage
|
122
| 1,481
|
https://en.uesp.net/wiki/Tes3Mod:GetAIPackageDone
|
Tes3Mod:GetAIPackageDone
|
{{Morrowind Modding Functions Trail}}
'''GetAIPackageDone'''
<pre>
GetAIPackageDone
Type: AI
Returns: short
Example: if ( GetAIPackageDone == 1 )
Scripts: dulniScript
FaluraScript
</pre>
Returns 1 for one frame when the NPC's AI package has completed (usually returns 0). Use this to determine when an NPC has arrived at their location when using the AITravel function.
See Also: [[Morrowind Mod:AIEscort|AIEscort]], [[Morrowind Mod:AIFollow|AIFollow]], [[Morrowind Mod:AITravel|AITravel]], [[Morrowind Mod:AIWander|AIWander]], [[Morrowind Mod:GetCurrentAIPackage|GetCurrentAIPackage]]
| 2,307,111
|
2021-01-07T23:43:54Z
|
HoodBot
|
GetAIPackageDone
Returns 1 for one frame when the NPC's AI package has completed (usually returns 0). Use this to determine when an NPC has arrived at their location when using the AITravel function.
See Also: AIEscort, AIFollow, AITravel, AIWander, GetCurrentAIPackage
|
122
| 1,482
|
https://en.uesp.net/wiki/Tes3Mod:GetCurrentAIPackage
|
Tes3Mod:GetCurrentAIPackage
|
{{Morrowind Modding Functions Trail}}
'''GetCurrentAIPackage'''
<pre>
GetCurrentAIPackage
Type: AI
Returns: short (-1 to 4)
None = -1
Wander = 0
Travel = 1
Escort = 2
Follow = 3
Activate = 4
Example: if ( GetCurrentAIPackage == 3 )
set g_TempValue to "teruise girvayne"->GetCurrentAIPackage
Scripts: devalFollow
FaluraScript
</pre>
Returns a short value based on the current AIPackage the NPC is performing.
See Also: [[Morrowind Mod:AIEscort|AIEscort]], [[Morrowind Mod:AIFollow|AIFollow]], [[Morrowind Mod:AITravel|AITravel]], [[Morrowind Mod:AIWander|AIWander]], [[Morrowind Mod:GetAIPackageDone|GetAIPackageDone]]
| 2,307,133
|
2021-01-07T23:44:06Z
|
HoodBot
|
GetCurrentAIPackage
Returns a short value based on the current AIPackage the NPC is performing.
See Also: AIEscort, AIFollow, AITravel, AIWander, GetAIPackageDone
|
122
| 1,483
|
https://en.uesp.net/wiki/Tes3Mod:AIWander
|
Tes3Mod:AIWander
|
{{Morrowind Modding Functions Trail}}
'''AIWander'''
<pre>
AIWander, Range, Duration, Time, [Idle2], [Idle3], ...[Idle10], [Reset]
Where Range = The range, in game units, that the NPC will wander in from its
current location.
Duration = Time (in hours?) that the NPC will wander (0 indicates infinite)
Time = Possibly the start time for the wandering to occur (0 may indicate
no start time).
[Idle2]... = Optional parameters, that give the chance of the NPC to perform the
following idle movements:
Idle1: Not used?
Idle2: Looking around
Idle3: Looking behind
Idle4: Scratching head
Idle5: Shifting clothing or armor on shoulder
Idle6: Rubbing hands together and showing wares
Idle7: Looking at fingers and looking around furtively
Idle8: Deep thought
Idle9: Reaching for weapon
[Reset] = Optional parameter, unknown, may indicate whether the current
AI package is interrupted.
Type: AI
Returns: none
Example: AIWander, 0, 0, 0 (forces NPC to stand in one spot)
"urzul gra-agum"->AIWander, 128, 0, 0, 60, 30, 10, 0, 0, 0, 0, 0, 0
Scripts: attack_Slave
dinScript
</pre>
Sets the given NPC to wander randomly in the current area using any AI grid points and performing various random idle movements. This function is commonly used to stop NPCs from following or performing a previously assigned action.
The Range appears to be relative to the point where the NPC last entered the AIWander state. If the NPC is set to AIWander, 100, 0, 0 and then moved more than 100 units away with the Position function, he/she will return to the region where the original call was made. Just issuing a new AIWander command after the Position will not stop this behavior: the AIWander package must complete or a separate package be run in order to reset the center of the range.
There are two known bugs with this function. The Idle2 parameter is not output in the compiled script (verified with Tribunal). The Reset parameter also maybe output incorrectly and should not be used.
See Also: [[Morrowind Mod:GetAIPackageDone|GetAIPackageDone]], [[Morrowind Mod:GetCurrentAIPackage|GetCurrentAIPackage]]
== Notes ==
As mentioned above the compiled output of the AIWander is strange in that it omits the first idle parameter and the reset parameter is output differently than the other AI functions. Sample SCDT output from the CS is shown in the below table:
{| class="wikitable"
|-
! Function Call
! Compiled Output
|-
| AIWander, 10, 20, 30
| F910 00002041 0000A041 0000F041 0000 00
|-
| AIWander, 10, 20, 30, reset
| F910 00002041 0000A041 0000F041 0000 05
|-
| AIWander, 10, 20, 30, 2
| F910 00002041 0000A041 0000F041 0000 01
|-
| AIWander, 10, 20, 30, 2, reset
| F910 00002041 0000A041 0000F041 0100 0000 01
|-
| AIWander, 10, 20, 30, 2, 3
| F910 00002041 0000A041 0000F041 0100 0300 01
|-
| AIWander, 10, 20, 30, 2, 3, reset
| F910 00002041 0000A041 0000F041 0200 0300 0000 01
|-
| AIWander, 10, 20, 30, 2, 3, 4, 5, 6, 7, 8, 9
| F910 00002041 0000A041 0000F041 0700 0300 0400 0500 0600 0700 0800 0900 01
|-
| AIWander, 10, 20, 30, 2, 3, 4, 5, 6, 7, 8, 9, 10
| F910 00002041 0000A041 0000F041 0800 0300 0400 0500 0600 0700 0800 0900 0A00 01
|-
| AIWander, 10, 20, 30, 2, 3, 4, 5, 6, 7, 8, 9, 10, reset
| F910 00002041 0000A041 0000F041 0900 0300 0400 0500 0600 0700 0800 0900 0A00 0000 01
|}
The value of the reset parameter varies between 00, 01, and 05 and depends on the previous calls to AIWander in the current script. It seems like the first occurrence of reset in a script has the value of 05. Subsequent uses of reset in the same script adds an extra short value of 0000 to the parameter list along with a reset value of 1. It is currently unsure whether this is the function's intended behavior. I don't believe the reset parameter is used at all with AIWander in any official script.
In a script where reset is not used, all reset output values are 01.
| 2,307,008
|
2021-01-07T23:43:10Z
|
HoodBot
|
AIWander
Sets the given NPC to wander randomly in the current area using any AI grid points and performing various random idle movements. This function is commonly used to stop NPCs from following or performing a previously assigned action.
The Range appears to be relative to the point where the NPC last entered the AIWander state. If the NPC is set to AIWander, 100, 0, 0 and then moved more than 100 units away with the Position function, he/she will return to the region where the original call was made. Just issuing a new AIWander command after the Position will not stop this behavior: the AIWander package must complete or a separate package be run in order to reset the center of the range.
There are two known bugs with this function. The Idle2 parameter is not output in the compiled script (verified with Tribunal). The Reset parameter also maybe output incorrectly and should not be used.
See Also: GetAIPackageDone, GetCurrentAIPackage
Notes
As mentioned above the compiled output of the AIWander is strange in that it omits the first idle parameter and the reset parameter is output differently than the other AI functions. Sample SCDT output from the CS is shown in the below table:
The value of the reset parameter varies between 00, 01, and 05 and depends on the previous calls to AIWander in the current script. It seems like the first occurrence of reset in a script has the value of 05. Subsequent uses of reset in the same script adds an extra short value of 0000 to the parameter list along with a reset value of 1. It is currently unsure whether this is the function's intended behavior. I don't believe the reset parameter is used at all with AIWander in any official script.
In a script where reset is not used, all reset output values are 01.
|
122
| 1,484
|
https://en.uesp.net/wiki/Tes3Mod:AITravel
|
Tes3Mod:AITravel
|
{{Morrowind Modding Functions Trail}}
'''AITravel'''
<pre>
AITravel, X, Y, Z, [reset]
Where X,Y,Z = The exterior position for the NPC to travel to.
[Reset] = Optional parameter, unknown, may indicate whether the current
AI package is interrupted.
Type: AI
Returns: none
Example: AiTravel, 1900 -2146 -173 0
"adaves therayn"->AiTravel, 10199, 1945, 100
Scripts: lookoutscript (good example of making Fargoth move around)
dulniScript
tarenScript
</pre>
Starts the NPC to travel to the given exterior position. The distance to the new coordinates cannot be too great (about 3000-4000 units), or the actor will not react,
although this maybe related to trying to move the NPC to another cell (which often has problems). Use GetAIPackageDone function to determine when the actor reaches destination.
Note that sleeping, teleporting, or fast travel will cause the actor to warp to the end-coordinates, but the GetAIPackageDone function will not fire - this can be a problem.
The Z coordinates need only be approximate and all values must be literal, no variables accepted. AIpath grid helps, but is not mandatory.
As with other AI functions, issue this command only once or the results may not be as expected.
See Also: [[Morrowind Mod:AIEscort|AIEscort]], [[Morrowind Mod:AIFollow|AIFollow]], [[Morrowind Mod:GetAIPackageDone|GetAIPackageDone]], [[Morrowind Mod:GetCurrentAIPackage|GetCurrentAIPackage]]
| 2,307,007
|
2021-01-07T23:43:10Z
|
HoodBot
|
AITravel
Starts the NPC to travel to the given exterior position. The distance to the new coordinates cannot be too great (about 3000-4000 units), or the actor will not react,
although this maybe related to trying to move the NPC to another cell (which often has problems). Use GetAIPackageDone function to determine when the actor reaches destination.
Note that sleeping, teleporting, or fast travel will cause the actor to warp to the end-coordinates, but the GetAIPackageDone function will not fire - this can be a problem.
The Z coordinates need only be approximate and all values must be literal, no variables accepted. AIpath grid helps, but is not mandatory.
As with other AI functions, issue this command only once or the results may not be as expected.
See Also: AIEscort, AIFollow, GetAIPackageDone, GetCurrentAIPackage
|
122
| 1,485
|
https://en.uesp.net/wiki/Tes3Mod:BetaComment
|
Tes3Mod:BetaComment
|
{{Morrowind Modding Functions Trail}}
'''BetaComment (BC)'''
<pre>
BetaComment, Comment
BC, Comment
Where: Comment = Beta comment string to save
Type: Console
Returns: none
Example: BC, "test comment"
Scripts:
</pre>
Console function that presumably records a comment for use in beta testing.
| 1,184,891
|
2013-05-03T23:08:55Z
|
Jeancey
|
BetaComment (BC)
Console function that presumably records a comment for use in beta testing.
|
122
| 1,486
|
https://en.uesp.net/wiki/Tes3Mod:Begin
|
Tes3Mod:Begin
|
{{Morrowind Modding Functions Trail}}
'''Begin'''
'''End'''
<pre>
begin ScriptName
end
Where: ScriptName = The unique name of the script
Type: System
Returns: none
Example: begin testing_script
end
Scripts:
</pre>
The begin command must be the first command in the script. It should be first line at the top of your script that states the script's ID. The script ID can be any combination of letters, numbers, underscore or spaces. It is recommended not to use spaces for simplicity (as with any other object ID). The end command is placed at the end of a script.
| 531,569
|
2010-01-30T09:50:18Z
|
RoBoT
|
Begin
End
The begin command must be the first command in the script. It should be first line at the top of your script that states the script's ID. The script ID can be any combination of letters, numbers, underscore or spaces. It is recommended not to use spaces for simplicity (as with any other object ID). The end command is placed at the end of a script.
|
122
| 1,487
|
https://en.uesp.net/wiki/Tes3Mod:OnDeath
|
Tes3Mod:OnDeath
|
{{Morrowind Modding Functions Trail}}
'''OnDeath'''
<pre>
OnDeath
Type: Combat
Returns: short
Example: if ( OnDeath == 1 )
Scripts: anoScript
BILL_MT_WritGuril
</pre>
Returns 1 for one frame when the actor is killed (0 otherwise). Calling this function clears the OnDeath flag for the calling actor. You cannot successfully call OnDeath twice in a single script (why would you need to?). This can also cause problems when you have multiple scripts running on the same target, that all check for OnDeath. The first to call the function will clear the flag, and the remaining scripts will not detect the death. One possible solution is to test for health being less than zero.
See Also: [[Morrowind Mod:OnKnockout|OnKnockout]], [[Morrowind Mod:OnMurder|OnMurder]]
| 2,307,400
|
2021-01-07T23:46:09Z
|
HoodBot
|
OnDeath
Returns 1 for one frame when the actor is killed (0 otherwise). Calling this function clears the OnDeath flag for the calling actor. You cannot successfully call OnDeath twice in a single script (why would you need to?). This can also cause problems when you have multiple scripts running on the same target, that all check for OnDeath. The first to call the function will clear the flag, and the remaining scripts will not detect the death. One possible solution is to test for health being less than zero.
See Also: OnKnockout, OnMurder
|
122
| 1,488
|
https://en.uesp.net/wiki/Tes3Mod:OnKnockout
|
Tes3Mod:OnKnockout
|
{{Morrowind Modding Functions Trail}}
'''OnKnockout'''
<pre>
OnKnockout
Type: Combat
Returns: short
Example: if ( OnKnockout == 1 )
Scripts: girasScript
gardingScript
</pre>
Returns 1 for one frame when the actor is knocked out (0 otherwise).
See Also: [[Morrowind Mod:OnDeath|OnDeath]], [[Morrowind Mod:OnMurder|OnMurder]]
| 2,307,401
|
2021-01-07T23:46:09Z
|
HoodBot
|
OnKnockout
Returns 1 for one frame when the actor is knocked out (0 otherwise).
See Also: OnDeath, OnMurder
|
122
| 1,489
|
https://en.uesp.net/wiki/Tes3Mod:OnMurder
|
Tes3Mod:OnMurder
|
{{Morrowind Modding Functions Trail}}
'''OnMurder'''
<pre>
OnMurder
Type: Combat
Returns: short
Example: if ( OnMurder == 1 )
Scripts: alvisTeriScript
RedoranCouncillor
</pre>
Returns 1 for one frame when the actor is murdered (0 otherwise). Both this and OnDeath will return 1 at the same time, so you can do something like this:
<pre>
if ( OnDeath == 1 )
if ( OnMurder == 1 )
Set RedoranMurdered to 2
else
Set RedoranMurdered to 1
endif
endif
</pre>
See Also: [[Morrowind Mod:OnDeath|OnDeath]], [[Morrowind Mod:OnKnockout|OnKnockout]]
| 2,307,402
|
2021-01-07T23:46:09Z
|
HoodBot
|
OnMurder
Returns 1 for one frame when the actor is murdered (0 otherwise). Both this and OnDeath will return 1 at the same time, so you can do something like this:
See Also: OnDeath, OnKnockout
|
122
| 1,490
|
https://en.uesp.net/wiki/Tes3Mod:Operators
|
Tes3Mod:Operators
|
{{Morrowind Modding Functions Trail}}
'''->'''
<pre>
->
Type: System
Returns: none
Example: if ( player->GetHealth <= 10 )
"bk_fragmentonartaeum"->Enable
Scripts:
</pre>
This is a reserved script operator used to access functions for a particular object reference. Use this when you wish to manipulate or access a specific object explicitly. Note that if multiple objects exist in the world you have no guarantee which one you'll access (the first one the game finds). Also note that if you wish to access an object from anywhere in the world you will need to ensure that the object's ''References Persist'' button is checked.
If the object ID on the left of the -> has any spaces in it you will need to enclose the ID with double-quotes. Leading underscores (_) on Object IDs also seem to have erratic results in the script editor. In some places they work fine, in other places the script editor chokes on them. It is recommended not to name objects with a leading underscore.
| 531,923
|
2010-01-30T10:02:50Z
|
RoBoT
|
->
->
Type: System
Returns: none
Example: if ( player->GetHealth
This is a reserved script operator used to access functions for a particular object reference. Use this when you wish to manipulate or access a specific object explicitly. Note that if multiple objects exist in the world you have no guarantee which one you'll access (the first one the game finds). Also note that if you wish to access an object from anywhere in the world you will need to ensure that the object's References Persist button is checked.
If the object ID on the left of the -> has any spaces in it you will need to enclose the ID with double-quotes. Leading underscores (_) on Object IDs also seem to have erratic results in the script editor. In some places they work fine, in other places the script editor chokes on them. It is recommended not to name objects with a leading underscore.
|
122
| 1,491
|
https://en.uesp.net/wiki/Tes3Mod:If
|
Tes3Mod:If
|
{{Morrowind Modding Functions Trail}}
'''if'''<BR>
'''elseif'''<BR>
'''else'''<BR>
'''endif'''<BR>
<pre>
if ( LeftValue CompareOp RightValue )
< statements >
elseif ( LeftValue CompareOp RightValue )
< statements >
else
< statements >
endif
Where: LeftValue = Local/global variable or function call
CompareOp = ==, <=, <, >, >=, !=
RightValue = Local/global variable or numeric literal value
Statements = Zero or more statements to execute
Type: System
Returns: none
Example: if ( GlobalVar >= 10 )
; do stuff
elseif ( LocalVar < GlobalVar )
; do stuff
elseif ( player->GetStrength == 100 )
; do stuff
else
; do stuff
endif
Scripts:
</pre>
The IF statement block is used to test and execute conditional statements. The elseif/else blocks are both optional. It should be noted that if statements can be used in dialogue results. You should not include any operations (add, subtract, multiply, divide) in either the ''LeftValue'' or ''RightValue'' fields. Use a temporary variable and a set statement before the if block if you need to use operations.
'''Update:''' It is actually possible to use operators and functions on both sides of the comparison operator and references on the left side. In order for this to work correctly you must enclose both sides in brackets as well as have a space on either side of the comparison operator. If you omit either the comparison may not work as expected or even result the script crashing (the compiled output is messed up). Some example of correct and incorrect statements:
Wrong: if ( Var1 * Var2 + 10 >= Var2/109 ) ;Missing brackets
Correct: if ( (Var1 * Var2 + 10) >= (Var2/109) )
Wrong: if ( (Var1 * Var2 + 10)>=(Var2/109) ) ;Missing spaces around comparison
Correct: if ( (Var1 * Var2 + 10) >= (Var2/109) )
Wrong: if ( (player->GetStrength)>=(player->GetIntelligence) ) ;Cannot have reference call on right side
Correct: if ( (player->GetStrength) >= (TempInt) )
If in doubt it is always safer to assign the expression to a temporary variable and then use that variable in the if() statement. The Construction Set will not warn you with the two wrong examples above (it does give a strange error on the last one).
It is important to remember to use spaces surrounding the '(', compare operator, and ')'. There are known cases where omitting the spaces will cause compiler or runtime errors in the script.
'''Note:''' On the official forums Dave Humphrey notes, "An if block is limited to 255 compiled commands which are difficult to convert in the number of lines as each line may end up as one or several commands when compiled. The 255 line limit is just for each block, i.e. if you had an if block with 200 commands followed an elseif with 100 commands and an else with 50 commands, you'd be fine." See [http://www.elderscrolls.com/forums/index.php?showtopic=84383 Another script character limitation? thread] on {{BSForums|forum=13-the-elder-scrolls|The Elder Scrolls Forums}}.
| 1,054,553
|
2012-11-12T02:36:59Z
|
Minor Edits
|
if
elseif
else
endif
if ( LeftValue CompareOp RightValue )
elseif ( LeftValue CompareOp RightValue )
else
endif
Where: LeftValue = Local/global variable or function call
CompareOp = ==, , >=, !=
RightValue = Local/global variable or numeric literal value
Statements = Zero or more statements to execute
Type: System
Returns: none
Example: if ( GlobalVar >= 10 )
; do stuff
elseif ( LocalVar
The IF statement block is used to test and execute conditional statements. The elseif/else blocks are both optional. It should be noted that if statements can be used in dialogue results. You should not include any operations (add, subtract, multiply, divide) in either the LeftValue or RightValue fields. Use a temporary variable and a set statement before the if block if you need to use operations.
Update: It is actually possible to use operators and functions on both sides of the comparison operator and references on the left side. In order for this to work correctly you must enclose both sides in brackets as well as have a space on either side of the comparison operator. If you omit either the comparison may not work as expected or even result the script crashing (the compiled output is messed up). Some example of correct and incorrect statements:
Wrong: if ( Var1 * Var2 + 10 >= Var2/109 ) ;Missing brackets
Correct: if ( (Var1 * Var2 + 10) >= (Var2/109) )
Wrong: if ( (Var1 * Var2 + 10)>=(Var2/109) ) ;Missing spaces around comparison
Correct: if ( (Var1 * Var2 + 10) >= (Var2/109) )
Wrong: if ( (player->GetStrength)>=(player->GetIntelligence) ) ;Cannot have reference call on right side
Correct: if ( (player->GetStrength) >= (TempInt) )
If in doubt it is always safer to assign the expression to a temporary variable and then use that variable in the if() statement. The Construction Set will not warn you with the two wrong examples above (it does give a strange error on the last one).
It is important to remember to use spaces surrounding the '(', compare operator, and ')'. There are known cases where omitting the spaces will cause compiler or runtime errors in the script.
Note: On the official forums Dave Humphrey notes, "An if block is limited to 255 compiled commands which are difficult to convert in the number of lines as each line may end up as one or several commands when compiled. The 255 line limit is just for each block, i.e. if you had an if block with 200 commands followed an elseif with 100 commands and an else with 50 commands, you'd be fine." See Another script character limitation? thread on .
|
122
| 1,492
|
https://en.uesp.net/wiki/Tes3Mod:Journal
|
Tes3Mod:Journal
|
{{Morrowind Modding Functions Trail}}{{Protection|semi}}
'''Journal'''
<pre>
Journal, ID, Index
Where: ID = Journal ID to add.
Index = Value of the journal entry to add. Can be a literal value or also a
local or global short variable.
Type: Dialogue
Returns: none
Example: Journal, "A2_4_MiloGone", 10
Journal, C3_DestroyDagoth, 50
Journal, C3_DestroyDagoth, sSumValue (use a variable value)
Scripts: amayaJournal
AzuraEnd
</pre>
Adds a journal entry to the player's journal using the given value to determine which entry to add. Generally a single ID will refer to a single quest, with multiple index values to indicate various parts of the quest. The index starts low and ends high. For instance, 10 for the starting journal entry, 20 and 30 for two middle quest journal entries, and 50 for the last, end of quest, journal entry.
This is one of the few functions that can accept a variable for the index parameter.
This function also has some rather unique features:
* You can call <code>Journal my_quest 10</code> as often as you want, the journal entry 10 of ''my_quest'' is added only once.
* The function will write any entry into the journal, if it is new, but the index is only set, if it is higher than before. If you call the function like this:
::<code>Journal my_quest 10</code>
::<code>Journal my_quest 50</code>
::<code>Journal my_quest 40</code>
::<code>Journal my_quest 30</code>
: The Journal entries will appear in the order 10, 50, 40, 30; but after that the function <code>GetJournalIndex my_quest</code> and the dialog condition '''Journal my_quest''' will return 50.
* It is possible to set a journal index that has no text. This can be used to mark progress in the quest without notifying the player of every little step.
* The function does not work with non existing IDs. You must create a journal topic ''my_quest'' in the dialog window to make these examples work.
| 1,812,479
|
2018-07-06T05:59:04Z
|
NibKing
|
Journal
Adds a journal entry to the player's journal using the given value to determine which entry to add. Generally a single ID will refer to a single quest, with multiple index values to indicate various parts of the quest. The index starts low and ends high. For instance, 10 for the starting journal entry, 20 and 30 for two middle quest journal entries, and 50 for the last, end of quest, journal entry.
This is one of the few functions that can accept a variable for the index parameter.
This function also has some rather unique features:
You can call as often as you want, the journal entry 10 of my_quest is added only once.
The function will write any entry into the journal, if it is new, but the index is only set, if it is higher than before. If you call the function like this:
::
::
::
::
: The Journal entries will appear in the order 10, 50, 40, 30; but after that the function and the dialog condition Journal my_quest will return 50.
It is possible to set a journal index that has no text. This can be used to mark progress in the quest without notifying the player of every little step.
The function does not work with non existing IDs. You must create a journal topic my_quest in the dialog window to make these examples work.
|
122
| 1,493
|
https://en.uesp.net/wiki/Tes3Mod:Long
|
Tes3Mod:Long
|
{{Morrowind Modding Functions Trail}}
'''Long'''
<pre>
Long
Type: System
Example: long LocalVar
Scripts:
</pre>
This is one of the three types of the scripting language. Long variables are signed and can range from -2,147,483,648 to 2,147,483,647. While these are the correct logical ranges, the editor appears to only accept values up to 2,147,483,520.
Although local variables can start with an underscore character (_), this seems to cause strange problems in some functions. Therefore it is recommended that you do not name variables starting with the underscore.
See Also: [[Morrowind Mod:Float|Float]], [[Morrowind Mod:Short|Short]]
| 2,307,244
|
2021-01-07T23:44:51Z
|
HoodBot
|
Long
This is one of the three types of the scripting language. Long variables are signed and can range from -2,147,483,648 to 2,147,483,647. While these are the correct logical ranges, the editor appears to only accept values up to 2,147,483,520.
Although local variables can start with an underscore character (_), this seems to cause strange problems in some functions. Therefore it is recommended that you do not name variables starting with the underscore.
See Also: Float, Short
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.