BGforgeNet / FO2tweaks

Fallout 2 tweaks
https://forums.bgforge.net/viewforum.php?f=26
115 stars 10 forks source link

[RPUv25 +FO2Tweaks-v12.8] improved grenades causing soft lock #87

Closed agris-codes closed 2 years ago

agris-codes commented 2 years ago

Observed behavior: When fighting Tyler's gang in the Den residential area, with improved_grenades=1 and molotov_fire=1, throwing a molotov at an unoccupied tile and damaging Tyler's team causes RPUv25 to soft-lock, and at least once crash through an access / memory out of bounds error. This occurred 100% of the time with improved_grenades=1 when throwing a molotov at an empty hex with the splash damage hitting enemies. Disabling improved grenades caused the issue to disappear, and no other soft locks experience before or after the incident. As the the soft lock occurred during the enemy's turn, maybe AI is having issues attributing damage to a team?

I tested this later, enabling improved grenades for world map travel, and was able to introduce a soft lock 100% of the time by throwing molotovs at empty hexes which damaged enemies.

Expected behavior: using improved grenades on empty hexes which damage enemies does not product a soft lock.

Other: explosions emit light was also enabled in sfall. I did not change that to remove the soft lock though, all I had to do was disable improved grenades:

Feature feedback: I also think the explosion graphic you use for molotovs is too great for a beer bottle filled with gasoline. I think the graphic should be reverted to the standard one, and the radius probably reduced. Right now the radius is... 4 hex? In my opinion, it should be reduced by 1.

burner1024 commented 2 years ago

Need save. There's no change in graphics, nor radius (which is 1).

agris-codes commented 2 years ago

Need save. There's no change in graphics, nor radius (which is 1).

I'm working on it, have not been able to reproduce in VC and I don't have any saves from prior to the fight with Tyler's gang. What I thought was generalized behavior, the game soft locking during the fight with Tyler's gang and Kaga's first encounter after using molotovs on empty tiles, looks to be somewhat specific to those encounters themselves. I'll play with improved_grenades on and if I encounter another fight that I can induce a soft lock on, I'll ping you.

Ok on graphic, but the radius is definitely 3 hexes from the target for molotovs, which is 1 greater than frag grenades. See image below.

molotov range

Btw- where is radius of grenades defined? It doesn't seem to be part of the proto's properties in Proto Manager.

NovaRain commented 2 years ago

Btw- where is radius of grenades defined? It doesn't seem to be part of the proto's properties in Proto Manager.

In the engine, grenades have radius of 2 and rockets have 3.

agris-codes commented 2 years ago

Btw- where is radius of grenades defined? It doesn't seem to be part of the proto's properties in Proto Manager.

In the engine, grenades have radius of 2 and rockets have 3.

Be that as it may, it is very easy to demonstrate molotovs - specifically - having a radius of 3. Perhaps it is related to enabling of their damage type to fire in FO2Tweaks?

burner1024 commented 2 years ago

OK, 1 or 2 is semantics, I meant that it hits ajacent hexes and that's it. But if it's 3, I guess I've spoken too fast. Still, let's get a save.

agris-codes commented 2 years ago

OK, 1 or 2 is semantics, I meant that it hits ajacent hexes and that's it. But if it's 3, I guess I've spoken too fast. Still, let's get a save.

This one is easy, see attached. Baseline environment is RPU v25 and FO2Tweaks v12.8; deploy the contents of the 7z file to make your environment the same as mine when loading this save.

molotov radius.zip

Throw the molotov at one of the two NPCs above, you'll see the NPC 3 hexes adjacent is damaged.

agris-codes commented 2 years ago

Need save.

I've captured the grenade crash and a save to reproduce it. First, the error:

error

Extract this file to your RPUv25 + FO2Tweaks v12.8 baseline (contains same non-save files as previous 7z file did). molotov crash.zip

Load the save, and throw the equipped molotov at the tile adjacent the indicated NPC below. End your turn, let the AI start to cycle through and you'll get the crash.

instructions

edit: once you provoke the crash, if you disable improved grenades and throw the molotov at the NPC, the game proceeds fine.

FakelsHub commented 2 years ago

Скрипт "улушения гранат" является эксперементальным, он не был доведен мной до финала. Его использование может вызывать краши. Непонимаю, что вы от эого хотите.

agris-codes commented 2 years ago

Скрипт "улушения гранат" является эксперементальным, он не был доведен мной до финала. Его использование может вызывать краши. Непонимаю, что вы от эого хотите.

Я вижу. В документации FO2Tweaks он не описан как экспериментальный. Я предположил, что номинально он работает без сбоев. В любом случае, разве не полезно понимать, что он выдает ошибки, чтобы эти ошибки можно было исправить?

Autogenerated from deepL, I'm sure it isn't perfect.

I see. In FO2Tweaks documentation, it is not described as experimental. I assumed it was nominally working without crashes. Regardless, is it not helpful to understand that it produces errors, so those errors may be fixed?

FakelsHub commented 2 years ago

If I had used it in sfall-extended, I would have improved/fixes it, now it is not interesting to me and therefore it is not available as a mod in sfall-extended.

I thought I already said that the mod is not complete.

FakelsHub commented 2 years ago

Load the save,

Attach your save to this the it github repository.

agris-codes commented 2 years ago

Load the save,

Attach your save to this the it github repository.

molotov crash.zip

burner1024 commented 2 years ago

Thanks, that's enough info for now. I'll check this soon. Script in FO2tweaks repo is not the same as the original implementation, it's not experimental, and it's supposed to work fine.

FakelsHub commented 2 years ago

Люди и жалуются на этот скрипт и уже не в первый раз. Другого скрипта в сети нет.

agris-codes commented 2 years ago

It's quite a good idea to let players target empty squares, so I hope having a reproducible crash helps you fix it.

burner1024 commented 2 years ago

I can't reproduce the soft lock. Can you make a video?

burner1024 commented 2 years ago

I got confused... I can reproduce the crash. No need for the video.

burner1024 commented 2 years ago

The problem is, the save doesn't load without your own mod package. I tried clean RPU+FO2tweaks, gave Narg some Molotovs and throw near Klint - no crash. I also tried some mid game saves and also couldn't reproduce.

So the next step is to demonstrate that crash happens without your mod. You can make your own saves or pick some attaches from RPU issues (I used this one) and see if you can reproduce it there.