[CF-Devel] Housing

crossfire-devel-admin at archives.real-time.com crossfire-devel-admin at archives.real-time.com
Sat Jun 21 05:01:50 CDT 2003


After long thought on this and and discussions with a few people I have modified my thoughts on how to go about housing.  I wanted to mention my further thoughts on this.

I am not going to do it in Python.  I would have loved to do this in Python since I had much of the code and stuff done and am much more comfortable with it (especially the template stuff), but in the end I wanted to have housing work with guild halls and thus it has to work as part of the core server, and bottom line is that the Plugin is optional and should remain optional for now...  SO it will be done in c then.

The model I want to follow is like this:

Zoning and building houses.  

Map makers can layout (or DMs can create) a 'zoning permit' or 'Zone' on the ground tiles they will allow development on - this will basically just be an an empty arch with a picture that looks something like the goldfloor arch indicating that square is one 'zoned lot'.  I haven't decided if there should or shouldn't be different zone types but I am leaving the door open for this.

Players will purchase a housing blueprint representing a certain type of building (there will of course have to be an arch for each type of building availabe to be built containing the building information, the type of structure, the exit arch, a description, the price, the zone...) for an awful lot of money. Players will take the blueprint to the zoned tile they want to build on and activate it - it will turn into a building arch (unique) of the appropriate type, a set of maps will be created from templates in /var/crossfire/maps/buildings/<playername>/<building_type>/. The templates function like the existing guild maps (or if you saw the house templates I posted in the past) - so that these are shared spaces with a proportion of unique floors and access controlled by a playerforce or a key (key is for letting your friends in or for your half-orc girlfirend...) and certain areas keyed to detect them.  
The template part of the maps is just assigning the proper values into the slaying fields and the main map exits when writing the map to the var folder.  
This will have to support multipart buildings (initially for guild houses, but also for castles and such, which will be frightfully expensive) so the code will check if there are sufficient free group of zoned tiles for the building.  For cases like guilds the guildname will substitute for the player name.

Now as far as i am told if I create a building arch (name bob's house, slaying /buildings/bob/house/house), set this building arch on the map and flag it unique it will stay there...written to unique-items. The whole thing hinges on being able to do this. So I hope it's true or that garbled will make something work for me here if it isn't.

If the player quits or the guild goes defunct (more on this in the guild in the guild proposal) - the buildings under that player/guild name are removed and the map is removed from var/crossfire/maps and unique-items. (not the same - the house should survive the items in it)...
The server admin can also remove either the maps in the var directory by player name when deleting inactive characters and/or the entries in the unique_items directory when necessary (thinking of a script or DM command for this...)
Also I think that only one of each type or a max number of buildings (or both?, based on building?) can be assigned to control the number of buildings a player or guild can own (likely checking the subfolders...)

There should be a way for a player to destroy a building they own as well, that should be simple enough using the same techniques as used to clean up defunct buildings...

This is both a lot simpler method and more automated than what I initially had working on my server using the Python plugin (buying and selling houses - creating the maps from the templates but only manual exit arch placement...) but isn't as fragile or as much of a pain.  I know there was a suggestion to allow players to build houses on any open land (within reason - using some type of checking routine) but the two main problems I see with that are updating maps (what if someone builds a mountain range where your house is? - houses will be different on any given server) and controlling the litter (players building all over the freaking place - outside good dungeons, in front of someone elses front door, and in the way of other buildings) - it was too much to worry about.  I think the Zoning is a good way to make it easy to add housing while not causing too many problems.

As for zone types, I thought of making a simple list of different zones to have in the zone object (have to make it an simple object then but that might be good anyway for future development - say a parent country field for event/tax/statistics purposes... or commercial/residential for guilds vs homes) which the blueprint object would check for - this would allow you to build say caves only in the mountains or perhaps terrain appropriate house arches like tents in the desert or city appropriate building styles.

That's what I am thinking of doing anyway.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
     
     http://shadowknight.real-time.com/pipermail/crossfire/attachments/20030621/381383c7/attachment.htm
     
     
    


More information about the crossfire mailing list