Difference between revisions of "Modding Guide"

From Wildermyth Wiki
 
(52 intermediate revisions by 7 users not shown)
Line 1: Line 1:
Wildermyth is intended to be pretty moddable, but a lot of stuff isn't documented yet.
Wildermyth is intended to be pretty moddable. Here are the guides for doing it!


= Tutorials and Guides =
For background on writing, as opposed to the mechanics of creating mods, see instead: [[Writer's Guide]] and [[Story Inputs and Outputs]]
== How to write your own Villain ==
 
This is a series of blog posts that walk through how to create a villain (campaign story). The story is called "Heart of the Forest" and the mod is shipped with the game so you can inspect it or use it as a baseline.
==Starting Out==
When creating a mod of any kind, the first thing you'll usually want to do is go into the editor from the Wildermyth main menu (Tools > Editor), and create a new mod from either the '''Content and Comics Editor''' (Mods > Create New Mod) or the '''Steam Workshop''' page (Create New Mod button). Most of Wildermyth's data is stored as json files. Mods are stored in mods/user/[yourModName], with a parallel file structure to the core game. For example, if you wanted to modify the assets/data/balance/campaignBalance.json file, you would create a file at mods/user/[yourModName]/assets/data/balance/campaignBalance.json.
 
The '''Content and Comics Editor''' is probably the first thing you'll want to look at. From there, you can see all the events, abilities, aspects, campaigns, items, and monsters used in the core game. Feel free to duplicate existing things as a starting place for your own mods (we certainly do!)
 
In order to understand the structure of the data and tools, these are probably the best starting places (which are also linked to on the editor landing page):
* [[Data Format Overview]] (A broad overview of the files in Wildermyth and how they work together)
* [[Comic Editor Reference]] (How to create events, explanations of some of the editor tools)
 
== Encounters (events) ==
===Developer guides on steam===
* [https://steamcommunity.com/games/763890/announcements/detail/1714113379457395728 How to: Add an Event to Wildermyth], Steam post with attached video, by game designer Nate Austin.
* [https://steamcommunity.com/games/763890/partnerevents/view/1714113379457395727 Adding an event].  Creating your own event with relationship choices and sharing it as a mod.
===User written guides===
* [[Modding Wilderness encounter|Adding a wilderness encounter]]. Creating a basic wilderness encounter.
* [[Modding encounter choice|Adding an encounter with a choice]]. Creating a more complex encounter, which has a choice.
* [[Modding variant text|Variant text]]. Adding variety to the comic text, varying the text by the personality types of the speaker.
* [[Modding repeated roles]]. Adding an NPC, who can re-appear with the same name and appearance in a later encounter.
* [[Encounter Consistency]].  Preventing victory comics that don't make sense for a particular battle.
===More complex topics===
* [[Modding multiple branches]].  Creating a complex encounter, which has several choices and "branches"
* [[Modding site activities]].  Creating an encounter which appears as a flag on the map, such as a treasure map or request for help.
* [[Modding quest chains]].  Creating a linked set of encounters, or "quest chain".
* [[Modding scripted missions]].  Creating a mission which has a specific map and script, as opposed to random monsters on a procedurally generated map.
* [[Modding generic chapters]].  As of June 2021, release 1.0 has a structure for chapters in the generic campaign.  This topic shows how they work and how to add more.
== Campaigns (Villains) ==
 
=== Using the "new campaign" tool ===
 
[https://steamcommunity.com/app/763890/eventcomments/2146469724193067415 How to create a campaign]
 
=== Heart of the Forest ===
 
This is a series of blog posts that walk through how to create a [[villain]] (campaign story). The story is called "Heart of the Forest" and the mod is shipped with the game so you can inspect it or use it as a baseline.
* [https://yonderinglands.blogspot.com/2019/07/how-to-write-your-own-villain-for.html Part 1 Creating a Mod and a Campaign]
* [https://yonderinglands.blogspot.com/2019/07/how-to-write-your-own-villain-for.html Part 1 Creating a Mod and a Campaign]
* [https://yonderinglands.blogspot.com/2019/08/how-to-write-your-own-villain-for.html Part 2 Custom Fights]
* [https://yonderinglands.blogspot.com/2019/08/how-to-write-your-own-villain-for.html Part 2 Custom Fights]
* [http://yonderinglands.blogspot.com/2019/10/how-to-write-your-own-villain-for.html Part 3 Custom Monsters]
* [http://yonderinglands.blogspot.com/2019/10/how-to-write-your-own-villain-for.html Part 3 Custom Monsters]


== Writing Stories ==
== Other topics ==
There are a bunch of helpful articles on the wiki for this!
* [[Writer's Guide]]
* [[Story Inputs and Outputs]]
* [[Comic Editor Reference]]
* [[Tag Reference]]
* [[Text Styles]]
* [[Face Tags]]


== Guides for particular types of mods ==
=== Equipment ===
This section has guides to developing particular types of mods.
* [[Modding Wilderness encounter|Adding a wilderness encounter]]
* [[Modding add equipment|Adding equipment]]
* [[Modding add equipment|Adding equipment]]
* [[Modding add monster|Adding a monster]]
* [[Legacy Carry-Over]]  Having an item stick with a hero through legacy.
* [[Modding variant text|Variant text]]
 
* [[Modding encounter choice|Adding an encounter with a choice]]
=== Monsters ===
* [[Modding add monster|Adding a monster]] (this is mostly duplicated by [http://yonderinglands.blogspot.com/2019/10/how-to-write-your-own-villain-for.html Part 3 Custom Monsters] above)
* [[Modding monster abilities|Adding a custom ability to a monster]]
 
=== Factions ===
* [[Modding replace faction|Replacing the monsters in a faction]]
 
=== Tidings ===
* [[Tidings|Adding a tiding]]
 
=== Intermediate level FAQ ===
* [[Modding intermediate FAQ|Intermediate level modding FAQ]]
 
== Mod mechanics ==
 
=== How mods are loaded ===
 
Each mod lives in its own folder, and mirrors the folder structure of the game itself. When the game loads, all mods are scanned in order to show available scenarios, which can come from any mod. When a particular game is started, the mod where the story is found is always used, and additional mods can be specified. Mods can override any of the main categories of data that the game uses, and can provide new images too. Not all image-modding functionality is supported currently, however.
 
=== Where to find installed mods ===
 
* Mods included with the game are stored under steam\steamapps\common\wildermyth\mods\builtin
* Mods that you create are stored under steam\steamapps\common\wildermyth\mods\user.  Mods that you download from other sites such as [https://www.nexusmods.com/wildermyth nexus] will instruct you to install them in this folder.
* Mods that you download from the steam workshop are located under steam\steamapps\workshop\content\763890, with 763890 being Wildermyth's Steam ID. Each mod is assigned a numeric steam ID, which can be viewed by looking at last digits of the URL in the browser version of Steam or by copying the page URL from the client and pasting it somewhere else. You can also identify which mods are which by viewing the mod.json file in mod folder. If you need to refer back to a mod frequently, saving the mod ID somewhere for future use will help save time.
 
===Using an existing mod as a starting point===
# Before changing and publishing a mod, discuss with the mod author.  It is not fair to make a tiny change to a large mod and then re-release it as your own.  Most mod authors are happy to have other authors learn from their published mods, but check before getting underway with something you plan to publish.
# Subscribe, download and find the mod, as described above
# Create a new, blank mod.  Select "Tools" at the main game screen, then "Open Editor", then "Content and Comics Editor".  At the upper left, click "Mods", click "Create New Mod" in the browser, and fill in the form. This will pop up a file browser showing the files the tool just created; note that the directory is steam\steamapps\common\wildermyth\mods\user\<your mod name>.
# Exit the game
# In file explorer, copy the folders from the numeric steam directory to your new mod directory.
# Restart the game, so it loads all the files.  You should see entries for your "new" mod as well as entries for the previous numeric mod.
# Edit the mod as desired.
 
===How to publish your mod on Steam Workshop===


==How to publish your mod==
Once you have created a mod, publishing it is easy.  There is a button right in the game itself.
Once you have created a mod, publishing it is easy.  There is a button right in the game itself.
# Obviously, test your mod and make sure it is polished enough for others to use it.
<ol>
# Make sure you are logged into steam.
<li>Obviously, test your mod and make sure it is polished enough for others to use it.</li>
# In the mod folder, make sure there is a file preview.png (currently only png format works).  This is the main image people will see for your mod.  Square aspect ratio is preferred.
<li>In the mod folder, make sure there is a file preview.png (currently only png format works).  This is the main image people will see for your mod.  Square aspect ratio is preferred.</li>
# In the game, choose tools, click "open editor", and click the bottom choice "Steam Workshop".  This will show all of your mods on the current computer.
<li>Make sure you are logged into steam and launch wildermyth from within steam.</li>
# Click "share" on the mod you want to publish.  This will upload the files and show the steam overlay on your mod.  Now it is on steam, but it is only visible to you.
<li>In the game, choose tools, click "open editor", and click the bottom choice "Steam Workshop".  This will show all of your mods on the current computer.</li>
# The mod description on steam is filled in from the description field of your mod files.  But this is very short, and you will want a longer description.  Write the description in the steam form.
<li>Set the tags you want your mod to have using the "edit mod tags" button shown here:
# Because any update you do will wipe out the description, cut the text you have written and paste it into a notepad file, or equivalent, on your computer.  After any update, you will have to replace the description.  (This may be be fixed in a later game release.)
<p>[[File:ModdingAddTags.PNG]]</p></li>
# Once you are sure the description and preview image are correct, find "Change Visibility" on the lower right, and choose "Public".
<li>Click "share" on the mod you want to publish.  This will upload the files and show the steam overlay on your mod.  Now it is on steam, but it is only visible to you.</li>
# Congratulations, you are now a published mod author!
<li>The mod description on steam is filled in from the description field of your mod files.  But this is very short, and you will want a longer description.  Write the description in the steam form.</li>
<li>Because any update you do will wipe out the description, cut the text you have written and paste it into a notepad file, or equivalent, on your computer.  After any update, you will have to replace the description.  (This may be be fixed in a later game release.)</li>
<li>Once you are sure the description and preview image are correct, find "Change Visibility" on the lower right, and choose "Public".</li>
</ol>


= How it Works =
Congratulations, you are now a published mod author!
Each mod lives in its own folder, and mirrors the folder structure of the game itself. When the game loads, are mods are scanned in order to show available scenarios, which can come from any mod. When a particular game is started, the mod where the story is found is always used, and additional mods can be specified. Mods can override any of the main categories of data that the game uses, and can provide new images too. Not all image-modding functionality is supported currently, however.


= Where to find installed mods =
If you wish to update your mod from another computer, you will need to copy or recreate the "managedModOwnership.json" file in the "Wildermyth/mods" folder. This file is of the form
<pre>
[
{ "steamWorkshopId": "[steam workshop ID]", "localModId": "myCoolMod"},
{ "steamWorkshopId": "[steam workshop ID]", "localModId": "myOtherCoolMod"}
]
</pre>
where "[steam workshop ID]" would be replaced with the the (number) name of the folder corresponding to the mod when downloaded from the Steam workshop in "Steam/steamapps/workshop/content/763890/" and the local mod IDs would be be the names of the folders for your published mods in "Wildermyth/mods/user/".


* Mods included with the game are stored under steam\steamapps\common\wildermyth\mods\builtin
== See also ==
* Mods that you create are stored under steam\steamapps\common\wildermyth\mods\user.  Also, mods that you download from other sites such as [http://https://www.nexusmods.com/wildermyth nexus] will instruct you to install them in this folder.
* Mods that you download from the steam workshop are harder to find.  Under steam\steamapps\workshop\content, you need to know or guess the numeric steam game ID.  It seems to be 763890, so go inside that folder.  Then each mod is assigned a numeric steam mod ID.  If you have several mods, you may be able to guess which folder goes to a particular mod by the date you installed it.  If not, go into each folder and double click on the preview.jpg file to view it.  This is the "splash screen" of the mod.  Once you have found the steam ID of a particular mod, it may be easiest to write that down on a sticky by your monitor.


= Game Data Reference =
* [[Data Format Overview]] (A broad overview of the files in Wildermyth and how they work together)
How the game works.
** [[Aspect]]s
* [[Aspects]]
** [[Effects]]
* [[Effects]]
** [[Outcomes]]
* [[History]]
** [[History]]
** [[Scenario]]s
** [[Plot]]s
* [[Comic Editor Reference]]
* [[Tag Reference]]
* [[Text Styles]]
* [[Face Tags]]
* [[Expressions]]
* [[Modding Relationship Points|Adding/strengthening relationships]]
* [[Mod Injections]] (A way to make changes to existing json data without needing to overwrite the entire file, useful when modifying files that many modders may want to modify, e.g. the "human" aspect)


[[Category:Modding]]
[[Category:Modding]]
[[Category:Modding Guides]]
[[Category:Modding Guides]]

Latest revision as of 20:40, 27 September 2024

Wildermyth is intended to be pretty moddable. Here are the guides for doing it!

For background on writing, as opposed to the mechanics of creating mods, see instead: Writer's Guide and Story Inputs and Outputs

Starting Out

When creating a mod of any kind, the first thing you'll usually want to do is go into the editor from the Wildermyth main menu (Tools > Editor), and create a new mod from either the Content and Comics Editor (Mods > Create New Mod) or the Steam Workshop page (Create New Mod button). Most of Wildermyth's data is stored as json files. Mods are stored in mods/user/[yourModName], with a parallel file structure to the core game. For example, if you wanted to modify the assets/data/balance/campaignBalance.json file, you would create a file at mods/user/[yourModName]/assets/data/balance/campaignBalance.json.

The Content and Comics Editor is probably the first thing you'll want to look at. From there, you can see all the events, abilities, aspects, campaigns, items, and monsters used in the core game. Feel free to duplicate existing things as a starting place for your own mods (we certainly do!)

In order to understand the structure of the data and tools, these are probably the best starting places (which are also linked to on the editor landing page):

Encounters (events)

Developer guides on steam

User written guides

More complex topics

  • Modding multiple branches. Creating a complex encounter, which has several choices and "branches"
  • Modding site activities. Creating an encounter which appears as a flag on the map, such as a treasure map or request for help.
  • Modding quest chains. Creating a linked set of encounters, or "quest chain".
  • Modding scripted missions. Creating a mission which has a specific map and script, as opposed to random monsters on a procedurally generated map.
  • Modding generic chapters. As of June 2021, release 1.0 has a structure for chapters in the generic campaign. This topic shows how they work and how to add more.

Campaigns (Villains)

Using the "new campaign" tool

How to create a campaign

Heart of the Forest

This is a series of blog posts that walk through how to create a villain (campaign story). The story is called "Heart of the Forest" and the mod is shipped with the game so you can inspect it or use it as a baseline.

Other topics

Equipment

Monsters

Factions

Tidings

Intermediate level FAQ

Mod mechanics

How mods are loaded

Each mod lives in its own folder, and mirrors the folder structure of the game itself. When the game loads, all mods are scanned in order to show available scenarios, which can come from any mod. When a particular game is started, the mod where the story is found is always used, and additional mods can be specified. Mods can override any of the main categories of data that the game uses, and can provide new images too. Not all image-modding functionality is supported currently, however.

Where to find installed mods

  • Mods included with the game are stored under steam\steamapps\common\wildermyth\mods\builtin
  • Mods that you create are stored under steam\steamapps\common\wildermyth\mods\user. Mods that you download from other sites such as nexus will instruct you to install them in this folder.
  • Mods that you download from the steam workshop are located under steam\steamapps\workshop\content\763890, with 763890 being Wildermyth's Steam ID. Each mod is assigned a numeric steam ID, which can be viewed by looking at last digits of the URL in the browser version of Steam or by copying the page URL from the client and pasting it somewhere else. You can also identify which mods are which by viewing the mod.json file in mod folder. If you need to refer back to a mod frequently, saving the mod ID somewhere for future use will help save time.

Using an existing mod as a starting point

  1. Before changing and publishing a mod, discuss with the mod author. It is not fair to make a tiny change to a large mod and then re-release it as your own. Most mod authors are happy to have other authors learn from their published mods, but check before getting underway with something you plan to publish.
  2. Subscribe, download and find the mod, as described above
  3. Create a new, blank mod. Select "Tools" at the main game screen, then "Open Editor", then "Content and Comics Editor". At the upper left, click "Mods", click "Create New Mod" in the browser, and fill in the form. This will pop up a file browser showing the files the tool just created; note that the directory is steam\steamapps\common\wildermyth\mods\user\<your mod name>.
  4. Exit the game
  5. In file explorer, copy the folders from the numeric steam directory to your new mod directory.
  6. Restart the game, so it loads all the files. You should see entries for your "new" mod as well as entries for the previous numeric mod.
  7. Edit the mod as desired.

How to publish your mod on Steam Workshop

Once you have created a mod, publishing it is easy. There is a button right in the game itself.

  1. Obviously, test your mod and make sure it is polished enough for others to use it.
  2. In the mod folder, make sure there is a file preview.png (currently only png format works). This is the main image people will see for your mod. Square aspect ratio is preferred.
  3. Make sure you are logged into steam and launch wildermyth from within steam.
  4. In the game, choose tools, click "open editor", and click the bottom choice "Steam Workshop". This will show all of your mods on the current computer.
  5. Set the tags you want your mod to have using the "edit mod tags" button shown here:

    ModdingAddTags.PNG

  6. Click "share" on the mod you want to publish. This will upload the files and show the steam overlay on your mod. Now it is on steam, but it is only visible to you.
  7. The mod description on steam is filled in from the description field of your mod files. But this is very short, and you will want a longer description. Write the description in the steam form.
  8. Because any update you do will wipe out the description, cut the text you have written and paste it into a notepad file, or equivalent, on your computer. After any update, you will have to replace the description. (This may be be fixed in a later game release.)
  9. Once you are sure the description and preview image are correct, find "Change Visibility" on the lower right, and choose "Public".

Congratulations, you are now a published mod author!

If you wish to update your mod from another computer, you will need to copy or recreate the "managedModOwnership.json" file in the "Wildermyth/mods" folder. This file is of the form

[
{ "steamWorkshopId": "[steam workshop ID]", "localModId": "myCoolMod"},
{ "steamWorkshopId": "[steam workshop ID]", "localModId": "myOtherCoolMod"}
]

where "[steam workshop ID]" would be replaced with the the (number) name of the folder corresponding to the mod when downloaded from the Steam workshop in "Steam/steamapps/workshop/content/763890/" and the local mod IDs would be be the names of the folders for your published mods in "Wildermyth/mods/user/".

See also