Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

I found a bug during testing. If you have tried equipping the sword and failed, still have the knife, and equip a stick (or bone) if it's the last one, the option to switch weapons disappears, and the game will say that you're now barehanded and have to rely on your claws. The game will still use the weapon you chose though. The bug also appears when you enter battle and select the stick. I think this is caused because on line 540 of 'battle.rpy', you check if all of the weapons are == 0. However, you don't check for the knife, and the player might have something equipped already.

So basically there are 3 bugs:

1) You don't currently check for the knife on line 540 of 'battle.rpy'. This causes the game to show a message saying that the player has no weapons, even if they have a knife. ("现在的你赤手空拳,只能依靠自己的爪子了")

2) You again don't check for the knife on line 327 of 'battle.rpy', this stops the menu option to switch weapons from showing. ("选择武器")

3) You again don't check for the knife on lines 341, 361, 387 and 544.

4) These checks don't consider the currently equipped item either.


For a suggestion, I would move the 'Skill' button to it's own category. Basically it's currently like this:
>Choose weapon

>Battle

>>Skill

>>Attack

>Items

>Run

I'd change it to:

>Choose weapon

>Skill

>Attack

>Items

>Run

If I may, the current weapon system has some maintainability issues. Code-wise at least. This battle test has 5 weapons total: The sword, the knife, the twigs, the wooden sticks, raw bones and technically bare handed too, so kind of 6. Each of these weapons are checked individually in 25 different places throughout the script, and each additional weapon actually adds more checks. If you add a new weapon, and forget any of these places, it'll create a bug that might be rare, and hard to track down. 

I'd be willing to lend a hand in refactoring the code to be more maintainable if you'd like? The idea would be to condense the number of checks by abstracting them, so instead of checking each weapon individually, it checks a list of weapons instead. You can message me on discord at 'rachel02048' to talk further if you want.

Thank you very much for your input!

I have now centralized all the code for weapon selection in order to add weapons in the future without problems.

Regarding the knife, I'm aware of the issue of not being able to display the selected weapon even if the knife is still present after all weapons have been consumed, as this was deliberately designed by me.

Thank you very much for your input again!

I'm glad to hear it! I look forward to the next update and wish you good luck! Implementing an RPG system can be a big task.