CoE5 Modding Compendium

CoE5 Modding Compendium

The Basics Of The Basics


CoE5 Modding Compendium image 1

Before beginning any modding project, it is strongly recommended that you download a proper plaintext editor, as Microsoft Notepad is unacceptable for even the most simple of text-based modding. The most commonly used programs are Programmer's Notepad and Notepad++. Each has its benefits and drawbacks, but the important thing is that you use a program that saves formatting with the file and can monitor functions and brackets.

Programmer's Notepad:

https://www.pnotepad.org/

Notepad ++:

https://notepad-plus-plus.org/downloads/

My personal preference is Notepad++ due to the comparatively high ease-of-use, but your mileage may vary.

Plaintext editor in hand, you will then need to create the basic file structure of the mod. This consists of a folder in ...\User\Appdata\Roaming\coe5\mods that contains a text file labeled 'coe5ws.txt' (this is used to set visibility of the mod on the workshop), a PNG titled 'banner' that is no larger than 1MB (this is the first image attached to the mod on the workshop), a text file labeled <modnamegoeshere>.c5m (this is where all work is done), and a TGA-format picture that is no larger than 256x64 pixels (this is the image that shows up in-game for the mod). The name of the TGA picture can be whatever you want, but it must be specifically referenced in the c5m file and must be a valid size, or the mod will not load.

Example file structure:

Failing to have any of these elements will have an effect ranging from preventing the mod from being uploaded to simply doing nothing. The CoE5 modding manual does a rather good job of explaining this, but lacks some depth of detail present here.

Reference Materials


CoE5 Modding Compendium image 12

CoE5 Modding Compendium image 13

There is a rather large amount of current and slightly outdated reference material for CoE5 that is available. The only thing that has not been properly ripped from a recent Illwinter game is events, which are Fun™. This section is largely devoted to my personally collected reference database, so links abound.

CoE5 Sprite Dump:

https://drive.google.com/file/d/1L2gFNlIOISnOuxV876iHQVmKwzZLUePo/view

Dominions 5 Sprite Dumps - courtesy of larzm:

Monsters - PNG (for viewing/editing):

https://drive.google.com/file/d/1EJ8A1azzYfFRFjJHB_0W-vO8RIQUW7Dp/view

Monsters - TGA (For placeholders or straight rips)

https://drive.google.com/file/d/1s_aBRg-mKrP3GtvxzMbqMlFCjSfpPCDm/view

CoE5's (Incomplete) modding manual:

http://www.illwinter.com/coe5/coe5modding.html#aff

CoE4's modding manual:

http://www.illwinter.com/coe4/coe4modding.pdf

CoE4 Data Rips for Terrain, Monsters, Rituals, Classes, Spells, Items, and Recruitment:

https://steamcommunity.com/app/403950/discussions/1/1699415798780806822/

Personally-gathered Planar ID's:

Ritual Resources:

Most info that is missing can be found via the inspect tool (Ctrl + i) in-game. Unfortunately, it does not work in post-game. The tool can be used on basically anything you can mouse over.

Load Order

Internal Ordering

Conquest of Elysium mods are order-sensitive both internally and externally, which presents some unique challenges for maintaining internal cohesion and compatibility. For any given class - whether you are starting from scratch or modifying existing data - the more you change, the more order matters.

Internal ordering for new content, from top to bottom should be:

Weapons

Units

Terrain

Rituals

Class content (Recruitment, starting troops/terrain/plane/etc, text/sound changes)

Events

Class and events are interchangeable with one another, but failing to adhere to the first four points of the ordering can very well wind up with you summoning nothing, having monsters with no weapons, or an inability to recruit units or cast rituals.

External Ordering

All mods have the same load priority by default. This can lead to some...interesting problems, as CoE5's mod compatibility is not quite robust enough to get away with this scott-free. As such, there are a few things to consider.

modprio <x>

Modprio is a function that forces the mod to load before or after what is normal. All mods have a modprio of 5 if it is not defined by the creator. Setting the number lower will make the mod load earlier, while setting it higher loads it later. This is a great tool for sorting mods to prevent issues with - say - monster or ritual offsets. However, there are only 9 values for modprio, which limits its potential as a "cure-all", so modprio should only be used as a last resort.

newritpow and ritpow

Since we are severely limited by how many times we can safely use modprio, there are some considerations to factor in when making mods. First, ritpows pose a unique issue as both negative offsets (from the minimum value -1) and positive offsets (from the maximum value +1) are affected by load order, which can cause some funny, if frustrating issues. There are some options, but each has its own benefits and drawbacks.

ritpow Option 1:

Option 1 is to completely avoid making newritpows. The obvious benefit to this is that you'll never have to worry about ritual group compatibility. The drawback is that you are limited to vanilla ritpows and may need to resort to lengthy workarounds to add powers to new units without dragging along the rest of the ritpow, such as combining the notforpoor restriction and classcost <x> on units. This may be particularly burdensome if you are trying to maintain internal compatibility across several of your own mods.

ritpow Option 2:

Option 2 is to use positive offsets for your rituals within your newritpows. These start at 58 and are practically infinite. The primary benefit here is that it's easy to set up and keeps formatting with all existing rituals, which is great for beginners and sufferers of OCD. The problem, however, is that it is atrocious for external compatibility and you are essentially requires to use modprio 1-4 to prevent issues.

ritpow Option 3:

Ritpow option 3 is to use negative offsets for your rituals within your ritpows. These start at 0 and are, again, practically infinite in the opposite direction of the positives, but require slightly different syntax that is more dependent on the power <x> <y> function for units and the breaking up of blocks of rituals to tie them to specific units or groups of units, which is rather messy and hard to track. This method offers the same level of internal compatibility as positive offsets and somewhat less awful external compatibility, but for the price of significantly more work in the long run. Still, you might save on having to use modprio if you play your cards right.Monster offsets

Monster offsets are used for a variety of tasks, ranging from creating monthly freespawns and automatic promotions, to changing units as part of mastery rituals. Like with newritpow offsets, these cause all sorts of issues for external compatibility, as well as some new ones for general modding. Unlike with ritpow offsets, monster ID's are not mapped in any official documentation and there are well over a thousand of them. Worse, none of the CoE5 monster offsets are available anywhere. As such, there are a few options to consider:

Option 1:

Avoid doing anything with monster offsets at all costs. You'll avoid pulling your hair out trying to find the exact offset needed to get from a vanilla monster to a modded monster or vice versa, only to have the offsets completely break when there's more than one mod in play. Obviously, this limits the Fun™ you can have/inflict on people, but you can work around some of the problems with monster offsets by using promotion rituals instead of mastery rituals.

Option 2:

Avoid doing anything with vanilla monsters' offsets. This is a less restrictive than option 1 and you can get around basically all offset issues by either creating new Totally Original Content™ monsters and offsetting based on those. Promotion rituals still work as a workaround with these, too. This also helps to avoid potential monster offset compatibility problems, as you are not reliant on load order to keep your monster offsets from breaking into a million pieces.

Option 3:

Avoid doing anything with new monsters' offsets. This is less restrictive than option 1, but you completely lose access to any monster offset dependent function for new monsters aside from 'mastery' via the promotion workaround. Should be avoided.

copy functions

This is rather simple: Don't try to have any copy function precede what is being copied. e.g. If you are trying to copy a custom monster's stats, the copystats "existingunit" function should be placed somewhere below where the monster was created in the mod. If the monster was in another mod, the other mod must have a higher load priority (lower number) and be listed as a dependency in the workshop.

Failing to do either - where applicable - will result in the monster not working properly. The same is true of things like terrain, rituals, and weapons.

Syntax

Under Construction™

ETA: Sometime in the afternoon of 9/1/21

Examples

Under Construction™

ETA: Sometime in the evening of 9/1/21

Source: https://steamcommunity.com/sharedfiles/filedetails/?id=2590582675					

More Conquest of Elysium 5 guilds