Pluggy Strings vs OBSE strings

Post » Tue Apr 06, 2010 11:11 pm

Basically what I'm wondering is if it's possible to load a Pluggy string into an OBSE string.

What I want to do is load data from a text file using Pluggy, and parse it using OBSE commands.

Okay, well, what I really want to do is load an array three-levels deep with data from disk, but I don't believe you can use console commands on arrays so RunBatchScript and RunScriptLine are out. So that leaves Pluggy.

Any ideas?
User avatar
Natasha Callaghan
 
Posts: 3523
Joined: Sat Dec 09, 2006 7:44 pm

Post » Wed Apr 07, 2010 8:27 am

IIRC, Pluggy adds a ToOBSEString command that lets you do just that.
User avatar
Craig Martin
 
Posts: 3395
Joined: Wed Jun 06, 2007 4:25 pm

Post » Wed Apr 07, 2010 7:14 am

I use the function below to convert a pluggy string to an OBSE string.
Not sure it is the best way, but it works just fine.

It, basically, renames a base object using a pluggy function and retrieves the name using an OBSE function. I suppose there is a limit to the length of the string.

scn zxStringFromPluggystring_var sText long psText 			;===Pluggy===ref refRenamable begin Function {psText}	let refRenamable := aaqqwwDesvRenamableBase	setname "NoName" refRenamable 	StringSetName refRenamable psText 	let sText := getname refRenamable 	SetFunctionValue sText 	sv_destruct sText end 

User avatar
Sun of Sammy
 
Posts: 3442
Joined: Mon Oct 22, 2007 3:38 pm

Post » Wed Apr 07, 2010 3:25 am

IIRC, Pluggy adds a ToOBSEString command that lets you do just that.

Ah, there it is, in the Pluggy docs... I looked online at the OBSE docs and the TESCS Wiki, but didn't think to check the docs that came with the package. Thanks!
It, basically, renames a base object using a pluggy function and retrieves the name using an OBSE function. I suppose there is a limit to the length of the string.

Speaking of which, I was also trying to see if there's a limit to 1) OBSE string sizes, and 2) the amount of text you can put into a book (in particular, the book you open with OpenTextInput). Any ideas?
User avatar
alyssa ALYSSA
 
Posts: 3382
Joined: Mon Sep 25, 2006 8:36 pm

Post » Tue Apr 06, 2010 8:25 pm

Ah, there it is, in the Pluggy docs... I looked online at the OBSE docs and the TESCS Wiki, but didn't think to check the docs that came with the package. Thanks!

Speaking of which, I was also trying to see if there's a limit to 1) OBSE string sizes, and 2) the amount of text you can put into a book (in particular, the book you open with OpenTextInput). Any ideas?

I know that ToOBSE stops working if the Pluggy string is more than 16384 (signed short max) characters long, so it wouldn't surprise me if that is the limit for the things you ask as well. I seem to recall that kyoma has mentioned the same max size for his journal mod.

For the record, I use ToOBSE in both Enhanced Economy and Map Marker Overhaul, and it works fine as long as the string size isn't too long (see above). Unfortunately, the strings I work with may be longer, so I use a loop where the pluggy string is divided into 10,000 char long chunks before calling ToOBSE on it. :)
User avatar
kasia
 
Posts: 3427
Joined: Sun Jun 18, 2006 10:46 pm


Return to IV - Oblivion