[RELz] Oblivion Script Extender (OBSE) 0020

Post » Wed Mar 30, 2011 8:59 am

Continuing from the http://www.gamesas.com/index.php?/topic/1173487-beta-oblivion-script-extender-obse-0020.

The Oblivion Script Extender, or OBSE for short, is a modder's resource that expands the scripting capabilities of Oblivion. It doesn't make any modifications to oblivion.exe, TESConstructionSet.exe, or any other files in your oblivion install, so don't worry about permanent side effects. As of v0017, OBSE requires the 1.2.0.416 version of Oblivion.

http://obse.silverlock.org/download/obse_0020.zip - current stable version, recommended for general use
http://obse.silverlock.org/
http://obse.silverlock.org/obse_command_doc.html - newly reformatted documentation

0020 is now available for general use. Many thanks to our dedicated, creative, extremely patient beta testers.

What's new:
Spoiler

0020:
-ToggleSkillPerk
-Fix compiler override using localized actor value strings
-Fix IsNthEffectItemScriptHostile returning inconsistent values
-Prevent equipping an item from generating multiple OnActorEquip events
-Prevent power-attacking generating multiple OnAttack events
-Fix GetActiveSpell returning zero if the player has not switched from the default starting spell

0020 beta 6:
-GetCellNorthRotation
-SetRaceWeight/Scale
-SetGoldValue_T
-GetActorBaseLevel
-SetDoorTeleport now accepts an optional argument specifying the change should not be recorded in the savegame
-OnCreatePotion event
-Fix issues with input functions arising from conflicts between mods using GetKeyPress and Enable/DisableControl.
-Fix IsDigit always returning true regardless of character type
-Fix misnamed OnPlayerDrop event to OnActorDrop
-Prevent GetDescription using cached value of skill perk text.
-Make SetInputText accept extremely long strings
-Make compiler override accept string_var as argument for old sv_* commands
-Fix OnSkillUp event

0020 beta 5:
-Get/SetLocalGravity
-Get/SetVelocity
-GetVerticalVelocity
-New events: OnHealthDamage, OnCreateSpell, OnEnchant, OnAttack, OnRelease, OnBowAttack, OnBlock, OnDodge, OnStagger, OnRecoil
-OnActorEquip event now triggered by actors equipping items due to changes in their AI
-OnHealthDamage event can now be filtered by the damaged actor
-SetVerticalVelocity now operates in game units instead of centimeters
-Internal changes to handling of parallel script execution

0020 beta 4:
-Get/SetCellWaterType
-GetEquippedTorchTimeLeft
-(Set)IsHidden/Automatic/MinimalUseDoor, SetIsOblivionGate
-OnEatIngredient, OnNewGame events
-Update active effect commands to work on non-actor magic targets (doors, furniture, etc)
-ar_Erase erases all elements if second argument omitted
-GetGameLoaded now returns true when the player starts a new game

0020 beta 3:
-OnDrinkPotion, OnActorDrop, OnSpell/ScrollCast, OnFallImpact, OnMapMarkerAdd events
-SetVerticalVelocity
-GetHigh/MiddleHighActors
-GetCurrentPackageProcedure
-Get/SetSkillSpecialization
-GetEditorID optionally does not return formID if no string editorID exists
-%B, %b format specifiers for colored text in console
-Fix compiler override not being deactivated at end of script block
-Fix crash in GetRaceHairs/Eyes if race has no hairs/eyes defined
-Fix OnHitWith event being reported multiple times per event if weapon enchanted

0020 beta 2:
-Set/ClearPlayersLastRiddenHorse
-GetNthActiveEffectActorValue
-Equip/UnequipItemSilent
-GetCurrent/CallingScript
-GetRaceVoice now returns "this" race if no voice race is defined
-SetCellWaterHeight now works with cells that aren't defined in editor as having water
-Make "stringVar[-x]" work as expected
-Make foreach/while loops thread-safe
-Fix issue with IsKeyPressed2 introduced in 0020 beta

0020 beta:
-Compiler override for passing OBSE expressions and data types as arguments to any command
-Get/SetCellLighting
-IsNthActiveEffectApplied, GetNthEffectItem
-GetMapMarkers
-PlayIdle
-ar_CustomSort
-GetPathNodesInRadius/Rect
-Is/SetPathNodeDisabled
-GetPathNodePos
-PathEdgeExists
-GetPathNodeLinkedRef
-Get/SetCellClimate
-SetCellBehavesAsixterior, SetCellHasWater
-IsCellPublic, SetCellIsPublic
-IsOblivionInterior/World, IsInOblivion
-(Set)CanFastTravelFromWorld
-GetBoundingRadius, GetEditorSize
-GetTerrainHeight
-ResolveModIndex
-SetPos_T, SetOwnership_T, ClearOwnership_T
-GetRequiredSkillExp
-HasEffectShader
-Get/SetLightDuration, Get/SetTimeLeft
-SetCreatureSkill
-SetInputText, SetTextInputControlHandler, SetTextInputDefaultControlsDisabled


Readme (abbreviated):
Spoiler
Oblivion Script Extender v0020
by Ian Patterson, Stephen Abel, and Paul Connelly
(ianpatt, behippo, and scruggsywuggsy the ferret)

Additional contributions from Timeslip, The J, DragoonWraith, SkyRanger-1, badhair, JRoush, shademe, and kyoma.

The Oblivion Script Extender, or OBSE for short, is a modder's resource that expands the scripting capabilities of Oblivion. It doesn't make any modifications to oblivion.exe, TESConstructionSet.exe, or any other files in your oblivion install, so don't worry about permanent side effects. It is compatible with the 1.2.0.416 Oblivion patch, as well as the 1.2 version of the Construction Set. Versions of Oblivion downloaded via Steam are supported as well.

[ Installation ]

If you are using a retail (non-Steam) version of the game:

1. Copy obse_1_2_416.dll, obse_editor_1_2.dll, and obse_loader.exe to your Oblivion directory. This is usually in your Program Files folder, and should contain files called "Oblivion.exe" and "OblivionLauncher.exe".
2. Run oblivion by running obse_loader.exe from the Oblivion directory.

If you use a desktop shortcut to launch Oblivion normally, just update the shortcut to point to obse_loader.exe instead of oblivion.exe.

If you are using the Steam version of the game:

1. Copy obse_1_2_416.dll, obse_editor_1_2.dll, and obse_steam_loader.dll to your Oblivion directory. This is usually "C:\Program Files\Valve\Steam\SteamApps\common\oblivion".
2. OBSE will automatically be run along with Oblivion when launched. To disable this, rename or move obse_steam_loader.dll. You do not need to use obse_loader.exe unless you are running the editor.

Scripts written with these new commands must be written via the TESConstructionSet launched with obse_loader. Open a command prompt window, navigate to your oblivion install folder, and type "obse_loader -editor". The normal editor can open plugins with these extended scripts fine, it just can't recompile them and will give errors if you try.


For mod developers:
  • http://home.comcast.net/~scruggsyW/obse/ScriptViewer.zip - View offsets into compiled scripts to help debug errors reported by OBSE at run-time

User avatar
Suzie Dalziel
 
Posts: 3443
Joined: Thu Jun 15, 2006 8:19 pm

Post » Tue Mar 29, 2011 9:46 pm

Hooray! Congratulations on release. :celebration:
User avatar
Jaylene Brower
 
Posts: 3347
Joined: Tue Aug 15, 2006 12:24 pm

Post » Wed Mar 30, 2011 9:50 am

Indeed! Been very busy. Congrats :foodndrink:
User avatar
Jordyn Youngman
 
Posts: 3396
Joined: Thu Mar 01, 2007 7:54 am

Post » Wed Mar 30, 2011 9:15 am

Congratulations on the release indeed. :)
User avatar
Bryanna Vacchiano
 
Posts: 3425
Joined: Wed Jan 31, 2007 9:54 pm

Post » Wed Mar 30, 2011 1:43 am

Congratulations on the release! And thank you very much! :)
User avatar
Floor Punch
 
Posts: 3568
Joined: Tue May 29, 2007 7:18 am

Post » Wed Mar 30, 2011 1:19 am

Not that I ever do much scripting myself, but I use enough OBSE-based mods that I think I should chime in with the general thanking. :thumbsup:

Vac
User avatar
Alexandra Ryan
 
Posts: 3438
Joined: Mon Jul 31, 2006 9:01 am

Post » Wed Mar 30, 2011 1:46 pm

Thanks for the release - now I can actually update some mods that needed OBSE 0020 betas. :)
User avatar
Glu Glu
 
Posts: 3352
Joined: Sun Apr 01, 2007 5:39 am

Post » Wed Mar 30, 2011 3:09 am

:twirl: :celebration: :wub:

Compiler Override now works with Actor Values :user:


And here comes the first request for the stable release:
Is it possible to expand ToggleSkillPerk to the Armor Skills. I'm espacially interested in Expert/Master-Perks.

Oh, and an IsSkillPerkEnabled would be neat. :)
User avatar
Love iz not
 
Posts: 3377
Joined: Sat Aug 25, 2007 8:55 pm

Post » Wed Mar 30, 2011 8:31 am

:thumbsup:
User avatar
Kelly John
 
Posts: 3413
Joined: Tue Jun 13, 2006 6:40 am

Post » Wed Mar 30, 2011 10:35 am

:thumbsup:

'bout time, no? I appreciate everyone's patience and help in ironing out the bugs.
And here comes the first request for the stable release:
Is it possible to expand ToggleSkillPerk to the Armor Skills. I'm espacially interested in Expert/Master-Perks.

Oh, and an IsSkillPerkEnabled would be neat. :)

Yeah, the plan is to expand ToggleSkillPerk based on requests, for those perks which can't be controlled using game settings. The armor perks look doable.
User avatar
Anthony Santillan
 
Posts: 3461
Joined: Sun Jul 01, 2007 6:42 am

Post » Tue Mar 29, 2011 10:26 pm

Cool, thanks. :)
User avatar
Cameron Garrod
 
Posts: 3427
Joined: Sat Jun 30, 2007 7:46 am

Post » Wed Mar 30, 2011 2:47 am

'bout time, no? I appreciate everyone's patience and help in ironing out the bugs.
Very much so - I'd intended to release CSE alongside 20's official release, but look where we are now :P
User avatar
ShOrty
 
Posts: 3392
Joined: Sun Jul 02, 2006 8:15 pm

Post » Wed Mar 30, 2011 12:42 pm

Awesome work OBSE team! :goodjob:
User avatar
Stephani Silva
 
Posts: 3372
Joined: Wed Jan 17, 2007 10:11 pm

Post » Wed Mar 30, 2011 8:55 am

I bet most players do not realize that OBSE is the number one most used mod in Oblivion.
Thank you to scruggsywuggsy the ferret, ianpatt, behippo, and the rest of the team for all your "un-sung" hard work.

( OBSE is "my density... ". )
User avatar
(G-yen)
 
Posts: 3385
Joined: Thu Oct 11, 2007 11:10 pm

Post » Wed Mar 30, 2011 1:49 pm

( OBSE is "my density... ". )
Type in '88mph' in CSE's console.
User avatar
Gisela Amaya
 
Posts: 3424
Joined: Tue Oct 23, 2007 4:29 pm

Post » Wed Mar 30, 2011 8:09 am

Type in '88mph' in CSE's console.


Oh God... Well it was nice to see a Delorian got used for something... :lol:
User avatar
Jonathan Montero
 
Posts: 3487
Joined: Tue Aug 14, 2007 3:22 am

Post » Tue Mar 29, 2011 9:37 pm

Awesome work! Little by little this is becoming a programming language on it's own ^^
User avatar
CRuzIta LUVz grlz
 
Posts: 3388
Joined: Fri Aug 24, 2007 11:44 am

Post » Wed Mar 30, 2011 12:58 pm

Found a Bug with ar_Append, an Array stored in a StringMap, a string_var as key for the StringMap and ->/$:
ar_Append ( LPLSQuMain.GlisasItems -> ctsSkill ), ctrItemar_Append ( LPLSQuMain.GlisasItems[$ctsSkill] ), ctrItem

Both lines compile fine, but only the second one works.

ar_Append ( LPLSQuMain.GlisasItems -> $ctsSkill ), ctrItem

Here, the CS(E) complains about
[CS] Script 'LPLSFuncRegisterItem', line 28:
Too many operators.
[CS] Script 'LPLSFuncRegisterItem', line 28:
Too many operands.
[CS] Script 'LPLSFuncRegisterItem', line 28:
Could not parse this line.


PS:
ar_Dump has the same problem (doesn't do anything).

PS2:
First Request and first Bug report. :intergalactic:
User avatar
Andrew
 
Posts: 3521
Joined: Tue May 08, 2007 1:44 am

Post » Wed Mar 30, 2011 9:56 am

Found a Bug with ar_Append, an Array stored in a StringMap, a string_var as key for the StringMap and ->/$:

I should make the docs clearer about the -> operator: the right-hand side is a *literal* string. The first line of script you posted is looking for an element with the key "ctsSkill", which probably doesn't exist.
User avatar
Rachell Katherine
 
Posts: 3380
Joined: Wed Oct 11, 2006 5:21 pm

Post » Wed Mar 30, 2011 2:34 am

Always my first try if the direct use of a string_var doesn't work. But as said: using the Stringize-character ($) results in an Error Message.


Anyway, thanks for clarifying. :)
User avatar
Nikki Lawrence
 
Posts: 3317
Joined: Sat Jul 01, 2006 2:27 am

Post » Wed Mar 30, 2011 1:16 pm

But as said: using the Stringize-character ($) results in an Error Message.

Right, the operand has to be a literal string, at least currently. That could be changed but the idea behind -> is to let you treat arrays as pseudo-structs; if it accepts string vars/expressions then this becomes ambiguous:
string_var keylet stuff := ar_map "key"::"whatever" "something"::"blah"let key := "something"print stuff->key ; stuff["key"]? or stuff["something"]?

So I think it might be better to leave things as they are and let -> be more specialized than the [brackets]. (But the docs do need to be clarified on that point).
User avatar
Philip Rua
 
Posts: 3348
Joined: Sun May 06, 2007 11:53 am

Post » Wed Mar 30, 2011 6:06 am

Ah, ok.
I understand the problem now.


Always been a bit confused when your talking about the different string types. Maybe because I'm not a native english speaker and never had any programming/coding education.

So, just to be sure: If your talking about
  • a string_var it's the variable itself.
  • a string it's the content of a string_var/array[key], or the result of the ToString-command/Stringize-character ($)
  • a literal string it's sth. you write in quotes ("), or OBSE says it's treated as a string (because your too lazy to use quotes).

Sth. wrong here?
Always assumed string is the same as literal string.
User avatar
Rude Gurl
 
Posts: 3425
Joined: Wed Aug 08, 2007 9:17 am

Post » Wed Mar 30, 2011 3:27 am

:obliviongate:
User avatar
Steve Smith
 
Posts: 3540
Joined: Sat Jun 30, 2007 10:47 am

Post » Wed Mar 30, 2011 2:44 am

Happy to have a new stable. thanks everyone <3
User avatar
Elizabeth Davis
 
Posts: 3406
Joined: Sat Aug 18, 2007 10:30 am

Post » Wed Mar 30, 2011 9:39 am

Any plans to include a SetCreatureType command? Unless I missed one that already exists.
User avatar
Eire Charlotta
 
Posts: 3394
Joined: Thu Nov 09, 2006 6:00 pm

Next

Return to IV - Oblivion