I run a modified version of the 095 distro on the 096 core.
Any time I create a new type of item and give it a desc like "unused bar of soap", it always shows up in game as "a unused bar of soap". I want the article there, and for stacking to remove it (which works fine), but it should be "an unused bar of soap" since the first letter of the desc starts with a vowel.
Apples and such show up correctly ("an apple") and stack correctly, so why when I add an item does this not work? Any idea how to fix this?
Articles a/an
To add: looks like even items like that in the distro like "orc mask" show up as "a orc mask"... but yet, the itemdesc entry for that doesn't seem to have anything different from the itemdesc entry for "apple" that would change this behavior.
Even more strange is that "arrow shaft" doesn't get an article at all, and yet the itemdesc entry doesn't seem to have anything that would affect this.
Anyone know where the magic is happening?
Even more strange is that "arrow shaft" doesn't get an article at all, and yet the itemdesc entry doesn't seem to have anything that would affect this.
Anyone know where the magic is happening?
From what little I know, the core prepends a/an to a name only if servspecopy.cfg has
UseTileFlagPrefix=1
In pol096/7 it looks to the tiles.cfg file to change it. (It would have to be one of the UoFlags)
If you use mulpatcher you will see that the a/an flag is set on each art tile in tiledata.mul. When building the 096/097 files, you get to create tiles.cfg from tiledata.mul. That sets each tile with the flags that the core uses.
So you can either figure out which of the UoFlags is responsible for a|an or use mulpatcher to set the flag and then rebuild tiles.cfg.
Your problem may well be that you set the objtype different from the graphic, and the graphic a/an rule is correct.
If the above is wrong, please correct me.
UseTileFlagPrefix=1
In pol096/7 it looks to the tiles.cfg file to change it. (It would have to be one of the UoFlags)
If you use mulpatcher you will see that the a/an flag is set on each art tile in tiledata.mul. When building the 096/097 files, you get to create tiles.cfg from tiledata.mul. That sets each tile with the flags that the core uses.
So you can either figure out which of the UoFlags is responsible for a|an or use mulpatcher to set the flag and then rebuild tiles.cfg.
Your problem may well be that you set the objtype different from the graphic, and the graphic a/an rule is correct.
If the above is wrong, please correct me.
Has taken me a while, sorry, but you're correct, OldnGrey. Looks like whatever the prepend setting in tiles.cfg is for the graphic you're using for you're custom item is what gets used. So if you make an item called "orange box" with the graphic of a crate, you end up with "a orange box" because the prepend setting in tiles.cfg for the crate graphic is 'a'.
This seems like something we should be able to get around. Maybe set POL so that if DescPrependA or DescPrependAn is set in itemdesc.cfg it would override either of those prepend settings in tiles.cfg?
*looks to the POL core guys*
This seems like something we should be able to get around. Maybe set POL so that if DescPrependA or DescPrependAn is set in itemdesc.cfg it would override either of those prepend settings in tiles.cfg?
*looks to the POL core guys*
I have thought about that. Of course "doing it myself" would mean handling the prefixes at any time stacks were created or unstacked. There's a big problem with that even if I had the time to handle that mess, though. The desc property is, yep, read only. Then I would have to turn to the name property. Now, if you have a command like .point, have you ever made an item with a stackable name such as "sack%s%" and pointed at it? Clicking on it looks fine, but display its name in text like .point you would see "sacks%s%" with the percent symbols. That would have to be handled wherever item names were retrieved as well.
Another way would be to add duplicate tiles to tiledata.mul for every graphic for which you will be using prefixes. Of course not only is that super tedious, but then you have a nice funky tiledata file for all your users to download. Not to mention compatibility issues.
But the short answer is no, I think it would be a tedious misappropriation of effort and processing power to accomplish something that seems to me should be an easy option setting in an itemdesc.cfg file.
Another way would be to add duplicate tiles to tiledata.mul for every graphic for which you will be using prefixes. Of course not only is that super tedious, but then you have a nice funky tiledata file for all your users to download. Not to mention compatibility issues.
But the short answer is no, I think it would be a tedious misappropriation of effort and processing power to accomplish something that seems to me should be an easy option setting in an itemdesc.cfg file.
I noticed that the use of "a" or "an" can be switched off or on, I quote from the changelog.txt from POL 096.6 vestal virgin, although it looks like the option has been there before that :
03-05 Shinigami
Added : UseTileFlagPrefix=0|1 in SERVSPECOPT(.LOCAL).CFG (default = 1)
Should Core prepend "a"/"an" according to tiles.cfg flags to formatted item names?
(p.s.: in 08-29 renamed from UseAAnTileFlags to UseTileFlagPrefix)
03-05 Shinigami
Added : UseTileFlagPrefix=0|1 in SERVSPECOPT(.LOCAL).CFG (default = 1)
Should Core prepend "a"/"an" according to tiles.cfg flags to formatted item names?
(p.s.: in 08-29 renamed from UseAAnTileFlags to UseTileFlagPrefix)