[RELz] Oblivion Script Extender (OBSE) 0018

Post » Thu Nov 25, 2010 1:36 pm

wow...really?...wow....
ok thanks for letting me know that. That is important as I do a lot of "changing of variables names" as I flesh out scripts.

In a compiled script, variables are actually represented by a numeric ID that corresponds to an entry in the script's local variable list. When you add a variable and recompile the script, the compiler adds a new entry to the variable list, with a new unique ID number. When you remove a variable, the compiler removes its entry from the compiled local variable list. When you rename a variable, the script compiler sees it as removing one variable and adding another, so the new name gets a new ID number and the old ID number is no longer valid. This breaks all other compiled scripts that refer to the variable, since they have the old ID number compiled into them.

If you want to rename a variable but have it still be the "same" variable, you can use TES4Edit beforehand to edit the script's local variable list, changing the variable's SCVR entry to the new name. Then when you rename the variable in the script's source code and recompile the script in the CS, the new variable name matches an existing entry in the local variable list (the one that you edited), so it uses that variable's ID instead of adding a new one. The result is that other compiled scripts that reference this one will still work, since the variable IDs haven't changed. (Trying to recompile one of those scripts, though, will still fail since it'll try to look up the old name. The person editing the script will still need to change it to refer to the new variable name instead of the old.)

One nice thing about OBSE v0018 function scripts, btw, is that it's not possible to refer directly to their variables from other scripts, so you can change variables all you want and not have to worry about breaking dependencies. Just don't change the function's parameter list, since callers do depend on that.
User avatar
Reven Lord
 
Posts: 3452
Joined: Mon May 21, 2007 9:56 pm

Post » Thu Nov 25, 2010 12:01 pm

I believe this is just the bytecode changes from v0017 to v0018. Simply recompiling obse-based scripts with v0018 will require that v0018 or later be used.

I think most of the concern is over "non-OBSE-based" scripts. If I were to load Oblivion.esm and nothing else in the CS, do a "recompile all" in the script editor, and save the result as a new plugin, would the game's vanilla scripts now use OBSE-specific bytecode?
User avatar
!beef
 
Posts: 3497
Joined: Wed Aug 16, 2006 4:41 pm

Post » Thu Nov 25, 2010 7:07 pm

...
If you want to rename a variable but have it still be the "same" variable, you can use TES4Edit beforehand to edit the script's local variable list, changing the variable's SCVR entry to the new name.

And it works too, except for one very large problem - when you load an old game with the old variable names, Oblivion assumes the new, different variable name must be wrong and throws a very angry looking MessageBox 'Save Game Corruption Error'.
User avatar
Kelsey Hall
 
Posts: 3355
Joined: Sat Dec 16, 2006 8:10 pm

Post » Thu Nov 25, 2010 3:38 pm

Hmm, interesting. I didn't know it checked the names against the indexes.

There's another reason to use function scripts for anything that doesn't actually need to be stateful: their vars don't get saved.
User avatar
ladyflames
 
Posts: 3355
Joined: Sat Nov 25, 2006 9:45 am

Post » Thu Nov 25, 2010 7:20 am

TheMagician: Might you perhaps have a sneak-preview of how this new/alternative documentation looks like? I don't think the current one is really that bad but I don't really have a comparison either. :)

Nothing fancy: http://i279.photobucket.com/albums/kk146/TheMagicianFromOblivion/obsehomepage-1.jpg

It's the same page, I've just introduced some whitespace and a dash of color to break up the monotony. I find it a lot easier to use, personally, but I'm not a programmer. :P

The function names are linked to the CS wiki page.

I'm undecided on whether or not to break it up over multiple pages. It's kind of nice to have everything on one page, but the page is really long. I might just insert some 'Top' or 'TOC' links every so often to make navigation easier. The style instructions are now located on a separate stylesheet.
User avatar
Nathan Maughan
 
Posts: 3405
Joined: Sun Jun 10, 2007 11:24 pm

Post » Thu Nov 25, 2010 8:11 am

And it works too, except for one very large problem - when you load an old game with the old variable names, Oblivion assumes the new, different variable name must be wrong and throws a very angry looking MessageBox 'Save Game Corruption Error'.
This makes me wonder, could the same thing happen if I'd delete a script from my mod and then re-add it, obtaining the same formID as the previously deleted script. And assuming the deleted script has the same content/variable list as the new script, with the exception of the name of one variable. Probably very unlikely though. :P


Nothing fancy: http://i279.photobucket.com/albums/kk146/TheMagicianFromOblivion/obsehomepage-1.jpg

It's the same page, I've just introduced some whitespace and a dash of color to break up the monotony. I find it a lot easier to use, personally, but I'm not a programmer. :P

The function names are linked to the CS wiki page.

I'm undecided on whether or not to break it up over multiple pages. It's kind of nice to have everything on one page, but the page is really long. I might just insert some 'Top' or 'TOC' links every so often to make navigation easier. The style instructions are now located on a separate stylesheet.
Looks pretty great. :) Definitely keep the colors, as for breaking up into pages, maybe also put the raw list of functions and/or the various 'codes' for the functions. Or is that what you ment by "style instructions"?

-kyoma
User avatar
TOYA toys
 
Posts: 3455
Joined: Sat Jan 13, 2007 4:22 am

Post » Thu Nov 25, 2010 7:19 am

This makes me wonder, could the same thing happen if I'd delete a script from my mod and then re-add it, obtaining the same formID as the previously deleted script. And assuming the deleted script has the same content/variable list as the new script, with the exception of the name of one variable.

You won't get the same formID when you add it back, unless you set it manually with TES4Edit. If you delete something and then put it back with the same formID, though, you haven't actually changed anything, so I think what you described above is equivalent to just renaming the variable in the existing script.
User avatar
Symone Velez
 
Posts: 3434
Joined: Thu Sep 07, 2006 12:39 am

Post » Thu Nov 25, 2010 6:47 pm

There's another reason to use function scripts for anything that doesn't actually need to be stateful: their vars don't get saved.

I would test to make sure, but that sounds about right.
User avatar
Del Arte
 
Posts: 3543
Joined: Tue Aug 01, 2006 8:40 pm

Post » Thu Nov 25, 2010 2:58 pm

I've got a question with my logs, I get "plugin did not read all of its data (at 0000000000007477 expected 0000000000007478):" and what does it mean? is there anything I can do to correct it??
Spoiler
OBSE: initialize (version = 18.6 010201A0)
oblivion root = C:\Games\Oblivion\
plugin directory = C:\Games\Oblivion\Data\OBSE\Plugins\
checking plugin C:\Games\Oblivion\Data\OBSE\Plugins\\FastExit2.dll
plugin C:\Games\Oblivion\Data\OBSE\Plugins\\FastExit2.dll (00000001 FastExit 00000002) loaded correctly
checking plugin C:\Games\Oblivion\Data\OBSE\Plugins\\OBGEv2.dll
SetOpcodeBase 00002100
RegisterCommand GetAvailableGraphicsMemory (2100)
RegisterCommand GetScreenWidth (2101)
RegisterCommand GetScreenHeight (2102)
RegisterCommand LoadShader (2103)
RegisterCommand ApplyFullscreenShader (2104)
RegisterCommand RemoveFullscreenShader (2105)
RegisterCommand SetShaderInt (2106)
RegisterCommand SetShaderFloat (2107)
RegisterCommand SetShaderVector (2108)
RegisterCommand SetShaderTexture (2109)
RegisterCommand ForceGraphicsReset (210A)
RegisterCommand LoadTexture (210B)
RegisterCommand FreeTexture (210C)
RegisterCommand CreateHUDElement (210D)
RegisterCommand SetHUDElementTexture (210E)
RegisterCommand SetHUDElementColour (210F)
RegisterCommand SetHUDElementPosition (2110)
RegisterCommand SetHUDElementScale (2111)
RegisterCommand SetHUDElementRotation (2112)
RegisterCommand PurgeManagedTextures (2113)
RegisterCommand IsShaderEnabled (2114)
plugin C:\Games\Oblivion\Data\OBSE\Plugins\\OBGEv2.dll (00000001 OBGEv2 00000003) loaded correctly
checking plugin C:\Games\Oblivion\Data\OBSE\Plugins\\OBSE_Elys_Pluggy.dll
SetOpcodeBase 00002330
RegisterCommand GetEsp (2330)
RegisterCommand CreateArray (2331)
RegisterCommand DestroyArray (2332)
RegisterCommand ArraySize (2333)
RegisterCommand ArrayCount (2334)
RegisterCommand SetInArray (2335)
RegisterCommand SetFloatInArray (2336)
RegisterCommand GetInArray (2337)
RegisterCommand GetTypeInArray (2338)
RegisterCommand RemInArray (2339)
RegisterCommand FindInArray (233A)
RegisterCommand FindFloatInArray (233B)
RegisterCommand SetRefInArray (233C)
RegisterCommand FindRefInArray (233D)
RegisterCommand CopyArray (233E)
RegisterCommand ArrayEsp (233F)
RegisterCommand ArrayProtect (2340)
RegisterCommand FirstInArray (2341)
RegisterCommand DestroyAllArrays (2342)
RegisterCommand PackArray (2343)
RegisterCommand CreateString (2344)
RegisterCommand DestroyString (2345)
RegisterCommand SetString (2346)
RegisterCommand StringEsp (2347)
RegisterCommand StringProtect (2348)
RegisterCommand StringLen (2349)
RegisterCommand DestroyAllStrings (234A)
RegisterCommand StringSetName (234B)
RegisterCommand StringGetName (234C)
RegisterCommand StringMsg (234D)
RegisterCommand StringCat (234E)
RegisterCommand UserFileExists (234F)
SetOpcodeBase 00002378
RegisterCommand RenFile (2378)
RegisterCommand DelFile (2379)
RegisterCommand StringToTxtFile (237A)
RegisterCommand CopyString (237B)
RegisterCommand IntToString (237C)
RegisterCommand FloatToString (237D)
RegisterCommand RefToString (237E)
RegisterCommand IniReadInt (237F)
RegisterCommand IniReadFloat (2380)
RegisterCommand IniReadRef (2381)
RegisterCommand IniWriteInt (2382)
RegisterCommand IniWriteFloat (2383)
RegisterCommand IniWriteRef (2384)
RegisterCommand IniKeyExists (2385)
RegisterCommand IniDelKey (2386)
RegisterCommand EspToString (2387)
RegisterCommand IniReadString (2388)
RegisterCommand IniWriteString (2389)
RegisterCommand ModRefEsp (238A)
RegisterCommand GetRefEsp (238B)
RegisterCommand StringToRef (238C)
RegisterCommand StringCmp (238D)
RegisterCommand FileToString (238E)
RegisterCommand StringPos (238F)
RegisterCommand StringToInt (2390)
RegisterCommand StringToFloat (2391)
RegisterCommand ArrayCmp (2392)
RegisterCommand StringMsgBox (2393)
RegisterCommand StringIns (2394)
RegisterCommand StringRep (2395)
RegisterCommand IntToHex (2396)
RegisterCommand LC (2397)
SetOpcodeBase 000023B0
RegisterCommand FromTSFC (23B0)
RegisterCommand ToTSFC (23B1)
RegisterCommand StrLC (23B2)
RegisterCommand CreateEspBook (23B3)
RegisterCommand FmtString (23B4)
RegisterCommand FixName (23B5)
RegisterCommand ResetName (23B6)
RegisterCommand HasFixedName (23B7)
RegisterCommand csc (23B8)
RegisterCommand StringSetNameEx (23B9)
RegisterCommand StringGetNameEx (23BA)
RegisterCommand FixNameEx (23BB)
RegisterCommand IniGetNthSection (23BC)
RegisterCommand IniSectionsCount (23BD)
RegisterCommand RunBatString (23BE)
RegisterCommand Halt (23BF)
RegisterCommand RefToLong (23C0)
RegisterCommand LongToRef (23C1)
RegisterCommand FindFirstFile (23C2)
RegisterCommand FindNextFile (23C3)
RegisterCommand GetFileSize (23C4)
RegisterCommand NewHudS (23C5)
RegisterCommand DelHudS (23C6)
RegisterCommand ScreenInfo (23C7)
RegisterCommand HudS_X (23C8)
RegisterCommand HudS_SclX (23C9)
RegisterCommand HudS_Show (23CA)
RegisterCommand HudS_Opac (23CB)
RegisterCommand HudS_Align (23CC)
RegisterCommand AutoSclHudS (23CD)
RegisterCommand HudS_Y (23CE)
RegisterCommand HudSEsp (23CF)
RegisterCommand HudSProtect (23D0)
RegisterCommand HudsInfo (23D1)
RegisterCommand DelAllHudSs (23D2)
RegisterCommand HudS_L (23D3)
RegisterCommand rcsc (23D4)
RegisterCommand HudS_SclY (23D5)
RegisterCommand NewHudT (23D6)
RegisterCommand DelHudT (23D7)
RegisterCommand HudT_X (23D8)
RegisterCommand HudT_SclX (23D9)
RegisterCommand HudT_Show (23DA)
RegisterCommand HudT_Opac (23DB)
RegisterCommand HudT_Align (23DC)
RegisterCommand AutoSclHudT (23DD)
RegisterCommand HudT_Y (23DE)
RegisterCommand HudTEsp (23DF)
RegisterCommand HudTProtect (23E0)
RegisterCommand HudTInfo (23E1)
RegisterCommand DelAllHudTs (23E2)
RegisterCommand HudT_L (23E3)
RegisterCommand HudT_SclY (23E4)
RegisterCommand PauseBox (23E5)
RegisterCommand KillMenu (23E6)
RegisterCommand SetHudT (23E7)
RegisterCommand HudT_Text (23E8)
RegisterCommand HudS_Tex (23E9)
RegisterCommand SanString (23EA)
RegisterCommand IsHUDEnabled (23EB)
RegisterCommand IsPluggyDataReset (23EC)
RegisterCommand FromOBSEString (23ED)
RegisterCommand ToOBSEString (23EE)
RegisterCommand HudT_Font (23EF)
SetOpcodeBase 000023FF
RegisterCommand PlgySpcl (23FF)
plugin C:\Games\Oblivion\Data\OBSE\Plugins\\OBSE_Elys_Pluggy.dll (00000001 OBSE_Elys_Pluggy 00000084) loaded correctly
checking plugin C:\Games\Oblivion\Data\OBSE\Plugins\\OBSE_Elys_Uncapper.dll
plugin C:\Games\Oblivion\Data\OBSE\Plugins\\OBSE_Elys_Uncapper.dll (00000001 OBSE_Elys_Uncapper 0000005E) loaded correctly
checking plugin C:\Games\Oblivion\Data\OBSE\Plugins\\sr_Oblivion_Stutter_Remover.dll
plugin C:\Games\Oblivion\Data\OBSE\Plugins\\sr_Oblivion_Stutter_Remover.dll (00000001 sr_Oblivion_Stutter_Remover 00004100) loaded correctly
patched
DoLoadGameHook: C:\Users\Mike\Documents\My Games\Oblivion\Saves\Save 704 - Nivar - The Heartlands, Level 30, Playing Time 166.50.31.ess
loading from C:\Users\Mike\Documents\My Games\Oblivion\Saves\Save 704 - Nivar - The Heartlands, Level 30, Playing Time 166.50.31.obse
Loading strings
Loading array variables
plugin didn't finish reading chunk
plugin didn't finish reading chunk
plugin didn't finish reading chunk
plugin did not read all of its data (at 0000000000007497 expected 0000000000007498)
**
Dumping Array #104 **
Refs: 1 Owner 60: FormID Finder4.esp
[ 0.000000 ] : SH Daedric Shield (0003635C)
[ 1.000000 ] : F Volendrung (0009DB4F)
[ 2.000000 ] : HH Inquisitor's Helmet (0002C212)
[ 3.000000 ] : CL Amazon's Bronze Armor (0400790C)
[ 4.000000 ] : (T) Diadem, Gold Ruby (200011F7)
[ 5.000000 ] : (T) Elven Crown, Ruby (20001200)
DoLoadGameHook: C:\Users\Mike\Documents\My Games\Oblivion\Saves\Save 656 - Nivar - Wendelbek, Level 30, Playing Time 162.53.22.ess
loading from C:\Users\Mike\Documents\My Games\Oblivion\Saves\Save 656 - Nivar - Wendelbek, Level 30, Playing Time 162.53.22.obse
Loading strings
Loading array variables
plugin didn't finish reading chunk
plugin didn't finish reading chunk
plugin didn't finish reading chunk
plugin did not read all of its data (at 0000000000007477 expected 0000000000007478)
**
Dumping Array #104 **
Refs: 1 Owner 60: FormID Finder4.esp
[ 0.000000 ] : SH Daedric Shield (0003635C)
[ 1.000000 ] : Lamp of Welkynds (3F023C4A)
[ 2.000000 ] : F Volendrung (0009DB4F)
[ 3.000000 ] : HH Inquisitor's Helmet (0002C212)
[ 4.000000 ] : CL Amazon's Bronze Armor (0400790C)
[ 5.000000 ] : CL Robe of the Black Death (2701B521)
[ 6.000000 ] : (T) Small White Cape (0402F768)
OBSE: deinitialize

User avatar
Danial Zachery
 
Posts: 3451
Joined: Fri Aug 24, 2007 5:41 am

Post » Thu Nov 25, 2010 9:58 am

I've got a question with my logs, I get "plugin did not read all of its data (at 0000000000007477 expected 0000000000007478):" and what does it mean? is there anything I can do to correct it??

What version of Pluggy do you use? Do you use a mod that uses Pluggy data - Kyoma's Journal mod, Alchemical Forumlas, etc?
User avatar
Rachel Tyson
 
Posts: 3434
Joined: Sat Oct 07, 2006 4:42 pm

Post » Thu Nov 25, 2010 9:30 am

I,ve got v132, I have switched in 124 to see if it helped, I don't know witch mods are using it, I've been seeing that error for quite awhile though... Is there a way to Flush it??
Spoiler
Active Mod Files:00  Oblivion.esm01  Francesco's Leveled Creatures-Items Mod.esm02  Francesco's Optional New Items Add-On.esm03  Cobl Main.esm  [Version 1.72]04  Oscuro's_Oblivion_Overhaul.esm  [Version 1.34]05  Mart's Monster Mod.esm  [Version 3.7b3p3]06  VASE - core.esm07  CyrodiilUpgradeResourcePack.esm08  FCOM_Convergence.esm  [Version 0.9.9MB3]09  Armamentarium.esm  [Version 1.35]0A  Artifacts.esm0B  CM Partners.esm0C  Unofficial Oblivion Patch.esp  [Version 3.2.4]0D  UOP Vampire Aging & Face Fix.esp  [Version 1.0.0]0E  Oblivion Citadel Door Fix.esp0F  DLCShiveringIsles.esp10  Unofficial Shivering Isles Patch.esp  [Version 1.4.0]11  Francesco's Optional Chance of Stronger Bosses.esp12  Francesco's Optional Chance of Stronger Enemies.esp13  Francesco's Optional Chance of More Enemies.esp++  FranDarkSeducerWeapFix.esp++  FCOM_Francescos.esp  [Version 0.9.9]++  FCOM_FrancescosItemsAddOn.esp  [Version 0.9.9]14  FCOM_FrancescosNamedBosses.esp  [Version 0.9.9]15  Fran Armor Add-on.esp16  Fran_Lv30Item_Maltz.esp17  FranOBSEConfig.esp  [Version 0.5]18  Ayleid Loot EXtension.esp19  Ayleid Loot EXtension - OOO Dungeons.esp++  Item interchange - Extraction.esp  [Version 0.78]1A  P1DseeYouSleep.esp1B  Map Marker Overhaul.esp  [Version 3.4]1C  Map Marker Overhaul - SI additions.esp  [Version 3.0.2]++  MaleBodyReplacerV4.esp1D  Adonnay's_Elven_Sabres-MOBS.esp1E  Lich King's Helm v1_0.esp1F  New Frostmourne Sword by Jojjo v1_0.esp++  RustyItems.esp20  KDCircletsOOOOptimized - NPC Equip.esp  [Version 1.2]++  FCOM_KDCircletsOOOOptimizedNPCEquip.esp  [Version 0.9.9]21  Cobl Glue.esp  [Version 1.72]22  Cobl Si.esp  [Version 1.63]23  OOO 1.32-Cobl.esp  [Version 1.72]++  FCOM_Cobl.esp  [Version 0.9.9]24  Bob's Armory Oblivion.esp25  FCOM_BobsArmory.esp  [Version 0.9.9]26  Loth's Blunt Weapons for Npcs.esp++  FCOM_LothsBluntWeapons.esp  [Version 0.9.9]27  Oblivion WarCry EV.esp28  FCOM_WarCry.esp  [Version 0.9.9MB3]29  Oscuro's_Oblivion_Overhaul.esp  [Version 1.34]++  OOO-Water_Weeds.esp  [Version 1.33]++  OMOBS.esp  [Version 1.0]++  OMOBS_SI.esp  [Version 1.0]2A  OMOBS Optional Combat Settings.esp  [Version 1.0]++  ArmamentariumLLVendors.esp  [Version 1.35]++  ArmamentariumLLMagic.esp  [Version 1.35]2B  ArmamentariumArtifacts.esp  [Version 1.35]2C  FCOM_Convergence.esp  [Version 0.9.9Mb3]++  FCOM_EntropicOrderhardcoe.esp  [Version 0.9.9]2D  FCOM_RealSwords.esp  [Version 0.9.9]2E  FCOM_DurabilityAndDamage.esp  [Version 0.9.9]++  FCOM_SpawnRatesSlightlyReduced.esp  [Version 0.9.9MB3]++  FCOM_LessRats.esp  [Version 0.9.9]++  FCOM_NoSpiders.esp  [Version 0.9.9]++  Mart's Monster Mod - No Pests.esp  [Version 3.7b3p3]++  Mart's Monster Mod - No Swarms.esp  [Version 3.7b3p3]++  FCOM_NoAdventurersInGates.esp  [Version 0.9.9]++  FCOM_LessReaversInGates.esp  [Version 0.9.9]2F  CurseOfHircine.esp30  Mart's Monster Mod - No Carrion Rats.esp  [Version 3.7b3p3]++  Mart's Monster Mod - No Bone Loot.esp  [Version 3.7b3p3]++  Mart's Monster Mod - No Undead Rise.esp  [Version 3.7b3p3]++  Mart's Monster Mod - No Slimes.esp  [Version 3.7b3p3]++  Mart's Monster Mod - No Lanterns.esp  [Version 3.7b3p3]++  Mart's Monster Mod - No Adventurers.esp  [Version 3.7b3p3]31  Mart's Monster Mod - Zombies for Body Meshes.esp  [Version 3.7b3p3]32  Mart's Monster Mod - Hunting & Crafting.esp  [Version 3.7b3p3]33  Mart's Monster Mod - Diverse WaterLife.esp  [Version 3.7b3p3f]34  MMM - Playable Undead Armors.esp++  MMM - Playable Undead Armors - Oblivion WarCry Compatability Patch.esp++  Mart's Monster Mod - Diverse Runeskulls Loot OOO.esp  [Version 3.7b3p3]++  FCOM_Archery.esp  [Version 0.9.9]++  ArmamentariumLL4OOO.esp  [Version 2.01]++  ArmamentariumLLMagicOOO.esp  [Version 1.35]35  OOO-WaterFish.esp  [Version 1.34]++  MMM-Cobl.esp  [Version 1.69]++  EVE_StockEquipmentReplacer4FCOM.esp36  Akiviri Imports MOBS.esp37  Artifacts.esp++  Artifacts - ArmaCompleteAddon.esp  [Version 1.0]38  GTAesgaard.esp39  VHBloodlines 1.2.esp  [Version 1.4]3A  Knights.esp3B  Knights - Unofficial Patch.esp  [Version 1.0.9]++  EVE_KnightsoftheNine.esp3C  Mighty Umbra.esp3D  Ungarion1TheWelkyndSword.esp  [Version 1.4]3E  Blood&Mud.esp3F  Lost Paladins of the Divines.esp40  Origin of the Mages Guild.esp  [Version 6.1]41  The Mystery of the Dulan cult.esp42  MannimarcoComplete.esp43  MannimarcoRevisited.esp44  MannimarcoRevisitedOOO.esp  [Version 0.1]++  FCOM_MightyUmbra.esp  [Version 0.9.9]45  FCOM_Blood&Mud.esp  [Version 0.9.9]++  FCOM_Knights.esp  [Version 0.9.9Mb3]++  FCOM_WelkyndSwordBlood&Mud.esp  [Version 0.9.9]46  FCOM_OMG.esp  [Version 0.9.9]47  FCOM_DulanCult.esp  [Version 0.9.9]48  Gah Falquan Umarile.esp49  mythsandlegends.esp4A  VeronaHouseBloodlines-LushWoodlands fix.esp++  FCOM_UnofficialFranArmorAddon.esp  [Version 0.9.9]4B  Harvest [Flora].esp  [Version 3.0.0]++  Harvest [Flora] - Shivering Isles.esp  [Version 3.0.0]4C  CUO_Dwemer.esp4D  CUO_FightersGuildContracts_SAFE.esp4E  CUO_NewFactionDialog_SAFE.esp4F  EVE_ShiveringIslesEasterEggs.esp50  P1DkeyChain.esp  [Version 5.00]51  RefScope.esp  [Version 1.3.0]++  cidnothumpMMversion.esp52  SupremeMagicka.esp  [Version 0.90]53  SM_ShiveringIsles.esp  [Version 0.86]++  SM_OOO.esp  [Version 0.89]++  SM_MMM.esp  [Version 0.89]++  SM_COBL.esp  [Version 0.86]54  SM_EnchantStaff.esp  [Version 0.80]++  SM_UnlockSpells.esp  [Version 0.70]55  Enchant Arrows Spells.esp++  Francesco's Slower skills x1.5.esp++  Item interchange - Placement for FCOM.esp  [Version 0.78]++  Item interchange - Option, Ingredients in Bulk.esp  [Version 0.78]++  Mart's Monster Mod - Resized Races.esp  [Version 3.7b3p3]56  IDKRRR_C_race.esp57  IDKRRR_C_race_closed_mouth_version.esp58  CM Partners.esp59  CM Partners Special NPCs.esp5A  CM Partners NPC.esp5B  CM Partners Extra NPCs.esp5C  Cobl Races.esp  [Version 1.52]**  Cobl Races TNR.esp  [Version 1.53]**  Cobl Races TNR SI.esp  [Version 1.53]++  Cobl Races - Balanced.esp  [Version 1.52]++  Francesco's day lenght rescale 1-16.esp5D  Get Wet.esp++  Cobl Filter Late MERGE ONLY.esp  [Version 1.53]5E  Cobl Silent Equip Misc.esp  [Version 01]5F  Bashed Patch, 0.esp60  FormID Finder4.esp61  Oblivion Graphics Extender Support.esp  [Version 0.2]62  Streamline 3.1.esp


User avatar
Sarah Unwin
 
Posts: 3413
Joined: Tue Aug 01, 2006 10:31 pm

Post » Thu Nov 25, 2010 10:57 am

I would test to make sure, but that sounds about right.

I've done tests involving checking the size of the .obse file, then loading the game and doing things that cause lots of function scripts to be called for the first time, then saving and checking the .obse file again. The size doesn't change at all, so I'm pretty confident that vars in functions don't get saved.

However, while re-testing to confirm that statement, I found what looks like a refcounting bug relating to ar_Insert. I haven't narrowed it down fully yet, but I have a structure like aFoo["Bar"]["Baz"], where aFoo and ["Bar"] are StringMaps and ["Baz"] is an Array, and I do something like

ar_Insert aFoo["Bar"]["Baz"], 0, aWakka

OBSE leaks a reference to aWakka, so its contents get saved in the .obse file even though aFoo has been destroyed (by the automatic cleanup of local arrays at the end of a function call). If I do

let aFoo["Bar"]["Baz"][0] := aWakka

instead, the leak doesn't occur.

(Edit: Yep, definitely refcounting. ar_Dump shows that before the ar_Insert call, the refcount of aWakka is 1, and afterward, it's 3.)
User avatar
Marguerite Dabrin
 
Posts: 3546
Joined: Tue Mar 20, 2007 11:33 am

Post » Thu Nov 25, 2010 8:02 pm

I,ve got v132, I have switched in 124 to see if it helped, I don't know witch mods are using it, I've been seeing that error for quite awhile though... Is there a way to Flush it??

You would need to save after switching to v124, so if it lets you continue after the error you can do that. Could you please send the save files (.ess and .obse) and a file in your \Oblivion\Data\OBSE\Plugins\ directory called "Pluggy - possible CTD on loading save.log" to haama341@hotmail.com

I've done tests involving checking the size of the .obse file, then loading the game and doing things that cause lots of function scripts to be called for the first time, then saving and checking the .obse file again. The size doesn't change at all, so I'm pretty confident that vars in functions don't get saved.

That's not the right test. Also, the data is probably saved in the .ess file, just like normal script data (if it is saved).

You need to load the mod, run the script, save, exit, change the variable name, reload the save. More than likely the function variables aren't saved so Oblivion doesn't have any old variable names to compare to the new ones. Again, though, I'd test it before releasing a mod on the assumption.
User avatar
Eilidh Brian
 
Posts: 3504
Joined: Mon Jun 19, 2006 10:45 am

Post » Thu Nov 25, 2010 5:30 pm

Looks pretty great. :) Definitely keep the colors, as for breaking up into pages, maybe also put the raw list of functions and/or the various 'codes' for the functions. Or is that what you ment by "style instructions"?

Style instructions simply refers to the formatting instructions in the html. I've started working up a 'raw function list' that includes the return value, function name (linked to the OBSE documentation), parameters, alias (if any), and OBSE version info (if any).

http://i279.photobucket.com/albums/kk146/TheMagicianFromOblivion/obserawfunctionlist.jpg

I'd be happy to hear more suggestions, recommendations, requests, etc., regarding the documentation if anyone has anything else to contribute.
User avatar
Cameron Garrod
 
Posts: 3427
Joined: Sat Jun 30, 2007 7:46 am

Post » Thu Nov 25, 2010 9:04 am

I've done tests involving checking the size of the .obse file, then loading the game and doing things that cause lots of function scripts to be called for the first time, then saving and checking the .obse file again. The size doesn't change at all, so I'm pretty confident that vars in functions don't get saved.

I've done a few tests myself and can confirm this.

Which makes sense, since processing goes in and out of User Functions within the same frame and there is no way to refer to those variables from outside the function script (therefore, no reason to keep them when the function returns).

The only bloat that may occur is if string variables created within the function are not explicitly destroyed, but this is true for any string variable in any kind of script, not a problem with User Functions themselves.

That's not the right test. Also, the data is probably saved in the .ess file, just like normal script data (if it is saved).

You need to load the mod, run the script, save, exit, change the variable name, reload the save. More than likely the function variables aren't saved so Oblivion doesn't have any old variable names to compare to the new ones. Again, though, I'd test it before releasing a mod on the assumption.

Oh, but I think you are not referring to saving variable contents, but rather somehow the 'order' of the variable being saved in the savegame.

I have not tested this explicitly, as you suggested, but since the first release of OBSE v18, once in a while, I reorder User Function variables in alphabetic order and have never had a single problem with this (I must have done this hundreds of times in several esps)
User avatar
~Amy~
 
Posts: 3478
Joined: Sat Aug 12, 2006 5:38 am

Post » Thu Nov 25, 2010 8:50 am

That's not the right test. Also, the data is probably saved in the .ess file, just like normal script data (if it is saved).

Oops, you're right. I'd actually been testing to make sure I wasn't leaking any arrays (due to circular references or refcounting bugs) and I mistakenly assumed that my results were applicable to the matter at hand.

You need to load the mod, run the script, save, exit, change the variable name, reload the save. More than likely the function variables aren't saved so Oblivion doesn't have any old variable names to compare to the new ones. Again, though, I'd test it before releasing a mod on the assumption.

I tried that just now, renaming a variable in a function script that I know has been run before, and was able to load the save without problems. However, I also renamed a variable in a quest script that's already been initialized and is running in my save, and didn't have any problems with that either; I didn't get the "save game corruption error" message that you mentioned.

In both cases, I used TES4Edit to change the name of a SCVR entry in the script. No other changes.
User avatar
krystal sowten
 
Posts: 3367
Joined: Fri Mar 09, 2007 6:25 pm

Post » Thu Nov 25, 2010 10:26 pm

I think most of the concern is over "non-OBSE-based" scripts. If I were to load Oblivion.esm and nothing else in the CS, do a "recompile all" in the script editor, and save the result as a new plugin, would the game's vanilla scripts now use OBSE-specific bytecode?


Exactly. This hasn't been clarified yet, because Behippo's explanation still implies that even non-OBSE scripts will end up dependent on OBSE bytecode once they're compiled. Most of the time I'd not be terribly concerned about it, but if I am compiling script changes for a UOP update or for Open Cities, I don't want those becoming OBSE dependent.
User avatar
Katie Louise Ingram
 
Posts: 3437
Joined: Sat Nov 18, 2006 2:10 am

Post » Thu Nov 25, 2010 1:58 pm

I've also linked the function name to the corresponding wiki entry. I can say with some certainty that at least half of the functions have not been documented on the wiki. Even though most of them are self-explanatory, I suspect a lot of modders are unaware of these functions as I tend to think the average modder uses the cs wiki, not the OBSE home page for reference. Since the OBSE home page has the most current and complete information it makes more sense to me to reformat it as a usable resource than to laboriously copy/paste everything over to the wiki.

Hmm... I run a bot on the Wiki. It has the ability to mass-create pages from a single document, using special tags to indicate where each article starts and stops.

If I sent you the appropriate format you'd need to use, and helped with appropriate wikification, do you think you could construct such a document?
User avatar
Mashystar
 
Posts: 3460
Joined: Mon Jul 16, 2007 6:35 am

Post » Thu Nov 25, 2010 10:33 pm

Not really what I was talking about but thanks for the valuable info anyway.

I was referring to how I changed the variable name in the script, forgot to change one instance of it from "timer" to "timer1" in the same script but the script compiled without errors anyway. I did not find this out until I saw the script would not run in the game. I was worried that OBSE or the CS had a compiling issue. Which per scruggsywuggsy the ferret it (the CS not OBSE) evidently does.


In a compiled script, variables are actually represented by a numeric ID that corresponds to an entry in the script's local variable list. When you add a variable and recompile the script, the compiler adds a new entry to the variable list, with a new unique ID number. When you remove a variable, the compiler removes its entry from the compiled local variable list. When you rename a variable, the script compiler sees it as removing one variable and adding another, so the new name gets a new ID number and the old ID number is no longer valid. This breaks all other compiled scripts that refer to the variable, since they have the old ID number compiled into them.

SNIP!


User avatar
Samantha Wood
 
Posts: 3286
Joined: Sun Oct 15, 2006 5:03 am

Post » Thu Nov 25, 2010 12:16 pm

I tried that just now, renaming a variable in a function script that I know has been run before, and was able to load the save without problems. However, I also renamed a variable in a quest script that's already been initialized and is running in my save, and didn't have any problems with that either; I didn't get the "save game corruption error" message that you mentioned.

In both cases, I used TES4Edit to change the name of a SCVR entry in the script. No other changes.

I found my test file and tried it myself - couldn't get the error again. It's been a year and a half since I tested, so I don't even remotely remember the steps. Not a clue :shrug:
User avatar
Chris Johnston
 
Posts: 3392
Joined: Fri Jul 07, 2006 12:40 pm

Post » Thu Nov 25, 2010 10:08 pm

Hmm... I run a bot on the Wiki. It has the ability to mass-create pages from a single document, using special tags to indicate where each article starts and stops.

If I sent you the appropriate format you'd need to use, and helped with appropriate wikification, do you think you could construct such a document?

I'd be happy to try. :)

I do have a question, though: is it better to have separate pages for each function, even if several functions are strongly related (for example, functions that get and set package flags like GetPackageOffersServices/SetPackageOffersServices or the combat style flags) or to redirect all of these functions to a single page? Or, should I just not create pages at all? (For example, MagicEffectSchool, which lists the char version, the code version, and the alias for each all on the same page.) In other words, what pages should be created, what should be redirected, and what should be left out entirely?
User avatar
Gavin boyce
 
Posts: 3436
Joined: Sat Jul 28, 2007 11:19 pm

Post » Thu Nov 25, 2010 4:13 pm

A warning for modders that create scripted items (carriable items).

In a very specific situation when (1) the script uses OBSE strings and/or arrays AND (2) there is more than one of this scripted item in inventory or container AND (3) one of them is removed from the inventory (RemoveItem, RemoveMe, Drop, DropMe, etc)

In the above scenario, even in a most ideal situation when the script itself determines that it should be removed, properly destroys string vars and arrays and, then, removes itself from inventory (RemoveMe, DropMe), there is a very high risk that bloating will occur.

Problem is that, when using functions that remove one of many similar items, there is no way to tell which one will be removed and array contents and strings belonging to that script may not be properly removed from the savegame.

For example, items A, B and C (same Base Object) are in some container and item A decides to remove itself, clears all vars and issues a RemoveMe. At this point, the game engine may remove item B instead. The script in item B is taken by surprise and have not cleared its variables and the contents of those variables may stay in the OBSE co-save (maybe) forever.

One possible workaround that I have not tried is using other script blocks (OnAdd, OnDrop) to catch this situation and clear the variables before the item is removed.

As I see it, this is the way inventory functions work, not a OBSE bug or problem.
User avatar
neen
 
Posts: 3517
Joined: Sun Nov 26, 2006 1:19 pm

Post » Thu Nov 25, 2010 4:55 pm

I'd be happy to try. :)

I do have a question, though: is it better to have separate pages for each function, even if several functions are strongly related (for example, functions that get and set package flags like GetPackageOffersServices/SetPackageOffersServices or the combat style flags) or to redirect all of these functions to a single page? Or, should I just not create pages at all? (For example, MagicEffectSchool, which lists the char version, the code version, and the alias for each all on the same page.) In other words, what pages should be created, what should be redirected, and what should be left out entirely?

We have, so far, created separate pages for each function, but not for aliases and things like the CODE versions of the Magic Effect functions, IIRC. That seems to make the most sense to me. Related functions get a See Also section with a link to the related page(s). This is useful because you want the functions to appear in the Category listing, so they need separate pages.

Anyway, we mainly use the same syntax set-up as the OBSE docs, so that's trivial.

The general format of an OBSE function, in the plaintext, is as follows:
A command from the [[:Category:Oblivion Script Extender|Oblivion Script Extender]].'''Syntax:''' (returnName:returnType) FunctionName arg1Name:arg1Type ''optArg1Name:optArg1Type'' (returnName:returnType) AliasName arg1Name:arg1Type ''optArg1Name:optArg1Type''Function description.== Example(s) ==
code code code
Explanation of what the example is supposed to do.== Notes ==* Note 1** Note 1 sub-note 1* Note 2== See Also ==* [[Related function]]* [[Related function]]* [[Tutorial using function]][[Category:Functions]][[Category:Functions (OBSE)]][[Category:{TYPE} Functions]][[Category:{TYPE} Functions (OBSE)]]

Obviously, not all functions require an example, notes, or see also sections. In fact, you don't have to include any of these, and it will still be a huge help to the Wiki. Also note that there are no double-quote-marks in there, only pairs and triplets of single-quote-marks - two is for italics, and three if for bold (five would be bold-italics, but we don't use that here).

In each case, the bot expects each page to start with {{-START-}} and end with {{-STOP-}}. Also, the page's name goes right after the START, surrounded by triple single-quotes.

So the final document would consist of a number of these:
{{-START-}}'''FunctionName'''A command from the [[:Category:Oblivion Script Extender|Oblivion Script Extender]].'''Syntax:''' (returnVal:returnType) FunctionName arg1Name:arg1Type ''optArg1Name:optArg1Type'' (returnName:returnType) AliasName arg1Name:arg1Type ''optArg1Name:optArg1Type''Function description.== Example(s) ==
code code code
Explanation of what the example is supposed to do.== Notes ==* Note 1** Note 1 sub-note 1* Note 2== See Also ==* [[Related function]]* [[Related function]]* [[Tutorial using function]][[Category:Functions]][[Category:Functions (OBSE)]][[Category:{TYPE} Functions]][[Category:{TYPE} Functions (OBSE)]]{{-STOP-}}

User avatar
kiss my weasel
 
Posts: 3221
Joined: Tue Feb 20, 2007 9:08 am

Post » Thu Nov 25, 2010 9:37 pm

I've got a question with my logs, I get "plugin did not read all of its data (at 0000000000007477 expected 0000000000007478):" and what does it mean? is there anything I can do to correct it??

It just means the plugin decided it wasn't interested in reading to the end of its data in the cosave - it's not an error, just a "heads-up" sort of thing.

---

Re: confusion over the disclaimer in the OP: Basically when you compile a script using OBSE commands one of two things happens. For the vast majority of commands, we let the CS parse and compile the command arguments itself. Those commands (including all commands from 0016 and earlier) are not affected.

For a handful of commands though more flexibility is needed than the default compiler provides. For instance, commands like Let and Eval support complex expressions involving additional operators, string and array variables, and so on. When compiling those types of commands we use OBSE's custom parse routine, which compiles down to a different bytecode format than that generated by the vanilla compiler. A handful of 0017 commands are compiled this way:

* Any command prefixed with 'ar_', looping commands, testexpr, let, eval, typeof, tostring, and print.

0018 beta 2 changed the format of the bytecode slightly. 0018 will happily run scripts compiled under 0017, but 0017 doesn't understand the bytecode generated by 0018 for these commands. beta 2 also introduced versioning so that future changes to the bytecode representation don't have this effect.

Since 0018 is now out of beta, I felt that was rather more explanation than necessary for the OP. But if you have some reason to target 0017 rather than 0018 then hopefully this clears it up.
User avatar
Sarah Bishop
 
Posts: 3387
Joined: Wed Oct 04, 2006 9:59 pm

Post » Thu Nov 25, 2010 7:23 pm

Since 0018 is now out of beta, I felt that was rather more explanation than necessary for the OP. But if you have some reason to target 0017 rather than 0018 then hopefully this clears it up.

Thanks, that'll ease the minds of modders who want to retain support for players without OBSE. Requiring OBSE users to upgrade from 0017 to 0018 isn't a big deal, but being able to put OBSE and non-OBSE scripts in the same mod is important.

BTW, some updates on past issues I've reported:

I worked around the GetNthAEData problem by checking MagicEffectUsesWeapon, MagicEffectUsesArmor, and MagicEffectUsesCreature first, and only getting the data if at least one of those return true. That's all I really need, so if you were thinking about adding a new function in a future release (as you'd mentioned previously), it can go pretty low on the priority list.

I worked around the http://www.gamesas.com/index.php?/topic/1087872-relz-oblivion-script-extender-obse-0018/page__view__findpost__p__15856882 by doing this:

ar_Insert aFoo["Bar"]["Baz"], 0, 42  ; Numbers aren't refcountedlet aFoo["Bar"]["Baz"][0] := aWakka  ; Store the real value now that ar_Insert has made a place for it

User avatar
Penny Wills
 
Posts: 3474
Joined: Wed Sep 27, 2006 6:16 pm

PreviousNext

Return to IV - Oblivion