I'm finally trying to add terrain (of a sort) to Neoband, but I'm wondering, why are there four types of granite walls (never mind doors) in lib/edit/terrain.txt? If I add a new type of wall, door, etc. will I have to add four versions? Or is this a thing for graphical tiles, that I can safely ignore?
Four types of granite walls?
Collapse
X
-
Tags: None
-
I'm finally trying to add terrain (of a sort) to Neoband, but I'm wondering, why are there four types of granite walls (never mind doors) in lib/edit/terrain.txt? If I add a new type of wall, door, etc. will I have to add four versions? Or is this a thing for graphical tiles, that I can safely ignore? -
With Neoband being based on 3.2.0, adding terrain is easy enough, but the difficult part is making sure it behaves correctly. Things you need to consider include- You need to add a Code:
#define FEAT_MARSHMALLOW indexno
- LoS considerations - you will need to make sure your terrain gets the CAVE_WALL flag if it is meant to block LoS, or doesn't if it isn't (see cave_set_feat in cave.c)
- Where it is placed in the order of terrain - a lot of things are done based on facts like "every terrain feature with index >= secret doors is a wall"
- Any behaviour specific to what you want to introduce
As fizzix says, it's all a bit painful, but kind of fun in a grim sort of wayOne for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.Comment
- You need to add a
-
Thanks... So I guess I won't need to add four types of e.g. coal seam?
(I take it that removing the need for multiple granite walls, etc. would be nontrivial?)
BTW I notice the trap implementation requires a terrain feature for each trap type. Ick.Comment
-
Oh dear. I'd wanted to add wall types, among other things. Unless you mean "only relevant for granite/perm walls/doors."
Thanks though, I will see if I can come up with a better way of doing things. (Not that I rate my chances that high.)Comment
-
At this stage of the code restructure the multiple types of granite have been removed, and traps are no longer terrain. See the restruct branch on Github if you're interested.One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.Comment
-
Comment