Pluggy .ini files

Post » Fri May 27, 2011 3:21 am

I've been trying to use an ini file with my mod, but I can't get it to work.

I've the latest OBSE installed (0018 beta 6), and my Pluggy version is v125b.

"MrF_Spell_Efficiency.ini" is located in my data folder. This is the script that's supposed to read the file, but it keeps giving the default value, not the one from the ini file:
scn 01MrFSEReadINIarray_var Settingslong Filenamelong Sectionlong Keyfloat DebugBegin Function{}SetDebugMode 1Let Settings := ar_Construct Stringmapif IsPluginInstalled "OBSE_Elys_Pluggy"	Let Filename := CreateString -1 "MrF_Spell_Efficiency.ini"	Let Section := CreateString -1 "General"	Let Key := CreateString -1 "fSpellEffectReduction"	Let Settings["SpellEffectReduction"] := IniReadFloat Filename Section Key 0.1 	SetString Key "fHeavyArmorModifier"	Let Settings["HeavyArmorModifier"] := INIReadFloat Filename Section Key 2 	SetString Key "fHelmModifier"	Let Settings["HelmModifier"] := INIReadFloat Filename Section Key 0.1 	SetString Key "fCuirassModifier"	Let Settings["CuirassModifier"] := INIReadFloat Filename Section Key 0.25 	SetString Key "fGreavesModifier"	Let Settings["GreavesModifier"] := INIReadFloat Filename Section Key 0.15 	SetString Key "fGauntletsModifier"	Let Settings["GauntletsModifier"] := INIReadFloat Filename Section Key 0.1 	SetString Key "fBootsModifier"	Let Settings["BootsModifier"] := INIReadFloat Filename Section Key 0.1 	SetString Key "fShieldModifier"	Let Settings["ShieldModifier"] := INIReadFloat Filename Section Key 0.3 		Let Debug := INIReadFloat Filename Section Key 0.3 	DebugPrint "ShieldModifier is set to %f" Debug	SetString Key "bChangeGameSettings"	Let Settings["ChangeGameSettings"] := INIReadFloat Filename Section Key 0 	Let Debug := INIReadFloat Filename Section Key 0 	DebugPrint "ChangeGameSettings is set to %f" Debug	SetString Key "fPerkLightArmorExpertSpeedMult"	Let Settings["fPerkLightArmorExpertSpeedMult"] := INIReadFloat Filename Section Key -1 	SetString Key "fPerkLightArmorMasterRatingMult"	Let Settings["fPerkLightArmorMasterRatingMult"] := INIReadFloat Filename Section Key -1 	SetString Key "fPerkHeavyArmorExpertSpeedMult"	Let Settings["fPerkLightArmorExpertSpeedMult"] := INIReadFloat Filename Section Key -1 	SetString Key "fPerkHeavyArmorMasterSpeedMult"	Let Settings["fPerkLightArmorExpertSpeedMult"] := INIReadFloat Filename Section Key -1 	SetString Key "fPCBaseMagickaMult"	Let Settings["fPCBaseMagickaMult"] := INIReadFloat Filename Section Key -1 	Let Debug := INIReadFloat Filename Section Key -1 	DebugPrint "fPCBaseMagickaMult is set to %f" Debug				DestroyString Key	DestroyString Section	DestroyString Filenameelse	Let Settings["SpellEffectReduction"] := 0.1	Let Settings["HeavyArmorModifier"] := 2				Let Settings["HelmModifier"] := 0.1	Let Settings["CuirassModifier"] := 0.25	Let Settings["GreavesModifier"] := 0.15	Let Settings["GauntletsModifier"] := 0.1	Let Settings["BootsModifier"] := 0.1	Let Settings["ShieldModifier"] := 0.3	Let Settings["ChangeGameSettings"] := 0endifLet Settings["Run"] := 1		Let Settings["HelmModifier"] *= Settings["SpellEffectReduction"]Let Settings["CuirassModifier"] *= Settings["SpellEffectReduction"]Let Settings["GreavesModifier"] *= Settings["SpellEffectReduction"]Let Settings["BootsModifier"] *= Settings["SpellEffectReduction"]Let Settings["GauntletsModifier"] *= Settings["SpellEffectReduction"]Let Settings["ShieldModifier"] *= Settings["SpellEffectReduction"]SetFunctionValue SettingsEnd


And this is the ini file itself:
[General]; ===== Script variables =====fSpellEffectReduction=0.1; The reduction in spell effectiveness with a full set of light armor.fHeavyArmorModifier=2; The multiplier for a piece of heavy armor.fHelmModifier=0.1fCuirassModifier=0.25fGreavesModifier=0.15fGauntletsModifier=0.1fBootsModifier=0.1fShieldModifier=0.5; Individual modifiers for each piece of equipment; If the sum of these is lower or higher than 1, ; the reduction with a full set of light armor will be ; lower or higher than fSpellEffectReduction.; ===== Game Settings =====bChangeGameSettings=1; Set to 1 to enable these changesfPerkLightArmorExpertSpeedMult=0.2fPerkLightArmorMasterRatingMult=1.1fPerkHeavyArmorExpertSpeedMult=0.6fPerkHeavyArmorMasterSpeedMult=0.2fPCBaseMagickaMult=1.5; Individual changes to various game settings. ; Set to -1 to disable a change to a specifc game setting.; Note that this will overwrite any changes to these game settings,; EVEN when these mods are loaded after MrF Spell Efficiency.


The DebugPrint does show up in the console, so that part of the script is running. However, it always returns the default value.

Could someone look into this, and help me?
Thanks.
User avatar
Sara Johanna Scenariste
 
Posts: 3381
Joined: Tue Mar 13, 2007 8:24 pm

Post » Fri May 27, 2011 9:33 am

I've been trying to use an ini file with my mod, but I can't get it to work.
Not really what you ask for, but I think it is much better to drop the Pluggy ini file stuff, and use a batch script ini file instead. That's what all my mods, and all other such mods (with the exception of those made by Elys AFAIK) do.
User avatar
Beth Belcher
 
Posts: 3393
Joined: Tue Jun 13, 2006 1:39 pm

Post » Fri May 27, 2011 3:58 pm

Pluggy .INI files go in "...\My Documents\My Games\Oblivion\Pluggy\User Files".
User avatar
Alexandra walker
 
Posts: 3441
Joined: Wed Sep 13, 2006 2:50 am

Post » Fri May 27, 2011 3:20 pm

Thanks! That fixed it.
User avatar
Kelsey Anna Farley
 
Posts: 3433
Joined: Fri Jun 30, 2006 10:33 pm


Return to IV - Oblivion