tf? why does this set the wrong vlaue

Nirran

Vault Senior Citizen
Modder
this is the entry in ini :
Code:
DudeOfferedValue=0.20

and this is the code saeting an checkngif it is correct
Code:
set_sfall_global("barter_8", get_ini_string("Barter.ini|MISC|DudeOfferedValue"));
         display_msg("DudeOfferedValue " + get_sfall_global_int("barter_8"));

currently display si 'DudeOfferedValue 4'

what gives?

edit : tried dif ini fiel and same result,renamed ini entry,tried bypassing sfall global,tried atof and it returns -1,im stumpted

edit 2: checked another mod's ini settings,and seems ot be fine,donno wtf is causing this
 
Last edited:
this is the entry in ini :
Code:
DudeOfferedValue=0.20
and this is the code saeting an checkngif it is correct
Code:
set_sfall_global("barter_8", get_ini_string("Barter.ini|MISC|DudeOfferedValue"));
         display_msg("DudeOfferedValue " + get_sfall_global_int("barter_8"));
currently display si 'DudeOfferedValue 4'
what gives?
You should use atof to convert string to float first.
And I don't know why you try to get a float value with get_sfall_global_int instead of get_sfall_global_float.
This prints "DudeOfferedValue 0.20000".
Code:
set_sfall_global("barter_8", atof(get_ini_string("Barter.ini|MISC|DudeOfferedValue")));
display_msg("DudeOfferedValue " + get_sfall_global_float("barter_8"));
 
Last edited:
on a related note,what would ppl recommend as the math for dudes side of the table?currently i have it as straight 20% of proto entries minus caps,but i want the formula to slightly add more to dudes value based on skill etc etc

edit : solved it with new impact multi ini setting,multi all formula aspects by percentage ini setting,seems ok,lvl 1 no perks or anything,item proto value is 700,it sells for 176 caps
 
Last edited:
Take a look at EcCo, it has all kinds of crazy calculations for barter. Skill level, charisma, reputation, karma, etc.
 
Back
Top