Building a Mod

From Retrovirus Editor
Jump to: navigation, search

The Retrovirus Editor allows you to add or edit any content that is in the Retrovirus game. You may then package together these edits into a "Mod" file which will be loaded together as a unit. Any Mod files in the %User%/AppData/Roaming/Retrovirus/Mods folder can be loaded Retrovirus when the game starts up. Also note that both Retrovirus and the Retrovirus Editor are integrated with Steam Workshop, so you can share and download mods easily.

Contents

[edit] Creating a RetrovirusMod Entity

The first thing you will need is a special Entity that tells Retrovirus about your Mod.

NewRetrovirusMod.jpg NewRetrovirusMod2.jpg

You have now created your Mod Entity. This entity tells Retrovirus about some of the key features of your Mod. This Editor also has a Build Mod button at the top, which will package up the Mod into a single file for distribution. You can edit this entity with the RetrovirusMod Editor

[edit] Readonly Files

All of the content in Retrovirus is initially Readonly. The Blue highlight behind the name of the file in the Entities list shows that it is readonly. Entities are readonly because the only copy of the entity you have is from a package (either a retrovirus dat file, or another mod file). These entities will remain readonly until you create a local copy of the entity. You can create a local copy by opening the file in an editor and then Saving the entity with Ctrl+S or File->Save. Your modifications will not stick until the entity has been saved.

By saving an entity, you are creating a copy of that entity in the %User%/AppData/Roaming/Retrovirus/Entities folder. The file you modified will override the previous version.

[edit] Building a Retrovirus Mod

From inside the RetrovirusMod Editor you can build a mod using the Build Mod button. Note that **All Content and Entity files will be built into the mod**. If you do not want some files to be built into the mod, then you need to remove them from the %User%/AppData/Roaming/Retrovirus/Entities folder or Delete them from the Entities List in the Editor.

The following image shows the building process displayed on the Messages window for a successful build. In some cases, builds may fail. They should show errors explaining the cause of the failure.

BuildRetrovirusMod.jpg BuiltModOutput.jpg

If you build the same mod multiple times, it will overwrite the mod file in your mods directory. The RetrovirusMod Entity contains a 'version' number, but please be aware that this is not enforced by the multiplayer code. If you use Steam Workshop to publish your Mod, then changes to a Mod file will be automatically updated on all players who are 'Subscribed' to that mod. However, if you plan on releasing multiple versions of the same multiplayer Mod and are not using Steam Workshop, we suggest releasing them as separate mods rather than updating the same mod. This will prevent players with different versions from joining the same multiplayer game.

[edit] Publishing with Steam Workshop

Once you have built a Mod, you can publish or update it on Steam Workshop using the Publish Steamworks Tool. Tools->Publish Steam Workshop File In order to publish to Steam Workshop, the Editor must have been started with Steamworks enabled (this is not done by default... because the Steamworks popup messages are annoying...). When you open the Publish Steamworks window, the log on the right should display your upload quota. If instead it shows "Steamworks Disabled" then enable Steamworks by checking Tools->Start with Steamworks and then **restart the editor**.

PublishSteamworks.jpg

You will need a preview image in order to upload a Steamworkshop file. Place any .jpg file under your %User%/AppData/Roaming/Retrovirus/Content folder and it will show up in the dropdown list. We recommend that your preview image is square at 286x268 because this is the size the preview will display on the Steam Workshop store page. You can use other sizes, but images that are too large may be rejected by the Steamworks API. You can update the preview image and even add additional images via the Steam Workshop webpage.

Once you have published a mod, you can update the mod again, but don't forget to rebuild the mod package first.

Personal tools
Namespaces

Variants
Actions
Navigation
Tools