Angband Forums

Angband Forums (
-   Variants (
-   -   Skills-Angband (Sangband) (

Leon Marrick April 28, 2007 02:21

Skills-Angband (Sangband)
This thread:

Feel free to post anything Sangband-related here, including ideas, play reports, questions, and - hopefully! - answers.

Latest version

1.0.0 Final, released May 26th, 2007.

What's Sangband?: character development: That's what Sangband's all about. You delve deeper and deeper into the Pits of Angband, gathering the skills and equipment and learning the battle wisdom needed to seize the Iron Crown of Morgoth. Dreadful opponents bar your path at every stage; kobold darts and trollish boulders, basilisk stares and dragon-fire, warrior steel and magician's cunning - you must defeat or dodge it all! are many ways to die. There are as many ways to win. The choices you make among skills, the plunder from vaults and fallen foes, the objects you forge, your growing tactical prowess - all will shape your adventure. Will you take the Oath of Iron to learn the most powerful warrior arts? Will you stand staunch for the Light - or choose the way of blood and necromancy? A Shadow Paladin, a Magic Engineer, a Loresmith, a Skirmisher - all can topple the Dark Lord from his dark throne. clean, unpretentious interface enhances your experience; powerful options let you configure the game as you please. There are six different display modes ranging from pure ASCII to 32x32 graphics, plus sound, music, mouse support, and abundant on-line help.


Seventh Holy Scripture April 28, 2007 06:47

Very minor cosmetic glitch: I sold a lantern directly from my equipment to a shopkeeper, and it's shown as 'lit' in the shop listing. You would think he would extinguish it. :)

camlost April 28, 2007 14:59

'Secret Doors'
I'm still having trouble with the secret doors. By moving into a secret door, you get to the tunneling code. The problem is that you need to differentiate secret doors from secret doors that are known. I fixed this by adding


 * Determine if a grid is a closed door.
 * Open or broken doors, as well as secret doors don't count.
#define cave_closed_door(Y,X) \
  (f_info[cave_feat[Y][X]].flags & (TF_DOOR_CLOSED) && !(cave_feat[Y][X] == FEAT_SECRET))

 * Determine if a grid contains a secret door
#define cave_secret_door(Y,X) \
  ((cave_feat[Y][X] == FEAT_SECRET))

 * Determine if a grid is any door.
#define cave_any_door(Y,X) \
  (f_info[cave_feat[Y][X]].flags & (TF_DOOR_ANY))

 * Determine if a grid contains an open door

#define cave_open_door(Y,X) \
  ((cave_feat[Y][X] == FEAT_OPEN))

Also, you will probably want to examine any existing uses of these functions to make sure they remain correct.

The problem occurs when the auto-interact code thinks "it's a door", so goes to the auto-do function, which sees granite and starts tunneling. I don't recall the correct names of those functions.

Leon Marrick April 28, 2007 21:26

SHS: Lantern bug added to the to-do list.

Camlost: I remember going over your enhanced beta 21 and carefully (or so I thought!) applying that bugfix (along with a great many others). Which version of Sangband are you seeing secret door problems with? I tested with Hotfix #3 and saw no obvious problems.

camlost April 29, 2007 04:50

Ok, something is still wrong in hotfix#4. It's not the same error as before -- I think I was still in hotfix#2 (extracted to the wrong directory, I think).

But in hotfix#4, I can now walk through secret doors. Here's a link to a link to a character.

Let me know if there's something wrong on my end. I might have coded it it incorrectly, or there might have been a problem in the conversion.

camlost April 29, 2007 18:25

I don't really know much about the terrain code, but presumable cave_wall_bold is not actually flagging secret doors as "walls".


                        /* Wall (or secret door) */
                        else if (cave_wall_bold(y, x))
                                /* Already known */
                                if (cave_info[y][x] & (CAVE_MARK))
                                        message(MSG_HITWALL, 0, "There is a wall in your way.");

                                        /* Hack -- Use no energy */
                                        if (!p_ptr->confused) p_ptr->energy_use = 0;
                                /* Not known */
                                        message(MSG_HITWALL, 0, "You feel a wall blocking your way.");
                                        cave_info[y][x] |= (CAVE_MARK);
                                        lite_spot(y, x);


 * Determine if a grid is a "wall"
#define cave_wall_bold(Y,X) \
        (f_info[cave_feat[Y][X]].flags & (TF_WALL))


 * Place a secret door at the given location
static void place_secret_door(int y, int x)
        /* Create secret door */
        cave_set_feat(y, x, FEAT_SECRET);

My solution was to add in some explicit tests for secret doors rather than fix the problem with cave_wall_bold. I'm not even sure where TF_WALL gets set in the code.

Would setting TF_WALL in place_secret_door solve anything? I'm guessing it's at the very least, the wrong way to do things.

Leon Marrick April 29, 2007 19:31

Ah, now at last I begin to understand. Look in the file "/lib/edit/terrain.txt". Go to terrain "N:48:secret door". It should have these flags: "F:TF_WALL | TF_ROCK | TF_DOOR_ANY | TF_DOOR_CLOSED | TF_GRANITE"

If your copy of terrain.txt doesn't look exactly like this, re-install the game.

Hopefully this will sort out the confusion!

camlost April 30, 2007 01:23

Thanks, I hadn't been replacing my lib directory...

But there is still a slight problem. You can dig through "granite" secret doors with a tunneling bonus of +1. But not with a tunneling bonus of +0. And that strikes me as odd. Especially since it has TF_GRANITE.

Thanks for fixing the running code and this. They make the game infinitely more playable for me.

Seventh Holy Scripture April 30, 2007 07:27

Potions of Essences that are monster drops seem to always do 0d0 damage.

camlost April 30, 2007 17:11

At some point I realized that as a druid, you get to see/target through trees, but monsters should not (at least in general). However, the rule for targeting are reciprocal (to prevent LOS abuse). This means that as a druid, monsters can target you through trees if you can target them.

Unfortunately, I don't know of clean solution to that problem. Currently, Sangband tests whether a monster can target the player if the player can target the monster. I guess you could flag whether the path to a particular square goes through a tree (or another player-only obstruction), but that seems clunky.

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

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.