Workshop
Warning, still in development!
To add something to the workshop, do the following:
- Create the folder workshopsrc in the empires folder. (.../steamapps/common/Empires/empires/workshopsrc/)
- Create a folder with the name of your workshop item in there. Example: emp_coast
- In that folder, create a vpk with your mod contents. (See https://developer.valvesoftware.com/wiki/Vpk for more information)
- Create a package.txt file in that folder. For an example of the contents, look below.
- Create a JPG image in the workshopsrc folder with the same name as your workshop item. Make sure the image has a resolution of 1920x1080 (at least 16:9) (emp_coast.png)
- Open Empires
- Open the console
- Type workshop_upload emp_coast (replace emp_coast with the name of your workshop item)
- The workshop webpage should now open
- Subscribe to your own workshop item
- Test out the workshop item
- If everything works, set the visibility to public.
package.txt
This file controls how the workshop item should be treated.
Example
Package { Name "emp_coast" Author "Thexa4" Type "Map" SearchPaths { game emp_coast.vpk } }
Fields
- Name The name of the workshop item
- Author Who made this workshop item originaly?
- Type The type of workshop item. Should be one of the following:
- Map
- Scripts
- Models
- Textures
- Sounds
- Plugin
- GameOverride If set to 1, load the files in this item before normal game files. This only works if your workshop item is signed. For instructions on signing, see below.
- SearchPaths A set of searchpaths for files in the item. Normally:
game <name>.vpk
- Plugins The list of plugins to load (paths should be without the .dll ending.) Normally:
game <path>
- Exec The list of commands to execute when loading the plugin. Normally:
exec "<script>.cfg"
Signing
If you want to override files that are shipped in the base game you need to get people to trust your key first.
Key Generation
To generate a key and trust it do the following:
- Start the game
- Execute workshop_upload_key_generate
- Copy the printed line
- Append the line to cfg/workshop_authorized.custom.txt (Replace cfg/workshop.key with a good description, like your forum handle)
- Make a secure backup of cfg/workshop.key. You will need to keep this key if you want to upload updates to your workshop item.
- Warning, this key must be kept secure. Don't send this file to other people.
- Start the game
- Upload a workshop item like you normally do.
Trusting someones key
If you want to install a workshop item that changes base game files you need to add the key of the contributor to your authorized keys file:
- Get the key of the person that uploaded the workshop item. It should look something like this:
0cbd890cd86a7990ff7baad34a68caca7331bb7f5e222ffc43bd57aa795828e7 Thexa4.key
- Add that line to your cfg/workshop_authorized.custom.txt file
- Start the game
- Have fun :)
Troubleshooting
If you accidentally removed the generated id file for your item, create a text file named <name>.id.txt, and add the number that's at the end of the url of the page when you have your workshop item open in your browser. This will link it again.
The game logs which workshop items are loaded in the console. If you scroll up you might see some error messages you can fix.