Ok, made my first ini and is working. But as I have no clue how it works, I must ask: is there anything more to add? On reload game, on instructions, PI? Is this OK?
if I use same word more than once in ini, will the code read the correct one?
Ini file
Code:
[Player settings]
;The pillars will replace the objects listed below. Change values between 0 and 10 to set your custom replacement ratio for each object. (0=none, 10=maximum)
Den of Thieves=10
Learning Stones=10
Creature Banks=0
Crypts=0
Schools of Magic=0
Creature Generators=10
Taverns=10
Obelisks=3
Prisons=10
;The following value will automatically activate/deactivate (0/OFF, 1/ON) the watcher for all the game length. The watcher allows to the player to know what the other pillars offer.
;The premonition lasts 7 days. If option is off, the player will have to find the watcher by his own. Default value is off.
Watcher=1
Script:
- !?FU33465124;
- !!VRvx16:Vzx16;
- !#SN:L^era.dll^/?y1 Ay1/^ReadStrFromIni^/?y2;
- !#SN:Ey2/1/^Den of Thieves^/^Player settings^/^\Pillars.ini^/?z1;
- !#SN:Ey2/1/^Learning Stones^/^Player settings^/^\Pillars.ini^/?z2;
- !#SN:Ey2/1/^Creature Banks^/^Player settings^/^\Pillars.ini^/?z3;
- !#SN:Ey2/1/^Crypts^/^Player settings^/^\Pillars.ini^/?z4;
- !#SN:Ey2/1/^Schools of Magic^/^Player settings^/^\Pillars.ini^/?z5;
- !#SN:Ey2/1/^Creature Generators^/^Player settings^/^\Pillars.ini^/?z6;
- !#SN:Ey2/1/^Taverns^/^Player settings^/^\Pillars.ini^/?z7;
- !#SN:Ey2/1/^Obelisks^/^Player settings^/^\Pillars.ini^/?z8;
- !#SN:Ey2/1/^Prisons^/^Player settings^/^\Pillars.ini^/?z9;
- !#SN:Ey2/1/^Watcher^/^Player settings^/^\Pillars.ini^/?z10;
- !#DO33465124/1/10/1:P;
- !#SN:W^R97percentage^/v1;
- !#SN:W^R100percentage^/v2;
- !#SN:W^R16percentage^/v3;
- !#SN:W^R85percentage^/v4;
- !#SN:W^R47percentage^/v5;
- !#SN:W^R17percentage^/v6;
- !#SN:W^R95percentage^/v7;
- !#SN:W^R57percentage^/v8;
- !#SN:W^R62percentage^/v9;
- !#VRv10&v10=1:S7;
- !#SN:W^R99counter^/v10;
Once the ini made, I had to delete the previous erm code which went through each option. Economized 300 script lines!