kart_characteristics.xml 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420
  1. <?xml version="1.0"?>
  2. <!-- Format
  3. It is possible to give relative values (factors and more) for each property.
  4. The format as a regex is: ([+-*/](%d+|x))*
  5. An empty value means no change, a value without sign or with a '-' replaces
  6. the previous value. If an operator prefixes the string, e.g. *1.5 (- doesn't
  7. work because it's a sign). x will get replaced by the previous value which
  8. means *1.5 is equal to x*1.5. It's also possible to combine operations:
  9. +1.5*20 means "add 1.5 to the previous value and then multiply by 20".
  10. Note that it's computed sequentially from left to right and there is no
  11. operator precedence. Also whitespaces aren't allowed because they are used
  12. to split arrays.
  13. If you want to return the square of something use x*x or only *x.
  14. ATTENTION: '-' is a special case if it is the first character of a number-
  15. string. It means that the number is negative and NOT that the following
  16. float will be substracted from the base value. So if x = 10 and the string
  17. "-5" is processed, the result will be -5 and not the same as "x-5", which
  18. would result in 10 - 5 = 5.
  19. -->
  20. <characteristics>
  21. <!-- The default values that can be modified by the difficulty, karts, etc.
  22. The values here should also be the values of the maximum difficulty. -->
  23. <characteristic name="base">
  24. <!-- ********** Physics ********** -->
  25. <!-- Suspension
  26. stiffness: kart's suspension stiffness.
  27. rest: Length of suspension when at rest.
  28. travel-cm: maximum movement of suspension - in cm!!
  29. exp-string-response: dampen the suspension spring reaction
  30. exponentially. See
  31. http://bulletphysics.org/Bullet/phpBB3/viewtopic.php?f=9&t=7369\&p=25236&hilit=vehicle#p25236
  32. for details.
  33. max-force: Maximum suspension force -->
  34. <suspension stiffness="280" rest="0.3" travel="0.29"
  35. exp-spring-response="false" max-force="12000" />
  36. <!-- Values related to stability of the chassis: damping, and reduced
  37. impact of roll.
  38. downward-impulse-factor: A speed proportional impulse applied each
  39. frame that pushes the vehicle onto the ground.
  40. track-connection-accel: An artificial force that pulls a wheel to
  41. the ground if its off ground. Reduces the affect if a kart loses
  42. contact with the ground (i.e. it then can't steer or accelerate
  43. anymore).
  44. angular-factor: Factor to change angular impulses. X and Z rotations
  45. are damped to avoid that karts in a collision are too easily pushed
  46. into a roll or pitch, which makes them topple over
  47. smooth-flying-impulse: apply a torque impulse to flying kart to keep
  48. them parallel to the ground. -->
  49. <stability roll-influence="0.3"
  50. chassis-linear-damping="0.2"
  51. chassis-angular-damping="0"
  52. downward-impulse-factor="5"
  53. track-connection-accel="2"
  54. angular-factor="0.25 1.0 0.5"
  55. smooth-flying-impulse="250" />
  56. <!-- Turning
  57. radius: The turn radius of the kart at
  58. a given speed. The actual steering angle is dependent on the
  59. wheel base of the kart: radius = wheel_base/sin(steering_angle).
  60. The values below define that at speed 0 the turn radius is 2, at
  61. speed 10 the radius is 7.5 etc.
  62. The actual turn radius is piece-wise linearly interpolated. This
  63. allows for tighter turning at lower speeds, and also avoids that
  64. the kart becomes too hard to control at high speed (speeds of
  65. higher than 23 can only be reached with powerups).
  66. time-full-steer: This is the amount of change in steering depending
  67. on current steering. So if the steering is between 0 and 0.5,
  68. the time-for-steering-change is 0.15. If the current steering is
  69. between 0.5 and 1.0, the time-for-steering-change is 0.25.
  70. The speed is used as dt/time-for-steering-change.
  71. In short: steering at less than halfway is somewhat faster,
  72. which should avoid oversteering (by pressing the key for too long),
  73. but slower when you want to steer more. Overwall with the current
  74. settings the expected time-to-full-steer is:
  75. 0.5 * 0.25 + 0.5 * 0.15 = 0.2 ... which is overall the same
  76. time we had previously. -->
  77. <turn radius="0:2.0 10:7.5 25:15 45:30"
  78. time-full-steer="0:0.17 0.5:0.17 0.5:0.28 1.0:0.28"
  79. time-reset-steer="0.1" />
  80. <!-- Speed and acceleration
  81. power: The power of the kart
  82. max-speed: The base maximum speed of the kart in m/s
  83. brake-factor: Value used when braking.
  84. brake-time-increase: The brake force is multiplied by
  85. (1 + brake_time) * brake_time_increase - i.e. the longer the
  86. brake was pressed, the harder the kart will brake.
  87. max-speed-reverse-ratio is the percentage of max speed for reverse
  88. gear.
  89. -->
  90. <engine power="875" max-speed="25" brake-factor="15"
  91. brake-time-increase="6" max-speed-reverse-ratio="0.65" />
  92. <!-- Simulated gears
  93. switch-ratio defines at what ratio of the maximum
  94. speed what gear is selected, e.g. 0.25 means that if the speed is
  95. bigger or equal to 0.25 * maxSpeed then use gear 1, 0.5 means if
  96. the speed is bigger or equal to 0.5 x maxSpeed then gear 2.
  97. gear-power-increase contains the increase in max power (to simulate
  98. different gears), e.g. 2.5 as first entry means: 2.5 * maxPower in gear 1
  99. | first | second | third | . -->
  100. <gear switch-ratio="0.25 0.7 1.0" power-increase="2.2 1.7 1.3" />
  101. <!-- Mass of a kart -->
  102. <mass value="350" />
  103. <!-- Wheels
  104. damping-relaxation/compression: for bullet
  105. damping parameters
  106. Radius and width of wheel
  107. front-right, front-left, rear-right and rear-left give the
  108. position of the physics raycast wheels relative to the center of
  109. gravity. Default is to use the corners of the chassis to attach
  110. the wheels to. -->
  111. <wheels damping-relaxation="35" damping-compression="5">
  112. <front-right position="0.38 0 0.6" />
  113. <front-left position="-0.38 0 0.6" />
  114. <rear-right position="0.38 0 -0.6" />
  115. <rear-left position="-0.38 0 -0.6" />
  116. </wheels>
  117. <!-- Friction of a kart when e.g. sliding along a wall. -->
  118. <friction kart-friction="0.0" />
  119. <!-- ********** Visuals ********** -->
  120. <!-- Skidding
  121. increase: multiplicative increase of skidding factor in each frame.
  122. decrease: multiplicative decrease of skidding factor in each frame.
  123. max: maximum skidding factor = maximum increase of steering angle.
  124. time-till-max: Time till maximum skidding is reached.
  125. visual: Additional graphical rotation of kart. The graphical rotation
  126. of the kart also determines the direction the kart is driving to
  127. when skidding is stopped.
  128. visual-time: How long it takes for the visual skid to reach maximum.
  129. revert-visual-time: how long it takes when stopping a skid to revert
  130. the visual skid and bring visuals and physics in sync again.
  131. angular-velocity: Angular velocity to be used for the kart when skidding.
  132. min-speed: Minimum speed a kart must have before it can skid. Must be
  133. >0, otherwise the kart can skid at the start of the race.
  134. time-till-bonus: How long a kart needs to skid in order to get a bonus.
  135. bonus-force: A speedup applied to the kart whick skidded for a while.
  136. bonus-time: How long the bonus-force is applied.
  137. bonus-force: Additional engine force (this is used to offset the fact
  138. that turning after skidding (e.g. to correct direction) often uses
  139. up the skid bonus).
  140. post-skid-rotate-factor: a factor to be used to determine how much
  141. the chassis of a kart should rotate to match the graphical view.
  142. A factor of 1 is identical, a smaller factor will rotate the kart
  143. less (which might feel better).
  144. physical-jump-time: Time for a physical jump at the beginning of a skid.
  145. graphical-jump-time: Time for a graphics-only jump at the beginning
  146. of a skid.
  147. reduce-turn-min/max: The steering done by the controller (which is in
  148. [-1,1]) is mapped to [reduce-turn-min, reduce-turn-max] when skidding
  149. is active (for left turn, right turn will use [-max, -min]). The
  150. effect is that while you skid (say left) you can adjust the direction
  151. of the turn the kart is doing somewhat by steering to the left and right,
  152. but you will always keep on doing a left turn, just more or less. -->
  153. <skid increase="1.05" decrease="0.95" max="2.5" time-till-max="0.5"
  154. visual="1.25" visual-time="0.7" revert-visual-time="0.7"
  155. min-speed="10" time-till-bonus="1.0 3.0"
  156. bonus-speed="4.5 6.5" bonus-time="3.0 4.0"
  157. bonus-force="250 350"
  158. physical-jump-time="0" graphical-jump-time="0.4"
  159. post-skid-rotate-factor="1"
  160. reduce-turn-min="0.2" reduce-turn-max="0.8" enabled="true" />
  161. <!-- Camera
  162. Distance between kart and camera.
  163. forward-up-angle: Angle between camera and plane of kart (pitch)
  164. when the camera is pointing forward
  165. backward-up-angle: Angle between camera and plane of kart (pitch)
  166. when the camera is pointing backwards. This is usually
  167. larger than the forward-up-angle, since the kart itself
  168. otherwise obstricts too much of the view. -->
  169. <camera distance="1.0" forward-up-angle="15"
  170. backward-up-angle="5" />
  171. <!-- Jump animation
  172. animation-time: only if the estimated time for a jump is larger
  173. than this value will the jump animation being
  174. shown. -->
  175. <jump animation-time="0.5" />
  176. <!-- Leaning related parameters, i.e. slightly leaning the karts when
  177. driving a fast curve.
  178. max: maximum leaning (i.e. when steering as much as possible at highest
  179. speed), in degrees.
  180. speed: Speed with which the leaning changes (in degree/second). -->
  181. <lean max="6.6" speed="15.0" />
  182. <!-- ********** Items ********** -->
  183. <!-- Anvil
  184. weight: The additional weight an anvil adds to a kart.
  185. speed-factor: The additional slowdown caused by the anvil.
  186. duration: The time an anvil is active. -->
  187. <anvil duration="2.0" weight="150" speed-factor="0.2" />
  188. <!-- Parachute
  189. friction: The friction increase when a parachute is attached.
  190. duration: The time an attached parachute is active
  191. duration-other: The time a parachute attached from other kart works
  192. duration-rank-mult: The multiplier applied to the duration of the
  193. parachute on the 1st kart when affected by the item. Scale for
  194. intermediary ranks to 1.0 for the last affected.
  195. duration-speed-mult: Applied in all cases, multitplier to duration
  196. of the parachute at max-speed. Scale to 1.0 at 0 speed.
  197. lbound-fraction: The lower bound fraction of speed when lost will
  198. detach parachute. E.g. at nearly 0 speed, only 20% of speed
  199. need to be lost.
  200. ubound-fraction: The upper bound fraction of speed when lost will
  201. detach parachute. E.g. at max-speed 50% of speed must be lost.
  202. max-speed: A factor that decides the impact of rate of speed
  203. (distance between bounds) -->
  204. <parachute friction="2.0" duration="2.0" duration-other="2.6"
  205. duration-rank-mult="1.35" duration-speed-mult="2.0"
  206. lbound-fraction="0.8" ubound-fraction="0.5" max-speed="23" />
  207. <!-- Bubblegum
  208. duration: How long the bubblegum lasts.
  209. speed-fraction: To what fraction of top-speed the speed is reduced.
  210. torque: To rotate the kart somewhat.
  211. fade-in-time: How quick the slowdown takes effect.
  212. shield-duration: How long the bubblegum shield lasts -->
  213. <bubblegum duration="1" speed-fraction="0.3" torque="500" fade-in-time="0.01"
  214. shield-duration="10.0" />
  215. <!-- Zipper
  216. duration: Time a zipper is active.
  217. force: Additional zipper force.
  218. speed-gain: One time additional speed.
  219. max-speed-increase: Additional speed allowed on top of the
  220. kart-specific maximum kart speed.
  221. fade-out-time: determines how long it takes for a zipper
  222. to fade out (after 'time'). -->
  223. <zipper duration="3.5" force="250.0" speed-gain="4.5" max-speed-increase="15"
  224. fade-out-time="1.0" />
  225. <!-- Swatter
  226. duration: How long can the swatter be active.
  227. distance: How close a kart or an item must be before it can be hit.
  228. This is the square of the real distance to accelerate the
  229. compution.
  230. squash-duration: How long a kart will remain squashed.
  231. squash-slowdown: Percentage of max speed that a kart is
  232. restricted to. -->
  233. <swatter duration="10" distance="9" squash-duration="5"
  234. squash-slowdown="0.5" />
  235. <!-- Plunger and rubber band handling
  236. band-max-length: The maximum length of rubber band before it snaps.
  237. band-force: The force a plunger/rubber band applies to the kart(s).
  238. band-duration: The duration a rubber band acts.
  239. in-face-time determines how long it takes before a plunger
  240. in your face is removed. -->
  241. <plunger band-max-length="50" band-force="1500" band-duration="1"
  242. band-speed-increase="7" band-fade-out-time="3"
  243. in-face-time="4.5" />
  244. <!-- ********** Miscellaneous ********** -->
  245. <!-- Startup
  246. If a kart starts within the specified time after 'go',
  247. it receives the corresponding bonus from 'boost'. Those
  248. fields must have the same size, and must be sorted by
  249. increasing times. -->
  250. <startup time="0.3 0.5"
  251. boost="6 3" />
  252. <!-- Rescue
  253. duration: How long it takes the kart to be raised.
  254. height: how height the kart will be raised before it is
  255. dropped back onto the track.
  256. vert rescue offset: used to raise karts a bit higher before
  257. releasing them on the ground after a rescue. Used to avoid
  258. resetting karts into the track. Not sure if this is still
  259. necessary. -->
  260. <rescue vert-offset="0.0" duration="1.2" height="2" />
  261. <!-- Explosion
  262. duration: how long it takes before the kart can drive again (this
  263. determines how height the kart is being thrown).
  264. invulnerability-time: how long a kart will be invulnerable
  265. after being hit by an explosion.
  266. radius: Kart closer to this value will be affected by
  267. an explosion as well. -->
  268. <explosion duration="2" radius="5"
  269. invulnerability-time="6" />
  270. <!-- Nitro
  271. engine-force: additional engine power
  272. consumption: nitro consumption - heavier characters can be set
  273. to need more nitro than lighter character.
  274. small-container: how much energy a small container gives.
  275. big-container: how much energy a big container gives.
  276. max-speed-increase: How much the speed of a kart might exceed
  277. its maximum speed (in m/s).
  278. duration: How long the increased speed will be valid after
  279. the kart stops using nitro (and the fade-out-time starts).
  280. fade-out-time: Duration during which the increased maximum
  281. speed due to nitro fades out.
  282. max: How much nitro a kart can store. -->
  283. <nitro engine-force="600" consumption="1" small-container="1" big-container="3"
  284. max-speed-increase="5" duration="1" fade-out-time="2" max="20" />
  285. <!-- Slipstream
  286. base-speed: the speed for which length and width are valid.
  287. They are upscaled when faster and downscaled when slower.
  288. length: How far behind a kart slipstream works
  289. (note : this helps OTHER karts)
  290. width: how wide slipstream works furthest away from the kart.
  291. inner-factor: The proportion of the slipstreaming area with
  292. twice faster slipstream "credits" collection.
  293. min-collect-time: How many seconds of sstream are needed to get a bonus
  294. it can be accumulated faster if in the inner quad)
  295. max-collect-time: How many seconds of sstream bonus can be accumulated at most
  296. add-power: Additional power due to sstreaming.
  297. min-speed: Minimum speed necessary for slipstream to take effect.
  298. max-speed-increase: How much the speed of the kart might exceed
  299. its normal maximum speed.
  300. duration-factor: A multiplicator to how long the higher speed lasts
  301. 1 means it last as long the total time collected
  302. fade-out-time: How long the slip stream speed increase will
  303. gradually be reduced. -->
  304. <slipstream base-speed="20" length="8" width="4" inner-factor="0.5"
  305. min-collect-time="3" max-collect-time="8" add-power="300" min-speed="8"
  306. max-speed-increase="5" duration-factor="1" fade-out-time="2" />
  307. </characteristic>
  308. <!-- The different difficulties (like easy, medium, hard) -->
  309. <difficulties>
  310. <characteristic name="easy">
  311. <engine power="*0.66" max-speed="*0.6" />
  312. <plunger in-face-time="3" />
  313. </characteristic>
  314. <characteristic name="medium">
  315. <engine power="*0.77" max-speed="*0.8" />
  316. <plunger in-face-time="4" />
  317. </characteristic>
  318. <characteristic name="hard">
  319. <engine power="*0.89" max-speed="*0.92" />
  320. </characteristic>
  321. <!-- This doesn't need to be changed because the most fast/heavy/extreme
  322. values should also be the default ones. -->
  323. <characteristic name="best" />
  324. </difficulties>
  325. <!-- The different kart types, that can be specified in the kart.xml file -->
  326. <kart-types>
  327. <characteristic name="light">
  328. <engine power="*0.46" max-speed="*0.92" brake-factor="*1"
  329. max-speed-reverse-ratio="*0.77" />
  330. <gear switch-ratio="0.20 0.55 1" power-increase="5 4 3" />
  331. <mass value="*0.56" />
  332. <startup time="0.3 0.5"
  333. boost="8.5 4.5" />
  334. <explosion time="2.1" radius="5.5"
  335. invulnerability-time="7" />
  336. <nitro engine-force="350" max-speed-increase="4.5" duration="1.5"
  337. fade-out-time="2.5" />
  338. <slipstream length="*0.9" collect-time="*0.9"
  339. duration-factor="*1" fade-out-time="*1" />
  340. </characteristic>
  341. <characteristic name="medium">
  342. <engine power="*0.63" max-speed="*1" brake-factor="*0.73"
  343. max-speed-reverse-ratio="*0.62" />
  344. <gear switch-ratio="0.30 0.7 1.0" power-increase="2.2 2.2 2.5" />
  345. <mass value="*0.71" />
  346. <startup time="0.3 0.5"
  347. boost="4.2 2.6" />
  348. <explosion time="1.8" radius="5"
  349. invulnerability-time="6" />
  350. <nitro engine-force="425" consumption="1.4" duration="1" />
  351. <slipstream duration-factor="*0.8" fade-out-time="*1" />
  352. </characteristic>
  353. <characteristic name="heavy">
  354. <engine power="*1" max-speed="*1" brake-factor="*0.66"
  355. max-speed-reverse-ratio="*1" />
  356. <gear switch-ratio="0.45 0.70 1" power-increase="1.5 1.7 2.5" />
  357. <mass value="*1" />
  358. <swatter duration="10" distance="3" squash-duration="5"
  359. squash-slowdown="0.5" />
  360. <startup time="0.3 0.5"
  361. boost="3.8 2" />
  362. <explosion time="1.5" radius="4"
  363. invulnerability-time="6" />
  364. <nitro engine-force="600" consumption="2" max-speed-increase="8"
  365. duration="0.7" fade-out-time="1.3" />
  366. <slipstream length="*1.1" collect-time="*1.1"
  367. duration-factor="*0.6" fade-out-time="*1" />
  368. </characteristic>
  369. </kart-types>
  370. <!-- Per-player settings/handicaps (or boosts) -->
  371. <player-characteristics>
  372. <characteristic name="normal" />
  373. <characteristic name="handicap">
  374. <engine power="*0.9" max-speed="*0.9" brake-factor="*0.8" brake-time-increase="*0.85" max-speed-reverse-ratio="*0.8" />
  375. <skid time-till-bonus="*1.2 1.0" bonus-speed="*0.9 0.8" bonus-force="*0.9 0.9" />
  376. <bubblegum duration="*1.5" torque="*1.5" />
  377. <zipper force="*0.8" speed-gain="*0.8" max-speed-increase="*0.8" />
  378. <swatter duration="*0.8" squash-duration="*1.3" />
  379. <plunger band-max-length="*0.8" band-speed-increase="*0.8" in-face-time="*1.3" />
  380. <startup time="*0.8 0.8" boost="*0.8 0.8" />
  381. <rescue duration="*1.5" />
  382. <nitro engine-force="*0.8" max-speed-increase="*0.9" max="*0.8" />
  383. <slipstream min-collect-time="*1.2" add-power="*0.9"
  384. max-speed-increase="*0.9" duration-factor="*0.9" />
  385. </characteristic>
  386. </player-characteristics>
  387. </characteristics>