As a rogue, I just recharged a staff of summoning and it went from 1 charge to 34 charges... none of which appear to do anything...
(feature branch, btw)
Current master post-4.1.3
Collapse
X
-
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.Leave a comment:
-
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!
Leave a comment:
-
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 nowLeave a comment:
-
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.Leave a comment:
-
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: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.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); }Leave a comment:
-
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: descriptionLeave a comment:
-
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.Leave a comment:
-
-
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.Leave a comment:
-
Starting with zero gold and zero stuff is perfectly viable as a warrior.
As a mage...less so.Leave a comment:
-
I just spotted something while working on my variant. If you go to constant.txt and set starting gold to zero, each character will start only with their starting equipment. However, if you set birth_start_kit to false, you start... with nothing. Like a plain "pitiful-looking beggar". This feels wrong... For my variant, I calculate the value of the items you don't get when birth_start_kit is not set and ensure every character starts at least with that amount of gold, so they could buy the same starting kit or different stuff of equivalent value. Consider adding that to V as well.Leave a comment:
-
-
-
Thank you kindly. I'll take a shot at the inscription options for those. Can't believe it never occurred to me.Leave a comment:
Leave a comment: