> Date: Tue, 27 Jun 2000 23:21:12 -0700 > From: Mark Wedel < mwedel at scruznet.com > > > Frank McKenney wrote: >> >> - 'Inventory:' items are no longer pluralized... until I drop them. >> Once an item moves ot the 'You see:' window, it gets pluralized. >> If I pick it up again, the plural vanishes. E.g., >> >> "20 gold coin" -> "20 gold coins" -> "20 gold coin" > > This is more because the client is supposed to handle the pluralization of > words. This was done somewhat to conserve bandwidth (save transmitting the > names when the only thing that has changed is the number.) > > However, the client doesn't do that right now. I think at one time I had > attempted to write the client in to do that, but it did it incorrectly on enough > items it appeared more annoying than the usefulness gained. > > A better approach would be to only send the name when the number of items > change which also causes a change in the plural form (basically, if old or > number of items =1, resend name). The problem with that approach is that the > function that updates the client doesn't know the old value, and even many > calling functions don't explicity know the value. I suppose an old_nrof field > could be added to the object structure and use that to know if we should update > the name or not. > That seems like a terrible approach. I think it makes far more sense to approach it similar to that for images. Image names are sent by the server and if the client doesn't have that image then client requests it from the server. Object name should be sent by server and if client doesn't know the plural of that name then it requests the plural name from the server. Client should quickly be able to cache every plural name. The artifacts file would thus have new option "plural" which is the name of the plural form of the object. It would default to merely adding an 's' to the singular form of the object. Thus, only irregular plural items would need to have the plural form specified. This approach also allows the client to know that a single gold coin is the same item type as "gold coins" since client knows them as being the same item name but with different display names. Also, this approach allows current clients to continue unchanged while new clients know to ask the server for the plural name. sdw