#66 CTD with Demonic chest

Closed
opened 5 months ago by eugeneloza · 5 comments
Traceback (most recent call last):
  File "/home/eugene/rogueboxadventures/main.py", line 13334, in <module>
    main()
  File "/home/eugene/rogueboxadventures/main.py", line 13318, in main
    test = player.user_input()
  File "/home/eugene/rogueboxadventures/main.py", line 9709, in user_input
    time.tick()
  File "/home/eugene/rogueboxadventures/main.py", line 13019, in tick
    world.maplist[player.pos[2]][player.on_map].AI_move()
  File "/home/eugene/rogueboxadventures/main.py", line 4502, in AI_move
    if len(self.containers[parent_pos[1]][parent_pos[0]].items) < 7:
AttributeError: 'int' object has no attribute 'items'

I'm not exactly sure what happened but it seems to have something to do with demonic chest.

  1. I saw several times Crows flying around without actually demonic chest around (meaning it was already killed at the moment). So if a Crow would try to steal something it'd have nowhere to place the item.

  2. This specific CTD was prequeled by the following. A crow stole ranged weapon and as the character didn't have a back-up weapon, it ended up in #65

So I tried to use a bomb to blow the Demonic chest up (I had some issues with bomb placement before, but I couldn't find any dependency. It just wouldn't drop into any place around, but this time it was not the issue - the bomb was placed correctly).

The bomb blew up, but the Demonic chest still remained in place. As the character was very low on health, I was forced to retreat. The Demonic chest spawned a crow that followed the player.

I got to the healing fountain (as the character was hexed and didn't regenerate over time) and tried another attack on the Demonic chest, first dispatching the Crow. When the player and the crow touched in, the CTD happened.

So my assumption is that the reason behind it was that the Crow tried to steal another item and place it inside the chest, but the chest was "destroyed" by explosion (maybe the underlying chest below the Demonic chest? Or was some part of the Demonic chest itself was destroyed?), so it tried to place the item into an inexistent container.

``` Traceback (most recent call last): File "/home/eugene/rogueboxadventures/main.py", line 13334, in <module> main() File "/home/eugene/rogueboxadventures/main.py", line 13318, in main test = player.user_input() File "/home/eugene/rogueboxadventures/main.py", line 9709, in user_input time.tick() File "/home/eugene/rogueboxadventures/main.py", line 13019, in tick world.maplist[player.pos[2]][player.on_map].AI_move() File "/home/eugene/rogueboxadventures/main.py", line 4502, in AI_move if len(self.containers[parent_pos[1]][parent_pos[0]].items) < 7: AttributeError: 'int' object has no attribute 'items' ``` I'm not exactly sure what happened but it seems to have something to do with demonic chest. 1. I saw several times Crows flying around without actually demonic chest around (meaning it was already killed at the moment). So if a Crow would try to steal something it'd have nowhere to place the item. 2. This specific CTD was prequeled by the following. A crow stole ranged weapon and as the character didn't have a back-up weapon, it ended up in https://notabug.org/themightyglider/RogueBoxAdventures/issues/65 So I tried to use a bomb to blow the Demonic chest up (I had some issues with bomb placement before, but I couldn't find any dependency. It just wouldn't drop into any place around, but this time it was not the issue - the bomb was placed correctly). The bomb blew up, but the Demonic chest still remained in place. As the character was very low on health, I was forced to retreat. The Demonic chest spawned a crow that followed the player. I got to the healing fountain (as the character was hexed and didn't regenerate over time) and tried another attack on the Demonic chest, first dispatching the Crow. When the player and the crow touched in, the CTD happened. So my assumption is that the reason behind it was that the Crow tried to steal another item and place it inside the chest, but the chest was "destroyed" by explosion (maybe the underlying chest below the Demonic chest? Or was some part of the Demonic chest itself was destroyed?), so it tried to place the item into an inexistent container.
themightyglider commented 5 months ago
Owner

Seems like your theory is right. I didn't think about the possibility to use bombs against chests. I'll add a rule that demonic chests always die by explosions or fire. This seems to be most logical to me.

Seems like your theory is right. I didn't think about the possibility to use bombs against chests. I'll add a rule that demonic chests always die by explosions or fire. This seems to be most logical to me.
themightyglider commented 5 months ago
Owner

BTW I think I know what the problem with placing bombs could have been. Did this happen inside a dungeon?

BTW I think I know what the problem with placing bombs could have been. Did this happen inside a dungeon?
eugeneloza commented 5 months ago
Poster

Yes, more exactly - inside a Tomb. Near the entrance. However, there were other situations when the bomb could not be placed at some free space (but actually was placable elsewhere).

Yes, more exactly - inside a Tomb. Near the entrance. However, there were other situations when the bomb could not be placed at some free space (but actually was placable elsewhere).
themightyglider commented 5 months ago
Owner

Bombs kill demonic chests everytime. This should fix the main issue. I still have to fix the placement bug.

Bombs kill demonic chests everytime. This should fix the main issue. I still have to fix the placement bug.
themightyglider commented 5 months ago
Owner

Now everything should be fixed.

Now everything should be fixed.
Sign in to join this conversation.
No Milestone
No assignee
2 Participants
Loading...
Cancel
Save
There is no content yet.