User Tools

Site Tools


z:objekte

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
z:objekte [2007/08/02 00:11]
cabalistic
z:objekte [2015/08/23 13:59] (current)
Line 77: Line 77:
 Weiterhin muss definiert werden, von wo aus Schüsse starten (und wie diese aussehen), also Nodes oder Bones als Waffenrohre deklarieren. Dazu braucht es auch noch die Info, ob alle Rohre gleichzeitig (z. B. Psycho) oder abwechselnd (z. B. Raketenwerfer) feuern sollen (aber das ist eigentlich wieder eine Gameplay-Sache). Weiterhin muss definiert werden, von wo aus Schüsse starten (und wie diese aussehen), also Nodes oder Bones als Waffenrohre deklarieren. Dazu braucht es auch noch die Info, ob alle Rohre gleichzeitig (z. B. Psycho) oder abwechselnd (z. B. Raketenwerfer) feuern sollen (aber das ist eigentlich wieder eine Gameplay-Sache).
  
 +
 +===== Beispiel =====
 +Ein Entwurf für eine Beschreibungsdatei für einen Roboter:
 +
 +<code xml>
 +<?xml version="1.0" encoding="utf-8"?>
 +<robot id="grunt">
 +  <basic>
 +    <!-- Number of hitpoints -->
 + <hitpoints>300</hitpoints>
 + <!-- Damage multipliers to increase or reduce damage taken from a specific damage type -->
 + <damage_mult type="1">1.2</damage_mult>
 + <damage_mult type="4">0.9</damage_mult>
 + <!-- The bounding radius specifies the space the object occupies on the map -->
 + <bounding_rad>15.0</bounding_rad>
 + <!-- Define hitboxes for projectile collision -->
 + <hitbox x1="-5.0" y1="-5.0" z1="0.0" x2="0.0" y2="0.0" z2="5.0" />
 + <hitbox x1="0.0" y1="0.0" z1="0.0" x2="5.0" y2="5.0" z2="10.0" />
 +  </basic>
 +  
 +  <moving>
 +    <!-- The unit's velocity -->
 + <velocity>20.0</velocity>
 + <!-- Turnspeed -->
 + <turnspeed>5.0</turnspeed>
 +  </moving>
 +  
 +  <weapon>
 +    <!-- The type of damage this unit deals -->
 + <damage_type>0</damage_type>
 + <!-- The amount of damage the unit deals -->
 + <damage>25.0</damage>
 + <!-- Variance of the damage dealt -->
 + <damage_variance>2.0</damage_variance>
 + <!-- Probability that this unit hits the driver of a vehicle instead of the vehicle. -->
 + <hit_driver_prob>0.05</hit_driver_prob>
 + <!-- Time in game ticks for firing a single shot -->
 + <shoot_duration>30</shoot_duration>
 + <!-- Relative time after which the projectile is created when firing -->
 + <shoot_out>0.7</shoot_out>
 + <!-- Time in game ticks between two shots -->
 + <shoot_pause>50</shoot_pause>
 + <!-- Projectile object to be used with this weapon -->
 + <projectile>grunt_projectile</projectile>
 + <!-- Range of fire -->
 + <shoot_range>30.0</shoot_range>
 + <!-- Does the unit need to stand still when shooting? -->
 + <shoot_stand>true</shoot_stand>
 + <!-- Weapon turning in horizontal: Min/max/default angle in degrees and turn speed in degrees/gametick-->
 + <horiz_angle min="-45" max="45" default="0" speed="1" />
 + <!-- Weapon turning in vertical: Min/max/default angle in degrees and turn speed -->
 + <vert_angle min="-15" max="30" default="0" speed="0.5" />
 + <!-- How many of the barrels defined in the rendering section actually fire per shot? -->
 + <barrels>1</barrels>
 +  </weapon>
 +  
 +  
 +  <rendering>
 +    <!-- Define nodes to attach meshes etc. to -->
 +    <node x="0" y="0" z="0">root</node>
 +
 + <!-- Define the meshes and their placement -->
 + <mesh material="grunt_mat" attach="node" id="root">grunt</mesh>
 +
 + <!-- Define the unit's states and the animations and particle effects accompanying those -->
 + <state name="idle0">
 +   <animation loop="false">grunt:idle0</animation>
 + </state>
 +
 + <state name="moving">
 +   <animation loop="true">grunt:walking</animation>
 + </state>
 +
 + <state name="shooting">
 +   <animation loop="false">grunt:shooting</animation>
 +   <particle attach="bone" id="grunt:weapon">grunt_smoke</particle>
 + </state>
 +
 + <!-- Declare bones or nodes as weapon barrels, this is where the projectiles will be emerging from -->
 + <barrel type="bone" id="grunt:weapon" />
 +  </rendering>
 +  
 +  
 +</robot>
 +
 +</code>
z/objekte.1186006313.txt.gz · Last modified: 2015/08/23 14:03 (external edit)