[RelzeWIP] Pluggy #8

Post » Mon Oct 08, 2012 1:07 am

Looks like this thread has been blessed ! Yet another mod that uses Pluggy - http://www.gamesas.com/bgsforums/index.php?showtopic=1068189. And I have a feeling that there's going to be more :shifty:
User avatar
Minako
 
Posts: 3379
Joined: Sun Mar 18, 2007 9:50 pm

Post » Sun Oct 07, 2012 9:43 pm

Looks like this thread has been blessed ! Yet another mod that uses Pluggy - http://www.gamesas.com/bgsforums/index.php?showtopic=1068189. And I have a feeling that there's going to be more :shifty:
Awesome idea (and the name discussion is hilarious - maybe Vacuity should make an enhanced shadows plugin called "ShadeMe" :P)
User avatar
Jack
 
Posts: 3483
Joined: Sat Oct 20, 2007 8:08 am

Post » Sun Oct 07, 2012 7:38 pm

Awesome idea (and the name discussion is hilarious - maybe Vacuity should make an enhanced shadows plugin called "ShadeMe" :P )
One can only hope.

Got some HUD crashes for you - First time I've seen it happen. Logs :
Faulting application name: Oblivion.exe, version: 1.2.0.416, time stamp: 0x462392c7Faulting module name: OBSE_Elys_Pluggy_HUD.dll, version: 0.0.0.0, time stamp: 0x2a425e19Exception code: 0xc0000005Fault offset: 0x00019529Faulting application name: Oblivion.exe, version: 1.2.0.416, time stamp: 0x462392c7Faulting module name: OBSE_Elys_Pluggy_HUD.dll, version: 0.0.0.0, time stamp: 0x2a425e19Exception code: 0xc0000005Fault offset: 0x00019529
Same offset. Happened on cell change.

Which reminds me, have you managed to work on the HUD hook fix yet ? If not, you might want to contact scanti. As he's rewriting OBGE, he might be able to offer some insight on it.
User avatar
Alkira rose Nankivell
 
Posts: 3417
Joined: Tue Feb 27, 2007 10:56 pm

Post » Sun Oct 07, 2012 3:07 pm

Which reminds me, have you managed to work on the HUD hook fix yet ? If not, you might want to contact scanti. As he's rewriting OBGE, he might be able to offer some insight on it.
Not yet - the information on possible fixes is scattered and I need to find it again. (or just contact scanti...)
User avatar
k a t e
 
Posts: 3378
Joined: Fri Jan 19, 2007 9:00 am

Post » Sun Oct 07, 2012 10:23 pm

Awesome idea (and the name discussion is hilarious - maybe Vacuity should make an enhanced shadows plugin called "ShadeMe" :P)

too late, I already made that joke a couple hours ago :P
User avatar
sarah simon-rogaume
 
Posts: 3383
Joined: Thu Mar 15, 2007 4:41 am

Post » Sun Oct 07, 2012 12:39 pm

Hi haama. As you may know I'm currently rewriting OBGE. Hopefully it will be a bit more stable.

I'm thinking of adding some sort of plug-in interop. Basically after my plug-in has rendered it's shaders it will send a message asking if any other plug-in wants to render anything. It will pass on a pointer to the Direct3D device and a pointer to the render surface.

I was wondering if you were interested in this idea.
User avatar
evelina c
 
Posts: 3377
Joined: Tue Dec 19, 2006 4:28 pm

Post » Sun Oct 07, 2012 3:12 pm

Hi haama. As you may know I'm currently rewriting OBGE. Hopefully it will be a bit more stable.

I'm thinking of adding some sort of plug-in interop. Basically after my plug-in has rendered it's shaders it will send a message asking if any other plug-in wants to render anything. It will pass on a pointer to the Direct3D device and a pointer to the render surface.

I was wondering if you were interested in this idea.
In general yes, but to be honest I haven't looked into the DirectX stuff too deeply to know what changes this would entail. As of now, Pluggy uses (and hooks into) quite a few DirectX functions - so there would be a lot to change over.
User avatar
Oceavision
 
Posts: 3414
Joined: Thu May 03, 2007 10:52 am

Post » Sun Oct 07, 2012 5:12 pm

We've got a new one - http://www.gamesas.com/bgsforums/index.php?showtopic=1070350

oh ... :whisper:
User avatar
joannARRGH
 
Posts: 3431
Joined: Mon Mar 05, 2007 6:09 am

Post » Sun Oct 07, 2012 9:05 pm

What is the maximum string length in Pluggy strings?

I need to read text from a file (using FileToString), and can have quite large files (couple of 100 KB). It seems that Pluggy manages to read it, but I'd like to know the maximum size to check for this.

The next step is to convert the string to an OBSE string, which I see fails if the string is more than 16 KB, but I plan to get around that by copying 16KB chucks into another Pluggy string and calling ToOBSE on those parts in a loop instead.
User avatar
Steven Hardman
 
Posts: 3323
Joined: Sun Jun 10, 2007 5:12 pm

Post » Sun Oct 07, 2012 2:21 pm

What is the maximum string length in Pluggy strings?

I need to read text from a file (using FileToString), and can have quite large files (couple of 100 KB). It seems that Pluggy manages to read it, but I'd like to know the maximum size to check for this.

The next step is to convert the string to an OBSE string, which I see fails if the string is more than 16 KB, but I plan to get around that by copying 16KB chucks into another Pluggy string and calling ToOBSE on those parts in a loop instead.
In general, Pluggy strings don't have a size limit. There is a limit for CreateString and SetString of 1k, but that's due to the way OBSE/Oblivion reads the script line (and that's limited to 76 bytes for CreateString due to a Construction Set bug and possibly limited for SetString (I've never tried 1k of text before)). If there is a size limit, it's determined by Delphi, and I don't know what that limit might be.

ToOBSE - let me play around with the internal array creation stuff a bit. I may be able to return an OBSE array of strings for large strings. Note that it will have to wait for an official v18 release, though.

By the way, what are you doing with the strings? It may be easier for me to add the functionality to Pluggy than to worry about going back and forth between OBSE.
User avatar
sarah simon-rogaume
 
Posts: 3383
Joined: Thu Mar 15, 2007 4:41 am

Post » Sun Oct 07, 2012 11:27 pm

By the way, what are you doing with the strings? It may be easier for me to add the functionality to Pluggy than to worry about going back and forth between OBSE.
Thanks for the info. What I'm doing is to read files on the format:
017829,	1,	Arrow1Iron,	Iron Arrow0229C1,	2,	Arrow2Steel,	Steel Arrow01EFD4,	3,	Arrow3Silver,	Silver Arrow022BE2,	5,	Arrow4Dwarven,	Dwarven Arrow0229C0,	8,	Arrow5Elven,	Elven Arrow....
, i.e. formId, price, editorId, name.

This will be read by Enhanced Economy in order to allow for repricing of items. Since each item takes 40 bytes or so, and Oblivion.esm has 7000 repricable items or so, the main file will be quite big, but some mods that I intend to make repricing files for, have 1000-2000 items too. Anyway, I intend to convert each line to an OBSE array, and then for each such line split it up in a sub-array of 4 items and convert the first to a reference and the second to an integer price value. The editorID and name isn't used, but important in order to make it possible to understand and edit the file, and removing them would still leave the size at 80K or so, still much larger than the 16K obse string restriction.

The way I intended to do it was to convert the string using ToOBSE, then using 'sv_Split obse_sting "%r"' to make an array for each line, etc. So getting an OBSE array with one element for each line directly from the Pluggy string would be perfect.
User avatar
Mr.Broom30
 
Posts: 3433
Joined: Thu Nov 08, 2007 2:05 pm

Post » Sun Oct 07, 2012 9:28 pm

Pluggy with HUD capabilities enabled is giving me CTD's. Pluggy version 1.32 Here are my mods:

00  Oblivion.esm  [Version 1.2.0416]01  All Natural Base.esm  [Version 0.9.8]02  DA Run Fatigue.esm03  Francesco's Leveled Creatures-Items Mod.esm04  Francesco's Optional New Items Add-On.esm05  Cobl Main.esm  [Version 1.72]06  Oscuro's_Oblivion_Overhaul.esm  [Version 1.34]07  Mart's Monster Mod.esm  [Version 3.7b3p3]08  FCOM_Convergence.esm  [Version 0.9.9MB3]09  Armamentarium.esm  [Version 1.3]0A  Kvatch Rebuilt.esm  [Version 1.1]0B  Progress.esm  [Version 2.2]0C  HorseCombatMaster.esm**  Cobl Races TNR.esp  [Version 1.53]**  Cobl Races TNR SI.esp  [Version 1.53]0D  Unofficial Oblivion Patch.esp  [Version 3.2.3a]0E  Oblivion Citadel Door Fix.esp0F  DLCShiveringIsles.esp10  Francesco's Optional Chance of Stronger Bosses.esp11  Francesco's Optional Chance of Stronger Enemies.esp12  Francesco's Optional Chance of More Enemies.esp13  Francesco's Optional Leveled Guards.esp14  FCOM_Francescos.esp  [Version 0.9.9]15  FCOM_FrancescosItemsAddOn.esp  [Version 0.9.9]16  FCOM_FrancescosNamedBosses.esp  [Version 0.9.9]17  Fran Armor Add-on.esp18  Fran_Lv30Item_Maltz.esp19  Natural_Habitat_by_Max_Tael.esp1A  All Natural - Real Lights.esp  [Version 0.9.8]1B  All Natural.esp  [Version 0.9.8]1C  All Natural - SI.esp  [Version 0.9.8]1D  All Natural - EW + NW + AWS.esp  [Version 0.9.6]1E  Kvatch Rebuilt Weather Patch.esp1F  phinix-waterfix.esp20  Symphony of Violence.esp21  AmbientTownSounds.esp  [Version 1.0]22  MIS.esp  [Version 1.0]23  MIS New Sounds Optional Part.esp  [Version 1.0]24  Atmospheric Oblivion.esp  [Version 1.1]25  Louder Nirnroot Sound.esp  [Version 1.0]26  Distant Chapel Bells.esp27  Rainbows.esp28  Cities Alive At Night.esp29  WindowLightingSystem.esp  [Version 5.1.6]2A  Book Jackets Oblivion.esp  [Version 0.01]2B  bgShaderStandAloneEV.esp  [Version 1.0EV]**  Cobl Bookjackets.esp2C  ClocksOfCyrodiil.esp2D  Chapel Tithe.esp2E  Days&Months.esp2F  diversegrasses.esp30  RAEVWD Cities.esp  [Version 1.4]31  RoadSigns.esp32  Map Marker Overhaul.esp  [Version 3.3]33  AddMapMarkers.esp34  DLCHorseArmor.esp35  DLCHorseArmor - Unofficial Patch.esp  [Version 1.0.5]36  MaleBodyReplacerV4.esp37  Adonnays Classical Weaponry.esp38  CSR - Fine Iron.esp  [Version 1.2]39  CSR - Golden Saint.esp  [Version 1.2]3A  Pek_Painting_Exchanger.esp3B  Reznod_Mannequin_HD[Eng].esp**  mz_Shields_SI.esp**  Armamentium female.esp3C  KDCircletsOOOOptimized - NPC Equip.esp  [Version 1.2]3D  FCOM_KDCircletsOOOOptimizedNPCEquip.esp  [Version 0.9.9]3E  Slof's Oblivion Robe Trader.esp3F  Cobl Glue.esp  [Version 1.72]40  Cobl Si.esp  [Version 1.63]41  OOO 1.32-Cobl.esp  [Version 1.72]42  FCOM_Cobl.esp  [Version 0.9.9]43  Bob's Armory Oblivion.esp  [Version 1.1]44  FCOM_BobsArmory.esp  [Version 0.9.9]45  Loth's Blunt Weapons for Npcs.esp  [Version 3.0]46  FCOM_LothsBluntWeapons.esp  [Version 0.9.9]47  Oblivion WarCry EV.esp48  FCOM_WarCry.esp  [Version 0.9.9MB3]49  zCats & Rats.esp4A  Oscuro's_Oblivion_Overhaul.esp  [Version 1.34]4B  OOO-Water_Weeds.esp  [Version 1.33]4C  RealitySpectreStars2HeavenBetterPotionsOOOEffects.esp  [Version 2.1]4D  ArmamentariumArtifacts.esp  [Version 1.3]4E  OBSE-Storms & Sound SI.esp4F  FCOM_Convergence.esp  [Version 0.9.9Mb3]50  FCOM_RealSwords.esp  [Version 0.9.9]51  FCOM_SpawnRatesReduced.esp  [Version 0.9.9Mb3]52  Mart's Monster Mod - No Bone Loot.esp  [Version 3.7b3]53  Mart's Monster Mod - No Undead Rise.esp  [Version 3.7b3]54  Mart's Monster Mod - No Slimes.esp  [Version 3.7b3]55  Mart's Monster Mod - Dungeons of MMM.esp  [Version 3.7b3]56  Mart's Monster Mod - Farm Animals.esp57  Mart's Monster Mod - Diverse WaterLife.esp  [Version 3.7b3p3]58  Mart's Monster Mod - Slof Horses Complete.esp  [Version 3.7b3]59  Mart's Monster Mod - Shivering Isles.esp5A  ArmamentariumLL4OOO.esp  [Version 2.0]5B  Fransfemale.esp5C  RustyItems for OOO.esp5D  OOOPekImperialHorseArmor.esp5E  Diverse Effect Icons for OOO.esp5F  MMM-Cobl.esp  [Version 1.69]**  EVE_StockEquipmentReplacer4FCOM.esp60  BenirusManorRebuilt.esp  [Version 1.0]61  LetThePeopleDrink.esp  [Version 2.5]62  24HrArenaAliveV2.esp63  DLCBattlehornCastle.esp64  DLCBattlehornCastle - Unofficial Patch.esp  [Version 1.0.4]65  Knights.esp**  Knights - Book Jackets.esp  [Version 1.0]66  Knights - Unofficial Patch.esp  [Version 1.0.9]67  Lost Paladins of the Divines.esp68  Mart's Monster Mod - City Defences.esp  [Version 3.7b3p3]69  FCOM_Knights.esp  [Version 0.9.9Mb3]6A  FCOM_SlofsRobeTrader.esp  [Version 0.9.9]6B  road+bridges.esp  [Version 4.5.2]6C  xulImperialIsle.esp  [Version 1.6.3]6D  NRB4+UL-II+LtPD Patch.esp  [Version 3.0]6E  FCOM_UnofficialFranArmorAddon.esp  [Version 0.9.9]6F  Harvest [Flora].esp  [Version 3.0.0]70  ANB_Item_Switchers.esp  [Version 0.8]71  FewerOBGates.esp72  more books teach.esp73  P1DkeyChain.esp  [Version 5.00]74  Toggleable Quantity Prompt.esp  [Version 3.1.1]75  DA Fatigued Running.esp76  DA Sprint.esp77  WPHealthRegen.esp  [Version 1.0]78  RealisticHealth.esp79  SpellDeflection.esp7A  Poison FX.esp7B  Lightweight Potions.esp  [Version 1.1]7C  EnchantmentRestore.esp  [Version 1.9]7D  attack and hide easier v2.0.esp  [Version 2.0]7E  sycHearNoEvil.esp  [Version 1.0]7F  DeadlyReflex 5 - Combat Moves.esp80  kuerteeAttributeAndSkillBasedDamageModifiers.esp81  Duke Patricks - Actors Can Miss Now.esp82  OOO-Level_Stock.esp  [Version 1.33]83  Kobu's Character Advancement System.esp84  Smarter Mercantile Leveling - Multi.esp  [Version 1.65]85  Grandmaster of Alchemy.esp86  Atmospheric Loading Screens - No Text.esp87  Slof's Oblivion Better Beasts.esp88  Kvatch Rebuilt.esp  [Version 1.1]89  Kvatch Rebuilt - OOO Compatibility.esp  [Version 1.1]8A  Kvatch Rebuilt - Leveled Guards - FCOM.esp  [Version 1.1]8B  bgBalancingEVCore.esp  [Version 10.52EV-D]8C  bgBalancingEVOptionalBetterRedguards.esp8D  bgBalancingEVOptionalFCOMAdditions.esp  [Version 10.]8E  ArgonianFeets.esp8F  wd purse of wonders.esp90  MRP - Loading area.esp  [Version 1.02]91  Get Wet.esp92  Better Lava by elveon.esp  [Version 1.0]93  MotionBlur.esp94  X-Ray Detect.esp95  SnArrowEffects.esp96  Faction Rank Fix.esp97  MiniMap.esp98  Scathe.esp  [Version 0.1]99  NRB4 Standard Road Record.esp++  CoreRandmonClothing4Npcs.esp**  All Natural - Indoor Weather Filter For Mods.esp  [Version 0.9.8]9A  Bashed Patch, 0.esp9B  kuerteeCleanUp.esp9C  Streamline 3.1.esp

OBSE version 0018 beta 4. Plugins are FastExit2, OSR 4.1.1.0, OBGE original and Elys Uncapper.
User avatar
Jack Bryan
 
Posts: 3449
Joined: Wed May 16, 2007 2:31 am

Post » Sun Oct 07, 2012 1:23 pm

I hope I am posting this in the proper place. I have recently decided to start using Mods in my gameplay. I have been using Arwen's List as a guide to which mods I want to install. The top of her list is a section of Utility Mods, which to me made sense to install first as other mods may be dependent on them. I have installed OBMM, OBSE, and OBGE and was about to install Pluggy. I opened the folder and the file "OBSE_Elys_Pluggy.dlx" has an Adobe Movie icon. So I checked the properties of the file and it says that the file opens with Adobe Premiere Pro CS3. I clicked the "change" button and it says that APP CS3 is the recommended program to open the file. OBMM and TESCS are on the list of "other programs" Now, this may be a stupid question because the icon may not matter, but do I need to change the program and check the "Always open with this program" box?
User avatar
Louise Lowe
 
Posts: 3262
Joined: Fri Jul 28, 2006 9:08 am

Post » Sun Oct 07, 2012 8:54 pm

Now, this may be a stupid question because the icon may not matter, but do I need to change the program and check the "Always open with this program" box?
No, there's no reason to do so. This only controls what will happen if you double-click on files of that type, not whether other programs are allowed to open them. So unless you want something specifc to happen when you double-click on it (and you don't), there's no reason to change this.
User avatar
Jodie Bardgett
 
Posts: 3491
Joined: Sat Jul 29, 2006 9:38 pm

Post » Sun Oct 07, 2012 1:12 pm

No, there's no reason to do so. This only controls what will happen if you double-click on files of that type, not whether other programs are allowed to open them. So unless you want something specifc to happen when you double-click on it (and you don't), there's no reason to change this.

Thank you! :D
User avatar
REVLUTIN
 
Posts: 3498
Joined: Tue Dec 26, 2006 8:44 pm

Post » Sun Oct 07, 2012 7:59 pm

Hello Haama,

AFAIK, pluggy can't read a whole array from an .ini file, much less a map, so it's difficult to code dynamic stuff where you don't know in advance, e.g., the number of string variables you'll be using.

Since OBSE now supports arrays and maps, I was wondering if you could look into reading/writing whole data structures from/to text files, instead of just single variables. Instead of reinventing the wheel, I think the best data format to use for that would be http://en.wikipedia.org/wiki/YAML (http://en.wikipedia.org/wiki/YAML#Sample_document). It's almost as easy to edit as ini files, is well documented, and has several C/C++ parsers available. I know it's never THAT easy, but it seems that parsing a YAML file with a pre-existing library and copying the resulting arrays/lists/maps into whatever memory structures pluggy and obse use isn't so far fetched.

What do you think? I imagine it would make a lot of new modding projects possible, especially in the realm of user-configurable stuff.
User avatar
James Smart
 
Posts: 3362
Joined: Sun Nov 04, 2007 7:49 pm

Post » Sun Oct 07, 2012 1:32 pm

AFAIK, pluggy can't read a whole array from an .ini file, much less a map, so it's difficult to code dynamic stuff where you don't know in advance, e.g., the number of string variables you'll be using.
You can however get around this by reading a (variable length) text file with Pluggy, converting the text file to an OBSE string, and then using sv_Split to create an array with one element for each line in the file. From there you can do anything you want.

Of course, if Pluggy (or OBSE) could do it all for us, that would be much easier, so I wouldn't say no to your suggestion :)
User avatar
CRuzIta LUVz grlz
 
Posts: 3388
Joined: Fri Aug 24, 2007 11:44 am

Post » Sun Oct 07, 2012 10:16 pm

You can however get around this by reading a (variable length) text file with Pluggy, converting the text file to an OBSE string, and then using sv_Split to create an array with one element for each line in the file. From there you can do anything you want.
Oh! Right. I remember wondering if that was possible. Isn't there a limit on OBSE string length, though? That could limit severely the size of the array you can create.

Of course, if Pluggy (or OBSE) could do it all for us, that would be much easier, so I wouldn't say no to your suggestion :)
Yup, even if a workaround exists I think there would be a lot of advantages to having the file parsed by pluggy or obse. One of them would be speed: the C++ parser should normally be much faster than an interpreted script doing a lot of string operations... gah!
User avatar
Alexander Lee
 
Posts: 3481
Joined: Sun Nov 04, 2007 9:30 pm

Post » Sun Oct 07, 2012 4:56 pm

Oh! Right. I remember wondering if that was possible. Isn't there a limit on OBSE string length, though? That could limit severely the size of the array you can create.
I don't *think* OBSE places a limit on them. So max. length would be that of a STL string.
User avatar
Tina Tupou
 
Posts: 3487
Joined: Fri Mar 09, 2007 4:37 pm

Post » Sun Oct 07, 2012 9:14 am

I think the maximum OBSE string length is 16KB. The Pluggy ToOBSE functions stops working if the Pluggy string is above 16KB. If you're interested you can download the Enhanced Economy 3.4 beta from TESNexusm and look at the script named EEreadPrices. The script handles this by copying chunks of 10000 characters at a time from the Pluggy string into a new Pluggy string, and then calling ToOBSE on that part.
User avatar
Bryanna Vacchiano
 
Posts: 3425
Joined: Wed Jan 31, 2007 9:54 pm

Post » Mon Oct 08, 2012 12:16 am

Hello,

Error on the last script on this page: http://cs.elderscrolls.com/constwiki/index.php/Pluggy_INI_Files
[indent];Variables to feed the IniWrite___ functions
long file
long section
long key

;Temp variables to hold data before it is saved
long tempL
float tempF
ref tempR

...

set file to CreateString -1 "myConfigFile.ini"
set section to CreateString -1 "General"
set key to CreateString -1 "Name"

set tempL to CreateString
http://cs.elderscrolls.com/constwiki/index.php/StringGetName player tempL => Invalid inventory object 'player' for parameter Reference
IniWriteString file section key tempL
[/indent]Could be replaced for example by :[indent];Variables to feed the IniWrite___ functions
long file
long section
long key

;Temp variables to hold data before it is saved
long tempL
float tempF
ref tempR
ref MyRef

...

set file to CreateString -1 "myConfigFile.ini"
set section to CreateString -1 "General"
set key to CreateString -1 "Name"

set tempL to CreateString
set MyRef to Player
StringGetName MyRef tempL

IniWriteString file section key tempL
[/indent]

@Edit: Thank you kyoma for the links in the answer below!

User avatar
NeverStopThe
 
Posts: 3405
Joined: Tue Mar 27, 2007 11:25 pm

Post » Sun Oct 07, 2012 6:08 pm

Hello,

Error on the last script on this page: http://cs.elderscrolls.com/constwiki/index.php/Pluggy_INI_Files
....
Actually, this seems to be related to how the player variable is handled by the engine. More info http://www.gamesas.com/bgsforums/index.php?showtopic=1070033&hl and http://www.gamesas.com/bgsforums/index.php?s=&showtopic=1069884&view=findpost&p=15551883.
User avatar
Iain Lamb
 
Posts: 3453
Joined: Sat May 19, 2007 4:47 am

Post » Sun Oct 07, 2012 8:39 pm

Where can I find an actual script example about how to draw an image on the screen using the Hud functions?
User avatar
Dark Mogul
 
Posts: 3438
Joined: Tue Feb 20, 2007 11:51 am

Post » Sun Oct 07, 2012 11:14 pm

Is this still being developed / supported?

Nexus still shows 1.32 as development/beta.
User avatar
Eilidh Brian
 
Posts: 3504
Joined: Mon Jun 19, 2006 10:45 am

Post » Sun Oct 07, 2012 1:32 pm

Pluggy with HUD capabilities enabled is giving me CTD's. Pluggy version 1.32 Here are my mods:


It's been a known issue with Pluggy since the HUD elements were added. It doesn't look like anyone is going to be able to fix the problem.
User avatar
Madison Poo
 
Posts: 3414
Joined: Wed Oct 24, 2007 9:09 pm

PreviousNext

Return to IV - Oblivion