Articles a/an

Here you can post threads requesting help on the official POL Ultima Online Emulator Core 096.
Note: Core 096 is no longer officially supported.
Post Reply
Erin
New User
Posts: 7
Joined: Fri Jun 29, 2007 10:39 am

Articles a/an

Post by Erin »

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?
Erin
New User
Posts: 7
Joined: Fri Jun 29, 2007 10:39 am

Post by Erin »

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?
runtest
Grandmaster Poster
Posts: 194
Joined: Sat Aug 05, 2006 11:43 am

Post by runtest »

Someone who loves grammar. Yes, I feel the pain, the lifestyle. :grin: :D
User avatar
OldnGrey
POL Expert
Posts: 657
Joined: Sat Feb 04, 2006 6:26 pm

Post by OldnGrey »

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.
runtest
Grandmaster Poster
Posts: 194
Joined: Sat Aug 05, 2006 11:43 am

Post by runtest »

an pre-ceding a long vowel auch as ORE INGOT and a following a const like long, boat or unit. (also short vowels)
Erin
New User
Posts: 7
Joined: Fri Jun 29, 2007 10:39 am

Post by Erin »

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*
User avatar
OldnGrey
POL Expert
Posts: 657
Joined: Sat Feb 04, 2006 6:26 pm

Post by OldnGrey »

Now we know why OSI doesn't have objtypes different from the graphic!
Of course knowing WHY is not the same as fixing it.

As a matter of interest, have you thought of the implications of the servspecopt flag UseTileFlagPrefix
Are you willing to script around not having a/an at all?
Erin
New User
Posts: 7
Joined: Fri Jun 29, 2007 10:39 am

Post by Erin »

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.
Yukiko
Distro Developer
Posts: 2826
Joined: Thu Feb 02, 2006 1:41 pm

Post by Yukiko »

You could always set prepend option to no and script around the issue when assigning names to add the appropriate article. A messy business I know but unfortunately English is a sticky language.
Justae
Expert Poster
Posts: 79
Joined: Thu May 24, 2007 2:12 pm

Post by Justae »

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)
Post Reply