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

no-reply_wiki at metalforge.org no-reply_wiki at metalforge.org
Fri Dec 1 07:47:26 CST 2006


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

Date        : 2006/12/01 07:47
User        : ryo
Edit Summary: format

@@ -901,21 +901,22 @@
  should contain background information on the object, or other somewhat general 
  details about the object.  It will be put into books, possibly used by npc's
  and other places where general knowledge should be presented.
  
- ===== MOVEMENT TYPES =====
  
- The movement types (MOVE_..) is a bitmask that determines which method
- of locomotion the object is using, and is also used to determine what
- types of movement the space blocks.  From define.h:
+ ===== Movement types =====
  
+ The movement types (MOVE_..) is a bitmask that determines which method of locomotion the object is using, and is also used to determine what types of movement the space blocks.  From define.h:
+ 
+ <code>
  #define MOVE_WALK       0x1     /* Object walks */
  #define MOVE_FLY_LOW    0x2     /* Low flying object */
  #define MOVE_FLY_HIGH   0x4     /* High flying object */
  #define MOVE_FLYING	0x6	/* combo of fly_low and fly_high for easier checking */
  #define MOVE_SWIM       0x8     /* Swimming object */
  #define MOVE_BOAT	0x10	/* Boats/sailing */
  #define MOVE_ALL        0x1f    /* Mask of all movement types */
+ </code>
  
  MOVE_ALL may change in the future - it is mask for all movement types -
  used for 'no_pass' - it sets move_block to MOVE_ALL, other places that
  check for all movement types may also use this value.
@@ -932,24 +933,30 @@
  removed, eg, 'walk', 'fly_low', 'fly_high', etc.  Multiple types can be
  listed, seperated by a space.  In addition, a - (minus) can precede the name,
  which means to negate that type.  These are all equivalant:
  
+ <code>
  move_block 6
  move_block fly_low fly_low
  move_block flying			(special symbolic name)
  move_block all -swim -walk -boat
+ </code>
  
  Note the order when using the -(negation) is important - the string is parsed
  left to right.  This is not equivalant to the above:
  
+ <code>
  move_block -swim -walk -boat all
+ </code>
  
  Because it will clear the swim, walk and boat flags, and then set the flags to
  all.
  
  Also, using only negation is not allowed - you can not do:
  
+ <code>
  move_block -walk
+ </code>
  
  To indicate you want to remove only the walk blocking from the archetype -
  you must include a positive indicator.
  
@@ -961,99 +968,69 @@
  Be aware that when the field is saved out, it may not be saved exactly as it
  was specified in the load file.  This is because the server converts the
  string to an int at load time, then converts it back to a string.
  
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- The fields in the object themselves:
+ ==== The fields in the object themselves ====
+ 
+ === move_type ===
+ 
+ Bitmask of above values which determines what form of movement this object uses.  For objects equipped by player/monster, move_type grants that movement.
+ 
+ Note that move_type of MOVE_FLY (0x2) replaces FLAG_FLYING.
+ 
+ In general, creatures will only have 1 movement type active at a time.
+ 
+ === move_block ===
+ 
+ Represents what movement types are unable to pass this space. If the creature has multiple movement types, they may still be able to pass the space.  For example, a player has MOVE_WALK | MOVE_FLY. He tries to move onto a space that blocks MOVE_WALK - not a problem, a he just flies over.
+ 
+ === move_allow ===
  
- move_type: Bitmask of above values which determines what form of movement
-   this object uses.  For objects equipped by player/monster, move_type grants
-   that movement.
+ This overrides move_block - basically, this allows movement of the specific type on the space, regardless of move_block of other objects on the space.  This is most useful to set on objects that  should temporary change the characteristics of the space.
  
-   Note that move_type of MOVE_FLY (0x2) replaces FLAG_FLYING.
+ === move_on/move_off ===
  
-   In general, creatures will only have 1 movement type active at a time.
+ These bitmasks represents for what movement types this object is activated on/off.  Replaces the walk/fly_on/off values
  
- move_block: Represents what movement types are unable to pass this space.
-   If the creature has multiple movement types, they may still be able
-   to pass the space.  For example, a player has MOVE_WALK | MOVE_FLY.
-   He tries to move onto a space that blocks MOVE_WALK - not a problem,
-   a he just flies over.
+ === move_slow ===
  
- move_allow: This overrides move_block - basically, this allows movement
-   of the specific type on the space, regardless of move_block of other
-   objects on the space.  This is most useful to set on objects that
-   should temporary change the characteristics of the space.
+ Like move_block, but represents what movement types are slowed on this space.  Note that it is not possible to specifiy different penalties for different movement types in the same object.  However, multiple objects with different move_slow values (and penalties) can be put on the same space.  This replaced FLAG_SLOW_MOVE, which is converted to only slow down walking movement.
  
- move_on/move_off: Take bitmasks - represents for what movement types
-   this object is activated on.  Replaces the walk/fly_on/off values
+ === move_slow_penalty (was slow_move) ===
  
- move_slow: Like move_block, but represents what movement types are slowed
-   on this space.  Note that it is not possible to specifiy different 
-   penalties for different movement types in the same object.  However,
-   multiple objects with different move_slow values (and penalties) can
-   be put on the same space.  This replaced FLAG_SLOW_MOVE, which is
-   converted to only slow down walking movement
+ How much the player is slowed down.
  
- move_slow_penalty (was slow_move) - how much the player is slowed down.
-   This value is a float (before it was an int converted to a float
-   at load time).  It is basically how much slower (percentage wise)
-   the player moves through this terrain.  A value of 0 is basically
-   a non operation.  A value of 0.5 means it takes 50% longer to move
-   through the space.  The old values were all positive ints.  Basically,
-   it effectively was how many ticks the player is slowed down by.
+ This value is a float (before it was an int converted to a float at load time).  It is basically how much slower (percentage wise) the player moves through this terrain.  A value of 0 is basically a non operation.  A value of 0.5 means it takes 50% longer to move through the space.  The old values were all positive ints.  Basically, it effectively was how many ticks the player is slowed down by.
  
-   Certain terrain has skills which reduce the slow penalty (woodsmen
-   in forest for example).  As of this writing, the penalty is reduced
-   to 1/4 of what it would be.  Eg, a move_slow_penalty of 1.0 would
-   say it takes twice as long to move through the space.  If the player
-   has appropriate skill, it would now only take that player 25%
-   longer to move through the space.
+ Certain terrain has skills which reduce the slow penalty (woodsmen in forest for example).  As of this writing, the penalty is reduced to 1/4 of what it would be.  Eg, a move_slow_penalty of 1.0 would say it takes twice as long to move through the space.  If the player has appropriate skill, it would now only take that player 25% longer to move through the space.
  
-   Note 2:  The old slow_move is loaded and converted into move_slow_penalty.
-   The old SLOW_PENALTY and SET_SLOW_PENALTY macros divided/multiplied
-   the result by 1000, so were basically a non operation.  Since it is now
-   just stored as a float, conversion macros are not needed or used.
+ Note 2: The old slow_move is loaded and converted into move_slow_penalty. The old SLOW_PENALTY and SET_SLOW_PENALTY macros divided/multiplied the result by 1000, so were basically a non operation.  Since it is now just stored as a float, conversion macros are not needed or used.
  
- move_state/move_status: This is unrelated to this movement code - it is
-   used for monster attack_movement information.  it is only noted here
-   since it starts with the move_ prefix.
+ === move_state/move_status ===
  
- msg/endmsg:  If an object has move_block of move_slow and that affects
-   the player movement, the objects message will be printed to the player -
-   thus things like 'The jungle slows you down' or 'The wall is in the way'
-   will be printed.  Various hints can be contained in the messages.
+ Not related to this code - noted here since it has the move_ prefix.   This is used to track monsters state of the attack_movement variable.  It is worth noting that move_type was changed to attack_movement - this matches the name in the archetype, but is a name change in the object field.
  
- move_status: Not related to this code - noted here since it has the move_
-    prefix.   This is used to track monsters state of the attack_movement
-    variable.  It is worth noting that move_type was changed to 
-    attack_movement - this matches the name in the archetype, but is
-    a name change in the object field.
+ === msg/endmsg ===
  
- Obsoleted fields:
- This change of logic has resulted in the following fields no longer
- being used:
- FLAG_WALK_ON -> move_on
- FLAG_NO_PASS -> move_block
- FLAG_SLOW_MOVE -> move_slow
- FLAG_FLYING -> move_type
- FLAG_WALK_OFF -> move_off
- FLAG_FLY_ON -> move_on
- FLAG_FLY_OFF -> move_off
- FLAG_PASS_THRU -> was unused, would be move_type
- FLAG_CAN_PASS_THRU -> was unused, would be move_type
+ If an object has move_block of move_slow and that affects the player movement, the objects message will be printed to the player - thus things like 'The jungle slows you down' or 'The wall is in the way' will be printed.  Various hints can be contained in the messages.
  
+ === Obsoleted fields ===
+ This change of logic has resulted in the following fields no longer being used:
+   * FLAG_WALK_ON -> move_on
+   * FLAG_NO_PASS -> move_block
+   * FLAG_SLOW_MOVE -> move_slow
+   * FLAG_FLYING -> move_type
+   * FLAG_WALK_OFF -> move_off
+   * FLAG_FLY_ON -> move_on
+   * FLAG_FLY_OFF -> move_off
+   * FLAG_PASS_THRU -> was unused, would be move_type
+   * FLAG_CAN_PASS_THRU -> was unused, would be move_type
  
- Load/Save behaviour and backward compatability:
- The loader knows about certain old flags (walk_on, blocked, etc) and
- sets up the appropriate bitmasks.  When data is saved, it is saved
- as the move_... with actual bitmasks.
+ === Load/Save behaviour and backward compatability ===
+ The loader knows about certain old flags (walk_on, blocked, etc) and sets up the appropriate bitmasks.  When data is saved, it is saved as the move_... with actual bitmasks.
  
- Special player notes:
- Player can only pick up items if MOVE_WALK is set (this may need
- to be expanded down the road).  Basic idea is that if you are flying,
- can't reach the ground, if swimming, don't really have any free hands
- to grab anything.
+ === Special player notes ===
+ Player can only pick up items if MOVE_WALK is set (this may need to be expanded down the road).  Basic idea is that if you are flying, can't reach the ground, if swimming, don't really have any free hands to grab anything.
  
  
  ====== SPECIAL OBJECTS ======
  


IP-Address  : 213.174.127.3
Old Revision: http://wiki.metalforge.net/doku.php/dev:objects?rev=1164980469
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