OPBE battle system BUG ;;

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • OPBE battle system BUG ;;

      This is an error posted by someone else about the OPBE combat system.
      I have the same problem.

      Is it possible to solve it?
      If you know how to solve it, please tell me.
      =====================================



      Bug with big number of civil ships.

      There is problem with big number of small cargo, heavy cargo, and recycler,
      attacker :
      small cargo : 7,000,000
      battlecruiser : 40,000

      defender:
      small cargo : 2,700,000
      battlecruiser : 15,000


      after battle

      attacker :
      small cargo : 6440792
      battlecruiser : 39857

      defender:
      small cargo : 2,700,000
      battlecruiser : 15,000

      result :
      The battle ended in a draw
      The attacker has lost a total of 2 246 842 000 units.
      The defender has lost a total of 0 units.

      problem : attacker has bigger number of ships, more battlecruisers but he cannot drop even 1 ship of defender.



      various parts of the problem
      It's weird when I try to simulate or test the OPBE.


      small cargo : 700,000
      battlecruiser : 15,000

      defender:
      small cargo : 270,000
      battlecruiser : 15,000
      =================

      small cargo : 700,000
      battlecruiser : 15,000
      death start: 111

      defender:
      small cargo : 270,000
      battlecruiser : 15,000
      --------------------------------------------------------------------------------------

      The post was edited 2 times, last by noonn ().

    • creo que este problema es conciente en el motor cuando se trata de batallas muy grande,
      Has mirado en las constants de OPBE creo que hay algo para cuando las batallas son grandes lo que creo que consume mas recursos.
      Tambien influye que de empate dependiendo de la cantidad de rondas que tengas permitido
      VERY SAD :/ :/ :/ :/
    • I quickly did a test and indeed some things are wrong, whether at the level of the maximum number of ships which are not taken into account in the calculation. There is also another concern about shields not being good with a reversal of this one. I think other things can also skew the fight.
    • Danter14 wrote:

      I quickly did a test and indeed some things are wrong, whether at the level of the maximum number of ships which are not taken into account in the calculation. There is also another concern about shields not being good with a reversal of this one. I think other things can also skew the fight.
      It seems that the problem occurs regardless of the number of ships in battle.
      It looks like you need a quick fix.
      I need help from someone who can solve it.
      --------------------------------------------------------------------------------------
    • To fix the bug, you just have to look in the files and test via the different functions.
      For my part, I started working on its global correction because a client asked me for it.
    • Danter14 wrote:

      To fix the bug, you just have to look in the files and test via the different functions.
      For my part, I started working on its global correction because a client asked me for it.
      Translation may not be good. ^^
      A quick look at the problem
      1. The enemy fleet's armor cannot be reduced due to the sum of the total attack power.
      2. Combat seems to have issues with shields and armor.
      3. Each Calculate equally by adding the attack damage each ship received from the enemy.
      4. Attacks cannot exceed the maximum HP of the ship.

      Please share when bugs are fixed.
      thank you
      --------------------------------------------------------------------------------------
    • yamilrh wrote:

      creo que este problema es conciente en el motor cuando se trata de batallas muy grande,
      Has mirado en las constants de OPBE creo que hay algo para cuando las batallas son grandes lo que creo que consume mas recursos.
      Tambien influye que de empate dependiendo de la cantidad de rondas que tengas permitido

      Danter14 wrote:

      To fix the bug, you just have to look in the files and test via the different functions.
      For my part, I started working on its global correction because a client asked me for it.

      I seem to have found the problem part.
      After modifying the code it works fine.
      Please try a test.

      combatObject/ShipsCleaner.php

      ==============
      find line
      if (USE_BIEXPLOSION_SYSTEM && $this->lastShipHit >= $this->fighters->getCount() / PROB_TO_REAL_MAGIC)
      {
      log_comment('lastShipHit bigger than getCount()/magic');
      if ($prob < MIN_PROB_TO_EXPLODE)
      {
      $probToExplode = 0;
      }
      else
      {
      $probToExplode = $prob;
      }
      }
      //otherwise statistically:
      else
      {
      log_comment('lastShipHit smaller than getCount()/magic');
      $probToExplode = $prob * (1 - MIN_PROB_TO_EXPLODE);
      }


      Modify as below

      if ($prob < MIN_PROB_TO_EXPLODE)
      {
      log_comment('lastShipHit smaller than getCount()/magic');
      $probToExplode = $prob * (1 - MIN_PROB_TO_EXPLODE);
      }
      else
      {
      log_comment('lastShipHit smaller than getCount()/magic');
      $probToExplode = $prob;
      }

      ==================


      Please let me know if you have better code.
      Thank you all.

      ^^ :D :D
      --------------------------------------------------------------------------------------