[Crossfire-wiki] [Crossfire DokuWiki] page changed: dev_todo:fancy_generators
no-reply_wiki at metalforge.org
no-reply_wiki at metalforge.org
Thu Dec 6 00:52:06 CST 2007
A page in your DokuWiki was added or changed. Here are the details:
Date : 2007/12/06 00:52
User :
Edit Summary:
@@ -38,13 +38,16 @@
* The other key would allow spawner to get into slower mode - where it works twice slower, but probably with the same max capacity.
Please add new ideas here.
+
==== Implementation ====
So far, I've added the ability for generators to create monsters within a radius, which is set with the ''generator_radius'' field in the object. This defaults to 1 if not set. Patch for this is at [[http://baugher.pikenet.net/cf/generator_radius.patch]].
The limit has been implemented. Patch is here: [[http://baugher.pikenet.net/cf/generator_radius.patch]]. If a generator has ''generator_max'' set, it will only create new objects when there are less than that many objects belonging to it already on the map. This works a little funny at the edges of tiled maps: If the generator creates a monster on the neighboring map, it won't be counted, so it could end up creating more than the limit. I'm not sure whether this is really a problem, but if it is, it could be fixed by preventing the generator from creating monsters on other maps.
+
+ Note from mwedel: current implementation of finding out how many monsters a generator has generated is highly inefficient - looking at all objects on the map can be a very time consuming process if there are large piles of treasure. A better approach would be to look on the active object list, on the basis all monsters are active objects, and then narrow the search criteria. Even on maps without treasure lists, this may be a gain - taking a quick look at metalforge, there were 3205 active objects when I logged in. A 50x50 world map is sure to have at least 2500 objects.
Both these changes have been committed to trunk.
IP-Address : 209.204.178.229
Old Revision: http://wiki.metalforge.net/doku.php/dev_todo:fancy_generators?rev=1171728636
New Revision: http://wiki.metalforge.net/doku.php/dev_todo:fancy_generators
--
This mail was generated by DokuWiki at
http://wiki.metalforge.net/
More information about the crossfire-wiki
mailing list