Game API tuts basicworkflow
Basic workflow in Visual Studios[edit | edit source]
Notes[edit | edit source]
This is not a 'You have to do it like this'
It's barely a 'recommended way of doing this'
But it can be used as a start, to help you find a good workflow that works for you, when working with mods.
(When clicking 'close-server' It is recommended to not be in a 'You are dead' or 'Respawn' screen ingame. As of A7.6.1 it usually causes Empyrion to crash)
Open software[edit | edit source]
-It is recommended to have visual studios open, with the project you are writing.
Optionally, it can be an idea to have a second visual studious open, with a project you might be referencing (such as the standard project), or another, if it have usefull functionality for you.
-It is recommended to have several folders open, to ease workflow:
--C:\Users\<username>\Documents\Visual Studio 2017\Projects\SpotGuard\SpotGuard\bin\Debug (1)
Folder of visual studios, onto the project you are currently working at (In this example, it's called 'SpotGuard')
In this folder, your 'primary file' will be created, when building your project: (in this example, it's called 'SpotGuard.dll')
--D:\APPS\steamapps\common\Empyrion - Dedicated Server (2)
Folder of your dedicated Empyrion server. I recommend using a local version for testing-purposes.
In this folder, the important file is 'EmpyrionDedicated.cmd', which will start your server. (5)
--D:\APPS\steamapps\common\Empyrion - Dedicated Server\Content\Mods\SpotGuard (3)
The folder of your mod, inside your servers Mods folder (In this example, the mod is 'SpotGuard')
--D:\APPS\steamapps\common\Empyrion - Dedicated Server\Logs\ (4)
Optionally, you might want to have the log-folder of your server open. The largest number will usually be most recent logs. Inside the newest "Dedicated_" file, will contain the most recent server-launch log.
In this file, you can see errors that might have occured during loading of your mod, aswell as where
will end up
-If your computer can handle it, it is recommended to have Empyrion running in the background
This saves you from loading the game up, every time you need to test something.
Basic workflow[edit | edit source]
- Make your edits to your mod-project in Visual studios (jump between open instances as needed)
- Click 'Build' > 'Build Solution' in the menu
- Refer to the 'Error list'. Warnings are fine. Errors should be resolved.
- Open your project folder (1)
- Copy the file <yourproject>.dll (In above example 'SpotGuard.dll')
- Go to mod folder in your server (3)
- Paste file here. Overwrite the current.
- Go to your server folder (2)
- Launch your server (5)
- Optionally: Look at the logs output (4)
- Go to Empyrion
- Go to 'multiplayer' tab
- Type your server IP in the 'direct-connect' input field (127.0.0.1, for local)
- Test what you need to test ingame
- Optionally: Look at the logs output if something didn't work as expected, and you have written Console_write outputs for it, or are looking for a general error (4)
- Close your server (find the empyrion logo in your taskbar with an S, and click 'save and exit' button)
- Restart from first point in list