Hatred
Not enough ratings
[experimental] Making map packs for 1.333 / 1.666
By Igoreso
By default, total conversion mods cannot load map packs. However there is an experimental change in 1.333 and 1.666 that allows to do so. If you start a map from your map pack it can only benefit from small part of the changes baked into our total conversions, but won't have access to the custom FPS / TPS perspectives. In this guide we'll try to trick your map pack into doing that.

I will try to explain it the best I can but there are zero guarantees that it will work.
This guide also assumes basic knowledge of the Editor and your ability to read and comprehend basic English.
   
Award
Favorite
Favorited
Unfavorite
Basics and preparation
Since I don't know your (the reader's) level of expertise with Unreal Engine, I have to explain few important things - this will be necessary for you to understand what's going on, especially when something breaks. And trust me, something somewhere will eventually break.

Total Conversions vs Map Packs

There are 2 ways Hatred Editor allows you to cook a mod. I'll assume you've read Destructive Creation's articles on this topic, so I'll explain from technical perspective. Let's start with something simpler. A map pack effectively works as a DLC - you can have new stuff there but you cannot override base game's stuff. This is because you're giving the engine your map pack's assets after the base game is loaded, and those assets are located in the isolated "directory" (as an analogy).

Total Conversions however are effectively "base" game's files instead. But the Editor does not cook the entire Content folder into a new mod - if it did so, each mod would take few GBs of disk space. Instead, it finds the difference between what it knows is a vanilla base game, and what you have in your copy of the Editor.

This means that if you altered an existing asset - it would be added to the cooked mod, and once the game starts, your version will override the base game's vanilla asset. This is how the entire game was colored in 1.666 - the assets are placed in the same "directories", but their contents are different. And this is why 1.333 is so much smaller than 1.666.

For us this means that in theory map packs should be able to load custom assets added in total conversions. One way to achieve this would be to provide the modders with the entire 1.333 / 1.666 code base, but due to reasons (see full info here), we cannot do so, but I've found an easier way - we can trick the game instead.

In short, what we will do is create a gamemode asset in the Content directory of your Editor that is named and placed the same way we have it. At run-time, your map will attempt to load this asset and will find our version of it baked into one of our mods you currently have active.

Please note that in theory this means that your map pack won't work on the vanilla game (because it doesn't have the custom gamemode asset), but in practice somehow this works, and game loads vanilla gamemode instead. However, I cannot guarantee it will work for everyone till the end of times, so at the end of the guide I'll provide a way to mitigate this, should it ever happen.

Redirectors

There is one technical type of "assets" called Redirectors. Those are created automatically by the Unreal Editor when you move or rename the files. Please read the official UE documentation[dev.epicgames.com] about this before you continue because you can easily break something in your mod even if you don't follow this guide.

Here is a what you need to do in your Editor. In the guide, I'll assume you've read the documentation and you have this enabled.



There are no strict rules regarding how to organize assets in your mods. The below screenshot is how I did my map pack "TestPack" for this guide. You can see the redirector there - we won't need it but now you know how it looks like.

Setting up the gamemode
In short, here is what we're going to do. The below will explain the same in detail:
  • Create a directory structure that mimics 1.333 / 1.666.
  • Create a child blueprint from vanilla campaign gamemode blueprint with a specific name
  • Move that newly created gamemode into a specific place
  • Change your map to use that gamemode
  • Cook and test it

Create a directory structure

You need to have a path like "Content/Custom/Perspectives".
Right click on top-level Content folder,
click "new folder" and name it "Custom".
Then right click Custom, "new folder", name it "Perspectives".

The end result is on a screenshot.



Create a child blueprint

Go to Content / Blueprints / GameModes,
right click on BP_HatredGameMode
and click on "create child blueprint class".
This will create a file in the same directory.
Name it BP_HatredGameModeFps.
Do not click "save all" yet, we will do that later.



Move it to Perspectives

Start dragging the file to the Perspectives folder.
Once you release mouse button, select "move here".





Now, close the Editor, but do NOT save the gamemode that is located in the first folder.



If you do so - you'll end up with 2 copies of same asset, but first one won't even be visible in the Editor. The best advice here is to delete both copies in the Explorer and start again.



Change your map

Open your map.
Go to World Settings tab. If you don't have this tab open - go to Window menu at the top.



Change "GameMode override" to use your BP_HatredGameModeFps.



So, that should be it for the changes.
Save the map and cook your mod.
Testing
How to test any mod locally

Here is a quick tip on how to test locally without having to upload your mod to the workshop.

Open 2 folders in explorer. First one is where the cooked mod is located, and the other one with the game in Steam. For me those are:
C:\_games\Steam\steamapps\common\HatredEditor\Hatred\Plugins\TestPack_47193AF64B000A4AFFB0468D791A577C\ReadyToUpload C:\Program Files (x86)\Steam\steamapps\common\Hatred\Hatred\Content\Paks\Mods

And then move both files - *.hatmod and *.pak - to the second folder.
Unsubscribe from your mod in Steam.
Now you should be able to start your map from a local version.

What to do if you don't see your latest changes

Sometimes UE's cooker refuses to see your latest changes. This is not your fault. What we need to do is to reset the Editor to the clean state and cook again. Below is the list of folders you need to delete:
Base path in my case: C:\_games\Steam\steamapps\common\HatredEditor Delete these: Engine\DerivedDataCache Engine\Saved Hatred\DerivedDataCache Hatred\Intermediate Hatred\Saved

This is a little overkill but the only way to be 100% sure.

Start the 1.333 or 1.666

Start the game with any of the mods.
Go to Mods --> Map Packs and start your map.
If you're lucky then you should be able to play with all the features of our mods.
If not... well, I'm not a god.
[Optional] In case it breaks in vanilla game
In case your map breaks when starting from unmodded game, you need to split it into 2 versions - one that uses "FPS" gamemode you created and the other one that doesn't. You don't have to copy the map and support 2 versions of it. We can use "sublevels" feature of the UE.

First of all, create a backup of your mod, because we're about to break everything.

Next, rename your map's asset in the Editor to anything else that doesn't include "_P" at the end so that it won't be shown in the mod's map list. Make sure you don't have it open, and ideally nothing else was opened since you started the Editor.

Now, create a new empty map with "_P" at the end. Open it.



Go to Window --> Levels.



Click Levels --> "Add Existing" and select your map you just renamed.



Select the sublevel row and click the "?" button.



Check the only 2 checkboxes here and save everything.



Now, do the exact same steps in order to create another "_P" map.
As a result, you now have 2 levels that can have different gamemodes.
Avoid editing these "_P" maps outside of that, and stick to editing the sublevel.

I did not test it myself but hope that helps.
2 Comments
Igoreso  [author] 11 May @ 11:33pm 
Because I don't care about it. It is my first mod for the game and it very simple - too simple perhaps, it just clutters the workshop. I made it "unlisted" now, you should be able to access it.
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=618676923
siliconbasedgluee 11 May @ 6:05am 
hi, not about 1.333 or 1.666, but why did you remove blackout mappack from workshop and is there any way to get it nowdays? Thank you!