[CF-Devel] Features suggestions & questions

crossfire-devel-admin at archives.real-time.com crossfire-devel-admin at archives.real-time.com
Wed Jul 30 23:56:42 CDT 2003


Nicolas Weeger wrote:
>
     
      Hello.
     
     >
     
     
     >
     
      I've been starting to check how to implement a custom name for items.
     
     >
     
     
     >
     
      As I see it, I need to tweak loader.l to correctly load/save the custom 
     
     >
     
      name, object.c for copy/free, and arch.c:item_matched_string to handle it.
     
     
  CAN_MERGE would also need to be updated.

>
     
      I got a question related to client side, though: would it be better to 
     
     >
     
      see the custom name in inventory window? or keep original name?
     
     >
     
      I'd rather see the custom name, so you don't have to examine items to 
     
     >
     
      know their custom name. But maybe that would break some things? As i see 
     
     >
     
      the code, it's just a matter of replacing 'name' with the custom name in 
     
     >
     
      the sending code (at least 3 times [almost] the same code, btw...).
     
     
  I can't see how sending the custom name to the client would break anything. 
Presumably, if the player sets a custom name for an object, he wants to see it.

  Perhaps add a new F_ value (F_CUSTOM_NAME) in the newclient.h so the client 
can easily know it is a custom name and do something clever with it.  Looks like 
the flag field is 4 bytes, so no problem there.

>
     
     
     >
     
      Also should name be saved when dropping the object? I'd say yes so you 
     
     >
     
      can exchange stuff with others. And also don't lose the name by simply 
     
     >
     
      dropping ^_^
     
     >
     
      Of course that may cause troubles if a player sees an item with a custom 
     
     >
     
      name & doesn't check the real name...
     
     >
     
      What do you think of that?
     
     
  I think the name has to be stripped in some cases.

  Certainly, anything sold to a store should lose its custom name.  do you 
really want to see a store with all sorts of misnamed objects?

  I agree that you want to be able to exchange things.  But at the same time, I 
don't think custom names should persist for ever.

  That is why I suggested that if a map is being saved, it strips the custom 
name at that point unless the item is being saved to a 'permanent' map, like an 
apartment.


_______________________________________________
crossfire-devel mailing list
     
     crossfire-devel at lists.real-time.com
     
     
     https://mailman.real-time.com/mailman/listinfo/crossfire-devel
     
     
    


More information about the crossfire mailing list