Skip to content

Commit 0654180

Browse files
committed
Update readme and finalise pipeline
1 parent 1c5616f commit 0654180

File tree

2 files changed

+20
-67
lines changed

2 files changed

+20
-67
lines changed

.github/workflows/pipeline.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ jobs:
6262
run: echo "should_release=${{ env.PUBLISHING }}" >> "$GITHUB_OUTPUT"
6363
release:
6464
name: Release NMSpy wheels and source build to PyPI
65-
# Only run this job if the commit was tagged.
66-
if: ${{ startsWith(github.ref, 'refs/tags') && needs.release_check.outputs.should_release == 'true' }}
65+
# Only run this job if we merge into master, we need to do a release, and we don't specifically have some tag to skip publishing to pypi.
66+
if: ${{ github.ref == 'refs/heads/master' && needs.release_check.outputs.should_release == 'true' && !startsWith(github.event.head_commit.message, '[skip pypi]') }}
6767
needs:
6868
- build_test
6969
- release_check
@@ -86,7 +86,7 @@ jobs:
8686

8787
test-release:
8888
name: Release NMSpy wheels and source build to test-PyPI
89-
# Only run this job if we merge into master. Addition check is added later.
89+
# Only run this job if we merge into master and if we need to do a release.
9090
if: ${{ github.ref == 'refs/heads/master' && needs.release_check.outputs.should_release == 'true' }}
9191
needs:
9292
- build_test

README.md

Lines changed: 17 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,86 +1,39 @@
11
# NMS.py
22

3-
NMS.py, a python hooking and modding library for No Man's Sky.
3+
NMS.py is a python library to expose interal game functions for No Man's Sky.
44

5-
**NOTE:** This is a heavy WIP. The API is NOT considered stable currently and a decent amount of data is missing and/or wrong.
5+
**NOTE:** This library is missing a lot of info which will gradually get added over time.
6+
It should also be noted that Game updates can very easily break mods utilising NMS.py, so care should be taken when using mods.
7+
Any responsibility for broken saves is entirely on the users of this library.
68

79
## Installation
810

9-
There are two ways to install NMS.py.
11+
**Note:** Before you start: NMS.py can only run on python 3.9 - 3.11 inclusive. Newer versions are not supported due to issues injecting python into them unfortunately.
12+
It is recommended that you download python from the [official site](https://www.python.org/downloads) as the windows store version may have issues, as well as the managed python which [uv](https://docs.astral.sh/uv/) installs.
1013

11-
### Basic installation
12-
13-
This method is for those who don't use python much or are not familiar with the python ecosystem (ie. virtual environments etc).
14-
15-
1. Download a version of python [3.9](https://www.python.org/downloads/release/python-3913/) or [3.10](https://www.python.org/downloads/release/python-31011/) from the official python site.
16-
Note: Later versions of python may work (eg. 3.11), however pymem seems to have issues injecting them sometimes it seems, so I find it better to stick to a slightly older version for simplicity.
17-
1. Clone/download this repository to somewhere on your computer.
18-
1. Open `cmd` in the directory this was downloaded to. This can be done most easily by typing `cmd` in the explorer path bar.
19-
1. Run `python -m pip install .`
20-
This should install all the dependencies including pulling the latest [`pyMHF`](https://github.com/monkeyman192/pyMHF) from GitHub which is the core framework which is used to power `NMS.py`.
21-
22-
### Advanced installation
23-
24-
This method is more suited for those who want to modify `pyMHF` or `NMS.py` as it doesn't involve installing `NMS.py`, but will just run `NMS.py` in local mode.
25-
This will assume some experience with python.
26-
27-
1. Clone both [`pyMHF`](https://github.com/monkeyman192/pyMHF) and `NMS.py` into separate folders. I recommend creating a directory and then cloning both into that directory so that the folders are siblings.
28-
1. Install `pyMHF` in editable mode. This can done in either a virtual envirnonment or using the system python by running `python -m pip install -e .` in the `pyMHF` folder.
29-
1. In the `NMS.py` folder, edit the `pymhf.cfg` file. Depending on whether or not you are wanting to run the old version of the game (4.13), or the latest on steam, will change what settings to change. (See `settings` section below)
30-
1. In the `pymhf` folder add a python file called `run_nms.py` which looks like the following:
31-
```py
32-
from pymhf import load_module
33-
34-
DIR = "<absolute path to NMS.py/nmspy folder>"
35-
36-
load_module("nmspy", DIR, True)
37-
```
38-
5. Run `python ./run_nms.py`
14+
The recommended way to install NMS.py is to simply run `python -m pip install nmspy`. This will install NMS.py and its' dependency [`pyMHF`](https://github.com/monkeyman192/pyMHF) into your system python. You can of course install it in a venv or as a dependency using uv if you prefer.
3915

4016
## Usage
4117

42-
The following is for anyone running `NMS.py` as per the "Basic Installation" above.
43-
44-
1. Run `pymhf nmspy`. The first time this is run it will copy the config file over to your appdata folder (`%AppData%/pymhf/nmspy`) and it will guide you through configuring `NMS.py`.
45-
If you ever want to return to this configuration menu, run `python --config nmspy`.
46-
1. Once the game has been configured, you will have an option to run it. Selecting `y` should run the game. This will create a popup with the `pyMHF` logo and this is your log terminal.
47-
If this doesn't occur then your firewall may be blocking the port 6770, so make sure that a TCP connection is allowed on this port on your local network (ie. 127.0.0.0, or possibly 0.0.0.0)
48-
49-
If all goes well you should see `"Serving on executor ('127.0.0.1', 6770)"`.
18+
To run NMS.py, enter the following command into a terminal:
19+
```
20+
pymhf run nmspy
21+
```
5022

51-
If the game starts paused, you'll need to press the return key on your keyboard in the console window that `pymhf nmspy` was run from to start the game properly.
23+
This will display some config options to complete. The only option to consider is the location of the mods folder. It is recommended that you create a new folder inside the normal MODS folder which can dontain all the python scripts you want to be run.
5224

53-
Any exceptions will be logged to a file named `CRITICAL_ERROR.txt`, and logs will be placed in a `logs` directory.
25+
If NMS.py starts up successfully you should see two extra windows; an auto-created GUI from pyMHF, and a terminal window which will show the logs for pyMHF.
5426

5527
If you want to stop NMS, you can press `ctrl + C` in the window you started the process in to kill it.
5628

57-
## Settings
58-
59-
Depending on what version of NMS you are running, you'll need to change different settings:
60-
61-
### Running NMS 4.13 (Fractals)
62-
63-
`[binary]`:
64-
- `path`: The absolute path to the `NMS.exe` which is to be run.
65-
- `steam_gameid`: This key should be either commented out or not present.
66-
- `mod_dir`: The absolute path to the directory containing mods.
67-
- `start_paused`: Should be `True`. This can be `False`, but you get better hook coverage with the value set to `True`.
68-
69-
### Running latest Steam version
70-
71-
`[binary]`:
72-
- `steam_gameid`: This should have the value `275850`.
73-
- `mod_dir`: The absolute path to the directory containing mods.
74-
- `internal_mod_dir`: This key should be either commented out or not present for now.
75-
- `start_paused`: Must be `False`.
76-
77-
7829
### Credits
7930

8031
Thanks to the developers of minhook, cyminhook and pymem, all of which are instrumental in making this framework possible.
8132

82-
Big thanks to [vitalised](https://github.com/VITALISED) for their constant RE discussions. and [gurren3](https://github.com/gurrenm3) for the same as well as the initial work done on NMS.API which heavily inspired the creation of this.
33+
Big thanks to [vitalised](https://github.com/VITALISED) for their constant RE discussions, and [gurren3](https://github.com/gurrenm3) for the same as well as the initial work done on NMS.API which heavily inspired the creation of this.
8334

8435
Thanks also to the many people I have discussed various NMS details with, both big and small.
8536

86-
Thanks to rayrod for initially discovering the pdb.
37+
Thanks to [RaYRoD](https://github.com/RaYRoD-TV) for initially discovering the pdb as well as regular insightful discussions regarding all things reverse engineering NMS.
38+
39+
Thanks also to anyone who has contributed function definitions or patterns. Any and all help is always appreciated!

0 commit comments

Comments
 (0)