[crossfire] Default hp/sp for exits

Nicolas Weeger nicolas.weeger at laposte.net
Fri Feb 18 12:54:16 CST 2022


Hello.


> I would like to set the default hp/sp in the archetype for exits to -1,
> which would make the default be to use the enter_x/y values for the
> target maps.  I expect these values are always overridden in the maps,

I like the idea, but I wouldn't guarantee that it's the case for all maps :)

It's pretty easy to check automatically, though.


> so the impact should be minimal, and it would make it cleaner when using
> a map's default entrance.  My thinking is to encourage the use of the
> default entrance, as it makes it easier to redesign a map without having
> to modify the maps that link to it.  (I ran into this on my server
> adjusting pocket reality maps, and I had to modify all existing
> apartments to make the changes work cleanly.)

Agreed, it's easier. You may need to change some warnings in the server, 
though, enter_map() will complain if supplied coordinated are invalid.


> I expect there are maps where the exit target is zero in one of the two
> coordinates.  Since doing a mix of default and specified coordinates is
> probably a bad idea, I would have the server convert a single -1 to a
> 0.  I would then only need to search through the maps for any exits with
> a slaying field but not hp or sp, just in case there are any 0,0 exits
> on purpose.

That can easily be checked automatically if needed.

Note that this is the current behaviour - if one coordinate is -1, then it'll 
be replaced by the default map enter x/y one (again, see enter_map()).

> I noticed a recent commit to all the guild maps to correct an exit
> coordinate, which might have been avoided by using the map default, but
> I'm not proposing a mass change to existing exits to convert them
> (eliminating coordinates on exits if they match the defaults for the
> target map), though that might not be a bad idea.

I guess it's easier to do that progressively once your changes are in place.


Best regards

Nicolas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part.
URL: <http://mailman.metalforge.org/pipermail/crossfire/attachments/20220218/21a895b5/attachment.sig>


More information about the crossfire mailing list