PC Angband 1.4

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Derakon
    Prophet
    • Dec 2009
    • 9022

    #61
    You could do it as a trap, I guess, but that wouldn't be doing it properly IMO. It should look like a staircase (because that's the functionality it's imitating), only presumably colored, e.g. purple. But the existing staircases still need to be usable, so you need a new terrain type.

    Implementing it as a trap would work for playtesting though.

    Comment

    • nppangband
      NPPAngband Maintainer
      • Dec 2008
      • 926

      #62
      Originally posted by Timo Pietilä
      Why would you need a new terrain type for that? Couldn't you just use a trap that activates for recall without delay for that portal? Just make it impossible to disarm. You would even get a warning for entering it from trap code.
      Becuause in the Vanilla code there are countless places that assume the terrain in terrain.txt appears in a certain order (unknown spot, followed by the floor, then stores, then traps, etc..). It doesn't use flags like the other edit files. There are many places in the code where, if it wants to test for a walkable floor space, it simply checks if the terrain # is less than the highest numbered terrain you can walk through. It assumes everything else is a wall or otherwise unpassable. So if you try to add a terrain WoR portal on at the end of terrain.txt, the source code assumes it is a permanent wall, and won't allow the player to walk into it. And there are hundreds of if-statements like this throughout the code, so de-bugging is a painful process.

      And, there are no empty slots in terrain.txt to put in a new terrain type.

      I suppose the simplest route is to break savefile compatibility and re-number terrain.txt. But when Diego and I made some changes, we even found parts of the code where values are hard-coded rather than linked to #defines, so a change will probably lead to plenty of game-crashing bugs.
      NPPAngband current home page: http://nppangband.bitshepherd.net/
      Source code repository:
      https://github.com/nppangband/NPPAngband_QT
      Downloads:
      https://app.box.com/s/1x7k65ghsmc31usmj329pb8415n1ux57

      Comment

      • Nick
        Vanilla maintainer
        • Apr 2007
        • 9634

        #63
        Originally posted by fizzix
        new terrain types are still brutal, I think. I tried to implement new types a while ago and broke everything. That's not to say that I won't try again.
        I think flag-based (rather than index-based) terrain handling will be introduced before too long, which will make adding new terrain a lot easier.

        I understand it already exists in some variant or other...

        EDIT: Ooh, look, I answered Jeff as well
        One for the Dark Lord on his dark throne
        In the Land of Mordor where the Shadows lie.

        Comment

        • Timo Pietilä
          Prophet
          • Apr 2007
          • 4096

          #64
          Originally posted by Derakon
          You could do it as a trap, I guess, but that wouldn't be doing it properly IMO. It should look like a staircase (because that's the functionality it's imitating), only presumably colored, e.g. purple. But the existing staircases still need to be usable, so you need a new terrain type.

          Implementing it as a trap would work for playtesting though.
          Why would it need to look like stairs? I would much rather see a trap-like portal than stairs, because it is a portal, not stairs. We already have teleport trap, this would be like that, only you take it by purpose and it takes you to town and back. It's teleporting not stairs.

          I would like to keep stairs also. Having only recall-portal in town is not that good idea. You might actually want to go down using stairs only sometimes.

          Recall portal doesn't even need to be immune to destruction and other effects, because you can find another just by going to other level. In ironman games you don't need those at all, so not being able to go other level is not an restriction.

          Comment

          • Timo Pietilä
            Prophet
            • Apr 2007
            • 4096

            #65
            Originally posted by nppangband
            Becuause in the Vanilla code there are countless places that assume the terrain in terrain.txt appears in a certain order (unknown spot, followed by the floor, then stores, then traps, etc..). It doesn't use flags like the other edit files. There are many places in the code where, if it wants to test for a walkable floor space, it simply checks if the terrain # is less than the highest numbered terrain you can walk through. It assumes everything else is a wall or otherwise unpassable. So if you try to add a terrain WoR portal on at the end of terrain.txt, the source code assumes it is a permanent wall, and won't allow the player to walk into it. And there are hundreds of if-statements like this throughout the code, so de-bugging is a painful process.

            And, there are no empty slots in terrain.txt to put in a new terrain type.
            So we need to replace one of the existing traps with the portal. My vote is for this:


            N:22:discolored spot
            G:^:u
            P:20
            F:PWALK | PPASS | MWALK | MPASS | LOOK | TRAP
            E:TRAP_SPOT_FIRE


            I never thought "trap" is a terrain type, I thought it be a feature attached to floor grid, like vault floors that prevent teleporting to or detection border. More like a unmovable monster than a terrain.

            Comment

            • Derakon
              Prophet
              • Dec 2009
              • 9022

              #66
              Originally posted by Timo Pietilä
              Why would it need to look like stairs? I would much rather see a trap-like portal than stairs, because it is a portal, not stairs. We already have teleport trap, this would be like that, only you take it by purpose and it takes you to town and back. It's teleporting not stairs.
              The portal's purpose is to take you up/down dungeon levels intentionally. Traps are for attacking you when you unwittingly walk into them (or purposefully, or fail to disarm them). Portals should be activated by standing on them and then pressing a key, like stairs; making them activate on walkover seems unfriendly.

              Functionally, stairs are like teleportation, but they take you up and down, not across. How is that different from portals? Just because portals are "portals" instead of "elevators"?

              I would like to keep stairs also. Having only recall-portal in town is not that good idea. You might actually want to go down using stairs only sometimes.
              Sure, and I never suggested replacing stairs, just Word of Recall.

              Comment

              • bio_hazard
                Knight
                • Dec 2008
                • 649

                #67
                Would be fun if the portals were objects, scatter 3 around the level, but monsters can pick them up. They would disappear from inventory when you leave the level so you can't horde them. Sometimes you find one right away, sometimes you need to go hunting (or try a new level).

                Comment

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