Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Vanilla

Reply
 
Thread Tools Display Modes
Old May 8, 2017, 23:14   #91
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 54
Posts: 7,971
Donated: $60
Nick will become famous soon enough
Quote:
Originally Posted by t4nk View Post
Nick, I got a crash from asan at obj-randart.c:2518:
Code:
while (strstr(art->name, "The One Ring") ||
	kf_has(kind->kind_flags, KF_QUEST_ART)) {
	(*aidx)++;
	art = &a_info[*aidx];
	art_level = art->level;
	if ((*aidx) >= z_info->a_max) {
		return;
	}
}
obj-init.c allocates z_info->a_max + 1 structs (line 2700), but note that it then increments a_max (line 2715). So accessing art->level when *aidx == a_max is illegal (perhaps that's the cause of Nomad's crash?)
Thank you, yes - I should be testing before incrementing.

Quote:
Originally Posted by t4nk View Post
(come to think of it, why does obj-init.c do that? and why does it start assigning from a_max, leaving zeroed out struct at the beginning?)
I don't actually remember. Each artifact in artifact.txt used to have an index, and they started at 1, and there was some code or other that relied on that fact, but I'm not at all sure it's necessary any more. I'll check at some point and change it if it's not needed, because it's a bit silly to do it for no reason.
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote
Old May 9, 2017, 10:11   #92
PowerWyrm
Prophet
 
PowerWyrm's Avatar
 
Join Date: Apr 2008
Posts: 2,698
PowerWyrm is on a distinguished road
Quote:
Originally Posted by t4nk View Post
come to think of it, why does obj-init.c do that? and why does it start assigning from a_max, leaving zeroed out struct at the beginning?
That's what the code does everywhere. The main reason is to put zero as index in the savefiles where there is nothing to save, while keeping a trivial loading routine: read index, assign struct = structs[index]. Otherwise, you would have to check the index, see if it's zero, assign null in that case, assign struct = structs[index-1] in other cases.

Note that in PWMAngband, I do the latter. It makes loading savefiles more complex, but simplifies all the rest (in particular, the init/parsing code).
__________________
PWMAngband variant maintainer - check http://powerwyrm.monsite-orange.fr (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!
PowerWyrm is offline   Reply With Quote
Old May 9, 2017, 10:14   #93
PowerWyrm
Prophet
 
PowerWyrm's Avatar
 
Join Date: Apr 2008
Posts: 2,698
PowerWyrm is on a distinguished road
Looking at master for implementing the latest stuff in PWMAngband. In commit a970eb7:

Code:
+
+	/* Uniques are doubly hard to affect */
+	if (rf_has(mon->race->flags, RF_UNIQUE)) {
+		resist_chance /= 2;
+	}
Well I think that makes uniques easier to affect no?

Best thing is to leave the double check in saving_throw(). Doing a *2 would make all level 50+ monsters completely immune to effects instead of giving them double resistance (double check at resist = 50 --> 75% vs single check at resist = 100 --> 100%).

Code:
if (rf_has(mon->race->flags, RF_UNIQUE) && (randint0(100) < resist_chance)) return true;
__________________
PWMAngband variant maintainer - check http://powerwyrm.monsite-orange.fr (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!

Last edited by PowerWyrm; May 9, 2017 at 10:26.
PowerWyrm is offline   Reply With Quote
Old May 9, 2017, 11:35   #94
PowerWyrm
Prophet
 
PowerWyrm's Avatar
 
Join Date: Apr 2008
Posts: 2,698
PowerWyrm is on a distinguished road
Minor issue: in commit e9458fa, many flags have been added to monster.txt, but some of them are already present in monster_base.txt (for example: NO_CONF on vortices).
__________________
PWMAngband variant maintainer - check http://powerwyrm.monsite-orange.fr (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!
PowerWyrm is offline   Reply With Quote
Old May 9, 2017, 14:08   #95
PowerWyrm
Prophet
 
PowerWyrm's Avatar
 
Join Date: Apr 2008
Posts: 2,698
PowerWyrm is on a distinguished road
Are traps still appearing only 25% of the time in vaults? I think the number of traps should be increased again, otherwise many vaults are very empty...
__________________
PWMAngband variant maintainer - check http://powerwyrm.monsite-orange.fr (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!
PowerWyrm is offline   Reply With Quote
Old May 9, 2017, 15:56   #96
t4nk
Swordsman
 
Join Date: May 2016
Posts: 330
t4nk is on a distinguished road
Quote:
Originally Posted by PowerWyrm View Post
That's what the code does everywhere. The main reason is to put zero as index in the savefiles where there is nothing to save, while keeping a trivial loading routine: read index, assign struct = structs[index]. Otherwise, you would have to check the index, see if it's zero, assign null in that case, assign struct = structs[index-1] in other cases.
Ah, so that's how it was (angband now saves artefact names as strings instead).
t4nk is offline   Reply With Quote
Old May 9, 2017, 16:58   #97
PowerWyrm
Prophet
 
PowerWyrm's Avatar
 
Join Date: Apr 2008
Posts: 2,698
PowerWyrm is on a distinguished road
Another minor issue: monsters break from "hold" effect when hit, but not from various other situations.

- hurt by earthquake
- summoned via "calling out"
- healed via "heal monster"
__________________
PWMAngband variant maintainer - check http://powerwyrm.monsite-orange.fr (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!
PowerWyrm is offline   Reply With Quote
Old May 9, 2017, 22:30   #98
takkaria
Veteran
 
takkaria's Avatar
 
Join Date: Apr 2007
Posts: 1,946
Donated: $40
takkaria is on a distinguished road
Quote:
Originally Posted by PowerWyrm View Post
Another minor issue: monsters break from "hold" effect when hit, but not from various other situations.

- hurt by earthquake
- summoned via "calling out"
- healed via "heal monster"
I think I'm OK with this. I'll fix the other issues though, and also turn on saving throws for the unresistable effects soon.
__________________
takkaria whispers something about options. -more-
takkaria is offline   Reply With Quote
Old May 10, 2017, 07:52   #99
Wanderlust
Apprentice
 
Join Date: Dec 2015
Posts: 76
Wanderlust is on a distinguished road
Exclamation

I had a problem compiling/installing the May 7 nightly.

I install locally with:

Code:
$ ./configure --prefix=$HOME --enable-sdl
$ make
$ make install
Running the program returns:

Code:
./angband: Cannot find required file:
/usr/local/share/angband/fonts/6x10x.fon
The same installation procedure works fine with earlier versions, such as the April 25 nightly, which I am running now with no problems.
Wanderlust is offline   Reply With Quote
Old May 10, 2017, 09:38   #100
PowerWyrm
Prophet
 
PowerWyrm's Avatar
 
Join Date: Apr 2008
Posts: 2,698
PowerWyrm is on a distinguished road
Quote:
Originally Posted by takkaria View Post
I think I'm OK with this. I'll fix the other issues though, and also turn on saving throws for the unresistable effects soon.
Ok don't do that. For what I've seen, stuff like Slow and Confuse are still marginally useful because not really powerful, so it's ok to leave them without saving throw. The problem reported is vs Stun... and that's because there's a bug in the new implementation. Looking at mon-timed.h, the STUN_DAM_REDUCTION value is supposed to be "Percentage reduction in damage". But in mon-attack.c, the code is:

Code:
if (stunned) damage = (damage * STUN_DAM_REDUCTION) / 100;
The recent nerfing made that even worse, since this reduces monster damage to 10% of their normal damage while stunned...

Oh and it seems that the same problem applies for STUN_HIT_REDUCTION. In check_hit():

Code:
if (debuff) chance = (chance * debuff) / 100;
Fixing both of these will give some threat back to stunned monsters, and removing the saving throw for stunning will be also fine. Maybe bring back the 25% reduction instead of 10% too, because 10% won't do much, especially when damage is low due to rounding down.
__________________
PWMAngband variant maintainer - check http://powerwyrm.monsite-orange.fr (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!

Last edited by PowerWyrm; May 10, 2017 at 09:45.
PowerWyrm 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
Bugs and complaints on current master Nick Vanilla 588 April 27, 2017 23:54
Master Thief Grotug Idle chatter 1 March 27, 2017 00:54
Sil 1.1.1 no-artefacts, polearm master bron AAR 21 August 28, 2013 00:42
Artifacts in 3.2 (Master List) Tregonsee Vanilla 8 March 6, 2011 12:33
State of Angband master branch d_m Development 80 November 26, 2010 15:14


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


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