[Crossfire-wiki] [Crossfire DokuWiki] page changed: dev:objects

no-reply_wiki at metalforge.org no-reply_wiki at metalforge.org
Fri Dec 8 08:54:38 CST 2006


A page in your DokuWiki was added or changed. Here are the details:

Date        : 2006/12/08 08:54
User        : ryo
Edit Summary: format

@@ -1402,94 +1402,43 @@
  end
  </code>
  
  Where 5 is connected to a lever.  When the lever is pulled, if a sword object is on top, its number is doubled.  If there is anything else on top, it is unaffected.  If the lever it is connected to is not pulled, it is also unaffected.
+ 
  
  ===== Transports =====
  
- Tranports are objects that help the player move.  These should not be confused
- with EXITS, which instaneously transport a player from one map to another.
- 
- Instead, tranports may let the player move faster, give them move types they
- don't have, etc.  A simple example of this would a horse.  It doesn't let the
- player move anyplace he normally couldn't go, but lets him get there faster.
- Ships would be another case - the player normally can't move accross water,
- but with a ship, he can.
- 
- Meaning of various object attributes (KV means the value is stored in the
- key/value list, and thus the get_ob_key_value() and set_ob_key_value()
- routines need to be used.
- 
- move_type   	The move type this object has.
- move_allow	Normal meanings - useful for things like boats so people
- 		can actually get on the boat.
- speed 		How fast the object moves
- weight_limit 	How much this object can carry.
- weight_speed_ratio (KV)
- 		This value is taken as a percentage which is multiplied
- 		against against the weight this object is carrying (the
- 		player) - this is then divided by weight_limit to determine
- 		the effective loading to determine effective object speed, eg:
- 
- 		speed = base_speed - (base_speed * pl->weight *
- 			weight_speed_ratio) / (weight_limit * 100)
+ Transports are objects that help the player move.  These should not be confused with EXITS, which instantly transport a player from one map to another.
  
- 		Thus, if weight_factor is 0, this object will move the same
- 		speed no matter how loaded it is.  If it is 100, then
- 		if the transport is fully loaded, it moves at a crawl.
- 		In a sense, this somewhat mimics the player movement
- 		speed.  Large transports, like boats, should likely be
- 		largely unaffected by weight (maybe have this value at
- 		10), where something like a horse would have a relatively high
- 		value.
+ Instead, transports may let the player move faster, give them move types they don't have, etc.  A simple example of this would a horse.  It doesn't let the player move anyplace he normally couldn't go, but lets him get there faster. Ships would be another case - the player normally can't move across water, but with a ship, he can.
  
- base_speed(KV)	This is only needed if weight_speed_ratio is set - it is used
- 		to know what the base speed to use in the calculation (since
- 		speed is getting clobbered).  If this is not set and
- 		weight_speed_ratio is set, the archetypes speed will be used.
+ Meaning of various object attributes (KV means the value is stored in the key/value list, and thus the get_ob_key_value() and set_ob_key_value() routines need to be used.
  
- passenger_limit(KV)
- 		How many players this transport can hold.  Thus, boats can 
- 		transport a party (this being set to 6) while horses could
- 		only transport a single person.  If this is not set, a default
- 		of 1 will be used.
+ | move_type | the move type this object has |
+ | move_allow | normal meanings - useful for things like boats so people can actually get on the boat |
+ | speed | how fast the object moves |
+ | weight_limit | how much this object can carry |
+ | weight_speed_ratio (KV) | this value is taken as a percentage which is multiplied against against the weight this object is carrying (the player) - this is then divided by weight_limit to determine the effective loading to determine effective object speed, eg: speed = base_speed - (base_speed * pl->weight * weight_speed_ratio) / (weight_limit * 100). Thus, if weight_factor is 0, this object will move the same speed no matter how loaded it is.  If it is 100, then if the transport is fully loaded, it moves at a crawl. In a sense, this somewhat mimics the player movement speed.  Large transports, like boats, should likely be largely unaffected by weight (maybe have this value at 10), where something like a horse would have a relatively high value |
+ | base_speed (KV) | this is only needed if weight_speed_ratio is set - it is used to know what the base speed to use in the calculation (since speed is getting clobbered).  If this is not set and weight_speed_ratio is set, the archetypes speed will be used |
+ | passenger_limit (KV) | how many players this transport can hold.  Thus, boats can transport a party (this being set to 6) while horses could only transport a single person.  If this is not set, a default of 1 will be used |
+ | face_full | it may be desirable to have different faces to denote what the transport looks like if someone is on it vs not (mounted horse vs just a horse).  This is used to denote what it will look like when loaded.  If the transport becomes empty, it will fall back to the archetype face |
+ | anim_full | like face_full above, but for animated objects |
  
- face_full
- 		It may be desirable to have different faces to denote what
- 		the tranport looks like if someone is on it vs not (mounted
- 		horse vs just a horse).  This is used to denote what it will
- 		look like when loaded.  If the tranport becomes empty, it will
- 		fall back to the archetype face.
  
- anim_full	Like face_full above, but for animated objects.
+ ==== Usage/implementation details ====
  
- Usage/implementation details:
- To activate a transport, the player will apply it just like any other object.
- When this is done, the pl->contr->transport will point to the transport.
- If the player is the first to board it, then transport->contr will point to the
- player.  The player is placed into the inventory of the transport.
+ To activate a transport, the player will apply it just like any other object. When this is done, the pl->contr->transport will point to the transport. If the player is the first to board it, then transport->contr will point to the player.  The player is placed into the inventory of the transport.
  
- When on the transport, the player will see other objects on the transport.
- When the player issues a map command, if they are the 'captain', the
- tranport moves as directed.  If not, the move command is ignored.  Note
- that players on the transport can issue other commands (say, cast, etc).
+ When on the transport, the player will see other objects on the transport. When the player issues a map command, if they are the 'captain', the transport moves as directed.  If not, the move command is ignored.  Note that players on the transport can issue other commands (say, cast, etc).
  
- Some special handling is done relating the player and transport speed so that
- transport speed is used.  IF the transport doesn't have speed to move,
- the move command is ignored.  The player speed_left is set to -0.01 when
- on the transport - in this way, the player will get actions and not limit
- transport speed.
+ Some special handling is done relating the player and transport speed so that transport speed is used.  If the transport doesn't have speed to move, the move command is ignored.  The player speed_left is set to -0.01 when
+ on the transport - in this way, the player will get actions and not limit transport speed.
  
- When aboard a transport, the player will be in the inventory of the transport.
- The player can see other objects in the transport.  If the player drops an
- item, it is placed into the transport inventory, and not the map.
+ When aboard a transport, the player will be in the inventory of the transport. The player can see other objects in the transport.  If the player drops an item, it is placed into the transport inventory, and not the map.
  
- When hit_map() hits the transport, we examine look for all players in the
- transport and damage them as appropriate.  Note that items are not
- damaged.
+ When hit_map() hits the transport, we examine look for all players in the transport and damage them as appropriate.  Note that items are not damaged.
  
- As of this writing, transports are non living creatures, and thus can't
- be damaged.
+ As of this writing, transports are non living creatures, and thus can't be damaged.
  
  ====== Flags & specifications: (usage: flag value) ======
  
  Note: the flags are case sensitive.


IP-Address  : 213.174.127.3
Old Revision: http://wiki.metalforge.net/doku.php/dev:objects?rev=1165589388
New Revision: http://wiki.metalforge.net/doku.php/dev:objects

-- 
This mail was generated by DokuWiki at
http://wiki.metalforge.net/




More information about the crossfire-wiki mailing list