Angband Forums Skills-Angband (Sangband)
 Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 April 28, 2007, 05:47 #2 Seventh Holy Scripture Rookie   Join Date: Apr 2007 Posts: 7 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.
 April 28, 2007, 13:59 #3 camlost Sangband 1.x Maintainer     Join Date: Apr 2007 Posts: 522 '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 Code: ```/* * 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.
 April 28, 2007, 20:26 #4 Leon Marrick Sangband maintainer     Join Date: Apr 2007 Location: Heavens only knows Posts: 31 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. __________________ S(all) W/D H+ D c+ f? PV++ s? d- P++ M+ C S !I !So SQ RQ V+ F:<> http://angband.oook.cz/code
 April 29, 2007, 03:50 #5 camlost Sangband 1.x Maintainer     Join Date: Apr 2007 Posts: 522 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.
 April 29, 2007, 17:25 #6 camlost Sangband 1.x Maintainer     Join Date: Apr 2007 Posts: 522 I don't really know much about the terrain code, but presumable cave_wall_bold is not actually flagging secret doors as "walls". Code: ``` /* 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 */ else { message(MSG_HITWALL, 0, "You feel a wall blocking your way."); cave_info[y][x] |= (CAVE_MARK); lite_spot(y, x); } }``` Code: ```/* * Determine if a grid is a "wall" */ #define cave_wall_bold(Y,X) \ (f_info[cave_feat[Y][X]].flags & (TF_WALL))``` Code: ```/* * 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.
 April 29, 2007, 18:31 #7 Leon Marrick Sangband maintainer     Join Date: Apr 2007 Location: Heavens only knows Posts: 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!
 April 30, 2007, 00:23 #8 camlost Sangband 1.x Maintainer     Join Date: Apr 2007 Posts: 522 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.
 April 30, 2007, 06:27 #9 Seventh Holy Scripture Rookie   Join Date: Apr 2007 Posts: 7 Potions of Essences that are monster drops seem to always do 0d0 damage.
 April 30, 2007, 16:11 #10 camlost Sangband 1.x Maintainer     Join Date: Apr 2007 Posts: 522 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.

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

 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 Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Angband     AAR     Vanilla     Development     ToME     Sil     Variants     Competition The real world     Idle chatter     Oook! Obsolete     v4

All times are GMT +1. The time now is 15:50.