source: experiments/frams/deathmatch/data/scripts/deathmatch.expdef @ 409

Last change on this file since 409 was 233, checked in by sz, 11 years ago

Adjusted experiment scripts to comply with the current Framsticks API (don't use static Genotype/Creature/GenePool/Population? objects and deprecated functions)

File size: 21.5 KB
Line 
1expdef:
2name:Deathmatch
3info:~
4This experiment simulates a team deathmatch. It means that framstick creatures are grouped in teams and the basic rule is: "My team vs WORLD!".
5
6The basic battle rules and collectibles are implemented. Statistics for the battle are saved to text files in CSV format: creatures.txt, teams.txt.
7
8For more information, see  http://www.framsticks.com/deathmatch
9~
10code:~
11
12//Author: Mateusz Cicheñski @ Poznan University of Technology, 2012
13
14@include "deathmatch-utils.inc"
15@include "deathmatch-levels.inc"
16
17global idleSimulationSteps;
18global battleNumber;
19global teams;
20
21function onExpDefLoad()
22{
23  idleSimulationSteps = 0;
24  battleNumber = 0;
25  initLevels();
26  initPopulations();
27 
28  Shapes.set("1p_weaponbox","""//0
29p:-0.5, -0.5, -0.5
30p: 0.5, -0.5, -0.5
31p: 0.5, 0.5, -0.5
32p: -0.5, 0.5, -0.5
33p:-0.5, -0.5, 0.5
34p:0.5, -0.5, 0.5
35p:0.5, 0.5, 0.5
36p:-0.5, 0.5, 0.5
37j: 0,1
38j: 1,2
39j: 2,3
40j: 3,0
41j: 4,5
42j: 5,6
43j: 6,7
44j: 7,4
45j: 0,4
46j: 1,5
47j: 2,6
48j: 3,7""", 0x0FAA0F);
49 
50  Shapes.set("1p_hpbox","""//0
51p:-0.5, -0.5, -0.5
52p: 0.5, -0.5, -0.5
53p: 0.5, 0.5, -0.5
54p: -0.5, 0.5, -0.5
55p:-0.5, -0.5, 0.5
56p:0.5, -0.5, 0.5
57p:0.5, 0.5, 0.5
58p:-0.5, 0.5, 0.5
59j: 0,1
60j: 1,2
61j: 2,3
62j: 3,0
63j: 4,5
64j: 5,6
65j: 6,7
66j: 7,4
67j: 0,4
68j: 1,5
69j: 2,6
70j: 3,7""", 0xAA0F0F);
71}
72
73function initPopulations()
74{
75  //clear anything in populations
76  Populations.clear();
77 
78  //add Food population (group 0)
79  var p=Populations[0];
80  p.name = "Food";
81  p.nnsim = 0;
82  p.enableperf = 0;
83  p.death = 1;
84  p.energy = 1;
85  p.selfmask = 0x20002;
86  p.othermask = 0x10002;
87 
88  //add Weapon Upgrade population (group 1)
89  p=Populations.addGroup("Upgrades");
90  p.nnsim = 0;
91  p.enableperf = 0;
92  p.death = 1;
93  p.energy = 1;
94  p.selfmask = 0x20002;
95  p.othermask = 0x10002;
96
97  //add Teams populations (group above 2)
98  var i = 0;
99  teams = ExpParams.teamCount;
100  if (teams == 1)
101        teams = GenePools[0].size;
102  for (i = 0; i < teams; i++)
103  {
104    p=Populations.addGroup("Team "+i);
105    p.nnsim = 1;
106    p.enableperf = 1;
107    p.death = 0;
108    p.energy = 1;
109    p.selfmask = 0x50001;
110    p.othermask = 0x60001;
111  }
112 
113  //Collisions on 32 bit mask:
114  // standard - rebound creatures => if lower bits 0xFFFF
115  // custom - custom function handler => if higher bits 0xFFFF0000
116  //Collisions map:
117  // Food vs Food = 0x20002 & 0x10002 = 2 - standard
118  // Upgrades vs Upgrades = 0x20002 & 0x10002 = 2 - standard
119  // Team X vs Team X = 0x50001 & 0x60001 = 0x40001 - standard + custom
120  // Team X vs Team Y = 0x50001 & 0x60001 = 0x40001 - standard + custom
121  // Food vs Upgrades = 0x20002 & 0x10002 = 2 - standard
122  // Food vs Team X = 0x20002 & 0x60001 = 0x20000 || 0x50001 & 0x10002 = 0x10000 - custom
123  // Upgrades vs Team X = 0x20002 & 0x60001 = 0x20000 || 0x50001 & 0x10002 = 0x10000 - custom
124}
125
126function initCreatures()
127{
128  for (var i = 0; i < Populations.size - 2; i++)
129  {
130        for (var j = 0; j < ExpParams.teamSize; j++)
131        {
132          var g; //Genotype object
133          if (ExpParams.teamCount != 1)
134            g = GenePools[0].random();
135          else
136            g = GenePools[0][i];
137          Populations[i+2].add(g).name = "Member " + j;
138        }
139  }
140}
141
142function onExpInit()
143{
144  battleNumber = 0;
145  initAll();
146}
147
148function initAll()
149{
150  idleSimulationSteps = 0;
151  battleNumber += 1;
152  initLevel();
153  initPopulations();
154  initCreatures();
155  initFiles();
156  writeTeamStatistics();
157}
158
159function initFiles()
160{
161  var f=File.createDirect("creatures"+battleNumber+".txt","Creature statistics");
162  f.writeString("#Creature name; Team; Kills; Assists; Total damage dealt; Total damage received; HP boxes collected; Upgrade boxes collected; Lifespan\n");
163  f.close();
164 
165  var s = "#Time interval; ";
166  for (var i = 0; i < Populations.size - 2; i++)
167  {
168    s += "Team " + i + "; ";
169        s += "Team members; ";
170  }
171  s += "Total energy\n";
172 
173  var f=File.createDirect("teams"+battleNumber+".txt","Teams statistics");
174  f.writeString(s);
175  f.close();
176}
177
178function initLevel()
179{
180  var levelNumber;
181  if (ExpParams.level == -1)
182    levelNumber = Math.random(levels.size);
183  else
184    levelNumber = ExpParams.level;
185
186  var level = levels.get(levelNumber);
187  Simulator.print("Level #" + (levelNumber + 1) + ": " + level[0]);
188
189  World.wrldbnd = level[2];
190  World.wrldsiz = level[1];
191  World.wrldwat = -1;
192  World.wrldtyp = level[3];
193  World.wrldmap = level[4];
194
195  World.wrldchg();
196}
197
198function tryCreateHPBox()
199{
200  if (Populations[0].size >= ExpParams.hpBoxTotalCount) return;
201 
202  if (Math.rnd01 > ExpParams.hpBoxProbability) return;
203 
204  var food = Populations[0].add("//0\nm:Vstyle=hpbox\np:");
205  food.name = "HP Box";
206  food.idleen = ExpParams.hpBoxIdleEnergy;
207  food.energ0 = ExpParams.hpBoxStartingEnergy;
208  food.energy = food.energ0;
209  food.nnenabled = 0;
210}
211
212function tryCreateUpgradeBox()
213{
214  if (Populations[1].size >= ExpParams.upgradeBoxTotalCount) return;
215 
216  if (Math.rnd01 > ExpParams.upgradeBoxProbability) return;
217 
218  var weapon = Populations[1].add("//0\nm:Vstyle=weaponbox\np:");
219  weapon.name = "Weapon Box";
220  weapon.idleen = ExpParams.upgradeBoxIdleEnergy;
221  weapon.energ0 = ExpParams.upgradeBoxStartingEnergy;
222  weapon.energy = weapon.energ0;
223  weapon.nnenabled = 0;
224}
225
226//handle creature placement in the world
227function onBorn(cr)
228{
229  // place newly born creature
230  var retry = 20; //try 20 times
231  var placed_ok = 0;
232  while (retry-- && !placed_ok)
233  {
234    switch (cr.population.index)
235    {
236    case 0: //food placement
237      place_centerhead(cr);
238      break;
239    case 1: //upgrade placement
240      place_centerhead(cr);
241      break;
242    default:
243          cr.user1 = [0.0, 0.0]; //attack cooldown (0), bonus damage (1)
244          cr.user2 = [0,0,0,0,0,0]; //kills (0), assists (1), total damage dealt (2), total damage received (3), HP boxes collected (4), Upgrade boxes collected (5)
245          cr.user3 = []; //who dealt damage to this creature
246          cr.energ0 = ExpParams.creatureStartingEnergy;
247          cr.energy = cr.energ0;
248      place_inTeamSpot(cr);
249      break;
250    }
251
252    if (!cr.boundingBoxCollisions(0))
253      {placed_ok=1; break;}
254  }
255  if (!placed_ok)
256    print("onBorn() could not avoid collisions.");
257}
258
259//place creature in random spot and make it head center of the map
260function place_centerhead(cr)
261{
262  var x, y, z;
263  x = (World.wrldsiz - cr.size_x) * Math.rnd01 - cr.size_x / 2;
264  y = (World.wrldsiz - cr.size_y) * Math.rnd01 - cr.size_y / 2;
265  z = WorldMap.getHeight(x, y);
266
267  var hx = 0.0 + (World.wrldsiz / 2) - x;
268  var hy = 0.0 + (World.wrldsiz / 2) - y;
269  var alpha_rad = vectorsAngle([1.0, 0.0], [hx, hy]);
270
271  cr.rotate(0, 0, alpha_rad);
272  cr.moveAbs(x, y, z - 0.999);
273 
274  print("Creature placed in [" + x +" " + y + " " + z);
275
276  return ;
277}
278
279//Place creature in correct team spot (valid for Team creatures only)
280//Creatures are placed in circle with random rotation (commented out: heading center of the map) in their respective team groups
281function place_inTeamSpot(cr)
282{
283  var radius = 360.00 * (cr.population.index - 1) / teams;
284
285  var x, y, z;
286  x = (ExpParams.teamSpawningAreaSize) * Math.rnd01 - cr.size_x / 2 - ExpParams.teamSpawningAreaSize/2;
287  y = (ExpParams.teamSpawningAreaSize) * Math.rnd01 - cr.size_y / 2 - ExpParams.teamSpawningAreaSize/2;
288 
289  //vector of length half the world size minus spawning area size
290  var vect = [0.0 + World.wrldsiz/2 - ExpParams.teamSpawningAreaSize/2 - 1.0, 0.0];
291  vect = rotateVector(vect, radius);
292 
293  //translate creature by given vector
294  //then translate by halfworld (as it is the center of the world
295  //and the positions were calculated for point [0,0]
296  x = x + vect[0] + World.wrldsiz/2;
297  y = y + vect[1] + World.wrldsiz/2;
298
299  z = WorldMap.getHeight(x, y);
300 
301  var alpha_rad = 360.0 * Math.rnd01; //random rotation
302 
303  //this would rotate creatures so that they would face the world center:
304  //var hx = 0.0 + (World.wrldsiz / 2) - x;
305  //var hy = 0.0 + (World.wrldsiz / 2) - y;
306  //var alpha_rad = vectorsAngle([1.0, 0.0], [hx, hy]);
307 
308  cr.rotate(0, 0, alpha_rad);
309  //place it mid-air
310  cr.moveAbs(x, y, z);
311
312  return ;
313}
314
315// ////////////////////////////////
316// Simulation steps
317
318function onStep()
319
320  idleSimulationSteps += 1;
321  tryCreateHPBox();
322  tryCreateUpgradeBox();
323 
324  lowerCooldownCounters();
325  applySuddenDeathModifier();
326
327  clearDeadCreatures();
328  checkGameState();
329}
330
331function writeTeamStatistics()
332{
333  var s = "" + Simulator.time + "; ";
334  var total = 0.0;
335  for (var i = 2; i < Populations.size; i++)
336  {
337    var pop=Populations[i];
338    var sum = 0.0;
339    for (var cr in pop)
340      sum += cr.energy;
341    s += "" + sum + "; ";
342    s += "" + pop.size + "; ";
343    total += sum;
344  }
345  if (total < 0) total == 0;
346  s += "" + total + "\n";
347 
348  var f=File.appendDirect("teams"+battleNumber+".txt","Teams statistics");
349  f.writeString(s);
350  f.close();
351}
352
353function clearDeadCreatures()
354{
355  for (var i = 2; i < Populations.size; i++)
356  {
357    var pop=Populations[i];
358    for (var j = 0; j < pop.size; j++)
359      {
360      var cr=pop[j];
361      if (cr.energy <= 0) {pop.kill(cr); j--;}
362      }
363  }
364}
365
366function applySuddenDeathModifier()
367{
368  if (idleSimulationSteps < ExpParams.stagnationInterval) return;
369
370  for (var i = 2; i < Populations.size; i++)
371    for (var cr in Populations[i])
372      cr.energy -= ExpParams.stagnationHealthReduce;
373}
374
375function lowerCooldownCounters()
376{
377  for (var i = 2; i < Populations.size; i++)
378  {
379    var pop=Populations[i];
380        for (var cr in pop)
381        {
382          if (cr.user1 != null)
383          {
384            if (cr.user1[0] > 0) cr.user1[0]=cr.user1[0] - 1;
385            if (cr.user1[0] < 0) cr.user1[0]=0.0;
386            if (cr.user1[1] > 0) cr.user1[1]=cr.user1[1] - ExpParams.upgradeBoxDecay;
387            if (cr.user1[1] < 0) cr.user1[1]=0.0;
388          }
389        }
390  }
391}
392
393function checkGameState()
394{
395  var alivePop = 0;
396  for (var i = 2; i < Populations.size; i++)
397    if (Populations[i].size > 0) alivePop += 1;
398 
399  if (alivePop == 0 && Simulator.time <= 1)
400  {
401    onExpInit(); //do initialization for user, because he forgot to do so
402        return;
403  }
404 
405  if (alivePop <= 1)
406  {
407    for (var i = 2; i < Populations.size; i++)
408    {
409      var pop=Populations[i];
410          if (pop.size > 0)
411          {
412            Simulator.print("Battle is OVER! The winner is: " + pop.name);
413               
414                //write stats of last living creatures
415                var f=File.appendDirect("creatures"+battleNumber+".txt","Creature statistics");
416                for (var cr in pop)
417                {
418                  //f.writeString("Creature name; Team; Kills; Assists; Total damage dealt; Total damage received; HP boxes collected; Upgrade boxes collected; Lifespan");
419                  if (cr.user2 != null)
420                    f.writeString(cr.name + "; " + pop.name + "; " + cr.user2[0] + "; " + cr.user2[1] + "; " + cr.user2[2] + "; " + cr.user2[3] + "; " + cr.user2[4] + "; " + cr.user2[5] + "; " + cr.lifespan + "\n");
421                }
422
423                f.close();
424          }
425    }
426        if (alivePop == 0) Simulator.print("Battle is OVER! Total annihilation!");
427       
428        Simulator.stop();
429  }
430}
431
432function print(msg)
433{
434  if (ExpParams.debug)
435    Simulator.print(msg);
436}
437
438function stop(msg)
439{
440  Simulator.print(msg);
441  Simulator.stop();
442}
443
444// ////////////////////////////
445// Collisions
446
447//function executed on any Creature collission
448function onTeam0CrCollision, onTeam1CrCollision, onTeam2CrCollision, onTeam3CrCollision, onTeam4CrCollision, onTeam5CrCollision, onTeam6CrCollision, onTeam7CrCollision, onTeam8CrCollision, onTeam9CrCollision()
449{
450  var c1 = CrCollision.Creature1;
451  var c2 = CrCollision.Creature2;
452 
453  if (c1 == null) stop("2");
454  if (c2 == null) stop("2");
455 
456  if (c1.energy <= 0 || c2.energy <= 0)
457  {
458    //collision with already killed creature (chain resolution)
459        print("onCrCollision called with less than 2 Creatures");
460        return ;
461  }
462 
463  if (c1.population == null || c2.population == null)
464  {
465    //collision of creature without a group
466        print("onCrCollision called for creature without group, ignoring");
467        return ;
468  }
469 
470  //first condition should never occur, but who knows?
471  if (c1.population.index < 2 || c2.population.index < 2)
472  {
473    //collision with HP Box and Upgrades are handled separately
474        print("onCrCollision called for population 0 or 1, ignoring");
475        return ;
476  }
477 
478  idleSimulationSteps = 0;
479 
480  var kill_c1 = 0;
481  var kill_c2 = 0;
482  var dice1 = 0;
483  var dice2 = 0;
484  var changed = 0;
485  for (var i = 0; i < ExpParams.diceCount; i++)
486  {
487    dice1 = dice1 + Math.random(ExpParams.diceSides) + 1;
488        dice2 = dice2 + Math.random(ExpParams.diceSides) + 1;
489  }
490  var energy1 = 0.0 + ExpParams.creatureDamage * dice1;
491  var energy2 = 0.0 + ExpParams.creatureDamage * dice2;
492  energy1 += ExpParams.upgradeMultiplier * c1.user1.get(1);
493  energy2 += ExpParams.upgradeMultiplier * c2.user1.get(1);
494  if (c1.population == c2.population)
495  {
496    energy1 = ExpParams.friendlyFireDamageMultiplier * energy1;
497        energy2 = ExpParams.friendlyFireDamageMultiplier * energy2;
498  }
499 
500  if (c1.user1 == null) stop("3");
501  if (c1.user2 == null) stop("3");
502  if (c1.user3 == null) stop("3");
503  if (c2.user1 == null) stop("3");
504  if (c2.user2 == null) stop("3");
505  if (c2.user2 == null) stop("3");
506 
507  if (c2.user1[0] <= 0 && energy2 > 0)
508  {
509    changed = 1;
510 
511    c1.energy = c1.energy - energy2;
512        if (c1.energy < 0) c1.energy = 0;
513    print(c2.name + " [" + c2.population.name + "] rolled " + dice2 + " and dealt " + energy2 + " [+" + (ExpParams.upgradeMultiplier * c2.user1[1]) +" bonus] damage to " + c1.name + " [" + c1.population.name + "]");
514        c2.user1.set(0, ExpParams.attackCooldown);
515        c2.user2.set(2, c2.user2[2] + energy1);
516        c1.user2.set(3, c1.user2[3] + energy1);
517        var vect = [c2.uid,c2.name];
518        var arrindex = arrayContains(c1.user3, 0, c2.uid);
519        if (arrindex != -1)
520        {
521          vect.add(energy2 + c1.user3[arrindex][2]);
522          c1.user3[arrindex]=vect;
523        }
524        else
525        {
526          vect.add(energy2);
527          if (c1.user3 == null) c1.user3 = Vector.new();
528          c1.user3.add(vect);
529          if (c1.energy > 0)
530            c2.user2[1] = c2.user2[1] + 1; //increase assists statistic
531        }
532        if (c1.energy <= 0)
533        {
534          c2.user2[0] = c2.user2[0] + 1; //increase kills statistic
535          kill_c1 = 1;
536        }
537  }
538 
539  if (c1.user1[0] <= 0 && energy1 > 0)
540  {
541    changed = 1;
542       
543    c2.energy = c2.energy - energy1;
544        if (c2.energy < 0) c2.energy = 0;
545    print(c1.name + " [" + c1.population.name + "] rolled " + dice1 + " and dealt " + energy1 + " [+" + (ExpParams.upgradeMultiplier * c1.user1[1]) +" bonus] damage to " + c2.name + " [" + c2.population.name + "]");
546    c1.user1[0] = ExpParams.attackCooldown;
547        c1.user2[2] = c1.user2[2] + energy1;
548        c2.user2[3] = c2.user2[3] + energy1;
549        var vect = Vector.new();
550        vect.add(c1.uid);
551        vect.add(c1.name);
552        var arrindex = arrayContains(c2.user3, 0, c1.uid);
553        if (arrindex != -1)
554        {
555          vect.add(energy1 + c2.user3[arrindex][2]);
556          c2.user3[arrindex] = vect;
557        }
558        else
559        {
560          vect.add(energy1);
561          if (c2.user3 == null) c2.user3 = Vector.new();
562          c2.user3.add(vect);
563          if (c2.energy > 0)
564          {
565        c1.user2[1] = c1.user2[1] + 1; //increase assists statistic
566          }
567        }
568        if (c2.energy <= 0)
569        {
570          c1.user2[0] = c1.user2[0] + 1; //increase kills statistic
571          kill_c2 = 1;
572        }
573  }
574 
575  if (changed == 1)
576  {
577    writeTeamStatistics();
578  }
579 
580  //resolve kills
581  if (kill_c1 == 1)
582    c1.population.kill(c1);
583  if (kill_c2 == 1)
584    c2.population.kill(c2);
585}
586
587//function executed on collision with Food population group
588function onFoodCollision()
589{
590  if (ExpParams.pickupNotStagnation == 1) idleSimulationSteps = 0;
591
592  //collect HP Box (by eating it :D)
593  print(Collision.Creature2.name + " [" + Collision.Creature2.population.name + "] picked a HP box");
594  Collision.Creature2.user2[4] = Collision.Creature2.user2[4] + 1;
595  Collision.Creature1.energy_m += Collision.Creature1.energy;
596  Collision.Creature2.energy_p += Collision.Creature1.energy;
597 
598  //kill HP Box
599  Collision.Creature1.population.kill(Collision.Creature1);
600 
601  writeTeamStatistics();
602}
603
604//function executed on collision with Upgrade population group
605function onUpgradesCollision()
606{
607  if (ExpParams.pickupNotStagnation == 1) idleSimulationSteps = 0;
608
609  //collect Upgrade Box (by eating it :D)
610  print(Collision.Creature2.name + " [" + Collision.Creature2.population.name + "] picked an upgrade box");
611  Collision.Creature2.user2[5] = Collision.Creature2.user2[5] + 1;
612  Collision.Creature1.energy_m += Collision.Creature1.energy;
613  Collision.Creature2.user1[1] = Collision.Creature2.user1[1] + Collision.Creature1.energy;
614 
615  //kill Upgrade Box
616  Collision.Creature1.population.kill(Collision.Creature1);
617 
618  writeTeamStatistics();
619}
620
621//function executed on Creature death
622//TODO: implement some statistics for dieing creature
623function onDied(cr)
624{
625  //ignore death of hp boxes and upgrades
626  if (cr.population.index < 2)
627   return ;
628
629  print(cr.name + " was killed");
630  for (var dam in cr.user3)
631    print(dam[1] + " dealt " + dam[2] + " damage");
632 
633  var f=File.appendDirect("creatures"+battleNumber+".txt","Creature statistics");
634  //f.writeString("Creature name; Team; Kills; Assists; Total damage dealt; Total damage received; HP boxes collected; Upgrade boxes collected; Lifespan");
635  f.writeString(cr.name + "; " + cr.population.name + "; " + cr.user2[0] + "; " + cr.user2[1] + "; " + cr.user2[2] + "; " + cr.user2[3] + "; " + cr.user2[4] + "; " + cr.user2[5] + "; " + cr.lifespan + "\n");
636  f.close();
637 
638  writeTeamStatistics();
639}
640
641// ////////////////////////////
642// ExpParams setters
643
644//reinit populations on change
645function ExpParams_teamCount_set()
646{
647  initPopulations();
648}
649
650function ExpParams_level_set()
651{
652  initLevel();
653}
654~
655
656# ################################
657# Team
658
659prop:
660id:teamCount
661name:Number of teams in Deathmatch
662type:d 1 10 1
663group:Team
664help:If set to 1, the number of teams will be equal to the number of genotypes in gene pool.
665
666prop:
667id:teamSize
668name:Number of creatures per team
669type:d 1 10 5
670group:Team
671
672prop:
673id:teamSpawningAreaSize
674name:Spawning area size for team
675type:f 10 30 20
676group:Team
677
678prop:
679id:creatureStartingEnergy
680name:Starting energy of creature
681type:f 0 1000 300
682group:Team
683help:Base starting energy level for each creature in teams
684
685# ################################
686# Attack parameters
687
688prop:
689id:diceSides
690name:Number of sides of dices
691type:f 1 10 1
692group:Attack rules
693
694prop:
695id:diceCount
696name:Number of dices to roll per attack
697type:f 0 10 5
698group:Attack rules
699
700prop:
701id:creatureDamage
702name:Basic damage multiplied by result of dice roll
703type:f 0 100 10
704group:Attack rules
705
706prop:
707id:friendlyFireDamageMultiplier
708name:Multiplier of energy taken when Creatures of the same team collide
709type:f 0 1 0.0
710group:Attack rules
711help:Set to 0 for no friendly fire, set to 1 if full damage should be dealt when interacting with team member
712
713prop:
714id:attackCooldown
715name:Number of simulation steps between two consecutive attacks of a creature
716type:f 100 10000 1000
717group:Attack rules
718help:Set this to 100 to nearly instantly resolve battles
719
720# ################################
721# Collectibles - HP Boxes & Upgrades
722
723prop:
724id:pickupNotStagnation
725name:Collectible pick-up resets stagnation counter?
726type:d 0 1 1
727help:If set to true picking up an item will restart counting towards stagnation, effects in longer battles.
728
729prop:
730id:hpBoxStartingEnergy
731name:Starting energy of HP Box
732type:f 0 1000 100
733group:Collectibles
734help:Base starting energy level for HP Box
735
736prop:
737id:hpBoxIdleEnergy
738name:Amount of energy lost by HP Box
739type:f 0 10 0.00
740group:Collectibles
741help:How much energy HP Box looses each step (0 - it will not disappear)
742
743prop:
744id:hpBoxProbability
745name:Probablity that new HP Box will spawn
746type:f 0 1 0.0005
747group:Collectibles
748help:Probability of HP Box appearing each step of simulation
749
750prop:
751id:hpBoxTotalCount
752name:Maximum number of HP Boxes on the field
753type:d 0 20 10
754group:Collectibles
755help:The total number of HP Boxes on the field will never exceed this number
756
757prop:
758id:upgradeBoxStartingEnergy
759name:Starting energy of Upgrade Box
760type:f 0 1000 500
761group:Collectibles
762help:Base starting energy level for Upgrade Box
763
764prop:
765id:upgradeBoxIdleEnergy
766name:Amount of energy lost by Upgrade Box
767type:f 0 10 0.00
768group:Collectibles
769help:How much energy Upgrade Box looses each step (0 - it will not disappear)
770
771prop:
772id:upgradeBoxProbability
773name:Probablity that new Upgrade Box will spawn
774type:f 0 1 0.0005
775group:Collectibles
776help:Probability of Upgrade Box appearing each step of simulation
777
778prop:
779id:upgradeBoxTotalCount
780name:Maximum number of Upgrade Boxes on the field
781type:d 0 20 10
782group:Collectibles
783help:The total number of Upgrade Boxes on the field will never exceed this number
784
785prop:
786id:upgradeBoxDecay
787name:How fast upgrade boost fades from creature
788type:f 0 10 0.1
789group:Collectibles
790help:Each step creature damage bonus will be decreased by given amount until it reaches 0
791
792prop:
793id:upgradeMultiplier
794name:Multiplier of bonus damage
795type:f 0 1 0.1
796group:Collectibles
797help:Value of collected bonus multiplied by this variable is taken as bonus damage
798
799# ################################
800# Other
801
802prop:
803id:level
804name:Level
805type:d -1 2 0
806help:Number of a level to battle (-1 is random)
807
808prop:
809id:stagnationInterval
810name:Number of idle simulation steps before Sudden Death
811type:d 0 10000 5000
812help:If no combat occurs during given number of steps, the Sudden Death mode is turned on (0 = Sudden Death all the time)
813
814prop:
815id:stagnationHealthReduce
816name:Sudden Death health reduce
817type:f 0 100 0.1
818help:If Suddent Death is turned on, creatures will lose given amount of HP each simulation step
819
820prop:
821id:debug
822name:Show additional debug messages
823type:d 0 1 0
824
Note: See TracBrowser for help on using the repository browser.