Help on adding room sectors [by Vestrial]
Snippet Posted Thursday, December 2nd @ 05:40:54 PM, by George Greer in the Rooms dept.
vestrial writes, "This is intended for newbie coders and adminstrators. If you have OLC and you like to increase the number of room sectors that you and your builders can choose from, then keep reading."

I use version 12 of circle3.0 and OLC 1.6b so keep that in mind as well.

First, make your way in constants.c. Then, Find the line that say const char*sector_type(about line 85). You will see a list of all the present sector type ending with /n. Put the new sector type just above the /n.(EG. "Swamp",)

Go to const int movement_loss in constant.c(line 880 or so) You will see a column of number. Notice that the last number in the column is without a comma. The numbers tell what how movement a player will lose when moving in that sector.

Structs.h

You will need to define the sectors you put in constants.c. The list of defined sectors is approximately 70 lines down. (EG. for the new sector swamp, it would look like

#DEFINE SECT_SWAMP            xx

OLC.H

This is the last you will have to change and then you can compile and reboot. You need to update the number of sectors that are in your mud. Go to the line that say number_room_sectors. Just change the old number and replace with the new amount of sectors.

You can compile and reboot now!!!!

<< Enhanced damage skill [by Gerold Fisher] | Reply | View as text | Flattened | FTP Uploads >>

 


Related Links
  vestrial
Related Articles
More by greerga
 
 

CircleMUD Snippets
 
Note: Not all of these snippets will work perfectly with your version of code, so be prepared to fix one or two bugs that may arise, and please let me know what you needed to do to fix it. Sending a corrected version is always welcome.
Finally, if you wish to use any of the snippets from this page, you are more than welcome, just mention the authors in your credits. If you wish to release any of these snippets to the public on another site, contact me FIRST.