[CF-Devel] Features suggestions
crossfire-devel-admin at archives.real-time.com
crossfire-devel-admin at archives.real-time.com
Sun Jul 27 17:19:46 CDT 2003
Nicolas Weeger wrote:
>
>>
It would require some changes, but I believe a common function (or
>>
functions) is used for matching names, so it wouldn't be that much
>>
harder.
>
>
>
From what i remember of the code (ok i don't know it by heart, but have
>
browsed it some), indeed... and actually one is partly broken somewhere,
>
since sometimes 'apply Thei' (for apply ring of Thieves <- note the
>
typo) can result in apply a haggis...
Well, the code that does matching (for player specified subnames) tries to get
the best match, through a bunch of different criteria (exact object name match,
substring, and some other ones I think). I don't know why a Thei would match a
haggis, but probably some reason.
It could be nice for player to specify how loosely a match could be, but since
the match routine basically uses non well defined values, that would be a bit
harder to document well.
>
>
But are functions actually checking an item's name that many? I think
>
for instance the god enchanting weapon one (to punish you if you have an
>
item of another god), but are there others?
>
Also, i'll point out that the prepare weapon actually changes the name
>
(weapon->name) of the prepared item, so changing an item's name isn't
>
that bad apparently ^_^
Difference in this case is that the player is being given a lot more leeway in
terms of what the name of the object may be. With existing code, the player
really can't control what the item will be named that much. It is basically
'weapon of <x>', where x is the player name or the god name.
>
To avoid that kind of bugs, i was thinking of
>
1) only allowing containers & freely writable scrolls to be renamed (not
>
something you often sacrifice i'm sure)
>
2) adding in front the item's type, like 'scroll: alchemy list A' or
>
'quiver: Fire Arrows'. This will ensure the name mentions the original
>
item's type. Of course maybe putting dots is bad, don't know
I can say with a high degree of certainty, that at some point #1 won't be
sufficient - players will want to be able to rename any object in their inventory.
I personally don't think it would be that much more difficult to just add
another field to the object which is a custom name for the object. It's a bit
more work, but not a whole bunch.
Note that the other advantage of a new field is that the original name is
always available (for example, if someone did make a quest where you had to
sacrifice the bag of valhalla, which is a special item, but a player renamed the
bag of valhalla, he could be somewhat screwed). Since sacrifices would still
deal with the items real name, that wouldn't be an issue.
>
>>
There would of course have to be some exception handling for unique
>>
maps/apartments, so that the custom name doesn't get stripped for
>>
items that should legitamately keep their name.
>
>
>
Would introducing that exception be all right? I'm afraid it'd somewhat
>
make the code less readable, having too much special stuff...
I'd think it'd be alright. The unique map/floor code already has some number
of special behaviour, and adding another one wouldn't seem like that big an issue.
_______________________________________________
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