[crossfire] Making maps easier to maintain, by creating custom archetypes for duplicated objects.

Kevin R. Bulgrien kbulgrien at worldnet.att.net
Thu Sep 21 22:12:55 CDT 2006


Andrew Fuchs wrote:

> There are several instances in the maps, where custom objects where
> copied and pasted from other maps.  An example to this is the
> guidebooks in the post offices.  Recently the guide books in Scorn's
> post office where modified, but not the ones in other post offices.

Heh, heh, you spotted it before I had a chance to fix that eh?  Yeah,
I remembered this morning on the way to work that I had forgotten to
check the rest of the maps for those patterns.

> Anyone want to write a script to find duplicate custom objects in
> maps, or intergrate it into a map checking script?

The script thing interests me, but I'd have to get a bit more wise
about map structure parsing to run with it, though I have started to
look at a similar type thing already.  I have a crude script that I
put together to spell check the maps.  It knows a bit about the map
structure to try to avoid flagging certain words as misspelled.  I
imagine a duplicate object processing script could use the same type
of parser that a script like spell checker might.  If nobody else
jumps on it, I may look at it a bit.

The IPO thing, though, illustrates a bit of a problem with assuming
too much about copy/pasted custom objects.  One ofthe mods I made
would not have been detected in other IPOs if certain assumptions
were made.  The person to ask for help is named Colette in Scorn,
but in other towns the person was named Betina, Babs, postmaster,
etc.  The fix in the other IPO's had to be customized to match the
environment. Also, even though the object was basically copy/pasted,
it may have been renamed.  It would be easy to assume the script was
doing a good job and still miss edits, or the script might be more
flexible, but also more prone to flagging items that weren't really
the same.  Of course, there is the other side too, that ironically,
the instructions were copy/pasted and told the reader to ask Colette
for help even though there was no Colette in that IPO, so a real fix
needed to change the name of Colette to match the actual person in
that map.

Really, grep -r "borken sentence frag" . | grep -v ".svn/text-base"
works about as well as anything, though a good script might actually
let you auto-edit the located items once you checked each one out to
be sure it was legitimate.

-- 
Kevin R. Bulgrien





More information about the crossfire mailing list