Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Vanilla

Reply
 
Thread Tools Display Modes
Old January 30, 2019, 22:30   #121
MattB
Veteran
 
Join Date: Mar 2013
Location: Berkshire, UK
Posts: 1,153
MattB is on a distinguished road
Starting with zero gold and zero stuff is perfectly viable as a warrior.
As a mage...less so.
MattB is offline   Reply With Quote
Old February 5, 2019, 09:47   #122
wobbly
Veteran
 
Join Date: May 2012
Location: Adelaide, Australia
Posts: 2,079
wobbly is on a distinguished road
You assume the form of a bat
You die

Might want to decide if losing hps to shapeshifting should be able to kill a character & if so whether it should be warning you first.
wobbly is offline   Reply With Quote
Old February 5, 2019, 10:10   #123
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 54
Posts: 7,834
Donated: $60
Nick is on a distinguished road
Quote:
Originally Posted by wobbly View Post
You assume the form of a bat
You die

Might want to decide if losing hps to shapeshifting should be able to kill a character & if so whether it should be warning you first.
You've been warned
__________________
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 February 5, 2019, 19:25   #124
Thraalbee
Knight
 
Thraalbee's Avatar
 
Join Date: Sep 2010
Location: Stockholm
Posts: 546
Thraalbee is on a distinguished road
artifact.txt | object_base.txt | object.txt mismatch

In the version I am looking at, armour spelling is both the UK and the US way
artifact.txt sample
name:'Hithlomir'
base-object:soft armour:Soft Leather Armour
...

object_base.txt sample
name:soft armor:Soft Armor~
graphics:slate
...

object.txt also uses both versions.


Not sure if it has any impact in the code or not, but I still recommend using just one of these consistently.
Thraalbee is offline   Reply With Quote
Old February 5, 2019, 20:22   #125
Thraalbee
Knight
 
Thraalbee's Avatar
 
Join Date: Sep 2010
Location: Stockholm
Posts: 546
Thraalbee is on a distinguished road
artifact.txt continued

Ok, so comments are not up to date. Below is a suggestion.

However, there is currently a variance in placement of "values:" lines which makes it harder to parse with regexp. Usually it comes after flags:, but also in some occasions after time: or msg:
Again, probably not a problem for the game today but I'd like to see consistency to simplify coming work on artifacts.

# name: name without object name
# base-object: tval : sval
# graphics: symbol : color
# info: level : weight : cost
# alloc: allocation probability : min depth : max depth
# power: base armor class : base damage : plus to-hit : plus to-dam : plus to-ac
# flags: flag | flag | etc
# values: label[value] | label[value] | etc
# brand: brand info
# slay: slay info
# act: activation
# time: recharge time
# msg: message when activated
# desc: description
Thraalbee is offline   Reply With Quote
Old February 5, 2019, 21:11   #126
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 54
Posts: 7,834
Donated: $60
Nick is on a distinguished road
There has been a deliberate policy for a while to allow both armor and armour, because development has been pretty evenly split between users of the two different spellings. It is accounted for in the code:
Code:
/**
 * Small hack to allow both spellings of armer
 */
char *de_armour(const char *name)
{
	char newname[40];
	char *armour;

	my_strcpy(newname, name, sizeof(newname));
	armour = strstr(newname, "armour");
	if (armour)
		my_strcpy(armour + 4, "r", 2);

	return string_make(newname);
}
Standardising the order of lines in artifact.txt (and actually all the data files is a good idea - I'll get to it some time.
__________________
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 February 6, 2019, 00:13   #127
takkaria
Veteran
 
takkaria's Avatar
 
Join Date: Apr 2007
Posts: 1,936
Donated: $40
takkaria is on a distinguished road
Why don't you just split the whole file into chunks based on a double-newline and then within each one run a 'match all' for each regex? Then you're not reliant on a particular line order, which is not guaranteed.
__________________
takkaria whispers something about options. -more-
takkaria is offline   Reply With Quote
Old February 6, 2019, 07:30   #128
Thraalbee
Knight
 
Thraalbee's Avatar
 
Join Date: Sep 2010
Location: Stockholm
Posts: 546
Thraalbee is on a distinguished road
I did that in the previous version. But I code to learn/practise. wanted to learn using more complex regexp this time. But after adding room for comments and mutiple locations of some strings it has become silly in terms of efficiency although it works for artifacts too now
Thraalbee is offline   Reply With Quote
Old February 6, 2019, 15:24   #129
Derakon
Prophet
 
Derakon's Avatar
 
Join Date: Dec 2009
Posts: 8,916
Derakon is on a distinguished road
Regular expressions are one of those "just because you can, doesn't mean you should" kinds of things. Often a complicated regex is better-represented as a few string splitting operations and a simple regex or two.

I guess what I'm saying is, part of practicing is knowing when to stop!
Derakon is offline   Reply With Quote
Old February 7, 2019, 13:15   #130
Grotug
Veteran
 
Join Date: Nov 2013
Posts: 1,164
Grotug is on a distinguished road
I recharge a staff of detect evil and it goes from 1 charge to 4 charges. I guess warriors should have limited magic, so maybe I shouldn't complain about this. But I assume this scroll is as lousy for warriors as it is everyone else.
__________________
Detailed account of my Ironman win here.
Grotug 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
Master of Magic TJS Idle chatter 5 August 14, 2017 14:44
Issues on current master Nick Vanilla 277 June 18, 2017 23:30
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
Artifacts in 3.2 (Master List) Tregonsee Vanilla 8 March 6, 2011 12:33


All times are GMT +1. The time now is 06:54.


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