[CF-Devel] CFEditor cleaning up

Mark Wedel mwedel at sonic.net
Fri Aug 9 14:53:37 CDT 2002


Andreas Vogl wrote:
>
     
      in reply to Mark W.:
     
     >
     
     
     >
     
     
     >>
     
     Any reason the editable field can't be used for sorting 
     
     >>
     
     like crossedit does? Note one difference there is the
     
     >>
     
     editable field is a bitmask, so in crossedit, 
     
     >>
     
     an item can appear in multiple categories. Not sure how
     
     >>
     
     easy that is to do.
     
     >
     
     
     >
     
     
     >
     
      Yes, using that field would be the easiest approach.
     
     >
     
      The reason I don't like it is that so many arches
     
     >
     
      are assigned to wrong cathegories because the creators
     
     >
     
      didn't know what the editable flag means.
     
     
  That is of course fixable.  One could argue that sorting by directory isn't 
quite foolproof either.

>
     
     
     >
     
      Now this reminds me of an old idea about this:
     
     >
     
      It would be very useful to have a script that goes through
     
     >
     
      all arches and automatically assigns a correct editable
     
     >
     
      flag to all arches.
     
     >
     
      The script could assign the editable values dependant
     
     >
     
      on the arch attributes. For example: All arches with
     
     >
     
      "is_floor 1" and "type 0" are part of the FLOOR cathegory,
     
     >
     
      all arches with "type 66" or "type 41" could be exits
     
     >
     
      and so on.
     
     
  Could be done.  However, one could also argue that the editor could look at 
those some attribute values and decide where to place the object (what lists).

  It certainly wouldn't be hard to write a script to make sure the editable 
field is 'sane', or that it at least has one.

  To me, the biggest problem is probably the backgrounds - you probably want to 
seperate that indoor backgrounds (cobblestone, woodfloor, etc) from the outdoor 
ones (woods, mountains, etc).  However, they have the same attribute flags (no 
pick, no type, is_floor).

If we want the editable field to be computer generated, pretty easy to do as 
part of the collect script.  You could even leave it as the java editor does it 
- assign editable based on which directory the file is from.

  The reasons to let it be done by humans is things may be in multiple 
categories (is a crown a helmet, or treasure/jewel?  Perhaps both).

  I wonder how many arch's are actually mistyped with the wrong editable flag. 
My guess is not too many - probably the bigger problem is the number of arch's 
that are missing the field.

  If you look at the current editable list, there are also some categories that 
are hard to do automatically, like shop.  shop contains the floors, but also 
contains things like the mats (which would appear more like an exit type), the 
anvils (converter type), as well as just the empty floor.

  If the editable really is screwed up for a large number of arcs, then perhaps 
an automated method would be the right approach.  However, I think there are 
certainly advantages to having it be humanly set (the artifacts entry would be 
another that would be very impossible to set automatically).

  It should be noted that the editable is a 32 bit value, and there are only 13 
currently in use, so there is a lot of room for expansion on this.  Here is the 
current list:

*1 (1)  Monsters                - all monsters, generators and NPC's
*2 (2)  Exits                   - all buildings, towns, teleprorts and other
                                 exits
*3 (4)  Treasures               - Normally used maps as treasures
*4 (8)  Backgrounds             - different backgrounds (floors, woods, etc.)
*5 (16) Gates and door          - everything that can be opened or closed
*6 (32) Special                 - directors, spinners, firewalls
*7 (64) Shop                    - All items needed in shops.
*8 (128) Normal objects         - sacks, signs, gravestone, furnitures etc.
*9 (256) False walls            - Walls that can be destroyed or
                                 broken through.
10 (512) Walls                  - different walls, caves, dungeons etc.
11 (1024) Equipments            - mainly weapons and armours
12 (2048) Rest treasures        - foods, scrolls, potions, jewels, etc
13 (4096) Artifacts             - Named weapons, special armors, etc

  Equipment could certainly get split between armor and weapons.  Backgrounds 
better split.  Not sure if there may be others.




    
    


More information about the crossfire mailing list