rvazarkar / NGUInjector

Apache License 2.0
27 stars 31 forks source link

NGUInjector

NGUInjector is an automation platform for the steam version of NGU Idle.

Instructions

Releases can be found in the releases section of the github page here. The latest release can be found here. Do not download the source code archive, instead download the zip file with the release version in the name (3.0.0.zip for example). Extract the downloaded archive to a directory of your choice. To start automation, run inject.bat in the extracted folder when NGU Idle is open. DO NOT RUN AS ADMINISTRATOR.

You'll know the injection has worked if you see the following in the upper left portion of NGU.

Injected

To upgrade to a new release, unload the injector from the General Settings page and then inject the new version.

Configuration

After injecting the dll, a new folder will be created on your Desktop called NGUInjector. Settings files will be automatically written to this directory. The following files are of interest:

A profiles folder will be created with the following files:

More profiles can be added to this folder at your discretion.

A logs folder will also be created with the following files:

Saving either file will automatically reload the settings in the configuration file. Reloading the game isn't necessary

Settings Configuration

An in game menu can be opened using the F1 button.

General Settings

Allocation Settings

Yggdrasil

Inventory

Titans

Adventure

Gold

Quests

Wishes

The Pit

Allocation

Allocation profiles can be found in the profiles folder and contain time breakpoints for configuring your gear, diggers, energy allocation and magic allocation. Sample allocation files can be found in the sampleprofile folder.

Sample 24 Hour Profile.

The time portion of every breakpoint refers to rebirth time in seconds. Time can be defined as a simple number (ex: 86400) or as a JSON object:

"Time": {
    "h": 1,
    "m": 30,
    "s": 20
},

Priorities can be modified with an optional percentage cap by adding a : and a percent. As an example:

CAPWISH-0:30

This will cap wish 0 but limit the maximum amount allocated to 30% of your current cap. When applied to non-cap priorities, it will limit to % of idle resource. Priorities will respect targets and not allocate to priorities that are target capped.

Energy

An energy breakpoint is structured as follows:

"Energy": [
    {
        "Time": 0,
        "Priorities": ["CAPNGU-0", "CAPWAN", "AT-1", "NGU-1"]
    }
]

Priorities come in 2 types - cap and non-cap. Any priority that has -X after it is 0 indexed.

A cap priority will use as much idle energy as possible and hit the highest BB breakpoint possible for the next 10 seconds. A non-cap priority will take a divider of your idle energy based on number of non-cap priorities and attempt to hit the highest BB breakpoint possible for the next 10 seconds. When a priority is calculated, it will push excess energy to later priorities.

In the above example the following actions will be taken:

Available cap priorities for Energy are as follows:

Available non-cap priorities for Energy are as follows:

More information on allocation indexes can be found on the wiki

Magic

A magic breakpoint is structured as follows:

"Magic": [
    {
        "Time": 0,
        "Priorities": ["CAPNGU-0", "CAPWAN", "BR", "NGU-1"]
    }
]

Priorities come in 2 types - cap and non-cap. Any priority that has -X after it is 0 indexed.

A cap priority will use as much idle energy as possible and hit the highest BB breakpoint possible for the next 10 seconds. A non-cap priority will take a divider of your idle energy based on number of non-cap priorities and attempt to hit the highest BB breakpoint possible for the next 10 seconds. When a priority is calculated, it will push excess energy to later priorities.

In the above example the following actions will be taken:

Available cap priorities for Magic are as follows:

Available non-cap priorities for Magic are as follows:

More information on allocation indexes can be found on the wiki

R3

An R3 breakpoint is structured as follows:

"R3": [
    {
        "Time": 0,
        "Priorities": ["HACK-1"]
    }
]

Available priorities for R3 are as follows:

Gear

A gear breakpoint is structured as follows:

"Gear": [
    {
        "Time": 0,
        "ID": [189, 442, 160, 441, 148, 169, 139, 184, 187, 185, 186, 188]
    }
]

The list of IDs is the IDs of the gear desired.

You can dump your loadouts from Gear Optimizer using the method found on this wiki page

Diggers

A digger breakpoint is structured as follows:

"Diggers": [
    {
        "Time": 3650,
        "List": [3, 4, 5, 8]
    }
]

The list of diggers is 0 indexed. Drop chance digger is 0, EXP digger is 11. More information can be found on the wiki

Wandoos

A wandoos breakpoint is structured as follows:

"Wandoos": [
    {
        "Time": 0,
        "OS": 1
    }
]

The OS is 0 indexed. Wandoos 98 is 0, Wandoos MEH is 1, Wandoos XL is 2

NGU Difficulty

A NGU Difficulty breakpoint is structured as follows:

"NGUDiff": [
    {
    "Time": 0,
    "Diff": 0
    }
]

The difficulty is 0 indexed. Normal NGUs is 0, Evil NGUs is 1, Sadistic NGUs is 2

Rebirth

Rebirth Breakpoints can be written 2 ways. A simple time based breakpoint is written as follows:

"RebirthTime": -1

A setting of -1 means no rebirths. Otherwise rebirth will be performed when the time in seconds is reached.

More complex rebirth breakpoints can be done as follows:

"Rebirth": {
    "Type": "Time",
    "Target": {
    "h": 24,
    "m": 1
    },
    "Challenges": []
},

The following types are available:

The following example will rebirth when your number is 10x your previous number:

"Rebirth": {
    "Type": "Number",
    "Target": 10,
    "Challenges": []
},

The following example will rebirth when you can kill 5 more bosses than your last rebirth:

"Rebirth": {
    "Type": "Bosses",
    "Target": 5,
    "Challenges": []
},

Additionally, you may specify challenges to rebirth into. The following string correspond to challenges:

Challenges must be given a number afterwards to specify which challenge is being completed. Challenges start at 1. Ex:

"Challenges": ["BASIC-1", "BASIC-2", "TC-1","NOEQ-1"]

Zone Stat Overrides

The optimal zone for gold sniping is calculated using a set of values from pins that show stats necessary to do each zone. If the manual threshold is met for a zone, the script will snipe a boss without fast combat. If the idle threshold is met, the script will snipe a boss using fast combat. Beast Mode will always be turned off for this.

The stats for the zones can be manually overriden using the zoneOverrides.json file in the user's directory. For the default stats used see here

Other Features

Quicksave + NGUSav.ES JSON

Pressing the F3 button will dump a NGU save file as well as a ngusav.es JSON file in the folder on desktop, which can be loaded into Gear Optimizer.

Quickload

Pressing the F7 button will load the save created by the quicksave function

Dump Equipment to Log

Pressing the F5 button will dump your current equipment to the log file for use in allocation files

Monitor Loot Log File

The adventure log will automatically be monitored and loot dropped will be written to loot.log in the folder on your desktop.

Monitor Money Pit/Daily Spin/Yggdrasil Results

The pitspin.log file will contain the results of each automatic money pit, daily spin, and yggdrasil harvest and will persist across sessions.

Quick Disable/Enable

Pressing the F2 button will globally disable all features of the app until re-enabled.

Turn on Autoattack in ITOPOD

Have you forgotten to turn on auto attack before and left yourself AFK in ITOPOD doing nothing? Me too! Pressing the F4 button will toggle the script to automatically turn auto attack on if you're in ITOPOD and its not on.

Auto Merge Boost to 100

Lock a boost in your inventory and the script will automatically merge boosts on to that boost until it hits level 100!

Acknowledgements

SharpMonoInjector can be found here. This wouldn't be possible without the excellent work done there. Obviously 4G for making NGU Idle. Altizar on discord for WISH logic and some other fixes Ingwar on discord for allocation profile logic and some other fixes