OBSE Wishes Fulfilled

Revision as of 10:14, 5 May 2008 by imported>Scruggs (add getsoundplaying, getactivemenuselection)

Wishes Fulfilled

The following requested functions have now been implemented in OBSE. Please consult the OBSE documentation to avoid requesting a feature which is already available. Some of the newer functions are not yet documented on the wiki.

Other

  • Not so much an actual OBSE function, but a way to use the OBSE with the Oblivion Launcher, instead of having to create two shortcuts.
    • Use OCOL
    • Use Wrye Bash launch buttons.
      • Check green box to activate OBSE.
      • Click either Oblivion or TESCS launch buttons. If the OBSE box is checked, they'll launch with OBSE running.

Plug-ins

OBSE now offers the ability to use plug-ins to add even more functions.

Tibixe's String Function Collection

OBSE v0008

  • GetArmorType [slot] - the weight of the armor in the slot alone would be a very useful function (one we had in Tribunal), but of course, actually getting the armor there would be even better - DONE!
  • Math functions - low priority, because there are ways around this. Still, can be annoying to use workarounds in some situations - DONE!
  • Message to Console - it would be so useful for debugging, using messages is annoying and sqv doesn't display all of the information - DONE!
  • Console only commands - Allow scripters to use console only commands in the editor. - DONE!
  • MoveMouse, a command for simulating mouse-movements. Useful for cinematics and combat moves. - DONE! (and done and done and done)
  • GetObjectValue [value] - ability to determine the stats of objects, such as finding out how damaged an armor is or the soul value in a soul gem. - DONE!
  • GetIsMajor [skill] - returns 1 if specified skill is a major skill of the calling actor - DONE! (undocumented as of yet)
  • Simple, binary operations - Dejaside recommends adding simple, binary operations for determining exactly what the script is running on (IsWeapon, IsContainer, etc etc). - Partially Done! See discussion.
  • GetSpell [Spell ID] - Returns 1 if actor has declared spell in their spell book. I know this will not be possible till the spell list is found, but it would be quite useful to have. - DONE! (undocumented as of yet)
  • Increased (or removed) script size limit - Partially Done! - The 32k text limit has been removed from the editor. The number of opcodes permitted in a script has not increased.
  • GetKeyPress - returns the scancode of currently pressed key. - DONE!

OBSE v0009

  • set/modObjectValue - Individual functions for each.
  • set/modCurrentValue - Individual functions for each.
  • GetActorLightAmount - Returns the level of light shining on an actor.
  • SetRefEssential - SetEssential works on base objects. This works on references.
  • GetGameLoaded - Returns true when a saved game is loaded.
  • Basic looping structures - GoTo and Label allow for looping within a script.
  • removeMagicEffect/setMagicEffect - Several functions for manipulating spell effects are now available.
  • SetName - sets the base object name on a passed base object or calling reference.
  • Looping Functions - DONE!

OBSE v0010

  • con_SaveGame
  • CopyModelPath, CopyIconPath - Copies the model or icon path from one object to another.
  • TCL - disables collision either globally or on a specific reference.
  • Bitwise logic functions: AND, OR, NOT, XOR.
  • get/setPointOfView - Sets or gets the current point of view (first or third person) and allows the scripter to adjust the position and angle of the third person camera. (IsThirdPerson returns the current perspective, which can be changed by forcing a keypress with TapKey).
  • getCreatureType - Returns the type of a creature - Humanoid, Daedra, Undead, etc.
  • SendKeyToDialog - simulates pressing keys for the dialog e.g. ESC or any other key. (The new menu input functions allow for this).
  • GetSpellMagicSchool spellID - finds what magic school a spell belongs in by finding the highest costing effect in the spell and finding what school that effect belongs to.
  • IsScripted - a simple boolean function that returns true if the object has a script attached to it.
  • getIsInName/getIsInID string - like GetInCell, allows a partial comparison of names or objectIDs. So if there are two NPCs named "OscarWilde" and "OscarTheGrouch", getIsInName "Oscar" would return true for both.
    • Use CompareName

OBSE v0011

  • ModName - Works like ModModelPath but on items' names. It would be great to make some naming rules in scripts.
    • Also, use ModName to add a prefix and AppendToName to add a suffix.
  • modPCSkillProgress skill amount - modifies the player's progress toward advancing the given skill.

OBSE v0012

  • SetUnplayable/GetUnplayable [ObjectID] - Sets or gets the unplayable attribute of apparel.
    • The function is called Get/SetIsPlayable
  • SetNthEffectItemScriptName - Sets the nth effect's name.
  • GetMerchantContainer - Returns a reference to the calling actor's merchant container.
  • GetScript [ObjectID] - Returns the script of the given object.
  • GetName - Returns full name of object or reference

OBSE v0013

  • con_LoadGame
  • IsUnderWater - Returns true if calling object is underwater
  • AddToLeveledList/RemoveFromLeveledList - Adds or removes items to/from a leveled item, spell, or creature list
  • GetParentCellWaterHeight - Returns height of water in the calling object's cell, if any
  • Moon phase functions
  • CopyFace/CopyHair
  • Get/SetTravelHorse
  • Version of PlaceAtMe that accepts a leveled item - pass an object returned from CalcLeveledItem to PlaceAtMe
  • CompareNames ObjectID1 ObjectID2 - Compares the first name to the second name. Returns 0 if they're the same, 1 if the first is later in the alphabet, -1 if the second is later in the alphabet.
  • GetRunningScriptEffectXXX - returns information about the active effect of the scripted spell including Caster, magnitude, duration, time elapsed and magic item
  • GetTotalActiveEffectMagnitude - returns the total magnitude of all active effects on a target for a given magic effect. Includes variations which filter based on spell type
  • Get/SetOpenKey - returns or sets the key needed to open a lockable reference
  • GetOwner - Returns the owner of the calling reference.
  • CellScan - Use GetFirstRef/GetNextRef to iterate through all references (or just those of a given type) within the current cell.

OBSE v0014

  • %N in messageBox - the %N character would compile as a new line. Fulfilled by new output functions, using %r instead of %n.
  • Message & MessageBox - Could take references as parameters and show the names of the references at the corresponding %f in the format string. It would be great for modders to provide more information to players. Fulfilled by new output functions using %n.
  • MagicItemHasScriptedEffectScript - Returns whether the magic item has a scripted effect with the specified script. (Also helpful for sorting scripts --Haama 17:15, 13 November 2007 (EST))
  • isOffLimits actorID - returns true if it would be illegal for the actor to activate the calling object.
  • getHUDTarget - Returns a reference to the object currently targeted by the HUD reticle. GetCrosshairRef
  • Has/SetLowLevelProcessing - Returns true if the "No Low Level Processing" flag is unchecked for the actor. Possibly sets the flag.
  • CanFly, isBiped, canSwim, usesWeapon - For creatures, these boolean functions would report on the check boxes used in the Creature properties window. Useful for discriminating between flying creatures, swimming creatures, weapon-wielders, etc.
  • GetSoulLevel - Returns the calling actor's soul level. For NPCs, it always returns Grand Level.
  • IsPersistent - returns true if the reference is persistent; possibly allows persistence to be toggled via script.
  • SetRespawns/GetRespawns [ObjectID] - Sets or gets the respawns attribute of containers. Also implemented for actors.
  • getHorse - Returns a reference to the horse currently ridden by the calling actor.
  • GetPlayerLastRiddenHorse it does essentially the same thing as GetHorse but has more uses and may be easier to do since there's already an IsPlayersLastRiddenHorse function.
  • GetCreatureSoundBase - Most creatures inherit their sounds from other creatures - i.e. all goblins inherit from CreatureGoblin01. This would be useful for figuring out which sounds a creature should use via script. It would also be an indirect but generally reliable way of determining the basic type of creature (goblin, zombie, horse, etc).
  • SetCurrentSoulLevel - Sets the soul level of the calling reference (counterpart to the existing function GetCurrentSoulLevel).

OBSE v0015 (forthcoming)

  • addItem/removeItem/equipItem/addSpell/etc without the sound effects and message spam. EquipItemNS, UnequipItemNS, AddItemNS, RemoveItemNS, AddSpellNS, RemoveSpellNS, SetStageNS
  • ToggleCreatureModel - Toggles a .nif object within a creature's model list on or off.
  • isPluginRunning - if the plugin is active, returns its load order. Use GetModIndex
  • IsValidReference - returns true if the supplied reference is valid. This would return false, for instance, if a reference to an item is put into an inventory, or if the reference is non-persistent and not in the loaded cell. Avoids issues with calling functions on such references crashing the game. Use IsFormValid
  • PlayCreatureSound [soundGroup] - an alternative to the above. Plays the sound associated with the specified group for the calling object (creature). Creatures have sounds like "Idle", "Hit", "Attack", etc. Pass the return value of GetCreatureSound to PlaySound or PlaySound3D
  • RemoveFromDetectionList - Oblivion stores a list of actors who currently detect the player. However, unconscious/paralyzed/knocked-down actors are not properly removed from the list if they detect the player at the moment their AI is turned off, and will continue to detect him regardless of how well-hidden he is. This function forcibly removes them from the detection list.
  • GetHotkey [N] and SetHotkey [N] [ref] - get and set the object or spell for hotkey slot N (0-7). This would primarily be of use to write hotkey extenders in a very natural way (the player can assign/re-assign hotkeys in the usualy fashion, the refs of which can then be copied away into script space).
  • IsFalling - Returns true if the calling actor is currently falling. Use GetFallTimer; if > 0, actor is falling.
  • IsMoving - Returns true if the actor is moving across space (e.g. Player coordinates are changing. For example, flying, jumping, swimming, falling, being pushed or carried, etc).
  • myRef.GetScriptVariable VarName, [value] - access the variable on the script that is associated with the myRef object instance. Even if VarName were replaced by VarNumber in the script, this would be very useful.
  • onJump - returns true when the actor jumps. Use IsJumping.
  • getCurrentAnimGroup - Returns the general AnimGroup of the current animation, e.g. Idle or Attack. Use IsAnimGroupPlaying
  • GetTotalGoldValue - Similar to GetGoldValue but will return total value of an object, rather than only the base value. GetFullGoldValue
  • IsSpellHostile Spell:ref - returns true if the spell will be considered an attack - not the same as checking the hostility of every effect. In most cases a spell is hostile if any of its effects are hostile, but if a non-hostile spell has a hostile effect added (or a hostile spell has its hostile effects removed), the "hostility" status does not update.
  • ForceSpellHostilityUpdate Spell:ref - fixes the above problem. SetSpellHostile
  • GetProcessState - Returns the current level of processing for the actor based on its distance from the player. The console functions like ToggleHighProcess and ToggleLowProcess might provide a starting point. GetProcessLevel
  • getSoundPlaying - returns true if the specified sound is playing on the calling reference, including things like weapon swishes, shield block sounds, etc.
  • GetSelection - Returns the index of the selected item in the current menu. GetActiveMenuSelection