[CF List] Re: [CF:1366] CF 0.95.6: Character lost at sea, odd behavior following recovery

Mark Wedel mwedel at scruznet.com
Wed Jun 28 02:05:58 CDT 2000


scott wrote:

>
     
      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.
     
     
 You can do this on a object by object basis in the players inventory.

 However, unlike the images were names are constant, object names are much more
dynamic.  For example, there is no 'wand of fireballs' listed in the archetypes
- rather, this is an item name that is generated at runtime.  Item names can
even change in the players inventory as more information is found out.

 For example, unidentified potions are just named 'potion(s)'.  When you get
them identified, they may then become 'potions of strength'.  The end result
would then be that client would have to see this name change and know that its
current cached result for the singular of the item is no longer accurate
('potion').

 A simpler approach, which would break compatibilty some, would be to just
always send both the singular and plural version of the name whenever we send
the name for something in the inventory.  That way, the client never needs to
request anything of have to worry about having an incorrectly cached entry.  And
this would not even be that hard to do - you could check the client version
number and only in recent versions do this.  Don't change the protocol, but
instead add some character that would never occur in the item names as a string
seperator (say control A).  So even if a client does claim to support this but
doesn't really, it will just have slightly strange item names and would not
completely blow up.

 Fortunately, not too many places send the item names (login, and some things
that change state - looking for UPD_NAME, I see it in apply.c (probably for
enchanting items), gods.c, and spell_effect.c (identify & the like).  So it
wouldn't suck up that much more bandwidth.

    
    


More information about the crossfire mailing list