Workshop: Difference between revisions

From Empires Wiki
Jump to navigation Jump to search
(Created page with "To add something to the workshop, do the following: # Create the folder workshopsrc in the empires folder. # Create a folder with the name of your workshop item in there. Exa...")
 
mNo edit summary
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Sitenav|:Workshop}}
Warning, still in development!
To add something to the workshop, do the following:
To add something to the workshop, do the following:


# Create the folder workshopsrc in the empires folder.
# 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
# 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)
# 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 package.txt file in that folder. For an example of the contents, look below.
# Create a PNG image in the workshopsrc folder with the same name as your workshop item. (emp_coast.png)
# 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 Empires
# Open the console
# Open the console
Line 38: Line 42:
** Map
** Map
** Scripts
** Scripts
** Modelpack
** Models
** Texturepack
** Textures
** Soundpack
** Sounds
** Plugin
** Plugin
* '''GameOverride''' If set to 1, load the files in this item before normal game files. This can only be set by developers, if you need this for your mod, please post on the forums.
* '''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:
* '''SearchPaths''' A set of searchpaths for files in the item. Normally:
** <pre>game <name>.vpk</pre>
** <pre>game <name>.vpk</pre>
* '''Plugins''' The list of plugins to load (paths should be without the .dll ending.) Normally:
** <pre>game <path></pre>
* '''Exec''' The list of commands to execute when loading the plugin. Normally:
** <pre>exec "<script>.cfg"</pre>
== 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:
** <pre>0cbd890cd86a7990ff7baad34a68caca7331bb7f5e222ffc43bd57aa795828e7 Thexa4.key</pre>
* 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.

Latest revision as of 01:38, 7 August 2021

Home > Workshop

Warning, still in development!

To add something to the workshop, do the following:

  1. Create the folder workshopsrc in the empires folder. (.../steamapps/common/Empires/empires/workshopsrc/)
  2. Create a folder with the name of your workshop item in there. Example: emp_coast
  3. In that folder, create a vpk with your mod contents. (See https://developer.valvesoftware.com/wiki/Vpk for more information)
  4. Create a package.txt file in that folder. For an example of the contents, look below.
  5. 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)
  6. Open Empires
  7. Open the console
  8. Type workshop_upload emp_coast (replace emp_coast with the name of your workshop item)
  9. The workshop webpage should now open
  10. Subscribe to your own workshop item
  11. Test out the workshop item
  12. 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.