Pirates Outlaws

Pirates Outlaws

Not enough ratings
Basic Guide to Modding: A Step by Step Introduction into Pirates Outlaws Modding
By SirDgor
A simple, step-by-step guide on how to get started with Modding Pirates Outlaws!
   
Award
Favorite
Favorited
Unfavorite
Introduction
Hello! If you're reading this, you are probably very excited to begin modding Pirates Outlaws, or are very confused on how to mod Pirates Outlaws. Either way, this guide will give you a step-by-step introduction into modding and will walk you through how the mods work, how to set up your first mod, and how to add in basic content such as Cards or Relics.

If you're curious about anything else throughout this guide, feel free to leave a comment at the end or contact me on the Pirates Outlaws Discord (My name on there is SirDgor, Plunder Ammo Enthusiast)

Now that I've introduced myself and what will be going on today, let's just jump right in to STEP 1
Step 1 : Acquiring all the content you'll need
We'll begin by going over all the content that you'll need to begin modding. First, you'll want to go to the Steam Workshop and Subscribe to the Official Sample mods that Fabled has provided. They will look something like this:



Once you have subscribed to these samples, you're going to want to locate your Workshop folder. Start by right-clicking Pirates Outlaws in your library and click "Browse Local Files". It should pop up a screen similar to this:



Once you get to this screen, click on "steamapps" and then navigate through your files to your Pirates Outlaws workshop file. The pathing should look similar to this:



Once you are here, you can locate the specific files that you've subscribed to (as well as any mods that you've subscribed to, so you can peek at how other mods are coded). Opening the Official Assets mod folder and opening table should bring up something like this:



All of these files are what is required to start modding. Downloading these and opening them in either Excel or Google Sheets (which I personally use and recommend) will allow you to view most, if not all, of the code needed to start making mods! From here on out, I would recommend putting all of these files in one single spreadsheet, so that you can quickly access each file as needed. Mine looks something like this:



Now that you have all the source files, you can now start with making your mod!
Step 2: Setting up your First Mod
Setting up the files to start creating a mod can be a tricky and long process. Fortunately, Fabled has provided several Sample Mods that you can use to quickly make your own Mod off of. Depending on which mod you decide to make, the process can be as simple as renaming a couple things to renaming several files' worth of images and lines in the code. For your first mod, I would recommend keeping everything named the same until you're sure it works, then slowly renaming things one at a time until everything is renamed to what you would like it to be named.

Using a similar process in Step 1, navigate to your Workshop Folder and find whichever Sample Mod you would like to use. For this example, I'll be using the Official Sample Card. The folder for it should look like this:



Once you have found the folder you want, Copy the Named folder (not the one with a bunch of numbers) and locate your Mods folder, which should be at this file path:



Once you locate your Mods folder, create a new folder with the same name as the folder you've copied, then paste the copied folder into that new named folder. This should create 2 layers of folder that are named Official Sample (name). This is required to upload your mod, otherwise it will not work.

Now that you've done this, you can see that there are 3 folders inside your mod folder named Image, Localization, and Table. Image is for images for your mods, Localization is for the localization files that allow mods to be translated into other languages, and Table is for all the code for the mod. There are also 2 sets of TXT and XLSX files named ExtraAssetPivot and ModInfo. For now, ignore those. We will come back to them later.

Inside Table, you will notice more sets of TXT and XLSX files that correspond to files in Official Assets. Fabled intended the XLSX files to be turned into TXT files using their libtool that they provided. However, it is much easier to just copy-paste from Excel/Google Sheets into the TXT file directly, so that is what we will be doing from now on.

To begin making modifications to the Sample mod, You're going to want to open a new Excel File/Google Spreadsheet. I would recommend setting it up like this for easy use, using Copy-paste from the mod's TXT files to fill the spreadsheet:



Now that we have our Reference sheet, Official Sheet, and Mod Sheet, we can now start making changes to properly make the mod! Note that if you are using Excel, it may be a little different looking.
Step 3 : Creating new content for your Mod
This step is going to be less specific in its instructions than Step 1 and 2, and that's due to how free-flowing the modding process is. Making a mod can take many steps, such as making artwork, figuring out what content to add, how to add it, then actually writing the code required to make the content, then bugtesting and (hopefully) bugfixing, and you can see how this process can take a LONG time, especially when you're adding things like Heroes or several different cards, relics, etc.

For this guide, we will just be creating a simple card. You can follow along directly and create the exact same card, or be loose with it and see what happens. Just know that some things may not work if you stray too far from the guide.

To begin however, you may need a brief explanation of what the files you're looking at mean and just how a card "works". I will try my best to explain in text, but a lot of how cards work will be intuited from working with them long enough.

All things in the game are dictated by BaseActions. These are what causes cards to deal damage, heal your character, provide Armor, all that. These BaseActions are used by HighActions to basically do those actions a certain way. The HighAction for dealing Melee Damage is different than the one for Ranged Damage, which is also different from the HighAction for dealing Critical Melee Damage or Armor-Penetrating Melee Damage. There are well over 2000 different HighActions, so there's a lot of them that have just been passed over or ignored, but most of the well-used ones are generally understood how they work. Cards simply run a HighAction in a certain way dictated by their code. There's a step by step example in the Official Guide, but i'll go over it in a different way.

Our example card will be Double Shot. This card is a Ranged Card that costs 2 Ammo that deals 7/10 Damage 2 times. Its Card ID is 1002, and its upgraded Card ID is 11002. Looking at it in the spreadsheet, you can see many things such as Card_Name_1002 and Card_Info_1002. These are important later, so you can just ignore them. Things such as CardType, CardTargetType, and CardTarget are explained in the Reference sheet, but for our card they are 2, 2, and 221 respectively. If you are confused at why CardTarget is 221 and what all that means, I'd recommend studying the Reference sheet and then once you're still confused, just copy the numbers from cards that have similar targeting parameters to the one you want. Past those are a bunch of null and a column called UseEvent. This is the code that runs when the card is used (shocker). Most cards have effects when they are used, and Double Shot is no different. The code goes as follows:

GHT{"name":"null","values":[]}|[1001,0,2,221,7,null]

Understanding what each value means and how they work can take a long time. For now, we're just going to go over them in the context of a Ranged Card.

1001 - Ranged Damage. This is the HighAction that is ran when the card is used.
0 - Instant - If this number is a 0, it applies the HighAction instantly. If not, it applies it equal to the number put. For most attacking cards, this is a 0.
2 - The amount of attacks done by the card. Since Double Shot attacks twice, this is a 2.
221 - Targeting Parameter. Like I said earlier, this is gone over in the Reference Sheet. This just means it can target any enemy.
7 - The amount of damage dealt by the card. This is 7 since Double Shot does 7 Damage.
null - Since there isn't any other effect that 1001 does, this is Null. If a HighAction can do multiple effects on use, this would instead be a different number. This is best seen in Heal effects that do damage instead if the enemy is undead, so their number here is the same as their heal.

Other cards can have text after this that decides things such as VFX and whatnot, but for now we just want a card that does thing. For this example, let's say I want it to instead deal 11 Damage and attack once per enemy alive. This can be done by changing the 7 and the 2 to:

GHT{"name":"null","values":[]}|[1001,0,<C_EnemyCount>,221,11,null]

Changing a number or two to create an entirely different card is really easy if there is a card with a similar effect. Feel free to experiment with different effects and see what you can make! A lot of getting experienced the modding is learning how the cards work and WHY they work. This is something that can't be taught in a mod but rather through practice.

Once you got the card to what you want it to be, Ctrl-A + Ctrl-C the code you edited, open the TXT file for the mod, and Ctrl-A + Ctrl-V the code into the TXT file. Now you should be able to run your code and see if there's any issues or not. Keep in mind that other parts of the code may make it so that the card doesn't work or doesn't show up (like the CardFall needing to be correct for the card to properly drop.)

For now, this will be the end of this step. If you want any other information to be added, please let me know!

Step 4 : Publishing the Mod (and extra checks beforehand).
So now that your card works properly, you can now do some final checks to make sure it's good to publish. Some of the things you can check:

- Make sure all the localization is correct for the card, so that the information on the card is correct for when you're in-game. Depending on the amount of cards, this can take either a moment or several minutes. Make sure that the names you use aren't the same as already existing cards, or else there may be issues.

- Make sure that the Mod Info is changed to properly reflect the new mod. Note that for this one only, you MUST change the XLSX file as well as the TXT file. Once you do this, you can then change the folder name from Official Sample to whatever your mod is called.

Once these are done, you can run the Publishing tool named "Pirates outlaws - modding kit". It should look something like this, minus the other mods:



Clicking "add" will begin the process of adding a new mod. Fill out the fields that you want, add the content (which is the 1st folder of your mod, not the 2nd named one!) and then click Publish. It may take several minutes to have your mod become visible.

Congrats, your mod is published! From here, you can continue working on it or start making a new mod (or play it with other mods).

Conclusion
This will be the end of the basic guide. If more information is required, please leave a comment on this guide and I'll try to respond as quickly as possible. Hope you all enjoyed, and good luck with the Modding Contest!