Evolution/Skill Tree/load: Difference between revisions

From Portals of Phereon Wiki
Content added Content deleted
mNo edit summary
No edit summary
Line 1: Line 1:
{\"Centaur\":[{\"name\":\"KnockBack\",\"count\":1,\"costPrimary\":7,\"type\":4,\"connectionRight\":true,\"connectionBottom\":true},{\"name\":\"Push\",\"count\":1,\"costPrimary\":7,\"type\":4,\"connectionRight\":true,\"connectionBottom\":true},{\"name\":\"Strength\",\"count\":1,\"costPrimary\":5,\"type\":1,\"connectionRight\":true,\"connectionBottom\":true},{\"name\":\"Virility\",\"count\":2,\"costPrimary\":5,\"type\":3,\"connectionRight\":true,\"connectionBottom\":true},{\"name\":\"Health\",\"count\":2,\"costPrimary\":5,\"type\":3,\"connectionRight\":true,\"connectionBottom\":false},{\"name\":\"Ram\",\"count\":1,\"costPrimary\":8,\"costSecondary\":2,\"speciesSecondary\":78,\"type\":4,\"connectionRight\":false,\"connectionBottom\":true},{\"name\":\"Health\",\"count\":2,\"costPrimary\":5,\"type\":1,\"connectionRight\":true,\"connectionBottom\":true},{\"name\":\"Core\",\"count\":1,\"costPrimary\":10,\"type\":9,\"connectionRight\":true,\"connectionBottom\":true},{\"name\":\"Virility\",\"count\":5,\"costPrimary\":3,\"type\":1,\"connectionRight\":true,\"connectionBottom\":true},{\"name\":\"Rush\",\"count\":1,\"costPrimary\":7,\"costSecondary\":7,\"speciesSecondary\":78,\"type\":4,\"connectionRight\":false,\"connectionBottom\":false},{\"name\":\"Cock\",\"count\":2,\"costPrimary\":4,\"type\":1,\"connectionRight\":true,\"connectionBottom\":true},{\"name\":\"Virility\",\"count\":2,\"costPrimary\":5,\"type\":3,\"connectionRight\":false,\"connectionBottom\":true},{\"name\":\"Virility\",\"count\":5,\"costPrimary\":3,\"type\":1,\"connectionRight\":true,\"connectionBottom\":true},{\"name\":\"Virility\",\"count\":2,\"costPrimary\":5,\"type\":3,\"connectionRight\":false,\"connectionBottom\":true},{\"name\":\"Cum\",\"count\":1,\"costPrimary\":5,\"type\":1,\"connectionRight\":true,\"connectionBottom\":false},{\"name\":\"Virility\",\"count\":5,\"costPrimary\":3,\"type\":1,\"connectionRight\":true,\"connectionBottom\":false},{\"name\":\"Strength\",\"count\":2,\"costPrimary\":5,\"type\":3,\"connectionRight\":true,\"connectionBottom\":true},{\"name\":\"LustRes\",\"count\":1,\"costPrimary\":2,\"costSecondary\":15,\"speciesSecondary\":10,\"type\":1,\"connectionRight\":true,\"connectionBottom\":true},{\"name\":\"Strength\",\"count\":2,\"costPrimary\":5,\"type\":3,\"connectionRight\":true,\"connectionBottom\":true},{\"name\":\"Virility\",\"count\":5,\"costPrimary\":2,\"type\":1,\"connectionRight\":true,\"connectionBottom\":false},{\"name\":\"StrengthForm\",\"count\":1,\"costPrimary\":15,\"costSecondary\":15,\"speciesSecondary\":31,\"type\":6,\"connectionRight\":false,\"connectionBottom\":true},{\"name\":\"Health\",\"count\":3,\"costPrimary\":5,\"type\":1,\"connectionRight\":false,\"connectionBottom\":false},{\"name\":\"Strength\",\"count\":5,\"costPrimary\":10,\"costSecondary\":5,\"speciesSecondary\":78,\"type\":1,\"connectionRight\":false,\"connectionBottom\":false},{\"name\":\"Speed\",\"count\":1,\"costPrimary\":3,\"costSecondary\":8,\"speciesSecondary\":3,\"type\":1,\"connectionRight\":false,\"connectionBottom\":false},{\"name\":\"ArmorHorse\",\"count\":1,\"costPrimary\":5,\"costSecondary\":10,\"speciesSecondary\":31,\"type\":7,\"connectionRight\":false,\"connectionBottom\":false}]}{{Documentation}}
{
"Centaur": [
{
"name": "KnockBack",
"count": 1,
"costPrimary": 7,
"type": 4,
"connection": [2,6]
},
{
"name": "Push",
"count": 1,
"costPrimary": 7,
"type": 4,
"connection": [3,7]
},
{
"name": "Strength",
"count": 1,
"costPrimary": 5,
"type": 1,
"connection": [4,8]
},
{
"name": "Virility",
"count": 2,
"costPrimary": 5,
"type": 3,
"connection": [5,9]
},
{
"name": "Health",
"count": 2,
"costPrimary": 5,
"type": 3,
"connection": [10]
},
{
"name": "Ram",
"count": 1,
"costPrimary": 8,
"speciesSecondary": 78,
"costSecondary": 2,
"type": 4,
"connection": [7]
},
{
"name": "Health",
"count": 2,
"costPrimary": 5,
"type": 1,
"connection": [8,12]
},
{
"name": "Core",
"count": 1,
"costPrimary": 10,
"type": 9,
"connection": [9,13]
},
{
"name": "Virility",
"count": 5,
"costPrimary": 3,
"type": 1,
"connection": [10,14]
},
{
"name": "Rush",
"count": 1,
"costPrimary": 7,
"speciesSecondary": 78,
"costSecondary": 7,
"type": 4
},
{
"name": "Cock",
"count": 2,
"costPrimary": 4,
"type": 1,
"connection": [12,16]
},
{
"name": "Virility",
"count": 2,
"costPrimary": 5,
"type": 3,
"connection": [13]
},
{
"name": "Virility",
"count": 5,
"costPrimary": 3,
"type": 1,
"connection": [14,18]
},
{
"name": "Virility",
"count": 2,
"costPrimary": 5,
"type": 3,
"connection": [15]
},
{
"name": "Cum",
"count": 1,
"costPrimary": 5,
"type": 1,
"connection": [20]
},
{
"name": "Virility",
"count": 5,
"costPrimary": 3,
"type": 1,
"connection": [21]
},
{
"name": "Strength",
"count": 2,
"costPrimary": 5,
"type": 3,
"connection": [18,22]
},
{
"name": "LustRes",
"count": 1,
"costPrimary": 2,
"speciesSecondary": 10,
"costSecondary": 15,
"type": 1,
"connection": [19,23]
},
{
"name": "Strength",
"count": 2,
"costPrimary": 5,
"type": 3,
"connection": [20,24]
},
{
"name": "Virility",
"count": 5,
"costPrimary": 2,
"type": 1,
"connection": [25]
},
{
"name": "StrengthForm",
"count": 1,
"costPrimary": 15,
"speciesSecondary": 31,
"costSecondary": 15,
"type": 6,
"connection": [22]
},
{
"name": "Health",
"count": 3,
"costPrimary": 5,
"type": 1
},
{
"name": "Strength",
"count": 5,
"costPrimary": 10,
"speciesSecondary": 78,
"costSecondary": 5,
"type": 1
},
{
"name": "Speed",
"count": 1,
"costPrimary": 3,
"speciesSecondary": 3,
"costSecondary": 8,
"type": 1
},
{
"name": "ArmorHorse",
"count": 1,
"costPrimary": 5,
"speciesSecondary": 31,
"costSecondary": 10,
"type": 7
}
]
}

Revision as of 03:30, 24 December 2021

{\"Centaur\":[{\"name\":\"KnockBack\",\"count\":1,\"costPrimary\":7,\"type\":4,\"connectionRight\":true,\"connectionBottom\":true},{\"name\":\"Push\",\"count\":1,\"costPrimary\":7,\"type\":4,\"connectionRight\":true,\"connectionBottom\":true},{\"name\":\"Strength\",\"count\":1,\"costPrimary\":5,\"type\":1,\"connectionRight\":true,\"connectionBottom\":true},{\"name\":\"Virility\",\"count\":2,\"costPrimary\":5,\"type\":3,\"connectionRight\":true,\"connectionBottom\":true},{\"name\":\"Health\",\"count\":2,\"costPrimary\":5,\"type\":3,\"connectionRight\":true,\"connectionBottom\":false},{\"name\":\"Ram\",\"count\":1,\"costPrimary\":8,\"costSecondary\":2,\"speciesSecondary\":78,\"type\":4,\"connectionRight\":false,\"connectionBottom\":true},{\"name\":\"Health\",\"count\":2,\"costPrimary\":5,\"type\":1,\"connectionRight\":true,\"connectionBottom\":true},{\"name\":\"Core\",\"count\":1,\"costPrimary\":10,\"type\":9,\"connectionRight\":true,\"connectionBottom\":true},{\"name\":\"Virility\",\"count\":5,\"costPrimary\":3,\"type\":1,\"connectionRight\":true,\"connectionBottom\":true},{\"name\":\"Rush\",\"count\":1,\"costPrimary\":7,\"costSecondary\":7,\"speciesSecondary\":78,\"type\":4,\"connectionRight\":false,\"connectionBottom\":false},{\"name\":\"Cock\",\"count\":2,\"costPrimary\":4,\"type\":1,\"connectionRight\":true,\"connectionBottom\":true},{\"name\":\"Virility\",\"count\":2,\"costPrimary\":5,\"type\":3,\"connectionRight\":false,\"connectionBottom\":true},{\"name\":\"Virility\",\"count\":5,\"costPrimary\":3,\"type\":1,\"connectionRight\":true,\"connectionBottom\":true},{\"name\":\"Virility\",\"count\":2,\"costPrimary\":5,\"type\":3,\"connectionRight\":false,\"connectionBottom\":true},{\"name\":\"Cum\",\"count\":1,\"costPrimary\":5,\"type\":1,\"connectionRight\":true,\"connectionBottom\":false},{\"name\":\"Virility\",\"count\":5,\"costPrimary\":3,\"type\":1,\"connectionRight\":true,\"connectionBottom\":false},{\"name\":\"Strength\",\"count\":2,\"costPrimary\":5,\"type\":3,\"connectionRight\":true,\"connectionBottom\":true},{\"name\":\"LustRes\",\"count\":1,\"costPrimary\":2,\"costSecondary\":15,\"speciesSecondary\":10,\"type\":1,\"connectionRight\":true,\"connectionBottom\":true},{\"name\":\"Strength\",\"count\":2,\"costPrimary\":5,\"type\":3,\"connectionRight\":true,\"connectionBottom\":true},{\"name\":\"Virility\",\"count\":5,\"costPrimary\":2,\"type\":1,\"connectionRight\":true,\"connectionBottom\":false},{\"name\":\"StrengthForm\",\"count\":1,\"costPrimary\":15,\"costSecondary\":15,\"speciesSecondary\":31,\"type\":6,\"connectionRight\":false,\"connectionBottom\":true},{\"name\":\"Health\",\"count\":3,\"costPrimary\":5,\"type\":1,\"connectionRight\":false,\"connectionBottom\":false},{\"name\":\"Strength\",\"count\":5,\"costPrimary\":10,\"costSecondary\":5,\"speciesSecondary\":78,\"type\":1,\"connectionRight\":false,\"connectionBottom\":false},{\"name\":\"Speed\",\"count\":1,\"costPrimary\":3,\"costSecondary\":8,\"speciesSecondary\":3,\"type\":1,\"connectionRight\":false,\"connectionBottom\":false},{\"name\":\"ArmorHorse\",\"count\":1,\"costPrimary\":5,\"costSecondary\":10,\"speciesSecondary\":31,\"type\":7,\"connectionRight\":false,\"connectionBottom\":false}]}

[view | edit | purge]Documentation

Pre-script preparation:

Find \r\n and replace with (empty) in regex mode (text mode)

Script operation:

  1. Open web console
  2. Set the file text, type and copy the text inside the single quotes for each skill tree
    let skillText = {
      "Centaur": TEXT FROM SKILL FILE HERE,
      "PlantGirl": TEXT FROM SKILL FILE HERE,
      "Mermaid": TEXT FROM SKILL FILE HERE,
      "LavaGirl": TEXT FROM SKILL FILE HERE,
      "Lymean": TEXT FROM SKILL FILE HERE,
      "Succubus": TEXT FROM SKILL FILE HERE,
      "Harpy": TEXT FROM SKILL FILE HERE,
      "LizardGirl": TEXT FROM SKILL FILE HERE,
      "InsectGirl": TEXT FROM SKILL FILE HERE,
      "BeastGirl": TEXT FROM SKILL FILE HERE,
      "Shadow": TEXT FROM SKILL FILE HERE,
      "Tanid": TEXT FROM SKILL FILE HERE
    };
    
  3. Run this script:
    let json = {},outputText = "";
    function createEntry(node) {
      let outObj = {};
      outObj.name = node.name;
      outObj.count = node.amountPossible;
      outObj.costPrimary = node.pointCostPrimary;
      if (node.pointCostSecondary > 0) {
        outObj.costSecondary = node.pointCostSecondary;
        outObj.speciesSecondary = node.secondarySpeciesPoints;
      }
      outObj.type = node.nodeType;
      outObj.connectionRight = node.connectionRight;
      outObj.connectionBottom = node.connectionBottom;
      return outObj;
    }
    for (const prop in skillText) {
      if (skillText.hasOwnProperty(prop)) {
        for (var i = 0; i < skillText[prop].length; i++) { 
          skillText[prop][i] = createEntry(skillText[prop][i]);
        }
      }
    }
    outputText += JSON.stringify(skillText);
    outputText += "{{Documentation}}";
    outputText;
    
  4. Press copy button on the output string
  5. Replace all the text in Evolution/Skill_Tree/load with the output, remove any " before and after the output
[view | edit | purge]The above documentation is transcluded fromEvolution/Skill Tree/load/doc.