Crash: Infinite bonus healing onsome units IMPLEMENTED

Put here any issue you find, please avoid repetitions, so check if your issue is already there.
Post Reply
Stratego (dev)
Site Admin
Posts: 15741
Joined: Fri Apr 25, 2014 9:28 pm

Crash: Infinite bonus healing onsome units IMPLEMENTED

Post by Stratego (dev) »

i faced a weird problem, very hard to inventigate (i need to rebuild all level of projects to set a thing, that will let infinite values to go into file-saves and check which unit has "infinite" value instead of a normal number on its property.)

2 cases i investigated:

both problems were on Scaledfolks

in one game it was a UNIT_SCALEDFOLK_LIZARDMAN_TLACOTIN having Infinite bonusHealing
in the other game a UNIT_SCALEDFOLK_DRAGOLIA_FROST_KIN having Infinite bonusHealing

here are the units from the extracted game files

Code: Select all

{
  "abilityPower": 0,
  "armorNormal": 1,
  "armorPierce": 1,
  "attackTypeArrow": false,
  "attackTypeBurningRock": false,
  "bonusHealing": Infinity,
  "bonusMending": 0,
  "bonusMendingWhenConstructing": 0,
  "canBeCarried": true,
  "canBuild": false,
  "canFlyAsteroid": false,
  "canKillForest": false,
  "canOccupyBuilding": true,
  "canSeeStealthUnits": false,
  "canWalkForest": false,
  "canWalkGround": false,
  "canWalkHill": false,
  "canWalkSpace": false,
  "canWalkWater": false,
  "carriedUnits": [],
  "carryCapacity": 0,
  "column": 8,
  "convertPossibility": 0,
  "convertRange": 0,
  "convertResistance": 0.3,
  "cosmeticID": 0,
  "dodgeClose": 0,
  "dodgeCounter": 0,
  "dodgeRanged": 0,
  "facingDirection": "RIGHT",
  "healRate": 0,
  "hp": 85,
  "hpMax": 85,
  "hpMaxPercent": 0,
  "hpPercent": 0,
  "id": 408,
  "isCarriedButRevealed": false,
  "isCarriedUnitSurvivesIfIDie": false,
  "isCarrierCanCarryUnderConstruction": false,
  "isCarrierHidesCarriedUnits": true,
  "isCarrierLetCarriedUnitsToShoot": false,
  "isCarrierRemovesTerrainDrawbacks": false,
  "isFactory": false,
  "isFactoryThatNotAffectsFactoryLimits": false,
  "isOccupiableBuilding": false,
  "isStealthUnit": false,
  "isUnderConstruction": false,
  "isWalkableThrough": true,
  "maxActionCount": 1,
  "mendRate": 40,
  "needOccupacyDisplay": false,
  "nextRandom": [
    0.7806185238821637,
    0.127848895359294,
    0.02255586617180083
  ],
  "playerGlobalID": "309076",
  "playerGlobalIDCreator": "309076",
  "playerIndex": 1,
  "power": 19,
  "powerAccuracyPenalty": 0,
  "powerBaseModifier": 0,
  "powerRange": 0,
  "powerRangePenaltyPercent": 0,
  "powerRangePowerDrop": 0,
  "rangeAttack": 1,
  "rangeAttackMin": 0,
  "rangeFly": 0,
  "rangeFlySpace": 0,
  "rangeHeal": 0,
  "rangeMend": 1,
  "rangeSwim": 0,
  "rangeWalk": 3,
  "remainingAction": true,
  "remainingActionCount": 1,
  "remainingMovement": 3,
  "row": 26,
  "sight": 4,
  "trnBestAgainstMeGround": {
    "categories": [
      "U_ANTI_INFANTRY"
    ],
    "copyFromUnit": "UNIT_SPEARMAN"
  },
  "trnBestAgainstMeWater": {
    "categories": [
      "AND(",
      "U_SHIPS",
      "U_SHOOTER",
      ")",
      "AND(",
      "U_SHIPS",
      "U_MELEE",
      ")"
    ],
    "copyFromUnit": "UNIT_SWORDSMAN"
  },
  "trnCategories": [
    "U_FOOT",
    "U_LABORERS",
    "U_ALIVE",
    "U_LAND",
    "U_WATER",
    "U_LIZARDMAN",
    "DOC_OTHER"
  ],
  "trnWalkTerrain": [
    {
      "modifier": 1,
      "terrainType": "TERRAINS_FORESTWALKABLE"
    },
    {
      "modifier": 0.5,
      "terrainType": "TERRAINS_SWIMABLE"
    },
    {
      "modifier": 0.8,
      "terrainType": "TERRAINS_SHALLOWSAILABLE"
    },
    {
      "modifier": 0.6,
      "terrainType": "TERRAINS_ICEWALKABLE"
    },
    {
      "modifier": 1,
      "terrainType": "TERRAINS_SWAMPWALKABLE"
    }
  ],
  "unitSizeCol": 1,
  "unitSizeRow": 1,
  "unitStance": "NORMAL",
  "weaponEffectAffects": [
    {
      "efAlter": {
        "density": 1,
        "thisManyTimes": 1
      },
      "effectDefID": 573,
      "origin": 1,
      "turnsLeft": 0
    }
  ],
  "builders": [
    8,
    4073,
    4076
  ],
  "className": "Unit",
  "costTurn": 3,
  "grantorShopItems": [
    1845
  ],
  "isFunModeBuildable": false,
  "isNeedMapGrant": false,
  "isTechnology": false,
  "races": [
    4000
  ],
  "type": 4118,
  "upgradeAncestor": 0
}
and

Code: Select all

{
  "abilityPower": 4,
  "armorNormal": 5,
  "armorPierce": 5,
  "attackTypeArrow": false,
  "attackTypeBurningRock": true,
  "bonusHealing": Infinity,
  "bonusMending": 0,
  "bonusMendingWhenConstructing": 0,
  "canBeCarried": true,
  "canBuild": false,
  "canFlyAsteroid": false,
  "canKillForest": false,
  "canOccupyBuilding": true,
  "canSeeStealthUnits": false,
  "canWalkForest": false,
  "canWalkGround": false,
  "canWalkHill": false,
  "canWalkSpace": false,
  "canWalkWater": false,
  "carriedUnits": [],
  "carryCapacity": 0,
  "column": 1,
  "convertPossibility": 0.3,
  "convertRange": 4,
  "convertResistance": 0.4,
  "cosmeticID": 0,
  "dodgeClose": 0,
  "dodgeCounter": 0,
  "dodgeRanged": 0,
  "facingDirection": "RIGHT",
  "healRate": 0,
  "hp": 102,
  "hpMax": 102,
  "hpMaxPercent": 0,
  "hpPercent": 0,
  "id": 2683,
  "isCarriedButRevealed": false,
  "isCarriedUnitSurvivesIfIDie": false,
  "isCarrierCanCarryUnderConstruction": false,
  "isCarrierHidesCarriedUnits": true,
  "isCarrierLetCarriedUnitsToShoot": false,
  "isCarrierRemovesTerrainDrawbacks": false,
  "isFactory": false,
  "isFactoryThatNotAffectsFactoryLimits": false,
  "isOccupiableBuilding": false,
  "isStealthUnit": false,
  "isUnderConstruction": false,
  "isWalkableThrough": true,
  "maxActionCount": 1,
  "mendRate": 0,
  "needOccupacyDisplay": false,
  "nextRandom": [
    0.4929034457157845,
    0.7748082275873165,
    0.5982947632674507
  ],
  "playerGlobalID": "272063",
  "playerGlobalIDCreator": "272063",
  "playerIndex": 0,
  "power": 26,
  "powerAccuracyPenalty": 0,
  "powerBaseModifier": 0,
  "powerRange": 0,
  "powerRangePenaltyPercent": 0,
  "powerRangePowerDrop": 0,
  "rangeAttack": 1,
  "rangeAttackMin": 0,
  "rangeFly": 0,
  "rangeFlySpace": 0,
  "rangeHeal": 0,
  "rangeMend": 0,
  "rangeSwim": 0,
  "rangeWalk": 4,
  "remainingAction": true,
  "remainingActionCount": 1,
  "remainingMovement": 4,
  "row": 19,
  "sight": 6,
  "specUnitActions": [
    "CAN_FLY"
  ],
  "trnBestAgainstMeGround": {
    "categories": [
      "U_ANTI_AIR"
    ],
    "copyFromUnit": "UNIT_BIRD"
  },
  "trnBestAgainstMeWater": {
    "categories": [
      "AND(",
      "U_SHIPS",
      "U_SHOOTER",
      ")"
    ],
    "copyFromUnit": "UNIT_BIRD"
  },
  "trnCategories": [
    "U_FOOT",
    "U_CASTERS",
    "U_CASTERS_ARCANE",
    "U_ALIVE",
    "U_FLYING",
    "U_DRACONIAN",
    "DOC_FLYING"
  ],
  "trnWalkTerrain": [
    {
      "modifier": 1,
      "terrainType": "TERRAINS_FLYABLE"
    }
  ],
  "unitSizeCol": 1,
  "unitSizeRow": 1,
  "unitStance": "NORMAL",
  "weaponEffectAffects": [],
  "weaponEffectOptionCooldown": {
    "mKeys": [
      1048,
      1054,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0
    ],
    "mSize": 2,
    "mValues": [
      1,
      1,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0
    ]
  },
  "weaponEffects": {
    "mKeys": [
      1,
      1,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0
    ],
    "mSize": 1,
    "mValues": [
      498,
      498,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0
    ]
  },
  "className": "Unit",
  "costTurn": 8,
  "isFunModeBuildable": false,
  "isNeedMapGrant": false,
  "isTechnology": false,
  "races": [
    4000
  ],
  "type": 4210,
  "upgradeAncestor": 0
}

@Savra @makazuwr32 if anyone have any tiny idea how it can happen (legally) within game effects/techs maybe those being added on units multiple times or something - please tell me.


Illegally it can be set b a hacker but i wonder why would he set this - making his game crash too... - so i rather feel some bug or some infinite effect executing somehow.
User avatar
makazuwr32
Posts: 7830
Joined: Tue Oct 17, 2017 9:29 am
Location: Moscow, Russia

Re: Crash: Infinite bonus healing onsome units

Post by makazuwr32 »

there are indeed few ways to increase bonus heal rate:
1. Totem of healing from orcs - gives +1 (+100%) heal rate to units in range of its aura (range 1 if i remember correctly).
2. Hydra has increased heal rate - 200%.
3. Venomwyrm Dragolia has ability Draconic rage that also affects heal rate (by -7% per spell power thus when maxed it will reduce heal rate down by -56%).

But nothing else.
I am only slowly trying to use bonus heal rate (both positive and negative) and their effect onto balance so we did not make too many effects with it yet.
makazuwr32 wrote: Mon Sep 16, 2019 7:54 amWhen you ask to change something argument why...
Put some numbers, compare to what other races have and so on...
© by Makazuwr32™.
AoF Dev Co-Leader
Image
Stratego (dev)
Site Admin
Posts: 15741
Joined: Fri Apr 25, 2014 9:28 pm

Re: Crash: Infinite bonus healing onsome units

Post by Stratego (dev) »

i could not figure it out how it happens, so i made a "hack" or "workaround" so on game save if a unit have "Infinite" healBonus than i set 101%, so if you see that value that means it turned to "infinity" somehow.
Post Reply

Return to “Reporting Issues”