Jump to content

Mod with Ini file question, commenting out certain parts


HadToRegister

Recommended Posts

OK, for a mod with an ini file, that allows you to change the settings, such as toggling a feature on or off.

An example like "HUD Status Vars", where, if you don't want a certain section of the status bars to appear, you just comment out the entire section like so

 


; ==== Health bar
;set tnoHSB.hud_direction to HUDdirBoth
;set tnoHSB.hud_val to sv_Construct "GetMenuFloatValue %qhudmain_background\hudmain_statusbars\hudmain_health_empty\hudmain_health_full\user0%q 1004"
;set tnoHSB.hud_color to sv_Construct "HUDcolorHealth + 4*(GetDisease > 0)" ; Change to brown when you have a disease
;set tnoHSB.hud_alpha to 255
;set tnoHSB.hud_x to 50
;set tnoHSB.hud_y to 100
;set tnoHSB.hud_store_pos to 1
;SetStage tnoHSB 10

 

Now, with ALL of those lines commented out, the HUD doesn't show that entire section.
So, can I do this in another mod where I don't want to have a feature enabled?
Or would it cause a crash by messing up the scripts?

Example
In AOG Overhaul

 

 

 

 

 

;===================================================================
; Greed Quest
; ------------------------------------------------------------------
;Fame Gain. Set randomize min max Greed Quest / errand that player
;must complete to gain fame up. For infamy gain you could just do
;any bad deeds
;Range : 1 ~ 10000
set aog.minQFam to 90 ;minimum random next fame up
set aog.maxQFam to 125 ;maximum random next fame up
;Quest Dispo Bonus. Disposition gain for finishing one Greed Quest
;Range : 1 ~ 100 (disposition) (0 disable)
set aog.QDispOK to 0
;Quest Reject Dispo. Disposition loss when refusing Greed Quest
;Range : -1 ~ -100 (disposition) (0 disable)
set aog.QDispNo to 0
;Quest Dispo Penalty. Disposition loss when you ignoring Greed Quest
;you've taken in days
;Range : -1 ~ -100 (disposition) (0 disable)
set aog.QDispBad to 0

 

Note in the example, there are toggles to turn certain things off, but there is also a setting that can only be set between 1 and 10000

Can I comment out the lines like so, without messing up the mod?
In other words, will the mod just skip the commented out lines and go about it's business, or will it be unable to find the commented out lines and crash miserably?

Lines disabled like so:

;set aog.minQFam to 90 ;minimum random next fame up
;set aog.maxQFam to 125 ;maximum random next fame up

 

Page loaded in: 1.206 seconds
Link to comment
Share on other sites

Well, actually these are no INI files in the traditional sense. They're ObScript "batch" files externalized for setting variables and such during initialization, most commonly through RunBatchScript.

So what you're looking at is, after all, still a regular Oblivion script, and any and all syntax rules of ObScript apply here as well. So, yes, the runtime interpreter will simply skip these commented-out lines, safely and securely, and won't crash.

Link to comment
Share on other sites

Well, actually these are no INI files in the traditional sense. They're ObScript "batch" files externalized for setting variables and such during initialization, most commonly through RunBatchScript.

So what you're looking at is, after all, still a regular Oblivion script, and any and all syntax rules of ObScript apply here as well. So, yes, the runtime interpreter will simply skip these commented-out lines, safely and securely, and won't crash.

 

Excellent!

That's good to know.

Thank you!

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...