[crossfire] Obsolete flags

Mark Wedel mwedel at sonic.net
Sun Apr 22 00:22:29 CDT 2007


Nicolas Weeger wrote:
> Hello.
> 
> There are quite many obsolete things in loader.l, so I'd like to remove'em, 
> but not sure on some things. Also it'll require some map/arch cleaning.
> 
> First, those flags:
> * has_ready_rod
> * has_ready_horn
> * has_ready_wand
> mapped to FLAG_READY_RANGE
>>From what i read from the monster handling code, this ready_range flag is 
> actually not required, it'll be calculated again. So IMO those three flags 
> should be removed totally.

  Probably true - I can't remember now, but certainly at one point, they were 
used internally - I don't know if they were ever saved out to any maps.

> 
> * can_use_wand mapped to FLAG_USE_RANGE
> 
> many archetypes use this flag, many in maps... So should be cleaned like 
> crazy :)

  At the same time, are there any other can_use_... flags out that that have 
been replaced/supserseded?

> 
> 
> * immune
> * protected
> * vulnerable
> those kind of conflict with the resist_ values, they'll "override" or mess 
> with them.
> Unfortunately many (~400) maps still use those, so updating won't be easy.

  yes - like most things in the loader, it supported using these values along 
with the new, but having both set in the same object was never really considered 
supported.

> 
> * armour, which should be resist_physical, doesn't seem to be used much.
> 
> Any volunteers for helping to clean ? :)

  Can't most of this be automated with scripts?

  For flags that just go away, it'd seem to be a simple 'remove this line' type 
of logic - not hard at all.

  The immune/protected/vulnerable may be a little trickier, because if an object 
is using those plus the resist values, just putting in the corresponding values 
based on the immune may conflict with those other ones.  However, I'd think that 
would be something pretty easy to catch - only in those cases where that is 
happening would manual interaction be needed - otherwise, this could be automated.

  It'd also seem to be that baseline scripts that do this conversion would be 
useful - it would be a good starting point so if down the road, something else 
is obsoleted, change the script a little bit and you are good to go.

  I think there may already be some scripts out there that do this sort of 
thing.  I know I wrote some for the map updates (to update exits & whatnot).




More information about the crossfire mailing list