[crossfire] Various adjustments

Mark Wedel mwedel at sonic.net
Sat May 9 19:52:31 CDT 2020


On 5/8/20 11:41 AM, Kevin Zheng wrote:
> On 5/8/20 9:15 AM, Rick Tanner wrote:
>> I see no help file exists for fix_me, but I found this in the ChangeLog:
>>
>> fix_me command added - basically just calls the fixme function.  Can be
>> useful if you that your characters weight is for some reason incorrect.
>> Another commit added "Add sum_weight() call to fix_me command so that
>> players weight is properly recalculated"
>>
>> Looks to me that fix_me should remain accessible to players?
> 
> I agree. Ideally, we would not need a fix_me command, but until all the
> bugs are squashed, I think this should be available to players.

  IIRC, main issue is when picking up or dropping lots of stuff, and I suspect there is probably some interaction with containers that reduce weight of things inside of it.

  fix_me (which maybe should really be called fix_weight?) has to go through every item in the players inventory to calculate things correctly.  As such, if player has tons of stuff, it is not most efficient, though this was probably more an issue when computers were much slower and fix_me took a measurable amount of time.  And I think some of the issue is one wouldn't want to call this function everytime an item is picked up or dropped, because if someone is doing a dropall or has pickup mode all on, this could get called hundreds of times in one tick.

  It might be interesting to measure how long it takes now on a character with lots of items to run this.  One thought is to just call this every Xth tick or something  if it is sufficiently fast on current hardware.

> 
>> As for forget_spell - I have heard from players they use that to keep
>> their spell list short, or to get rid of low level spells (i.e., cause
>> light wounds when they have cause critical wounds) that are no longer
>> used. Otherwise, I am not sure why one would use this command.
>>
>>  From my testing, forget_spell was available as a player. It is listed as
>> a dm_command though on the wiki and as best as I can tell should be a DM
>> only ability? lib/wizhelp/forget_spell
> 
> I added this command. I initially designed it for DM's (as an undo for
> learn_spell), but agree that it's useful to players.
> 
> I'm not sure if this could be abused; you could repeatedly learn and
> unlearn low-level spells. But what would that give you?

  I thought you got literacy experience each time you learned a spell (though could be mis remembering).  As such, anytime you found a spellbook, if you already knew the spell, you forget it, and then re-learn it from the spellbook you found, gaining a little more literacy experience.  I'm not sure if that is really an abuse, though if that is intended (or lack of better term), probably some better interface to do that would be desired - an option to read (consume) the book for some amount of experience if you already know the spell.


More information about the crossfire mailing list