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

Last change on this file since 1097 was 634, checked in by sz, 8 years ago

Updated for the upcoming Framsticks release - the old Shapes object is now called WireframeAppearance?.

File size: 22.0 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  WireframeAppearance.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  WireframeAppearance.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 = ExpProperties.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 < ExpProperties.teamSize; j++)
131        {
132          var g; //Genotype object
133          if (ExpProperties.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 (ExpProperties.level == -1)
182    levelNumber = Math.random(levels.size);
183  else
184    levelNumber = ExpProperties.level;
185
186  var level = levels[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 >= ExpProperties.hpBoxTotalCount) return;
201 
202  if (Math.rnd01 > ExpProperties.hpBoxProbability) return;
203 
204  var food = Populations[0].add("//0\nm:Vstyle=hpbox\np:");
205  food.name = "HP Box";
206  food.idleen = ExpProperties.hpBoxIdleEnergy;
207  food.energy0 = ExpProperties.hpBoxStartingEnergy;
208  food.energy = food.energy0;
209  food.nnenabled = 0;
210}
211
212function tryCreateUpgradeBox()
213{
214  if (Populations[1].size >= ExpProperties.upgradeBoxTotalCount) return;
215 
216  if (Math.rnd01 > ExpProperties.upgradeBoxProbability) return;
217 
218  var weapon = Populations[1].add("//0\nm:Vstyle=weaponbox\np:");
219  weapon.name = "Weapon Box";
220  weapon.idleen = ExpProperties.upgradeBoxIdleEnergy;
221  weapon.energy0 = ExpProperties.upgradeBoxStartingEnergy;
222  weapon.energy = weapon.energy0;
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.data->cooldown=0.0;
244      cr.data->bonusdamage=0.0;
245      cr.data->kills=0;
246      cr.data->assists=0;
247      cr.data->damagedealt=0;
248      cr.data->damagereceived=0;
249      cr.data->hpcollected=0;
250      cr.data->upgradecollected=0;
251      cr.data->damagefrom=[]; //who dealt damage to this creature
252      cr.energy0 = ExpProperties.creatureStartingEnergy;
253      cr.energy = cr.energy0;
254      place_inTeamSpot(cr);
255      break;
256    }
257
258    if (!cr.boundingBoxCollisions(0))
259      {placed_ok=1; break;}
260  }
261  if (!placed_ok)
262    print("onBorn() could not avoid collisions.");
263}
264
265//place creature in random spot and make it head center of the map
266function place_centerhead(cr)
267{
268  var x, y, z;
269  var size=cr.bboxSize;
270  x = (World.wrldsiz - size.x) * Math.rnd01 - size.x / 2;
271  y = (World.wrldsiz - size.y) * Math.rnd01 - size.y / 2;
272  z = WorldMap.getHeight(x, y);
273
274  var hx = 0.0 + (World.wrldsiz / 2) - x;
275  var hy = 0.0 + (World.wrldsiz / 2) - y;
276  var alpha_rad = vectorsAngle([1.0, 0.0], [hx, hy]);
277
278  cr.rotate(0, 0, alpha_rad);
279  cr.locationSetBboxLow(x, y, z - 0.999);
280 
281  print("Creature placed in [" + x +" " + y + " " + z);
282
283  return ;
284}
285
286//Place creature in correct team spot (valid for Team creatures only)
287//Creatures are placed in circle with random rotation (commented out: heading center of the map) in their respective team groups
288function place_inTeamSpot(cr)
289{
290  var radius = 360.00 * (cr.population.index - 1) / teams;
291
292  var x, y, z;
293  x = (ExpProperties.teamSpawningAreaSize) * Math.rnd01 - cr.bboxSize.x / 2 - ExpProperties.teamSpawningAreaSize/2;
294  y = (ExpProperties.teamSpawningAreaSize) * Math.rnd01 - cr.bboxSize.y / 2 - ExpProperties.teamSpawningAreaSize/2;
295 
296  //vector of length half the world size minus spawning area size
297  var vect = [0.0 + World.wrldsiz/2 - ExpProperties.teamSpawningAreaSize/2 - 1.0, 0.0];
298  vect = rotateVector(vect, radius);
299 
300  //translate creature by given vector
301  //then translate by halfworld (as it is the center of the world
302  //and the positions were calculated for point [0,0]
303  x = x + vect[0] + World.wrldsiz/2;
304  y = y + vect[1] + World.wrldsiz/2;
305
306  z = WorldMap.getHeight(x, y);
307 
308  var alpha_rad = 360.0 * Math.rnd01; //random rotation
309 
310  //this would rotate creatures so that they would face the world center:
311  //var hx = 0.0 + (World.wrldsiz / 2) - x;
312  //var hy = 0.0 + (World.wrldsiz / 2) - y;
313  //var alpha_rad = vectorsAngle([1.0, 0.0], [hx, hy]);
314 
315  cr.rotate(0, 0, alpha_rad);
316  //place it mid-air
317  cr.locationSetBboxLow(x, y, z);
318
319  return ;
320}
321
322// ////////////////////////////////
323// Simulation steps
324
325function onStep()
326
327  idleSimulationSteps += 1;
328  tryCreateHPBox();
329  tryCreateUpgradeBox();
330 
331  lowerCooldownCounters();
332  applySuddenDeathModifier();
333
334  clearDeadCreatures();
335  checkGameState();
336}
337
338function writeTeamStatistics()
339{
340  var s = string(Simulator.stepNumber) + "; ";
341  var total = 0.0;
342  for (var i = 2; i < Populations.size; i++)
343  {
344    var pop=Populations[i];
345    var sum = 0.0;
346    for (var cr in pop)
347      sum += cr.energy;
348    s += "" + sum + "; ";
349    s += "" + pop.size + "; ";
350    total += sum;
351  }
352  if (total < 0) total == 0;
353  s += "" + total + "\n";
354 
355  var f=File.appendDirect("teams"+battleNumber+".txt","Teams statistics");
356  f.writeString(s);
357  f.close();
358}
359
360function clearDeadCreatures()
361{
362  for (var i = 2; i < Populations.size; i++)
363  {
364    var pop=Populations[i];
365    for (var j = 0; j < pop.size; j++)
366      {
367      var cr=pop[j];
368      if (cr.energy <= 0) {pop.kill(cr); j--;}
369      }
370  }
371}
372
373function applySuddenDeathModifier()
374{
375  if (idleSimulationSteps < ExpProperties.stagnationInterval) return;
376
377  for (var i = 2; i < Populations.size; i++)
378    for (var cr in Populations[i])
379      cr.energy -= ExpProperties.stagnationHealthReduce;
380}
381
382function lowerCooldownCounters()
383{
384  for (var i = 2; i < Populations.size; i++)
385  {
386    var pop=Populations[i];
387        for (var cr in pop)
388        {
389          if (cr.data->cooldown != null)
390          {
391            if (cr.data->cooldown > 0) cr.data->cooldown-=1;
392            if (cr.data->cooldown < 0) cr.data->cooldown=0.0;
393          }
394          if (cr.data->bonusdamage != null)
395          {
396            if (cr.data->bonusdamage > 0) cr.data->bonusdamage-=ExpProperties.upgradeBoxDecay;
397            if (cr.data->bonusdamage < 0) cr.data->bonusdamage=0.0;
398          }
399        }
400  }
401}
402
403function checkGameState()
404{
405  var alivePop = 0;
406  for (var i = 2; i < Populations.size; i++)
407    if (Populations[i].size > 0) alivePop += 1;
408 
409  if (alivePop == 0 && Simulator.stepNumber <= 1)
410  {
411    onExpInit(); //do initialization for user, because he forgot to do so
412        return;
413  }
414 
415  if (alivePop <= 1)
416  {
417    for (var i = 2; i < Populations.size; i++)
418    {
419      var pop=Populations[i];
420          if (pop.size > 0)
421          {
422            Simulator.print("Battle is OVER! The winner is: " + pop.name);
423               
424                //write stats of last living creatures
425                var f=File.appendDirect("creatures"+battleNumber+".txt","Creature statistics");
426                for (var cr in pop)
427                {
428                  //f.writeString("Creature name; Team; Kills; Assists; Total damage dealt; Total damage received; HP boxes collected; Upgrade boxes collected; Lifespan");
429                  if (cr.data->kills != null)
430                    f.writeString(cr.name + "; " + pop.name + "; " + cr.data->kills + "; " + cr.data->assists + "; " + cr.data->damagedealt + "; " + cr.data->damagereceived + "; " + cr.data->hpcollected + "; " + cr.data->upgradecollected + "; " + cr.lifespan + "\n");
431                }
432
433                f.close();
434          }
435    }
436        if (alivePop == 0) Simulator.print("Battle is OVER! Total annihilation!");
437       
438        Simulator.stop();
439  }
440}
441
442function print(msg)
443{
444  if (ExpProperties.debug)
445    Simulator.print(msg);
446}
447
448function stop(msg)
449{
450  Simulator.print(msg);
451  Simulator.stop();
452}
453
454// ////////////////////////////
455// Collisions
456
457//function executed on any Creature collission
458function onTeam0CrCollision, onTeam1CrCollision, onTeam2CrCollision, onTeam3CrCollision, onTeam4CrCollision, onTeam5CrCollision, onTeam6CrCollision, onTeam7CrCollision, onTeam8CrCollision, onTeam9CrCollision()
459{
460  var c1 = CrCollision.Creature1;
461  var c2 = CrCollision.Creature2;
462 
463  if (c1 == null) stop("2");
464  if (c2 == null) stop("2");
465 
466  if (c1.energy <= 0 || c2.energy <= 0)
467  {
468    //collision with already killed creature (chain resolution)
469        print("onCrCollision called with less than 2 Creatures");
470        return ;
471  }
472 
473  if (c1.population == null || c2.population == null)
474  {
475    //collision of creature without a group
476        print("onCrCollision called for creature without group, ignoring");
477        return ;
478  }
479 
480  //first condition should never occur, but who knows?
481  if (c1.population.index < 2 || c2.population.index < 2)
482  {
483    //collision with HP Box and Upgrades are handled separately
484        print("onCrCollision called for population 0 or 1, ignoring");
485        return ;
486  }
487 
488  idleSimulationSteps = 0;
489 
490  var kill_c1 = 0;
491  var kill_c2 = 0;
492  var dice1 = 0;
493  var dice2 = 0;
494  var changed = 0;
495  for (var i = 0; i < ExpProperties.diceCount; i++)
496  {
497    dice1 = dice1 + Math.random(ExpProperties.diceSides) + 1;
498        dice2 = dice2 + Math.random(ExpProperties.diceSides) + 1;
499  }
500  var energy1 = 0.0 + ExpProperties.creatureDamage * dice1;
501  var energy2 = 0.0 + ExpProperties.creatureDamage * dice2;
502  energy1 += ExpProperties.upgradeMultiplier * c1.data->bonusdamage;
503  energy2 += ExpProperties.upgradeMultiplier * c2.data->bonusdamage;
504  if (c1.population == c2.population)
505  {
506    energy1 = ExpProperties.friendlyFireDamageMultiplier * energy1;
507        energy2 = ExpProperties.friendlyFireDamageMultiplier * energy2;
508  }
509 
510  if (c1.data->cooldown == null) stop("3");
511  if (c2.data->cooldown == null) stop("3");
512 
513  if (c2.data->cooldown <= 0 && energy2 > 0)
514  {
515    changed = 1;
516 
517    c1.energy = c1.energy - energy2;
518        if (c1.energy < 0) c1.energy = 0;
519    print(c2.name + " [" + c2.population.name + "] rolled " + dice2 + " and dealt " + energy2 + " [+" + (ExpProperties.upgradeMultiplier * c2.data->bonusdamage) +" bonus] damage to " + c1.name + " [" + c1.population.name + "]");
520        c2.data->cooldown = ExpProperties.attackCooldown;
521        c2.data->damagedealt += energy1;
522        c1.data->damagereceived += energy1;
523        var vect = [c2.uid,c2.name];
524        var arrindex = arrayContains(c1.data->damagefrom, 0, c2.uid);
525        if (arrindex != -1)
526        {
527          vect.add(energy2 + c1.data->damagefrom[arrindex][2]);
528          c1.data->damagefrom[arrindex]=vect;
529        }
530        else
531        {
532          vect.add(energy2);
533          if (c1.data->damagefrom == null) c1.data->damagefrom = [];
534          c1.data->damagefrom.add(vect);
535          if (c1.energy > 0)
536            c2.data->assists += 1; //increase assists statistic
537        }
538        if (c1.energy <= 0)
539        {
540          c2.data->kills += 1; //increase kills statistic
541          kill_c1 = 1;
542        }
543  }
544 
545  if (c1.data->cooldown <= 0 && energy1 > 0)
546  {
547    changed = 1;
548       
549    c2.energy = c2.energy - energy1;
550        if (c2.energy < 0) c2.energy = 0;
551    print(c1.name + " [" + c1.population.name + "] rolled " + dice1 + " and dealt " + energy1 + " [+" + (ExpProperties.upgradeMultiplier * c1.data->bonusdamage) +" bonus] damage to " + c2.name + " [" + c2.population.name + "]");
552    c1.data->cooldown = ExpProperties.attackCooldown;
553        c1.data->damagedealt += energy1;
554        c2.data->damagereceived += energy1;
555        var vect = Vector.new();
556        vect.add(c1.uid);
557        vect.add(c1.name);
558        var arrindex = arrayContains(c2.data->damagefrom, 0, c1.uid);
559        if (arrindex != -1)
560        {
561          vect.add(energy1 + c2.data->damagefrom[arrindex][2]);
562          c2.data->damagefrom[arrindex] = vect;
563        }
564        else
565        {
566          vect.add(energy1);
567          if (c2.data->damagefrom == null) c2.data->damagefrom = [];
568          c2.data->damagefrom.add(vect);
569          if (c2.energy > 0)
570          {
571        c1.data->assists += 1; //increase assists statistic
572          }
573        }
574        if (c2.energy <= 0)
575        {
576          c1.data->kills += 1; //increase kills statistic
577          kill_c2 = 1;
578        }
579  }
580 
581  if (changed == 1)
582  {
583    writeTeamStatistics();
584  }
585 
586  //resolve kills
587  if (kill_c1 == 1)
588    c1.population.kill(c1);
589  if (kill_c2 == 1)
590    c2.population.kill(c2);
591}
592
593//function executed on collision with Food population group
594function onFoodCollision()
595{
596  if (ExpProperties.pickupNotStagnation == 1) idleSimulationSteps = 0;
597
598  //collect HP Box (by eating it :D)
599  print(Collision.Creature2.name + " [" + Collision.Creature2.population.name + "] picked a HP box");
600  Collision.Creature2.data->hpcollected += 1;
601  Collision.Creature1.transferEnergyTo(Collision.Creature2,Collision.Creature1.energy);
602 
603  //kill HP Box
604  Collision.Creature1.population.kill(Collision.Creature1);
605 
606  writeTeamStatistics();
607}
608
609//function executed on collision with Upgrade population group
610function onUpgradesCollision()
611{
612  if (ExpProperties.pickupNotStagnation == 1) idleSimulationSteps = 0;
613
614  //collect Upgrade Box (by eating it :D)
615  print(Collision.Creature2.name + " [" + Collision.Creature2.population.name + "] picked an upgrade box");
616  Collision.Creature2.data->upgradecollected += 1;
617  Collision.Creature2.data->bonusdamage += Collision.Creature1.energy;
618  Collision.Creature1.energy = 0;
619 
620  //kill Upgrade Box
621  Collision.Creature1.population.kill(Collision.Creature1);
622 
623  writeTeamStatistics();
624}
625
626//function executed on Creature death
627//TODO: implement some statistics for dieing creature
628function onDied(cr)
629{
630  //ignore death of hp boxes and upgrades
631  if (cr.population.index < 2)
632   return ;
633
634  print(cr.name + " was killed");
635  for (var dam in cr.data->damagefrom)
636    print(dam[1] + " dealt " + dam[2] + " damage");
637 
638  var f=File.appendDirect("creatures"+battleNumber+".txt","Creature statistics");
639  //f.writeString("Creature name; Team; Kills; Assists; Total damage dealt; Total damage received; HP boxes collected; Upgrade boxes collected; Lifespan");
640  f.writeString(cr.name + "; " + cr.population.name + "; " + cr.data->kills + "; " + cr.data->assists + "; " + cr.data->damagedealt + "; " + cr.data->damagereceived + "; " + cr.data->hpcollected + "; " + cr.data->upgradecollected + "; " + cr.lifespan + "\n");
641  f.close();
642 
643  writeTeamStatistics();
644}
645
646// ////////////////////////////
647// ExpProperties setters
648
649//reinit populations on change
650function ExpProperties_teamCount_set()
651{
652  initPopulations();
653}
654
655function ExpProperties_level_set()
656{
657  initLevel();
658}
659~
660
661# ################################
662# Team
663
664property:
665id:teamCount
666name:Number of teams in Deathmatch
667type:d 1 10 1
668group:Team
669help:If set to 1, the number of teams will be equal to the number of genotypes in gene pool.
670
671property:
672id:teamSize
673name:Number of creatures per team
674type:d 1 10 5
675group:Team
676
677property:
678id:teamSpawningAreaSize
679name:Spawning area size for team
680type:f 10 30 20
681group:Team
682
683property:
684id:creatureStartingEnergy
685name:Starting energy of creature
686type:f 0 1000 300
687group:Team
688help:Base starting energy level for each creature in teams
689
690# ################################
691# Attack parameters
692
693property:
694id:diceSides
695name:Number of sides of dices
696type:f 1 10 1
697group:Attack rules
698
699property:
700id:diceCount
701name:Number of dices to roll per attack
702type:f 0 10 5
703group:Attack rules
704
705property:
706id:creatureDamage
707name:Basic damage multiplied by result of dice roll
708type:f 0 100 10
709group:Attack rules
710
711property:
712id:friendlyFireDamageMultiplier
713name:Multiplier of energy taken when Creatures of the same team collide
714type:f 0 1 0.0
715group:Attack rules
716help:Set to 0 for no friendly fire, set to 1 if full damage should be dealt when interacting with team member
717
718property:
719id:attackCooldown
720name:Number of simulation steps between two consecutive attacks of a creature
721type:f 100 10000 1000
722group:Attack rules
723help:Set this to 100 to nearly instantly resolve battles
724
725# ################################
726# Collectibles - HP Boxes & Upgrades
727
728property:
729id:pickupNotStagnation
730name:Collectible pick-up resets stagnation counter?
731type:d 0 1 1
732help:If set to true picking up an item will restart counting towards stagnation, effects in longer battles.
733
734property:
735id:hpBoxStartingEnergy
736name:Starting energy of HP Box
737type:f 0 1000 100
738group:Collectibles
739help:Base starting energy level for HP Box
740
741property:
742id:hpBoxIdleEnergy
743name:Amount of energy lost by HP Box
744type:f 0 10 0.00
745group:Collectibles
746help:How much energy HP Box looses each step (0 - it will not disappear)
747
748property:
749id:hpBoxProbability
750name:Probablity that new HP Box will spawn
751type:f 0 1 0.0005
752group:Collectibles
753help:Probability of HP Box appearing each step of simulation
754
755property:
756id:hpBoxTotalCount
757name:Maximum number of HP Boxes on the field
758type:d 0 20 10
759group:Collectibles
760help:The total number of HP Boxes on the field will never exceed this number
761
762property:
763id:upgradeBoxStartingEnergy
764name:Starting energy of Upgrade Box
765type:f 0 1000 500
766group:Collectibles
767help:Base starting energy level for Upgrade Box
768
769property:
770id:upgradeBoxIdleEnergy
771name:Amount of energy lost by Upgrade Box
772type:f 0 10 0.00
773group:Collectibles
774help:How much energy Upgrade Box looses each step (0 - it will not disappear)
775
776property:
777id:upgradeBoxProbability
778name:Probablity that new Upgrade Box will spawn
779type:f 0 1 0.0005
780group:Collectibles
781help:Probability of Upgrade Box appearing each step of simulation
782
783property:
784id:upgradeBoxTotalCount
785name:Maximum number of Upgrade Boxes on the field
786type:d 0 20 10
787group:Collectibles
788help:The total number of Upgrade Boxes on the field will never exceed this number
789
790property:
791id:upgradeBoxDecay
792name:How fast upgrade boost fades from creature
793type:f 0 10 0.1
794group:Collectibles
795help:Each step creature damage bonus will be decreased by given amount until it reaches 0
796
797property:
798id:upgradeMultiplier
799name:Multiplier of bonus damage
800type:f 0 1 0.1
801group:Collectibles
802help:Value of collected bonus multiplied by this variable is taken as bonus damage
803
804# ################################
805# Other
806
807property:
808id:level
809name:Level
810type:d -1 2 0
811help:Number of a level to battle (-1 is random)
812
813property:
814id:stagnationInterval
815name:Number of idle simulation steps before Sudden Death
816type:d 0 10000 5000
817help:If no combat occurs during given number of steps, the Sudden Death mode is turned on (0 = Sudden Death all the time)
818
819property:
820id:stagnationHealthReduce
821name:Sudden Death health reduce
822type:f 0 100 0.1
823help:If Suddent Death is turned on, creatures will lose given amount of HP each simulation step
824
825property:
826id:debug
827name:Show additional debug messages
828type:d 0 1 0
829
Note: See TracBrowser for help on using the repository browser.