mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Minor edits to speed tweak and documents.
This commit is contained in:
+2
-2
@@ -46,7 +46,7 @@ SpeedMulti9=900
|
|||||||
;The initial speed at game startup
|
;The initial speed at game startup
|
||||||
SpeedMultiInitial=100
|
SpeedMultiInitial=100
|
||||||
|
|
||||||
;Set to 1 to also affect video playback and slideshow speed
|
;Set to 1 to also affect the playback speed of videos without audio tracks
|
||||||
AffectPlayback=0
|
AffectPlayback=0
|
||||||
|
|
||||||
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||||
@@ -705,7 +705,7 @@ DontDeleteProtos=0
|
|||||||
;Set to 1 to give scripts direct access to Fallout's address space, and to make arbitrary calls into Fallout's code
|
;Set to 1 to give scripts direct access to Fallout's address space, and to make arbitrary calls into Fallout's code
|
||||||
AllowUnsafeScripting=0
|
AllowUnsafeScripting=0
|
||||||
|
|
||||||
;Set to 1 to hide error messages in the debug.log file when a null value is passed to the function as an object
|
;Set to 1 to hide error messages in debug output when a null value is passed to the function as an object
|
||||||
HideObjIsNullMsg=0
|
HideObjIsNullMsg=0
|
||||||
|
|
||||||
;These options control what output is saved in the debug log (sfall-log.txt)
|
;These options control what output is saved in the debug log (sfall-log.txt)
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ get/set_critter_current_ap functions should only be used during the target critt
|
|||||||
|
|
||||||
The 'type' value in the weapon knockback functions can be 0 or 1. If 0, the value becomes an absolute distance that targets will be knocked back. If 1, the value is multiplied by the distance they would normally have been knocked back. Weapon knockback modifiers are applied in the order weapon -> attacker -> target, so a x2 weapon wielded by an abs 6 attacker hitting a /2 target will knock the target back 3 squares. The knockback functions will not override the stonewall perk or knockdowns resulting from criticals. knockback values set on weapons or critters are not saved, and must be reset each time the player reloads.
|
The 'type' value in the weapon knockback functions can be 0 or 1. If 0, the value becomes an absolute distance that targets will be knocked back. If 1, the value is multiplied by the distance they would normally have been knocked back. Weapon knockback modifiers are applied in the order weapon -> attacker -> target, so a x2 weapon wielded by an abs 6 attacker hitting a /2 target will knock the target back 3 squares. The knockback functions will not override the stonewall perk or knockdowns resulting from criticals. knockback values set on weapons or critters are not saved, and must be reset each time the player reloads.
|
||||||
|
|
||||||
The get/set_sfall_global functions require an 8 character long case sensitive string for the variable name. The variables behave the same as normal Fallout globals, except that they don't have to be declared beforehand in vault13.gam. Trying to get a variable which hasn't been set will always return 0. These functions are intended for use when a patch to a mod requires the addition of a new global variable, a case which would otherwise require the player to start a new game.
|
The get/set_sfall_global functions require an 8 characters long case sensitive string for the variable name. The variables behave the same as normal Fallout globals, except that they don't have to be declared beforehand in vault13.gam. Trying to get a variable which hasn't been set will always return 0. These functions are intended for use when a patch to a mod requires the addition of a new global variable, a case which would otherwise require the player to start a new game.
|
||||||
|
|
||||||
set_pickpocket_max and set_hit_chance_max effect all critters rather than just the player. set_skill_max can't be used to increase the skill cap above 300. set_perk_level_mod sets a modifier between +25 and -25 that is added/subtracted from the players level for the purposes of deciding which perks can be chosen.
|
set_pickpocket_max and set_hit_chance_max effect all critters rather than just the player. set_skill_max can't be used to increase the skill cap above 300. set_perk_level_mod sets a modifier between +25 and -25 that is added/subtracted from the players level for the purposes of deciding which perks can be chosen.
|
||||||
|
|
||||||
|
|||||||
+6
-6
@@ -69,16 +69,16 @@ void sArrayElement::set( float val )
|
|||||||
floatVal = val;
|
floatVal = val;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sArrayElement::set( const char* val, int _len /*= -1*/ )
|
void sArrayElement::set( const char* val, int sLen /*= -1*/ )
|
||||||
{
|
{
|
||||||
clear();
|
clear();
|
||||||
type = DATATYPE_STR;
|
type = DATATYPE_STR;
|
||||||
if (_len == -1) _len = strlen(val);
|
if (sLen == -1) sLen = strlen(val);
|
||||||
if (_len >= ARRAY_MAX_STRING) _len = ARRAY_MAX_STRING - 1; // memory safety
|
if (sLen >= ARRAY_MAX_STRING) sLen = ARRAY_MAX_STRING - 1; // memory safety
|
||||||
len = _len + 1;
|
len = sLen + 1;
|
||||||
strVal = new char[len];
|
strVal = new char[len];
|
||||||
memcpy(strVal, val, _len);
|
memcpy(strVal, val, sLen);
|
||||||
strVal[_len] = '\0';
|
strVal[sLen] = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
void sArrayElement::unset()
|
void sArrayElement::unset()
|
||||||
|
|||||||
+3
-4
@@ -164,14 +164,13 @@ void SpeedPatchInit() {
|
|||||||
sf_GetLocalTime = (DWORD)&FakeGetLocalTime;
|
sf_GetLocalTime = (DWORD)&FakeGetLocalTime;
|
||||||
|
|
||||||
int size = sizeof(offsets) / 4;
|
int size = sizeof(offsets) / 4;
|
||||||
if (GetPrivateProfileIntA("Speed", "AffectPlayback", 0, ini) == 0) {
|
if (GetPrivateProfileIntA("Speed", "AffectPlayback", 0, ini) == 0) size -= 4;
|
||||||
size -= 4;
|
|
||||||
HookCall(0x4A433E, scripts_check_state_hook);
|
|
||||||
}
|
|
||||||
for (int i = 0; i < size; i++) {
|
for (int i = 0; i < size; i++) {
|
||||||
SafeWrite32(offsets[i], (DWORD)&sf_GetTickCount);
|
SafeWrite32(offsets[i], (DWORD)&sf_GetTickCount);
|
||||||
}
|
}
|
||||||
SafeWrite32(0x4FDF58, (DWORD)&sf_GetLocalTime);
|
SafeWrite32(0x4FDF58, (DWORD)&sf_GetLocalTime);
|
||||||
|
HookCall(0x4A433E, scripts_check_state_hook);
|
||||||
|
|
||||||
TimerInit();
|
TimerInit();
|
||||||
dlogr(" Done", DL_INIT);
|
dlogr(" Done", DL_INIT);
|
||||||
|
|||||||
Reference in New Issue
Block a user