kart_characteristics.xml 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424
  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 subtracted 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="32000" />
  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
  65. higher than 25 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 (the engine power needed to accelerate
  82. at a given pace is proportional to mass)
  83. max-speed: The base maximum speed of the kart in m/s
  84. generic-max-speed: Must have the same value as max-speed. This
  85. is the max speed independently of kart type and
  86. of handicap, which is used by basket balls.
  87. brake-factor: Value used when braking.
  88. brake-time-increase: The brake force is multiplied by
  89. (1 + brake_time) * brake_time_increase - i.e. the longer the
  90. brake was pressed, the harder the kart will brake.
  91. max-speed-reverse-ratio is the percentage of max speed for reverse
  92. gear.
  93. -->
  94. <engine power="950" max-speed="25" generic-max-speed="25" brake-factor="15"
  95. brake-time-increase="6" max-speed-reverse-ratio="0.65" />
  96. <!-- Simulated gears
  97. switch-ratio defines at what ratio of the maximum
  98. speed what gear is selected, e.g. 0.25 means that if the speed is
  99. inferior or equal to 0.25 * maxSpeed then use gear 1, 0.5 means if
  100. the speed is inferior or equal to 0.5 x maxSpeed then gear 2.
  101. gear-power-increase contains the increase in max power (to simulate
  102. different gears), e.g. 2.5 as first entry means: 2.5 * maxPower in gear 1
  103. | first | second | third | . -->
  104. <gear switch-ratio="0.2 0.45 0.7 1 1.25"
  105. power-increase="2.5 2.1 1.7 1.4 1.2" />
  106. <!-- Mass of a kart -->
  107. <mass value="350" />
  108. <!-- Wheels
  109. damping-relaxation/compression: for bullet
  110. damping parameters
  111. Radius and width of wheel
  112. front-right, front-left, rear-right and rear-left give the
  113. position of the physics raycast wheels relative to the center of
  114. gravity. Default is to use the corners of the chassis to attach
  115. the wheels to. -->
  116. <wheels damping-relaxation="35" damping-compression="15">
  117. <front-right position="0.38 0 0.6" />
  118. <front-left position="-0.38 0 0.6" />
  119. <rear-right position="0.38 0 -0.6" />
  120. <rear-left position="-0.38 0 -0.6" />
  121. </wheels>
  122. <!-- Friction of a kart when e.g. sliding along a wall. -->
  123. <friction kart-friction="0.0" />
  124. <!-- ********** Visuals ********** -->
  125. <!-- Skidding
  126. increase: multiplicative increase of skidding factor in each frame.
  127. decrease: multiplicative decrease of skidding factor in each frame.
  128. max: maximum skidding factor = maximum increase of steering angle.
  129. time-till-max: Time till maximum skidding is reached.
  130. visual: Additional graphical rotation of kart. The graphical rotation
  131. of the kart also determines the direction the kart is driving to
  132. when skidding is stopped.
  133. visual-time: How long it takes for the visual skid to reach maximum.
  134. revert-visual-time: how long it takes when stopping a skid to revert
  135. the visual skid and bring visuals and physics in sync again.
  136. min-speed: Minimum speed a kart must have before it can skid. Must be
  137. >0, otherwise the kart can skid at the start of the race.
  138. time-till-bonus: How long a kart needs to skid in order to get a bonus.
  139. bonus-force: A speedup applied to the kart whick skidded for a while.
  140. bonus-time: How long the bonus-force is applied.
  141. bonus-force: Additional engine force (this is used to offset the fact
  142. that turning after skidding (e.g. to correct direction) often uses
  143. up the skid bonus).
  144. post-skid-rotate-factor: a factor to be used to determine how much
  145. the chassis of a kart should rotate to match the graphical view.
  146. A factor of 1 is identical, a smaller factor will rotate the kart
  147. less (which might feel better).
  148. physical-jump-time: Time for a physical jump at the beginning of a skid.
  149. graphical-jump-time: Time for a graphics-only jump at the beginning
  150. of a skid.
  151. reduce-turn-min/max: The steering done by the controller (which is in
  152. [-1,1]) is mapped to [reduce-turn-min, reduce-turn-max] when skidding
  153. is active (for left turn, right turn will use [-max, -min]). The
  154. effect is that while you skid (say left) you can adjust the direction
  155. of the turn the kart is doing somewhat by steering to the left and right,
  156. but you will always keep on doing a left turn, just more or less. -->
  157. <skid increase="1.05" decrease="0.95" max="2.5" time-till-max="0.5"
  158. visual="1.25" visual-time="0.7" revert-visual-time="0.7"
  159. min-speed="10" time-till-bonus="1.0 3.0"
  160. bonus-speed="4.5 6.5" bonus-time="3.0 4.0"
  161. bonus-force="250 350"
  162. physical-jump-time="0" graphical-jump-time="0.4"
  163. post-skid-rotate-factor="1"
  164. reduce-turn-min="0.2" reduce-turn-max="0.8" enabled="true" />
  165. <!-- Camera
  166. Distance between kart and camera.
  167. forward-up-angle: Angle between camera and plane of kart (pitch)
  168. when the camera is pointing forward
  169. forward-smoothing: if true, use smoothing (forward-up-angle become relative to speed) when pointing forward
  170. backward-up-angle: Angle between camera and plane of kart (pitch)
  171. when the camera is pointing backwards. This is usually
  172. larger than the forward-up-angle, since the kart itself
  173. otherwise obstricts too much of the view. -->
  174. <camera distance="1.0"
  175. forward-up-angle="0" forward-smoothing="true"
  176. backward-up-angle="5" />
  177. <!-- Jump animation
  178. animation-time: only if the estimated time for a jump is larger
  179. than this value will the jump animation being
  180. shown. -->
  181. <jump animation-time="0.5" />
  182. <!-- Leaning related parameters, i.e. slightly leaning the karts when
  183. driving a fast curve.
  184. max: maximum leaning (i.e. when steering as much as possible at highest
  185. speed), in degrees.
  186. speed: Speed with which the leaning changes (in degree/second). -->
  187. <lean max="12.0" speed="12.0" />
  188. <!-- ********** Items ********** -->
  189. <!-- Anvil
  190. weight: The additional weight an anvil adds to a kart.
  191. speed-factor: The additional slowdown caused by the anvil.
  192. duration: The time an anvil is active. -->
  193. <anvil duration="2.0" weight="150" speed-factor="0.2" />
  194. <!-- Parachute
  195. friction: The friction factor when a parachute is attached.
  196. duration: The time an attached parachute is active
  197. duration-other: Used when the parachute results from item use
  198. duration-rank-mult: The multiplier applied to the duration of the
  199. parachute on the 1st kart when affected by the item. Scale for
  200. intermediary ranks to 1.0 for the last affected.
  201. duration-speed-mult: Applied in all cases, multitplier to duration
  202. of the parachute at max-speed. Scale to 1.0 at 0 speed.
  203. lbound-fraction: The lower bound fraction of speed when lost will
  204. detach parachute. E.g. at nearly 0 speed, only 20% of speed
  205. need to be lost.
  206. ubound-fraction: The upper bound fraction of speed when lost will
  207. detach parachute. E.g. at max-speed 50% of speed must be lost.
  208. max-speed: A factor that decides the impact of rate of speed
  209. (distance between bounds) -->
  210. <parachute friction="5.0" duration="3" duration-other="2.5"
  211. duration-rank-mult="1.5" duration-speed-mult="1.35"
  212. lbound-fraction="0.5" ubound-fraction="0.3" max-speed="30" />
  213. <!-- Bubblegum
  214. duration: How long the bubblegum lasts.
  215. speed-fraction: To what fraction of top-speed the speed is reduced.
  216. torque: To rotate the kart somewhat.
  217. fade-in-time: How quick the slowdown takes effect.
  218. shield-duration: How long the bubblegum shield lasts -->
  219. <bubblegum duration="1" speed-fraction="0.3" torque="500" fade-in-time="0.01"
  220. shield-duration="10.0" />
  221. <!-- Zipper
  222. duration: Time a zipper is active.
  223. force: Additional zipper force.
  224. speed-gain: One time additional speed.
  225. max-speed-increase: Additional speed allowed on top of the
  226. kart-specific maximum kart speed.
  227. fade-out-time: determines how long it takes for a zipper
  228. to fade out (after 'time'). -->
  229. <zipper duration="3.5" force="250.0" speed-gain="4.5" max-speed-increase="15"
  230. fade-out-time="1.0" />
  231. <!-- Swatter
  232. duration: How long can the swatter be active.
  233. distance: How close a kart or an item must be before it can be hit.
  234. This is the square of the real distance to accelerate the
  235. compution.
  236. squash-duration: How long a kart will remain squashed.
  237. squash-slowdown: Percentage of max speed that a kart is
  238. restricted to. -->
  239. <swatter duration="10" distance="9" squash-duration="5"
  240. squash-slowdown="0.5" />
  241. <!-- Plunger and rubber band handling
  242. band-max-length: The maximum length of rubber band before it snaps.
  243. band-force: The force a plunger/rubber band applies to the kart(s).
  244. band-duration: The duration a rubber band acts.
  245. in-face-time determines how long it takes before a plunger
  246. in your face is removed. -->
  247. <plunger band-max-length="50" band-force="1500" band-duration="1"
  248. band-speed-increase="7" band-fade-out-time="3"
  249. in-face-time="4.5" />
  250. <!-- ********** Miscellaneous ********** -->
  251. <!-- Startup
  252. If a kart starts within the specified time after 'go',
  253. it receives the corresponding bonus from 'boost'. Those
  254. fields must have the same size, and must be sorted by
  255. increasing times. -->
  256. <startup time="0.3 0.5"
  257. boost="8 4" />
  258. <!-- Rescue
  259. duration: How long it takes the kart to be raised.
  260. height: how height the kart will be raised before it is
  261. dropped back onto the track.
  262. vert rescue offset: used to raise karts a bit higher before
  263. releasing them on the ground after a rescue. Used to avoid
  264. resetting karts into the track. Not sure if this is still
  265. necessary. -->
  266. <rescue vert-offset="0.0" duration="1.2" height="2" />
  267. <!-- Explosion
  268. duration: how long it takes before the kart can drive again (this
  269. determines how height the kart is being thrown).
  270. invulnerability-time: how long a kart will be invulnerable
  271. after being hit by an explosion.
  272. radius: Kart closer to this value will be affected by
  273. an explosion as well. -->
  274. <explosion duration="1.5" radius="6"
  275. invulnerability-time="7" />
  276. <!-- Nitro
  277. engine-force: additional engine power
  278. engine-mult: multiply the total engine power by this
  279. consumption: nitro consumption - heavier characters can be set
  280. to need more nitro than lighter character.
  281. small-container: how much energy a small container gives.
  282. big-container: how much energy a big container gives.
  283. max-speed-increase: How much the speed of a kart might exceed
  284. its maximum speed (in m/s).
  285. duration: How long the increased speed will be valid after
  286. the kart stops using nitro (and the fade-out-time starts).
  287. fade-out-time: Duration during which the increased maximum
  288. speed due to nitro fades out.
  289. max: How much nitro a kart can store. -->
  290. <nitro engine-force="300" engine-mult="1.2" consumption="1"
  291. small-container="1" big-container="3"
  292. max-speed-increase="5" duration="1" fade-out-time="2.4" max="20" />
  293. <!-- Slipstream
  294. base-speed: the speed for which length and width are valid.
  295. They are upscaled when faster and downscaled when slower.
  296. length: How far behind a kart slipstream works
  297. (note : this helps OTHER karts)
  298. width: how wide slipstream works furthest away from the kart.
  299. inner-factor: The proportion of the slipstreaming area with
  300. twice faster slipstream "credits" collection.
  301. min-collect-time: How many seconds of sstream are needed to get a bonus
  302. it can be accumulated faster if in the inner quad)
  303. max-collect-time: How many seconds of sstream bonus can be accumulated at most
  304. add-power: Additional power due to sstreaming.
  305. min-speed: Minimum speed necessary for slipstream to take effect.
  306. max-speed-increase: How much the speed of the kart might exceed
  307. its normal maximum speed.
  308. duration-factor: A multiplicator to how long the higher speed lasts
  309. 1 means it last as long the total time collected
  310. fade-out-time: How long the slip stream speed increase will
  311. gradually be reduced. -->
  312. <slipstream base-speed="20" length="8" width="4" inner-factor="0.5"
  313. min-collect-time="2.5" max-collect-time="8" add-power="300" min-speed="8"
  314. max-speed-increase="3" duration-factor="1" fade-out-time="2" />
  315. </characteristic>
  316. <!-- The different difficulties (like easy, medium, hard) -->
  317. <difficulties>
  318. <characteristic name="easy">
  319. <engine power="*0.7" max-speed="*0.6" generic-max-speed="*0.6" />
  320. <plunger in-face-time="3" />
  321. </characteristic>
  322. <characteristic name="medium">
  323. <engine power="*0.83" max-speed="*0.8" generic-max-speed="*0.8" />
  324. <plunger in-face-time="4" />
  325. </characteristic>
  326. <characteristic name="hard">
  327. <engine power="*0.92" max-speed="*0.92" generic-max-speed="*0.92" />
  328. </characteristic>
  329. <!-- This doesn't need to be changed because the most fast/heavy/extreme
  330. values should also be the default ones. -->
  331. <characteristic name="best" />
  332. </difficulties>
  333. <!-- The different kart types, that can be specified in the kart.xml file -->
  334. <kart-types>
  335. <characteristic name="light">
  336. <turn radius="0:2.0 10:7.5 25:15 45:30" />
  337. <engine power="*0.8" max-speed="*0.95" brake-factor="*1"
  338. max-speed-reverse-ratio="*0.8" />
  339. <gear switch-ratio="0.1 0.25 0.45 0.7 1.0 4.0"
  340. power-increase="2.8 2.3 1.9 1.5 1.25 1.0" />
  341. <mass value="*0.6" />
  342. <startup boost="*1 *1" />
  343. <explosion time="*1" radius="*1" />
  344. <nitro engine-force="*0.6" max-speed-increase="*0.9" duration="*1" />
  345. <slipstream length="*0.9" collect-time="*0.9"
  346. duration-factor="*1" fade-out-time="*1" />
  347. </characteristic>
  348. <characteristic name="medium">
  349. <turn radius="0:2.3 10:8.625 25:17.25 45:34.5" />
  350. <engine power="*0.875" max-speed="*1" brake-factor="*0.8"
  351. max-speed-reverse-ratio="*0.75" />
  352. <gear switch-ratio="0.1 0.25 0.45 0.7 1 4"
  353. power-increase="2.4 2 1.7 1.4 1.2 1" />
  354. <mass value="*0.75" />
  355. <startup boost="*0.8 *0.8" />
  356. <explosion time="*0.8" radius="*0.8" />
  357. <nitro engine-force="*0.75" consumption="*1.25" />
  358. <slipstream duration-factor="*0.8" fade-out-time="*1" />
  359. </characteristic>
  360. <characteristic name="heavy">
  361. <turn radius="0:2.6 10:9.75 25:19.5 45:39" />
  362. <engine power="*1" max-speed="*1.05" brake-factor="*0.6"
  363. max-speed-reverse-ratio="*0.7" />
  364. <gear switch-ratio="0.1 0.25 0.45 0.7 1 4"
  365. power-increase="2 1.7 1.5 1.3 1.15 1" />
  366. <mass value="*1" />
  367. <startup boost="*0.6 *0.6" />
  368. <explosion time="*0.6" radius="*0.6" />
  369. <nitro engine-force="*1" consumption="*1.67" max-speed-increase="*1.1" />
  370. <slipstream length="*1.1" collect-time="*1.1"
  371. duration-factor="*0.6" fade-out-time="*1" />
  372. </characteristic>
  373. </kart-types>
  374. <!-- Per-player settings/handicaps (or boosts) -->
  375. <player-characteristics>
  376. <characteristic name="normal" />
  377. <characteristic name="handicap">
  378. <engine power="*0.9" max-speed="*0.9" brake-factor="*0.8" brake-time-increase="*0.85" max-speed-reverse-ratio="*0.8" />
  379. <skid time-till-bonus="*1.2 *1.0" bonus-speed="*0.9 *0.8" bonus-force="*0.9 *0.9" />
  380. <bubblegum duration="*1.5" torque="*1.5" />
  381. <zipper force="*0.8" speed-gain="*0.8" max-speed-increase="*0.8" />
  382. <swatter duration="*0.8" squash-duration="*1.3" />
  383. <plunger band-max-length="*0.8" band-speed-increase="*0.8" in-face-time="*1.3" />
  384. <startup time="*0.8 *0.8" boost="*0.8 *0.8" />
  385. <rescue duration="*1.5" />
  386. <nitro engine-force="*0.8" max-speed-increase="*0.9" max="*0.8" />
  387. <slipstream min-collect-time="*1.2" add-power="*0.9"
  388. max-speed-increase="*0.9" duration-factor="*0.9" />
  389. </characteristic>
  390. </player-characteristics>
  391. </characteristics>