Angband crash

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Tibarius
    Swordsman
    • Jun 2011
    • 429

    Angband crash

    I am working on a variant, based on Angband version 4.0.4 under Windows10.

    I am experiencing an angband crash once a character has died and i try to 'press any key' after having created a new character.

    I can choose new and create a character, save that character with CTRL-X and continue to play after opening the saved game without any problems if it is the 1st character.

    The problem is caused by a change in either class.txt , object.txt or store.txt.

    What i basically did is that i moved every mage spell into a single magic book object and increased the num_books in class.txt to 52. store.txt only was adjusted in the magic store to replace the four basic books with now other magic books.

    I can supply a screenshot, i can supply the standard and changed text files.

    The only thing that looks suspicious to me is the lore.txt file that contains
    wrong 'flags' lines for dungeon level 1 monsters. For example:

    name:4:Giant yellow centipede
    counts:1:0:0:0:0:0:0
    flags:UNIQUE | QUESTOR | MALE | FEMALE | GROUP_AI | HAS_LIGHT | INVISIBLE
    flags:COLD_BLOOD | WEIRD_MIND | ANIMAL

    With that monster being defined in monster.txt with:
    name:4:Giant yellow centipede
    base:centipede
    color:y
    info:110:7:8:14:30
    power:1:1:16:2:3
    blow:BITE:HURT:1d2
    blow:STING:POISON:1d3
    desc:It is about four feet long and carnivorous.

    Anyone has any idea (or even knows or can check the 4.0.4 code) what could cause that crash?

    Thanks!
    Blondes are more fun!
  • Nick
    Vanilla maintainer
    • Apr 2007
    • 9648

    #2
    Originally posted by Tibarius
    I am working on a variant, based on Angband version 4.0.4 under Windows10.

    I am experiencing an angband crash once a character has died and i try to 'press any key' after having created a new character.

    I can choose new and create a character, save that character with CTRL-X and continue to play after opening the saved game without any problems if it is the 1st character.

    The problem is caused by a change in either class.txt , object.txt or store.txt.

    What i basically did is that i moved every mage spell into a single magic book object and increased the num_books in class.txt to 52. store.txt only was adjusted in the magic store to replace the four basic books with now other magic books.

    I can supply a screenshot, i can supply the standard and changed text files.
    You will also need to have 52 magic books in object.txt, and this may affect the other classes that use the arcane books (rogues and rangers in 4.0.4). If you post your changes I can give them a quick look.

    Originally posted by Tibarius
    The only thing that looks suspicious to me is the lore.txt file that contains
    wrong 'flags' lines for dungeon level 1 monsters. For example:

    name:4:Giant yellow centipede
    counts:1:0:0:0:0:0:0
    flags:UNIQUE | QUESTOR | MALE | FEMALE | GROUP_AI | HAS_LIGHT | INVISIBLE
    flags:COLD_BLOOD | WEIRD_MIND | ANIMAL
    This is fine; lore.txt records which flags are known about, not what the monster has. So UNIQUE just means you know whether this monster is unique or not (in this case, not).
    One for the Dark Lord on his dark throne
    In the Land of Mordor where the Shadows lie.

    Comment

    • Tibarius
      Swordsman
      • Jun 2011
      • 429

      #3
      text file excerptions

      object.txt:
      ===============================

      Code:
      # 460 to 463 basic magic books removed
      # 468 to 472 special magic books removed
      
      #####   MAGIC Books   600 to 699   #####
      
      name:600:[Magic Missile]
      graphics:?:V
      type:magic book
      properties:5:5:200
      alloc:5:1 to 100
      combat:0:1d1:0:0:0
      
      name:601:[Detect Visible Monsters]
      graphics:?:V
      type:magic book
      properties:5:5:200
      alloc:5:1 to 100
      combat:0:1d1:0:0:0
      
      name:602:[Blink]
      graphics:?:V
      type:magic book
      properties:5:5:200
      alloc:5:1 to 100
      combat:0:1d1:0:0:0
      
      ... *snip* ...
      
      name:650:[Mass Banishment]
      graphics:?:V
      type:magic book
      properties:85:5:25000
      alloc:5:1 to 100
      combat:0:1d1:0:0:0
      
      name:651:[Mind Blast]
      graphics:?:V
      type:magic book
      properties:85:5:25000
      alloc:5:1 to 100
      combat:0:1d1:0:0:0
      
      #####   HOLY Books   700 to 799   #####
      
      name:700:[Holy Handbook]
      graphics:?:Y
      type:prayer book
      properties:5:5:200
      alloc:5:1 to 100
      combat:0:1d1:0:0:0
      
      
      class.txt:
      ===============================
      ############### MAGE ###############
      name:1:Mage
      stats:-3:3:0:0:0
      skill-disarm:30:7
      skill-device:36:13
      skill-save:30:9
      skill-stealth:2:0
      skill-search:16:0
      skill-search-freq:20:0
      skill-melee:34:15
      skill-shoot:20:15
      skill-throw:20:15
      skill-dig:0:0
      info:0:10:170000:5
      attack:3:10:2
      equip:food:Ration of Food:1:3
      equip:light:Wooden Torch:1:3
      equip:magic book:[Magic Missile]:1:1
      equip:sword:Dagger:1:1
      equip:scroll:Word of Recall:1:1
      flags:CUMBER_GLOVE | ZERO_FAIL | BEAM | CHOOSE_SPELLS
      title:Apprentice
      title:Mage
      title:Conjurer
      title:Invoker
      title:Sorcerer
      title:Wizard
      title:Warlock 
      title:Battlemage
      title:Arcane Lord
      title:High Wizard
      
      magic:1:300:1:52
      
      book:magic book:[Magic Missile]:1:1
      spell:Magic Missile:1:1:22:3
      effect:BOLT_OR_BEAM:MISSILE:-50
      dice:$Dd3
      expr:D:PLAYER_LEVEL:+ 0
      desc:Fires a magic missile that always hits its target and does
      desc: unresistable damage.
      
      book:magic book:[Detect Visible Monsters]:1:1
      spell:Detect Visible Monsters:1:1:23:3
      effect:DETECT_VISIBLE_MONSTERS
      dice:22d40
      desc:Detects visible monsters in the immediate area,
      desc: for one turn only. 
      
      book:magic book:[Blink]:1:1
      spell:Blink:1:2:24:3
      effect:TELEPORT
      dice:10
      desc:Teleports you randomly up to 10 squares away.
      
      ... *snip* ...
      
      book:magic book:[Mass Banishment]:1:1
      spell:Mass Banishment:30:30:75:1000
      effect:MASS_BANISH
      desc:Removes all monsters within 20 squares of you.
      desc: Uniques are not affected.
      desc: You take 1d3 points of damage for every monster removed.
      
      book:magic book:[Mind Blast]:1:1
      spell:Mind Blast:30:50:75:1000
      effect:BOLT_AWARE:OLD_CONF
      dice:$B
      expr:B:PLAYER_LEVEL:* 2 + 10
      desc:Attempts to confuse a single monster for a level-dependant duration.
      desc: Monsters that resist confusion are not affected.
      
      
      ############### PRIEST ###############
      name:2:Priest
      
      
      store.txt
      ===============================
      # Magic-user's
      store:6:Magic Shop
      owner:15000:Ariel the Sorceress (Half-Elf)
      owner:20000:Buggerby the Great (Gnome)
      owner:25000:Inglorian the Mage (Human)
      owner:30000:Luthien Starshine (High-Elf)
      slots:4:14
      turnover:9
      always:magic book:[Detect Visible Monsters]
      always:magic book:[Blink]
      always:magic book:[Shield]
      normal:magic book:[Identify]
      normal:magic book:[Light Area]
      normal:magic book:[Enchant Armor]
      normal:ring:Searching
      normal:ring:Feather Falling
      
      ... *snip* ...
      
      
      store:8:Home
      owner:0:Your home
      #owner:0:Your home
      #owner:0:Your home
      #owner:0:Your home
      Last edited by Nick; May 25, 2020, 00:34.
      Blondes are more fun!

      Comment

      • Tibarius
        Swordsman
        • Jun 2011
        • 429

        #4
        emoticons

        If i view my last post, i see some emoticons. My post contains only plain text, so some kind of parsing must cause that. Can that be turned off somewhere?

        Rogue and ranger classes in class.txt have the same entries, except that i # commented out the 14 attack spells and reduced the num_books to 38.

        This all works fine for the 1st character created after choosing 'New' from the file menu (tested with mage, rogue, ranger). The crash occurs after pressing any key after the 1st character has died and a 2nd character is in creation.
        The message says "ESC to step back, S to start over, or any other key to continue" => I press any key and crash (that is endless loop and Application not responding, i press 'X' with mouse and then crash)
        Last edited by Tibarius; May 24, 2020, 23:37.
        Blondes are more fun!

        Comment

        • Nick
          Vanilla maintainer
          • Apr 2007
          • 9648

          #5
          Originally posted by Tibarius
          If i view my last post, i see some emoticons. My post contains only plain text, so some kind of parsing must cause that. Can that be turned off somewhere?
          The simplest thing to do is put 'CODE' tags around the stuff you're quoting (use the # button above); I've done that for your text files.

          Originally posted by Tibarius
          Rogue and ranger classes in class.txt have the same entries, except that i # commented out the 14 attack spells and reduced the num_books to 38.

          This all works fine for the 1st character created after choosing 'New' from the file menu (tested with mage, rogue, ranger). The crash occurs after pressing any key after the 1st character has died and a 2nd character is in creation.
          The message says "ESC to step back, S to start over, or any other key to continue" => I press any key and crash (that is endless loop and Application not responding, i press 'X' with mouse and then crash)
          OK, I'll have a think.
          One for the Dark Lord on his dark throne
          In the Land of Mordor where the Shadows lie.

          Comment

          • Tibarius
            Swordsman
            • Jun 2011
            • 429

            #6
            problem located & fixed

            Thanks Nick,
            i was able to track down the problem finally with narrowing down the possible changes made.

            The problem is caused by store.txt:
            store:8:Home
            owner:0:Your home
            owner:0:Your home
            owner:0:Your home
            owner:0:Your home

            It is required to have the 4 identical lines at the end of the store.txt file.
            If you comment out 3 of them (or delete them) then the game crashes once you try to start a 2nd character.

            It is hard to imagine, why that would happen. Somehow it seems to me
            like town generation has something to do with it (because that is likely the only place where store.txt is relevant for).

            But why wouldn't it crash playing the 1st char? Can't say ...

            My problem seems to be fixed for now. I recommend to insert a comment line in store.txt that these lines are required from Angband to work properly because that is not obvious for someone trying to modify the .txt files only.
            Blondes are more fun!

            Comment

            • tangar
              Veteran
              • Mar 2015
              • 1004

              #7
              Originally posted by Tibarius
              Thanks Nick,
              i was able to track down the problem finally with narrowing down the possible changes made.

              The problem is caused by store.txt:
              store:8:Home
              owner:0:Your home
              owner:0:Your home
              owner:0:Your home
              owner:0:Your home

              It is required to have the 4 identical lines at the end of the store.txt file.
              If you comment out 3 of them (or delete them) then the game crashes once you try to start a 2nd character.

              It is hard to imagine, why that would happen. Somehow it seems to me
              like town generation has something to do with it (because that is likely the only place where store.txt is relevant for).

              But why wouldn't it crash playing the 1st char? Can't say ...

              My problem seems to be fixed for now. I recommend to insert a comment line in store.txt that these lines are required from Angband to work properly because that is not obvious for someone trying to modify the .txt files only.
              Every store has to have 4 entries for owners, eg
              store:1:General Store
              owner:5000:Bilbo the Friendly (Hobbit)
              owner:10000:Rincewind the Chicken (Human)
              owner:20000:Snafu the Midget (Gnome)
              owner:30000:Lyar-el the Comely (Elf)
              player's house also considered as 'store' so it has to have these lines
              https://tangaria.com - Angband multiplayer variant
              tangaria.com/variants - Angband variants table
              tangar.info - my website ⍽⍽⍽⍽⍽⍽⍽⍽⍽⍽⍽⍽
              youtube.com/GameGlaz — streams in English ⍽ youtube.com/StreamGuild — streams in Russian

              Comment

              • Tibarius
                Swordsman
                • Jun 2011
                • 429

                #8
                stores

                Thanks for the hint Tangar.

                But what surprises me, is the fact, that it didn't crash at once then ...
                i was able to create a 1st char and run around in town normally ... odd!
                Blondes are more fun!

                Comment

                Working...
                😀
                😂
                🥰
                😘
                🤢
                😎
                😞
                😡
                👍
                👎