mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Added TagSkillBonus option to the skills ini file
Fixed a crash in the previous commit.
This commit is contained in:
@@ -31,7 +31,7 @@ VaultCityInoculationsPoisonBonus=10
|
||||
VaultCityInoculationsRadBonus=10
|
||||
|
||||
;Changes the damage bonus per level for 'Demolition Expert' perk (ID 82)
|
||||
;10 - default bonus
|
||||
;999 - maximum bonus, 10 - default bonus
|
||||
DemolitionExpertBonus=10
|
||||
|
||||
;Changes the damage bonus for 'Living Anatomy' perk (ID 97)
|
||||
@@ -43,7 +43,7 @@ LivingAnatomyBonus=5
|
||||
PyromaniacBonus=5
|
||||
|
||||
;Changes the skill bonus per level for 'Salesman' perk (ID 103)
|
||||
;125 - maximum bonus, 20 - default bonus
|
||||
;999 - maximum bonus, 20 - default bonus
|
||||
SalesmanBonus=20
|
||||
|
||||
;Changes the percent chance for 'Stonewall' perk (ID 104)
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
;This file lets you set the formula for calculating skills
|
||||
|
||||
[skills]
|
||||
BasedOnPoints=0 ;Set to 1 to base skill costs on spent points instead of current level
|
||||
;Changes the initial bonus to skill level for tagged skills
|
||||
;valid range: 0..100, 20 - default bonus
|
||||
TagSkillBonus=20
|
||||
|
||||
;Set to 1 to base skill costs on spent points instead of current level
|
||||
BasedOnPoints=0
|
||||
|
||||
Skill0=s1|i2|l1.5 ;Skill 0 (small guns) is str*1 + int*2 + luck*1.5
|
||||
SkillBase1=50 ;Big guns has a base of 50
|
||||
|
||||
@@ -407,6 +407,9 @@ void Skills::init() {
|
||||
|
||||
basedOnPoints = iniGetInt("Skills", "BasedOnPoints", 0, file);
|
||||
if (basedOnPoints) HookCall(0x4AA9EC, (void*)fo::funcoffs::skill_points_); // skill_dec_point_
|
||||
|
||||
int tagBonus = iniGetInt("Skills", "TagSkillBonus", 20, file);
|
||||
if (tagBonus != 20 && tagBonus >=0 && tagBonus <= 100) SafeWrite8(0x4AA61E, static_cast<BYTE>(tagBonus));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -91,8 +91,7 @@ public:
|
||||
void setSalesmanBonus(long value) {
|
||||
if (value < 0) return;
|
||||
SalesmanBonus = value;
|
||||
if (SalesmanBonus > 125) SalesmanBonus = 125;
|
||||
SafeWrite8(0x496F60, static_cast<BYTE>(SalesmanBonus));
|
||||
if (SalesmanBonus > 999) SalesmanBonus = 999;
|
||||
}
|
||||
|
||||
void setLivingAnatomyBonus(long value) {
|
||||
@@ -119,6 +118,7 @@ public:
|
||||
void setDemolitionExpertBonus(long value) {
|
||||
if (value < 0) return;
|
||||
DemolitionExpertBonus = value;
|
||||
if (DemolitionExpertBonus > 999) DemolitionExpertBonus = 999;
|
||||
}
|
||||
|
||||
void setVaultCityInoculationsPoisonBonus(long value) {
|
||||
@@ -167,14 +167,14 @@ void ReadPerksBonuses(const char* perksFile) {
|
||||
wScopeRangeMod = iniGetInt("PerksTweak", "WeaponScopeRangeBonus", 5, perksFile);
|
||||
if (wScopeRangeMod != 5) perks.setWeaponScopeRangeBonus(wScopeRangeMod);
|
||||
|
||||
int enginePerkMod = iniGetInt("PerksTweak", "WeaponLongRangeBonus", 4, perksFile);
|
||||
if (enginePerkMod != 4) perks.setWeaponLongRangeBonus(enginePerkMod);
|
||||
int wLongRangeBonus = iniGetInt("PerksTweak", "WeaponLongRangeBonus", 4, perksFile);
|
||||
if (wLongRangeBonus != 4) perks.setWeaponLongRangeBonus(wLongRangeBonus);
|
||||
|
||||
enginePerkMod = iniGetInt("PerksTweak", "WeaponAccurateBonus", 20, perksFile);
|
||||
if (enginePerkMod != 20) perks.setWeaponAccurateBonus(enginePerkMod);
|
||||
int wAccurateBonus = iniGetInt("PerksTweak", "WeaponAccurateBonus", 20, perksFile);
|
||||
if (wAccurateBonus != 20) perks.setWeaponAccurateBonus(wAccurateBonus);
|
||||
|
||||
enginePerkMod = iniGetInt("PerksTweak", "WeaponHandlingBonus", 3, perksFile);
|
||||
if (enginePerkMod != 3) perks.setWeaponHandlingBonus(enginePerkMod);
|
||||
int wHandlingBonus = iniGetInt("PerksTweak", "WeaponHandlingBonus", 3, perksFile);
|
||||
if (wHandlingBonus != 3) perks.setWeaponHandlingBonus(wHandlingBonus);
|
||||
|
||||
int masterTraderBonus = iniGetInt("PerksTweak", "MasterTraderBonus", 25, perksFile);
|
||||
if (masterTraderBonus != 25) perks.setMasterTraderBonus(masterTraderBonus);
|
||||
|
||||
Reference in New Issue
Block a user