Erannorth Reborn

Erannorth Reborn

评价数不足
Hands on Modding: Your first custom Race
由 [ER] Raven 制作
You read the Modding guide, but still not sure how to start your modding adventures in Erannorth?

Follow along as we make Elves a playable race together. And in no time you'll be crafting your own races ;)

   
奖励
收藏
已收藏
取消收藏
What makes a Race Mod?
Before we start let's see what sort of files we'll need to have for our mod to work.

At the bare minimum 2 things:

a) A .json file describing the race.
b) A .conf file declaring this race as playable.

Then optionally you can include:

a) Custom icon for this race
b) Custom Actions
c) Custom Perks

So let's pick any folder in our PC to work in there.

Step 1

I am in my Documents, where I will create a folder: Rs Race Addon, you can of course name it as you please. That's your Mod's name.

Rs Race Addon/

Step 2

Now let's create in there an Archetypes folder. This folder can contain both Class & Race archetype each in the corresponding folder "Races" & "Classes". We'll need a Races subfolder.

Rs Race Addon/Archetypes/Races

In there we'll put the Elf.json file defining the Elf Race.

PRO TIP: Your ../Content/ folder is a huge mod you have full access. It's structure represent how your Mod Structure should be. And you can study it to learn more about modding ER. It's located here (for me):

E:\Documents\SteamLibrary\steamapps\common\Erannorth Reborn\Erannorth Reborn_Data\StreamingAssets\Content\

So while we are in the ../Content folder let's borrow any .json file to use as a base for our race. Can you guess where are they? Correct. ../Content/Archetypes/Races.

As it happens an Elf.json file already exists and is used for Enemies. In particular the AI sections grants Elf enemies the 'Healing' AI Response.

Let's copy the file in our own folder: Rs Race Addon/Archetypes/Races

PRO TIP: You don't need to modify any Core file, in fact you probably shouldn't. You can Instead overload them with your own versions in your Mod Directory.

Step 3

Create a ModLoaderUser.conf file.

When you create this file, windows will go and attach the .txt extension. File won't work with it, so make sure you can see the extensions & remove it. We want a ModLoaderUser.conf file.

Which yes is just a text file, and has two lines of text:

>> Races
Elf

We then put our ModLoaderUser.conf in our Mod Root Folder. In my case Rs Race Addon/.

Done

You should have this structure:

Rs Race Addon/
Rs Race Addon/Archetypes/Races/Elf.json
Rs Race Addon/ModLoaderUser.conf

Now go outside the [Your Mod] folder, and just click it to send to .zip & install with the Mod Manager, or just create a ../Mods/ folder in ../Content & place your folder there.

Whichever way you go believe it or not you are done & Elf can now be chosen as a playable race.
Customizing your Race - Part 1
Now that you can play as an Elf, it would make sense to customize this race.

Right now everything is like the unplayable vanilla Elf.

{
"BaseHealth": 2,
"BaseActions": 3,
"Strength": -1,
"Agility": 3,
"Resilience": -2,
"Intellect": 2,
"Willpower": 1,
"Charisma": 3,
"AI":[
"Healing"
],
"Disciplines":[
"Elf"
],
"MainWeapon": "",
"StartingEquipment":[

],
"StartingDeck":[

],
"SkillTree":[

],
"PerksTree":[

],
"resistances":[
"Earth:2",
"Astral:2"
],
"proficiency":[
"Slashing:1",
"Piercing:2",
"Bludgeoning:-2"
]
}

After we decide on the attributes, resistances & proficiency. We need for sure a Starting Deck, Perhaps a Skill Tree and a Perks Tree. And of course Actions.

"MainWeapon": "",
"StartingEquipment":[

],
would be essential if this was a class, but we don't need either here.

Elves will gain immediate access to any Elf cards we create. But we won't create any new cards for now. Let's just borrow some from the Hunter & the Animist.

You can define those like so:

"AdditionalActions":[
"Camouflage",
"Track",
"Eagle Sight",
"Grappling Vines",
"Wooden Longbow (H)",
"Composite Longbow (H)"
],

etc.

Races contribute 3 out of the 12 cards, so we can pick 3 cards for our Starting Deck

"StartingDeck":[
"Camouflage",
"Camouflage",
"Track"
],

Skill tree is set similarly but we specify which level the Action unlocks. Keep in mind that an Elf can't unlock Hunter cards. They have to be unlocked as Hunter to be available to your Elf. So it's better to create Elf Cards and use as skills. But for now I'll just show you how you define them:

"SkillTree":[
"Camouflage:1",
"Track:1",
"Forest Sight:2"
],

etc. So Camouflage & Track unlocks at Lvl 1, Forest Sight at Lvl 2 etc.

We define the Perks Tree the same way.

"PerksTree":[
"Sensual:1",
"Earth Affinity:1",
"Otherworldly Beauty:2",
"Carefree:2"
],

etc. So Sensual & Earth affinity at Lvl 1, Otherworldly Beauty & Carefree at Lvl 2 etc.

And that's it. Your Custom Race now has a Deck, Skills & Perks.
Our Elf.json so far
This is how our Elf looks so far:

{
"BaseHealth": 2,
"BaseActions": 3,
"Strength": -1,
"Agility": 3,
"Resilience": -2,
"Intellect": 2,
"Willpower": 1,
"Charisma": 3,
"AI":[
"Healing"
],
"Disciplines":[
"Elf"
],
"AdditionalActions":[
"Camouflage",
"Track",
"Eagle Sight",
"Grappling Vines",
"Wooden Longbow (H)",
"Composite Longbow (H)"
],
"MainWeapon": "",
"StartingEquipment":[

],
"StartingDeck":[
"Camouflage",
"Camouflage",
"Track"
],
"SkillTree":[
"Camouflage:1",
"Track:1",
"Forest Sight:2"
],
"PerksTree":[
"Sensual:1",
"Earth Affinity:1",
"Otherworldly Beauty:2",
"Carefree:2"
],
"resistances":[
"Earth:2",
"Astral:2"
],
"proficiency":[
"Slashing:1",
"Piercing:2",
"Bludgeoning:-2"
]
}

If the file doesn't load, keep in mind .json is really strict, so mind the commas and spaces!
You can look a couple of the game .json files as an example, and you'll have it running in no time.
Customizing your Race - Part 2
Now that we have a working race, we can customize it further.

a) Custom icon [64x64, 128x128, 256x256 etc.]

Name your file Elf.png and place it the folder: ../Rs Race Addon/CustomArtworks/Archetypes

In the CustomArtworks/Actions folder I can also place any custom artworks I will use for my Elf Actions.

b) Create a Custom Action Set

Create a folder 'Actions' and place in it a text file called 'CardDB.Elf.tdb', make sure it won't get any .txt extension as it won't work ;)

../Rs Race Addon/Actions/CardDB.Elf.tdb

c) Create a Custom Perk Set

Create a folder 'Perks' and place in it a text file called 'PerksDB.Elf.tdb', make sure it won't get any .txt extension as it won't work ;)

../Rs Race Addon/Perks/PerksDB.Elf.tdb

d) Open your ModLoaderUser.conf it should now link to your new Action & Perk Sets:

>> Cards
CardDB.Elf.tdb
>> Perks
PerksDB.Elf.tdb
>> Races
Elf

And that's it.

PRO TIP: Never modify or include in your mods files you don't need or use, as it will make other mods less compatible for no reason ;)

And this is our complete mod:

Rs Race Addon/
Rs Race Addon/Archetypes/Races/Elf.json
Rs Race Addon/CustomArtworks/Archetypes/Elf.png
Rs Race Addon/CustomArtworks/Actions/ (Put the Graphics for your Actions here)
Rs Race Addon/Actions/CardDB.Elf.tdb
Rs Race Addon/Perks/PerksDB.Elf.tdb
Rs Race Addon/ModLoaderUser.conf

You can now further customize your new Race with custom Actions & custom Perks ;)

Just remember that after adding any new Perks & Actions in the corresponding text files, then you also need to re-open your Elf.json file again to add them there as Perks & Skills in the corresponding sections.
Next Steps
Now that you created your first race don't stop there! You can make any enemy race playable or just create your own races. You can even apply the exact same steps to create your own classes.

Just keep expanding on the same mod. Remember Vanilla content is just a huge Mod! This is how the vanilla ModLoader looks like:

>> Cards
CardDB.Generic.tdb
CardDB.Loot.tdb
CardDB.Herbs.tdb
CardDB.Mystic.tdb
CardDB.Mercenary.tdb
CardDB.Hunter.tdb
CardDB.Shadow.tdb
CardDB.Necromancer.tdb
CardDB.Exorcist.tdb
CardDB.Witch.tdb
CardDB.Animist.tdb
CardDB.Human.tdb
CardDB.Vampire.tdb
CardDB.Lycanthrope.tdb
CardDB.Demon.tdb
CardDB.Nephilim.tdb
CardDB.Undine.tdb
CardDB.Sylph.tdb
CardDB.Nymph.tdb
CardDB.Ifrit.tdb
CardDB.DeathKnight.tdb
CardDB.BloodMage.tdb
CardDB.Illusionist.tdb
CardDB.Inquisitor.tdb
CardDB.Spelldancer.tdb
CardDB.Warlock.tdb
CardDB.Runecaster.tdb
>> Perks
PerksDB.Core.tdb
PerksDB.Tales.tdb
>> Enemies
EnemyDB.Core.tdb
>> Core Races
Human:0
Vampire:60
Lycanthrope:60
Demon:60
Nephilim:60
Undine:90
Sylph:90
Ifrit:90
Nymph:90
>> Core Classes
Mercenary:0
Shadow:0
Mystic:0
Hunter:0
Animist:30
Necromancer:30
Exorcist:30
Witch:30
Death Knight:60
Inquisitor:60
Illusionist:60
Blood Mage:60
Warlock:60
Spelldancer:60
Runecaster:60
>> GameModes
Casual
Normal
Ironman
Endless
Expert
Adventure
Puppeteer
Draft

Looks familiar right? Your ModLoader can override anything in it ;)
References
As you embark in your journey to modding Erannorth Reborn or to follow along with the Hands on Examples, you'll find the official Modding Guide invaluable as a reference. It is updated frequently to include all the latest modding additions & changes, and includes almost everything you need to know about modding.

https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=1703719938