Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Vanilla

Reply
 
Thread Tools Display Modes
Old May 2, 2015, 03:23   #501
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 55
Posts: 8,658
Donated: $60
Nick will become famous soon enough
Quote:
Originally Posted by PowerWyrm View Post
Terse mode doesn't show terse info.

Code:
bool terse = (mode & ODESC_TERSE);
Tested in debug mode, the "mode" flag contains "ODESC_TERSE", the boolean value is set to FALSE. This is because unary operators don't return a boolean value. So the correct code is:

Code:
bool terse = (mode & ODESC_TERSE)? TRUE: FALSE;
There are a LOT of such declarations in the code. It's probably a good time to fix them all...
Thanks. Mercifully the actual setting of booleans like this seems to be confined to obj-desc and obj-info - there's a lot of use of things like (mode & ODESC_TERSE) in conditionals, which should be fine.
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is online now   Reply With Quote
Old May 2, 2015, 04:05   #502
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 55
Posts: 8,658
Donated: $60
Nick will become famous soon enough
Update bdd602d:
  • Makes a lot of PowerWyrm's suggested fixes to ID
  • Fixes some bad object names and descriptions (PowerWyrm again)
  • Fixes the bug where immunities were broken, which actually broke a whole lot of resistance-related stuff

Please report wherever ID and anything involving balls, bolts and breaths hitting the player seems not to be working.
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is online now   Reply With Quote
Old May 2, 2015, 11:45   #503
Thraalbee
Knight
 
Thraalbee's Avatar
 
Join Date: Sep 2010
Location: Stockholm
Posts: 630
Thraalbee is on a distinguished road
Quote:
Originally Posted by Nick View Post
Update bdd602d:
  • Makes a lot of PowerWyrm's suggested fixes to ID
  • Fixes some bad object names and descriptions (PowerWyrm again)
  • Fixes the bug where immunities were broken, which actually broke a whole lot of resistance-related stuff

Please report wherever ID and anything involving balls, bolts and breaths hitting the player seems not to be working.
When finding rings of known type the message is not as before. You get this also in the item list even before picking it up.
You see a Ring of Reckless attacks {worn}
You see a Ring of the Mouse {worn}
You see a Ring of Protection {worn}
Thraalbee is offline   Reply With Quote
Old May 2, 2015, 12:59   #504
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 55
Posts: 8,658
Donated: $60
Nick will become famous soon enough
Quote:
Originally Posted by Thraalbeast View Post
When finding rings of known type the message is not as before. You get this also in the item list even before picking it up.
You see a Ring of Reckless attacks {worn}
You see a Ring of the Mouse {worn}
You see a Ring of Protection {worn}
Thanks - that's an easy fix.
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is online now   Reply With Quote
Old May 2, 2015, 20:52   #505
Thraalbee
Knight
 
Thraalbee's Avatar
 
Join Date: Sep 2010
Location: Stockholm
Posts: 630
Thraalbee is on a distinguished road
Today's release. Rogue L30, insane amount of armour (AC170). SP = 4/4 in main screen but Character Screen with "C" (roguelike) says SP = 0/0. And I can't cast any spells, so the character screen seems correct.
Thraalbee is offline   Reply With Quote
Old May 2, 2015, 21:01   #506
passer_by
Rookie
 
Join Date: May 2015
Posts: 19
passer_by is on a distinguished road
I was finding that my mage's SP was usually set to 0 every time I reloaded a savefile. Looks like the problem is that max SP is sometimes calculated with an uninitialised INT of zero. I think this fix does what was intended:

Code:
--- a/src/player-calcs.c
+++ b/src/player-calcs.c
@@ -1296,10 +1296,10 @@ static void calc_spells(struct player *p)
 /**
  * Get the player's max spell points per effective level
  */
-int mana_per_level(struct player *p)
+int mana_per_level(struct player *p, struct player_state *state)
 {
        int stat = p->class->magic.spell_realm->stat;
-       return adj_mag_mana[p->state.stat_ind[stat]];
+       return adj_mag_mana[state->stat_ind[stat]];
 }
 
 /**
@@ -1326,7 +1326,7 @@ static void calc_mana(struct player *p, struct player_state *state)
        levels = (p->lev - p->class->magic.spell_first) + 1;
        if (levels > 0) {
                msp = 1;
-               msp += mana_per_level(p) * levels / 100;
+               msp += mana_per_level(p, state) * levels / 100;
        } else {
                levels = 0;
                msp = 0;

Last edited by passer_by; May 2, 2015 at 21:35.
passer_by is offline   Reply With Quote
Old May 2, 2015, 21:09   #507
Nomad
Knight
 
Nomad's Avatar
 
Join Date: Sep 2010
Location: England
Posts: 958
Nomad is on a distinguished road
There seems to be an issue with the randomly positioned doors not always being generated correctly for templated rooms, causing the generation process to make a break in the wall. For instance, I've just come across this:

Code:
                         
 ####################### 
 #.....................# 
 #.#.#.###.###.#.#.###.# 
 #.#.#.#.'.#.'.#.#.#.'.# 
 #.###.###.###.###.###.# 
 #.....................# 
 #.###.###.#.#.###.###.# 
 #.'.#.'.#.#.#.'.#.'.#.# 
 #.###.###.###.###.###.# 
 #.....................# 
 ####################### 
                         
Which is seemingly supposed to be this layout with the doors in position 3:

Code:
D:%%%%%%%%%%%%%%%%%%%%%%%
D:%.....................%
D:%.#2#.#2#.#2#.#2#.#2#.%
D:%.1.391.3.193.1.391.3.%
D:%.#4#.#4#.#4#.#4#.#4#.%
D:%.....................%
D:%.#4#.#4#.#4#.#4#.#4#.%
D:%.3.193.1.391.3.193.1.%
D:%.#2#.#2#.#2#.#2#.#2#.%
D:%.....................%
D:%%%%%%%%%%%%%%%%%%%%%%%
Judging by the pattern of which doors are missing, I'm going to take a stab that the problem is with where the symbols used in room_template.txt have been semi-standardised with vault symbols, and the "place some monsters and treasures nearby" symbol, (previously !) has been changed to a number 9. It looks like the code is possibly reading 3-followed-by-9 as 39 and failing to place a door because it doesn't recognise it's a 3, or something similar.
Nomad is offline   Reply With Quote
Old May 2, 2015, 22:09   #508
Thraalbee
Knight
 
Thraalbee's Avatar
 
Join Date: Sep 2010
Location: Stockholm
Posts: 630
Thraalbee is on a distinguished road
When my Rogue switches back and forth between super heavy armour (AC 102 adamantite plate) and leather, not only is the SP display incorrect. Also the AC is not always updated correctly, the old values remain even after switch. I will make a copy of the savefile if it turns out to be hard to reproduce.
Thraalbee is offline   Reply With Quote
Old May 3, 2015, 02:31   #509
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 55
Posts: 8,658
Donated: $60
Nick will become famous soon enough
Quote:
Originally Posted by Nomad View Post
Judging by the pattern of which doors are missing, I'm going to take a stab that the problem is with where the symbols used in room_template.txt have been semi-standardised with vault symbols, and the "place some monsters and treasures nearby" symbol, (previously !) has been changed to a number 9. It looks like the code is possibly reading 3-followed-by-9 as 39 and failing to place a door because it doesn't recognise it's a 3, or something similar.
Nice guess, but I don't think that's the problem - but I have no idea what the problem actually is, and I'm often wrong. Please keep an eye out for other malformed template rooms that might give clues.
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is online now   Reply With Quote
Old May 3, 2015, 03:23   #510
Nomad
Knight
 
Nomad's Avatar
 
Join Date: Sep 2010
Location: England
Posts: 958
Nomad is on a distinguished road
Quote:
Originally Posted by Nomad View Post
Judging by the pattern of which doors are missing, I'm going to take a stab that the problem is with where the symbols used in room_template.txt have been semi-standardised with vault symbols, and the "place some monsters and treasures nearby" symbol, (previously !) has been changed to a number 9. It looks like the code is possibly reading 3-followed-by-9 as 39 and failing to place a door because it doesn't recognise it's a 3, or something similar.

Quote:
Originally Posted by Nick View Post
Nice guess, but I don't think that's the problem - but I have no idea what the problem actually is, and I'm often wrong. Please keep an eye out for other malformed template rooms that might give clues.
Well, the initial example I was actually going to post was this one:

Code:
                 
 ############### 
 #.............# 
 #.#.###.#####.# 
 #.#...#.#...#.# 
 #.#...#.'...#.# 
 #.#...#.#...#.# 
 #.#####.#####.# 
 #.............# 
 ############### 
                 
Which follows the exact same pattern.

Code:
D:%%%%%%%%%%%%%%%
D:%.............%
D:%.##2##.##4##.%
D:%.#...#.#...#.%
D:%.1...393...1.%
D:%.#...#.#...#.%
D:%.##4##.##2##.%
D:%.............%
D:%%%%%%%%%%%%%%%
I actually specifically scummed for the "Ten little boxes" layout because I remembered seeing one with broken walls before and wanted to see if it bore out my hunch that it was happening in the same situation with the 9s - which it did - and I thought it would make a more illustrative example. (Although from if the code hasn't changed from before, I don't really see how it actually could be reading the two numbers together instead of taking them one at a time - but I confess I'm baffled as to why it follows so predictable a pattern otherwise.)

I'll keep an eye out for any more examples...
Nomad is offline   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

Similar Threads
Thread Thread Starter Forum Replies Last Post
FuryBand 5.1 Beta Release The GP Fury Variants 31 February 23, 2013 07:27
Angband release Shockbolt Vanilla 4 February 29, 2012 20:52
NPP 0.5.1 Beta-6 "Release Candidate" is available nppangband Variants 4 January 23, 2011 13:36
[Un]angband 0.6.2 beta Arralen Variants 9 February 20, 2008 22:09
FuryBand Gold Beta Release The GP Fury Variants 15 November 26, 2007 23:31


All times are GMT +1. The time now is 00:20.


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