[CF-Devel] random door styles

crossfire-devel-admin at archives.real-time.com crossfire-devel-admin at archives.real-time.com
Tue Sep 23 01:02:19 CDT 2003


Todd Mitchell wrote:
>
     
      I made a change in random_styles/door.c to allow for some special random
     
     >
     
      doors like rocks or shrubs spiderwebs you can chop away at.
     
     >
     
      I did this for some sylvan maps I was playing with, but it could be
     
     >
     
      useful otherwise as well I think.  Rather than having weird doors
     
     >
     
      showing up in old random maps I made it so that these have to be
     
     >
     
      specified in the message field as 'doorstyle special/x' where x is the
     
     >
     
      style.  If 'special' is not specified the normal doors will be used.
     
     
  I'd think I'd like this code to be a little more flexible.  Instead of looking 
for 'special', I'd rather that it does something more generic to see if there is 
a / in the style name.

  Or alternatively, have it just look for the stylename as set, and if it 
doesn't find it, then have it fall back to looking for hdoor/vdoor paths.

>
     
     
     >
     
      The next step I think is to do some things to doors to make them a bit
     
     >
     
      more interesting - like have a flag for turning off the traps, a level
     
     >
     
      for lockpicking attempts.
     
     
  Looking at the code, it appears it basically just copies the object from the 
style map onto the map in question.

  Thus, you can disable traps by setting 'randomitems NONE' in that object.

  Note that currently, the lockpick code looks at just the difficulty of the 
map.  It wouldn't be hard for it to look at the level of the door.  And in that 
case, once again, just setting the level in the door object on the style map 
would be enough.

>
     
     
     >
     
      I did notice a weird glitch when 'doorstyle special' is used (to get a
     
     >
     
      random map from the special directory) it does correctly look for a
     
     >
     
      random map in special (shows as loading a random map in the log anyway)
     
     >
     
      but the doors arent actually put on the map all the time...?
     
     
  I think that is the case - you could probably look at the parameters used to 
build the map and generate an ascii one.  I think sometimes it decides to just 
leave empty spaces instead of doors.  This may depend on the style of the map.



_______________________________________________
crossfire-devel mailing list
     
     crossfire-devel at lists.real-time.com
     
     
     https://mailman.real-time.com/mailman/listinfo/crossfire-devel
     
     
    


More information about the crossfire mailing list