NGUInjector icon indicating copy to clipboard operation
NGUInjector copied to clipboard

Suggestion: Alternate Profile Formatting

Open dark-fedora opened this issue 2 years ago • 1 comments

Profile formatting is a little bit illogical, so I reworked my existing profile to be in a more clear way and to be easier to change in the future. Old profile:

{
    "Breakpoints": {
        "Magic": [
            {
              "Time": 0,
              "Priorities": ["CAPRIT-0","CAPWAN","CAPRIT-1","CAPRIT-2","TM"]
          },{
              "Time": 3600,
              "Priorities": ["CAPWAN", "CAPRIT-0", "CAPRIT-1", "CAPRIT-2","CAPRIT-3", "NGU-1"]
          },{
              "Time": 10800,
              "Priorities": ["CAPWAN","CAPRIT-0", "CAPRIT-1","CAPRIT-2","CAPRIT-3","CAPRIT-4","NGU-1"]
          }
        ],
        "Energy": [
            {
              "Time": 0,
              "Priorities": ["CAPALLBT", "CAPWAN", "CAPAUG-4", "CAPAUG-5", "CAPTM","NGU-2"]
          },{
              "Time": 3600,
              "Priorities": ["CAPALLBT", "CAPWAN", "NGU-2", "AT-0", "AT-1"]
          },{
              "Time": 10800,
              "Priorities": ["CAPALLBT", "CAPWAN", "NGU-4"]
          }
        ],
        "R3": [
            {
              "Time": 0,
              "Priorities": []
            }
        ],
        "Gear": [
          {
            "Time": 0,
            "ID": [442,139,136,443,230,226,142]
          },{
              "Time": 3600,
              "ID": [138,101,442,160,139,230,118]
          },{
              "Time": 10800,
              "ID": [136,230,142,442,160,444,161]
          }
        ],
        "Wandoos": [
            {
              "Time": 0,
              "OS": 0
            }
        ],
        "Diggers": [
            {
              "Time": 0,
              "List": []
          },{
              "Time": 300,
              "List": [9]
          },{
              "Time": 3600,
              "List": [4,5,6]
          },{
              "Time": 86400,
              "List": [2,6]
          }
        ],
        "NGUDiff": [
            {
              "Time": 0,
              "Diff": 0
            }
        ],
        "RebirthTime": 86620
    }
}

New profile:

{
	"Breakpoints": [{
		"Time": 0,
		"Energy": ["CAPALLBT","CAPWAN","CAPAUG-4","CAPAUG-5","CAPTM","NGU-2"],
		"Magic": ["CAPRIT-0","CAPWAN","CAPRIT-1","CAPRIT-2","TM"],
		"Gear": [442,139,136,443,230,226,142],
		"Wandoos": 0,
		"Diggers": [],
		"NGUDiff": 0
	},{
		"Time": 300,
		"Diggers": [9]
	},{
		"Time": 3600,
		"Magic": ["CAPWAN", "CAPRIT-0", "CAPRIT-1", "CAPRIT-2", "CAPRIT-3", "NGU-1"],
		"Energy": ["CAPALLBT", "CAPWAN", "NGU-2", "AT-0", "AT-1"],
		"Gear": [138,101,442,160,139,230,118],
		"Diggers": [4,5,6]
	},{
		"Time": 10800,
		"Energy": ["CAPALLBT", "CAPWAN", "NGU-4"],
		"Magic": ["CAPWAN", "CAPRIT-0", "CAPRIT-1", "CAPRIT-2", "CAPRIT-3", "CAPRIT-4", "NGU-1"],
		"Gear": [136,220,142,442,160,444,161],
	},{
		"Time": 86400,
		"Diggers": [2]
	}],
	"RebirthTime": 86620
}

I'm working on a Node.js utility to convert the latter format into the former, and if requested I can post it in the coming days.

dark-fedora avatar Aug 08 '22 06:08 dark-fedora

Code is completed; it's attached as a standalone Node.js script converter.js.txt .

dark-fedora avatar Aug 08 '22 07:08 dark-fedora