Today I was testing knockback and noticed that despite me setting max_knockback value to -1 in fo2tweaks.ini nothing was causing knockback. I did a bunch of test, but finally I decided to completely remove fo2tweaks.dat from the mods folder. Suddenly the problem was fixed.
I looked at the code. On line 14 of gl_g_knockback.ssl it says:
if max_knockback then begin
register_hook_proc(HOOK_COMBATDAMAGE, combat_damage_hook);
ndebug("initialized");
end
Seems like -1 is considered a TRUE value and therefore the hook is being registered and -1 is being passed as maximum knockback, which disables all knockback.
You need to write the check different. Ex:
if max_knockback > -1 then...
Knockback not working correctly
Re: Knockback not working correctly
I just set max_knockback to 10, and its still not working.
There seems to be some other problem as well.
Anyway, the script seems to be stuck on 0 knockback. needs fixin.
To test just give your character some extra melee damage and start swinging. No knockback
There seems to be some other problem as well.
Anyway, the script seems to be stuck on 0 knockback. needs fixin.
To test just give your character some extra melee damage and start swinging. No knockback
Re: Knockback not working correctly
Ok the problem is
fo2tweaks_setting(sec_main, set_max_knockback)
The actual setting is called max_knockback, not set_max_knockback.
***** EDIT
NOPE. That's not fixed it either. I don't know where the problem comes from but when I removed the scripts dat everything starts to work.
fo2tweaks_setting(sec_main, set_max_knockback)
The actual setting is called max_knockback, not set_max_knockback.
***** EDIT
NOPE. That's not fixed it either. I don't know where the problem comes from but when I removed the scripts dat everything starts to work.
Re: Knockback not working correctly
do you have a save?
(also, fo2tweaks.ini and debug.log)
(also, fo2tweaks.ini and debug.log)
Please do not PM or email me about my mods and projects. Use forums. Also, see our talk channels.
Re: Knockback not working correctly
Its the same save I posted last time. But here it is again. I didn't provide any more data because honestly there was nothing special to report on. I am using
V12.2 with sfall 4.2.8.1 with RPU16.
I tried increasing weapon damages, then I tried increasing melee, then I tried giving extra hth bonus perks. All the same.
When the script fottweaks.dat is present, knockback doesn't work. I did not isolate scripts one at a time, difficult with being packed in dat.
I turn all features fo2tweak features off except for inventory size. Changing ini settings didn't help. Only when I remove the dat file it gets fix.
I think the script is loading the wrong value somehow, but I cant say. Just try any weapon on unarmed and do more than 10 damage. Where there should be knockback there isn't any.
Have you tried this on your rig? does it work for you at all? Cause it doesnt work for me at all.
V12.2 with sfall 4.2.8.1 with RPU16.
I tried increasing weapon damages, then I tried increasing melee, then I tried giving extra hth bonus perks. All the same.
When the script fottweaks.dat is present, knockback doesn't work. I did not isolate scripts one at a time, difficult with being packed in dat.
I turn all features fo2tweak features off except for inventory size. Changing ini settings didn't help. Only when I remove the dat file it gets fix.
I think the script is loading the wrong value somehow, but I cant say. Just try any weapon on unarmed and do more than 10 damage. Where there should be knockback there isn't any.
Have you tried this on your rig? does it work for you at all? Cause it doesnt work for me at all.
- Attachments
-
- ini log.zip
- (6.05 KiB) Downloaded 688 times
-
- SLOT06.zip
- (1.7 MiB) Downloaded 669 times
Re: Knockback not working correctly
OK, I found and fixed the issues.
One, as you noted, is a wrong setting check, the other was re-declaring a var.
I didn't notice it because I usually play with knockback disabled.
A new release is pushed.
(And for the future reference, you can disable scripts in dats surgically by creating empty files with the same names in "data/scripts").
One, as you noted, is a wrong setting check, the other was re-declaring a var.
I didn't notice it because I usually play with knockback disabled.
A new release is pushed.
(And for the future reference, you can disable scripts in dats surgically by creating empty files with the same names in "data/scripts").
Please do not PM or email me about my mods and projects. Use forums. Also, see our talk channels.