Angband.oook.cz
Angband.oook.cz
AboutDownloadVariantsLadderForumCompetitionSpoilersComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Vanilla

Reply
 
Thread Tools Display Modes
Old September 27, 2011, 21:03   #61
Derakon
Prophet
 
Derakon's Avatar
 
Join Date: Dec 2009
Posts: 5,807
Derakon is on a distinguished road
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.
Derakon is offline   Reply With Quote
Old September 27, 2011, 21:13   #62
nppangband
NPPAngband Maintainer
 
Join Date: Dec 2008
Location: Stat Gain, Angband
Posts: 813
nppangband is on a distinguished road
Quote:
Originally Posted by Timo Pietilš View Post
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://forum.nppangband.org/
Source code repository:
https://github.com/nppangband/NPPAngband
nppangband is offline   Reply With Quote
Old September 27, 2011, 21:15   #63
Nick
FAangband maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 49
Posts: 4,321
Donated: $60
Nick is on a distinguished road
Quote:
Originally Posted by fizzix View Post
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 Ring to rule them all, One Ring to find them,
One Ring to bring them all and in the darkness bind them.
Nick is offline   Reply With Quote
Old September 27, 2011, 21:56   #64
Timo Pietilš
Prophet
 
Join Date: Apr 2007
Location: In a hole, digging.
Posts: 3,383
Timo Pietilš is on a distinguished road
Quote:
Originally Posted by Derakon View Post
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.
Timo Pietilš is offline   Reply With Quote
Old September 27, 2011, 22:14   #65
Timo Pietilš
Prophet
 
Join Date: Apr 2007
Location: In a hole, digging.
Posts: 3,383
Timo Pietilš is on a distinguished road
Quote:
Originally Posted by nppangband View Post
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.
Timo Pietilš is offline   Reply With Quote
Old September 27, 2011, 22:44   #66
Derakon
Prophet
 
Derakon's Avatar
 
Join Date: Dec 2009
Posts: 5,807
Derakon is on a distinguished road
Quote:
Originally Posted by Timo Pietilš View Post
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"?

Quote:
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.
Derakon is offline   Reply With Quote
Old September 28, 2011, 00:39   #67
bio_hazard
Swordsman
 
bio_hazard's Avatar
 
Join Date: Dec 2008
Posts: 298
bio_hazard is on a distinguished road
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).
bio_hazard is online now   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 18:28.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.