Enclave

Enclave

Not enough ratings
How to Play as Zale and Mordessa
By Landon Rivers
This VIDEO GUIDE will show you everything that goes into the Enclave registry files, which drive the execution of the games files. With all of the files exposed to us, we simply need to use a text editor and we have the world of Enclave at our fingertips. Now we can create Zale and Mordessa as playable characters, modify levels, create new weapons, and more! The video has manually entered English Subtitles for those who would benefit.
   
Award
Favorite
Favorited
Unfavorite
Video Guide
Downloads
DOWNLOAD COMPLETED MOD -- https://drive.google.com/file/d/1EMjIuDIwJrqZH9ABaLJvPrn72Ujbjazn/view

PLAY AS ZALE AND MORDESSA!
-A Simple Mod by Landon Rivers

**How To Install:
- Extract the Sbz1 folder in this .zip folder directly into your Enclave directory. This will ask to overwrite some of the files contained in subfolders. Click Yes To All.

**What This Does:
- This mod creates two entirely new characters, Zale and Mordessa for the player to use. This does not replace any current characters. This also adds in Mordessa's Staff and Zale's Staff of the Earth Spirit for purchase in the store. This also gives access for the Druid, Wizard, Lich, and Sorceress to use these new weapons as well!

**How to Unlock:
- Unlock Zale by completing the Light campaign. This also unlocks the Staff of the Earth Spirit (Cost 5000) and gives this weapon to the Druid and Wizard as well.

- Unlock Mordessa by completing the Dark campaign. This also unlocks Mordessa's Staff (Cost 4000) and gives this weapon to the Lich and Sorceress as well.

**Notes:
- Zale and Mordessa are not entirely overpowered. They share the same HP as a regular character, though they have heightened weapon abilities.
- The Staff of the Earth Spirit and Mordessa's Staff are unchanged from how they were originally entered in the registry. Mordessa's Staff is weaker, therefore it has the lower price.

** HAVE QUESTIONS? COMMENTS? IDEAS? **
Come join the Enclave Discord Server!
https://discord.gg/gaDC88A
Github Repo of my Registry Configurations
There are certainly more efficient ways to make these changes and test things that I have discovered since making this video. For instance, if you don't specify a level for a weapon to be unlocked, then the weapon will be always unlocked for that character. I've made a special configuration of the registry which allows all default characters to be available on all levels, and have access to all weapons and items. I have a github repo of all my configurations, including the one I made for this tutorial (called the 'tutorial' branch) -
see the entire repo here (master branch = vanilla and has no changes): https://github.com/landonrivers/EnclaveRegistry/tree/master

and the 'weapons for all' branch here:
https://github.com/landonrivers/EnclaveRegistry/tree/master

These registry files by themselves are useless without the rest of the Sbz1 files (the actual models, textures, sound, animations, levels), so I am not worried about any legal issues of sharing this.
Video Transcript Pt 1.
Hidden in the folders of the PC version of Enclave is one of the greatest tools to craft the world of Enclave in ways you didn't know possible. I'm talking of course about the Starbreeze Registry, which by default is entirely exposed so players can mod much of the world in any way they want. You can create different enemies, re-make levels, make characters or certain weapons more powerful, and even delve into some of the hidden assets never seen in game. For instance, we can set the game to unlock a new character Mordessa when you beat the Dark campaign, complete with her new staff. Now she can go capture Jasindra by herself, and maybe take her castle back from her evil clone. Likewise when beating the Light campaign you can unlock Zale and the Staff of the Earth Spirit, and maybe HE should go find those keys of Kam'Zara. In this video I'll be showing you the basics of the Enclave registry, and we'll be going through the process of creating a new character from start to finish. You don't need any coding experience at all, just a text editor, and a PC copy of Enclave. However, if you don't care too much about modding, and just want to play as Zale and Mordessa, I've put a file in the description you can download with instructions on how to easily install them. If you're still needing some help, come join our Discord server and send us your questions. I'm Landon Rivers, let's get to modding.

Assuming you bought the game on Steam, the easiest way to navigate to your local files is through right clicking on the game in your Steam library, going to manage, and 'browse local files'. This opens up wherever your game directory is. Of course you would need to ultimately find your way here if you bought the game some other way. All Enclave modding work you will ever do is in the Starbreeze1 folder, called "Sbz1". Inside of here is the registry folder which has references to all of the models, sounds, levels, weapons, text, and how they all plug in to the game. Feel free to poke around at your leisure, you may learn a few things about why the game works the way it does. The main files we'll be working with in this video will be Campaign, RpgWeapons, Characters, AI Characters, and the StringTable in English. If you have a text editing program such as Notepad++ or Visual Studio Code, it might be easier to navigate through these files, but regular notepad on Windows will work just as well. Also a note for those using Notepad++ or Visual Studio Code, be sure to only work with these files using "Windows-1252" or "ANSI" encoding. Some special unicode characters might get wiped out when you save the files otherwise. Let's get these 5 files open and see what they're all about.

Starting with the Campaign file, we can see that this has the registration of all levels that go into both of the campaigns. It shows the coordinates of level icons on the map, which characters and items are unlocked after each level, what the character select screen should look like for each character, music to use for each level, and more.

The RPGWeapons file shows the templates for each kind of weapon, like the basics attributes of every bow and dagger, as well as the more specific versions like the fire sword. Each entry shows the sounds each weapon makes, how strong they are, how fast they fire, mana they consume, and other relevant attributes.

The Characters file has templates for every playable character, and templates for templates, down to the very base of what makes up any player character period, like how every single character has a base health of 350. The more specific templates start to modify this base player template and build out actual characters, such as the Knight who is known in the registry as 'Paladin'. Knights of course are taller, and run slower, but are good with all weapons. This is the file where that's all defined. There's actually different versions of these characters based on the armor they are wearing. And, we can even spot a bug with the Wizard - he's supposed to have stronger magic with better armor, but a small bit of code was missed to actually put this in effect. Let's squash this bug really quick...

The AI Characters file, much like Characters, has the breakout of every single NPC you interact with in Enclave, including the ones in cutscenes, those are considered different characters. It's also composed of a series of more specific templates and AI specific variables that result in our courageous friend Marcus, or the most annoying Nightcrawlers.

Finally, we have the StringTable. This provides the English text that is associated with every variable and attribute as it is used throughout the game. With this file we're able to change options text, mission text, character and weapon names and descriptions, even down to the little text that shows when you're sniping different spots on the enemy's body.

After looking at all of these files, there's a few things to keep in mind. 1. Everything has a pattern, so to mod in something new, be sure follow the pattern (that's actually coding 101). 2. We might not be able to see all of the actual file names. Many of the files like for models, animations, sounds, and special variables are hidden pretty deep. The game isn't exactly open source, but you can try your luck at installing the program Ogier to get a better look at some of the source files. (I've made a separate video walking through how to set up Ogier from start to finish, so check the link in the description). Third thing, when we make and save our changes, they will go into effect only after you re-launch the game. Also if you're working with character creation and item changes, it would be best practice to create a new game and work fresh. You might find that if you work with the same saved game, your old changes might stick to the save files and you won't get your expected results as you fine-tune things.

Now lets finally get started with modding in a new character. So lets consider the makeup of a character as they pertain to the campaign. What do we want them to look like? What should they sound like when making attacks or getting hit? What character animation should they emulate? What kinds of weapons should they use? When do we want them to be unlocked? In this example, we'll be building Zale. We'll also put the Staff of the Earth Spirit in the game.

Let's set Zale up to be similar to a wizard. He'll have the ability to equip two different staves, a dagger, and potions. There's only the one model of Zale, not one with different armor, so we'll skip adding armor. 4 Equipment slots. Open up the Campaign.xrg file and let's find the first '*characters' array. We can see there's all these different objects defined with curly braces surrounding some relevant data. Under each character shows a defined item slot with some mystery bit memory address, and it looks like its mentioning an icon to use as well. Whatever it means, maybe we'll figure out the importance later, but we still need to follow the pattern. Let's make a new entry for Zale at the bottom. Much like the others, we'll put curly braces below, and then copy and paste over the item slots on the 'wizard' entry. We'll take off the final entry to remove armor, and now Zale will have these item slots on character select.
Video Transcript Pt. 2
Skip past the *challenges array and let's go to *newgame_light. This array talks about the characters available in the light campaign and the weapons they have access to in selection screen, pointing out specifically when they unlock the weapons. Again, we're basing off the wizard, so take this whole blurb here about the wizard and let's copy it then paste into a new object for zale at the bottom. Rename 'wizard' to 'zale', and now let's refine a little. I don't think we need to touch this item_staff_shield, I think that's important and lets us use our shield when we right click with a staff. Everyone's got it, even the Knights.

We can also see each entry has two for each staff. Why? Because remember, in equipment there were two slots for staves, and they use different bit addresses. We'll get back to that later. We can see at the end it also mentions L_M and then a number. That's the abbreviation for Light Mission # whatever, which therefore means, the wizard has access to this weapon when Light Mission #10 or 12 is unlocked. We can adjust these down if we want Zale unlocked earlier, which for testing purposes might be for the best. Let's change these all down to unlock after Mission 2, then wipe out those armor entries and move on.

We now have a good idea of what character select will look like and what we'll have access to as Zale. We'll put in his staff later. Go back up to the *challenges array now. Challenges is the term that they use for any kind of level be it a mission or the three phase challenge levels. Here we can see those mission names mentioned on those weapon entries from before. Here's L_M1, which is Imprisoned. Now we make a choice on when we want Zale to unlock. For the sake of testing, let's set it to unlock him after level 2, because you can't get to the character select screen until after the second level. He won't have access to buy his weapons, but we'll still be able to see and play with him early enough.

In the character object for level 2 it has 'paladin' and a few other characters next to it separated by pluses (+). This is actually the list of characters that can be used on that level, so we'll get back to this. Within the brackets it has the award for beating the level. No spaces but commas delimiting each award. Kind of easy to guess what each one is, we unlock Light Mission 3, 75 bonus gold, the Huntress character, referred to as 'archer' in the registry, and it shows the light crossbow. Let's take that same pattern for unlocking the Huntress and add Zale as a reward at the end of level 1. Add in ",character:zale". Let's add Zale to that character object for Light Mission 3 so he can be used then. Add "+zale" right at the end. Nice. So when we beat Level 2, we'll unlock Zale, and we can use him in Level 2. Now we'll only need to come back to this Campaign file again when we create Zale's weapon.

Now we actually build out Zale, and this is where it can get a little tricky at first, but fun when you get a hang of it. Go to the Template Characters file and scroll to the *template_wizard entry. We can see this is defining that every wizard is a good guy, how the camera follows him, that their mana should be shown in the user interface, their damage with staves and daggers, and their protection with different armors on. We can see below now we get into the actual *player objects. These are what the player will actually latch on to. This first player_wizard, which would have no armor, has a few more things defined about him, but we see it's referring to the template_wizard template right above, so it will get all of these attributes automatically. The armored versions of the wizard are basically the same, but have their little buffs to the damage that we talked about, and they refer to the player_wizard template right above, so now it starts to create a chain of little things each template adds along the way. It's all about inheriting.

Let's make a *player_zale template. We'll have it roughly similar to the *player_wizard template, so Zale will inherit everything in the chain of templates leading up to him. define its class as a player_wizard, and now.... we need to figure out what Zale is like. Well, we do know he's in the game, and he's an NPC. So let's refer over to the AICharacters file to see how they built him. I'm going to open the AICharacters file in a new window to make it easier to compare for later.

Do a search for "AI_Zale" and let's see what that gets us. Looks like there's 4 entries, but as I mentioned before, some of them might be for cutscenes. As it turns out, this AI_Special_Zale is the character used in Kam Zara of the Light Campaign, and Ai_Special_Zale2 is the enemy you fight in Level 6 of the Dark Campaign. I don't want my Zale to be too overpowered, so I'll be referring to the Special_Zale2 for attributes. Special_Zale2 is inheriting from Ai_Zale, so let's take some of these lines and carry them over. Character, dialogue, and especially model are important. team is already defined on what we're inheriting, along with a few other things. This AI Zale has different protection, given that he doesn't wear any armor, so I'm going to carry that over too. He also has Higher Mana, but lower Health compared to the base character template which we're referring to. That sounds good to me, a weak wizard, but with more magic to him. I'm also going to bump up his magic skill to be a bit better than a heavy wizard, given that it's Zale. We don't need any of the "ai" values, and I'm not too hot on changing his jump height, so lets call it that. Almost done with Zale.

Finally before we boot up Enclave, we need to make sure he's got a name that will show up in Character select. Head to the StringTable English file and find the Characters entries by searching "// Characters". Those // by the way make something a comment, meaning whatever is after them on the line will not be looked at by Enclave. It's for your notes alone. We can see the pattern for how these are laid out, so let's put an entry for zale. CHAR_ZALE, a few tabs, "Zale" in quotes, then CHARDESC_ZALE for character description, few tabs, then something super short but fitting. "Fabled creator of the rift between the Enclave and the Outlands." OK, and that finishes it. Make sure you save all three of the files we changed, and then launch Enclave.

To skip through the first two levels quickly, we'll make use of the in-game console. If you don't have your console enabled, go to the environment.cfg file in your Enclave root directory, and add the line CON_ENABLE=1 to the bottom of the text file and save. You can now open the console with the grave or back-tick key (`). Now use 'cg_menu cheatmenu' to open up the cheat menu and hit 'complete mission'. Do for both levels and you'll see we unlock Zale at the very end as expected. Very cool! Now we take a look at character select and sure enough, he's there along with all of the other characters we've unlocked so far, and he's able to be used in Level 3. We can't afford any of his staves, but we can equip a dagger if we want to play around. All is well though, so let's get to the second part of this, adding in the Staff of the Earth Spirit.
Video Transcript Pt. 3
Open the RpgWeapons file, and do me a favor - search for 'earthspirit' one word. Find, and there it is! It's got the model, sounds, icons, attack animations, and damage. We're all set, right? Well not exactly. If you remember in the Light Campaign, we get access to use the Staff of the Earth Spirit ourselves. This weapon is actually completely separate from our inventory we set up for our character. If we take a look, the itemtype has the memory address of 0x16, however if we look back at the Campaign file where we defined the equipment slots in the beginning, Zale and the other staff users use addresses 0x010 and 0x011. If we look at the other staffs further up, they have item types that match to those addresses, without the extra 0, but still similar enough. So we need to set up a new weapon entry which uses the correct itemtype address.

Copy and paste the template name, then lets add a 1 at the end. We've got all the data we need for it, so lets just set this new entry to inherit the template above it with "*classname weapon_staff_earthspirit" and then we just need to change "*itemtype 0x10". Let's also add a nice and reasonable price to the staff. "*price 5000" for it to cost 5000 gold at character select. Done yet? Almost. We need to make 1 more entry for the staff of the earth spirit, but for use in the second staff slot we specified. Create a new entry right below, we'll call it the "*weapon_staff_earthspirit2", then very simply, we inherit from the weapon right above us "*classname weapon_staff_earthspirit1", and change the item type with "*itemtype 0x11". Then since we're inheriting from what we just made, this new entry will also have the 5000 gold pricetag tied to it. Less work! OK, now our templates for Player usable staves have been made. Lets put them in the game.

Head back to the Campaign file, and find your zale entry under the *characters object. Now we can add the Staff of the Earth Spirit as usable items for him. Following the pattern, we enter "*weapon_staff_earthspirit1" and "*weapon_staff_earthspirit2". We'd like to have access to these as soon as possible, so match them to the rest of the items, and have them open after Light Mission 2. Now Zale will have access to his staff! We just need to give them Names and Descriptions in the String Table.

Head back to the String Table and Search again for "EARTHSPIRIT" one word. You'll jump to all of the entries with weapon names and descriptions. You might think again, Well it's right here and all written out! Good to go, right? Not really. First, I'm going to shorten the name of this so it fits better in the UI, then also, this is an entry for that original staff that we made copies of. We need to make entries that match the names of our newly made weapons. So we'll have four new entries, "*ITEMNAME_WEAPON_STAFF_EARTHSPIRIT1", "*ITEMDESC_WEAPON_STAFF_EARTHSPIRIT1" for the name and description, and then a copy for WEAPON_STAFF_EARTHSPIRIT2. Same name, same description. Got it. If we just let this go as it is and we didn't make these new entires, it'll just show a bunch of error t ext. We'd prefer it to be working instead, so we make the entries. Now we're all set! Save all of the files again, launch Enclave, and start a new game. Cheat past the first two levels, and you'll unlock Zale. Go to the character selection screen, see his weapons, and there it is. Staff of the Earth Spirit.

You can cheese together some way to give you gold a bit earlier, but everything we're looking at here with no errors is a good indicator that we've got the character functional. Now if you want to go back, you can set it so Zale is available on all of the levels, and he is also unlocked at the end of the campaign instead of at the end of the second level. You now basically have the tools to mess around and create characters of your own! Give it a shot and try to create Mordessa if you want! There's a few more things to keep in mind with her, like how she is tall. You might want to refer to the paladin template to see how they handle cameras for his height and copy that over to her.

CONGRATULATIONS! With Zale and the Staff of the Earth Spirit totally figured out, now we get to poke around! You'll actually find lots of answers to questions for how this game all goes together. There's variables set for AI specifically spreading their crossbow shots to simulate them having terrible accuracy for example. You'll also discover stuff like how Druids and Liches were supposed to have their own special damage type called 'summon' damage. Armor is set to protect against it, and it's supposed to give Druids and Liches an advantage with their starting staff. But, no matter which way you try and adjust it or their staff that the damage type is applied to, it makes no difference. Summon is a broken damage type. There's lots of secrets like this and more, and you now have the tools and the mindset to go exploring and start creating. I can't wait to see what you come up with. Hope you enjoyed this guide and found it helpful. I'm Landon Rivers, and I'll see you next time.





2 Comments
rataj 30 Jul @ 5:07am 
Thanks again for this guide!
Without it, the Extended Mod would never have seen the light of world. :-)
Vindavla ᚱᛁᛋᛖ 20 Jan, 2023 @ 12:46pm 
fucking awesome, thanks! :bbtraccoon: