[CF-Devel] random door styles

crossfire-devel-admin at archives.real-time.com crossfire-devel-admin at archives.real-time.com
Wed Sep 24 01:04:27 CDT 2003


On Tue, 2003-09-23 at 02:02, Mark Wedel wrote:
>
     
      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.
     
     
 if(vdoors=find_style("/styles/doorstyles",doorstyle,-1))
	hdoors=vdoors;
 else{
  	vdoors = find_style("/styles/doorstyles/vdoors",doorstyle,-1);
 	if(!vdoors) return; 
	sprintf(doorpath,"/styles/doorstyles/hdoors%s",strrchr(vdoors->path,'/'));
  	hdoors = find_style(doorpath,0,-1);
 }

- is this good then?  Actually this is simpler yes and I see no need to
have it pick a random style from the special folder (why I did it the
other way first) as I can make a style map with all the different
special types on it.

>
     
     
     >
     
      > 
     
     >
     
      > 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.
     
     >
     
     
     
oops silly me. I was wondering why the rocks had traps when obviously
there were no randomitems in the mountain3 arch... but I'm not using the
mountain3 arch - I'm using the door arch.... Doh.


_______________________________________________
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