Ravenfield

Ravenfield

108 ratings
Modding: EA26 Compatibility
By P. Good @ Ravenfield patching
Ravenfield moves to a new version of the Unity engine in EA26 (Unity 2020.3 LTS). This change causes incompatibility issues such as broken animations and unexpected collision issues on maps in many mods.

This guide is here to help you make sure your mod works with the EA26 update.
3
2
   
Award
Favorite
Favorited
Unfavorite
The EA26 game engine update
With the EA26 update, Ravenfield moves to the most recent stable Unity engine version, 2020.3 LTS. Due to changes in the game engine, this update inevitably causes compatibility issues with many mods made for earlier Ravenfield versions, which were running on Unity 5.6.

This guide is meant to help you make sure your mod works with the upcoming EA26 update.

For more information about the EA26 update (and why I'm updating the game engine in the first place) check out this post:
https://store.steampowered.com/news/app/636480/view/3129434247973275422

Current game version
Currently, the game is running EA25 (Unity Engine 5.6) on the stable branch, IE the branch most people play the game on. Alternatively, you can try the EA26 update (Unity engine 2020.3) by switching to the beta branch. This branch is typically used by players who want to test the latest features, or mod developers who want to use the latest game features.

Mod Compatibility
It is currently possible to develop mods using two versions of the tools pack, the old Unity 5.6 tools or the new Unity 2020.3 tools:


As shown in the diagram above, mods made with the Unity 5.6 tools have full compatibility with the EA25 version of the game, and will still be partially compatible with the upcoming EA26 update. Mods created using the new Unity 2020.3 tools have full compatibility with EA26, but will not load on earlier versions.

To help players find mods that are compatible with EA26, I have added an "EA26 Compatible" tag to the workshop. This tag is automatically added to mods uploaded from the 2020.3 mod tools. Additionally, mod makers on the 5.6 mod tools can optionally mark their mod as EA26 Compatible when uploading. Please make sure you have the latest mod tools version for this to work!

What does Partially Compatible actually mean?

Mods made with Unity 5.6 are, in general, possible to load in EA26, but some of them suffer from major bugs. Some of the most common issues follow:
  • Animations are broken, typically visible on first person animations but can happen to vehicles such as airplane landing gears.
  • Materials are not loaded correctly and appear pink ingame.
  • Player/projectiles/vehicles collide with foliage and other vis blocking objects.
  • Detail objects such as grass and trees are invisible.

When EA26 is ready, it will be pushed to the game's stable branch, meaning that all players will be forced to play on Unity 2020.3. This makes it very important to make sure your mod is compatible with EA26!

Legacy Branch
It is natural that many mods are no longer being actively developed or maintained, and will break when EA26 is pushed to the stable branch. For that reason I will create a new "Legacy" branch, containing the EA25 build. If anyone wants to play a mod that is only compatible with EA25 or earlier versions of the game, they will always have the option to switch to the legacy branch. However, this branch will not be updated, so EA26 and future features will not be available on it.

Ravenfield Mod Tool Versions
You have the option of modding using the Unity 5.6 tools or the Unity 2020.3 tools, so which one should you use?

The answer depends on what you want to do with your mod:
  • If you want to patch an old mod to work with EA26 - Use Unity 5.6
  • If you are actively working on a mod or are starting a new one - Use Unity 2020.3

Download links:
Unity 5.6 mod tools[drive.google.com]
Unity 2020.3 mod tools[drive.google.com]

If you want to work on both old and new mods, it is possible to have both Unity 5.6 and Unity 2020.3 installed at the same time. When working with multiple versions of Unity at the same time, I would recommend downloading the Unity Hub which makes this a lot easier!
Installing 2020.3 mod tools and upgrading a project from Unity 5.6
Updating from 5.6 to 2020.3 is fairly straightforward, and it is recommended to create a new Unity 2020.3 project and import your existing assets into it. This allows you to keep your old 5.6 project as a backup. Updating your mod to 2020.3 and then uploading it to the workshop will automatically assign the "EA26 Compatible" tag to your workshop item (if you are using the latest 2020.3 mod tools). Also, a 2020.3 mod is not compatible with EA25, so make sure you switch to the game's Beta Branch to be able to test your mod in EA26 (here's how).

Follow these instructions to safely upgrade a 5.6 project to 2020.3:

Let's start by creating a new 2020.3 project:
  • Download and install the Unity Hub at https://unity.com/download
  • Install Unity 2020.3 (The game currently uses 2020.3.18f1, but the latest 2020.3 version should be supported)
  • Create a new 2020.3 project using the 3D template. DO NOT use the High Definition RP (HDRP) or Universal Render Pipeline (URP) templates as these are not supported by Ravenfield.
  • Download the 2020.3 Ravenfield Mod Tools[drive.google.com] and import it into your 2020.3 project.

You should now see the Export, Plugins and RFTools folders in your project. The 2020.3 project is now set up with the latest mod tools and ready for modding. Any time you upload a mod to the workshop using the 2020.3 mod tools, it will automatically be tagged as EA26 Compatible.

If you wish to import an existing 5.6 modding project, follow these instructions:
  • Open your Unity 5.6 project (open it in Unity 5.6, DO NOT UPGRADE!) and export your assets as a unity package (Assets/Export Package).
  • Make sure only your own assets are exported. Accidentally including old script files or plugins will cause script errors in the new project, so make sure the Scripts, Plugins and Standalone folders are NOT EXPORTED to your unity package.

We now have the mod assets inside a unity package which is ready to import into the 2020.3 project.
  • Open your Unity 2020.3 project
  • Import your unity package (Assets/Import Package/Custom Package)
  • After import is done, make sure there are no script errors by pressing the play button. If the editor enters play mode successfully, you should be good to go.
  • If you cannot enter play mode due to errors, you most likely included a script file or plugin file from the 5.6 Ravenfield tools. You need to remove the old script file from the project to solve this, which typically reside in the Scripts, Plugins or Standalone folders. Make sure you only remove old script files and not the new ones from the 2020.3 mod tools package!

You should now have your assets up and running in Unity 2020.3, ready for exporting to the game. However, there are most likely still a few changes you need to do to ensure your mod loads correctly in 2020.3:

Changes in 2020.3 mod tools
Plane component renamed to Airplane
Due to name collisions commonly happening between Ravenfield's Plane class and external tools, I have decided to rename the Plane class to Airplane. Therfore, any Plane components will need to be changed to use the Airplane component after upgrading to 2020.3:
  • Find your airplane prefab and open it.
  • In the parent game object, check the vehicle component which should have a "The associated script can not be loaded" warning.
  • Click the script field and select the Airplane component.
  • All 5.6 Plane component values should automatically carry over to the Airplane component.

Vehicle Content Mod Variants
Vehicle content mods can now contain multiple variants, meaning you can bundle multiple versions of a vehicle inside the same .rfc file which is preferable as it reduces memory usage and file sizes. Due to this change, you will have to re-assign your vehicle content mods using the new vehicle system.

Actor Skin Rigging Change
The actor skin rig in Ravenfield EA26 has changed, resulting in skins that were rigged in the Unity 5.6 mod tools no longer align with the skeleton when exported from 2020.3. The easiest way around this is to select your Actor Skin Content Mod (or DataContainer actor skins) and set the Rig Settings -> Version to Unity_5. This causes the game to convert your skin from the Unity 5 rig to the Unity 2020.3 rig.

Alternatively you can export your skin using the recommended 2020.3 fbx export settings using Blender 2.93. This should make your skin compatible with the 2020.3 rig (Make sure you set the actor skin rig settings version to Unity_2020). Please see the RFTools/Models/blender_version.txt file for more information.
Patching a Unity 5.6 mod for EA26
If you have already finished your mod in Unity 5.6 and want to take the path of least resistance to get it ready for EA26 this section is for you. First of all, make sure you switch to the game's Beta Branch to be able to test your mod in EA26 (here's how).

Listed below are the most common issues that should be solved before your mod can be considered compatible with EA26. When you get your mod working nicely with EA26, please make sure you mark it as compatible with EA26!

Fixing the Buggy Animation issue
When loaded into EA26, animations will sometimes be corrupted and fail to play back properly, typically resulting in first person arms that bend the wrong way. This issue can affect all exported animations, including first person weapon animations, vehicle landing gear animations, animations exported with a map, etc.

Solve this issue by checking the Resample Curves option in your model import animation settings. Here are the settings I use to export a animation that loads correctly in EA26:

Fixing pink error materials
Pink error materials occurs when the game fails to load the shader associated with a material bundled in your mod. To ensure the shaders load correctly, make sure you only use shaders bundled with the Unity editor. Any custom shaders exported from the 5.6 mod tools will not load in EA26.

Fixing foliage collisions
For an unknown reason, the layer setting on modded content will sometimes fail to load, typically resulting in players/projectiles/vehicle colliding with game objects set to the AiVisionOccluder layer. Unfortunately the only easy way around this is to completely disable collisions on any affected objects. To solve this in a more graceful manner, you need to upgrade your project and export the affected mod from Unity 2020.3.

Marking as EA26 Compatible
When uploading your mod patch, you can optionally mark your mod as compatible with EA26 at the bottom of the Steam Workshop upload tab (Make sure you have the latest Ravenfield mod tools for EA25[drive.google.com] installed for this option to appear).
23 Comments
Ushanka King Jun 15, 2023 @ 2:31pm 
So URP will not work?? Please add URP support if not and add stochastic texturing it will make the game look a lot better
IronMKai Feb 2, 2023 @ 5:06pm 
mmm, The game won't go full screen, I contacted game support: DID NOTHING, now I had to say this to the creator. And yes I'm not pleased from this bug.:steamthumbsdown:
Trudny Przeciwnik Dec 22, 2022 @ 10:17am 
I cannot mod anymore. I have 77 errors, and no matter if I'm importing older or newest Ravenfield tools package... after import I always have 77 errors that I cannot fix. I already made some mods for Ravenfield in the past, but now it's just not possible, and Im really sad because of it. I wanted to make better version of Contra Gun _ spread gun from Contra, but yeah... now I cannot. I was also trying to reinstall Unity, UnityHub, to reimport assets, to make sure I got C# extension in my Visual Studio Code, still 77 errors. Like sometjing is missing. If anyone can help me, please help. I want to add some nice content into Ravenfield that for sure many players would appreciate to have
olm.steady May 7, 2022 @ 10:42pm 
Bro ANY LEERSOG MAP 1000 bots like butter. It's so freakin cool to see this game continue to develop... thank you for all your hard work on this :')
Nanner May 1, 2022 @ 2:13pm 
Funny thing for me is that all my subscribed to EA25 mods work with EA26
Artyom Apr 2, 2022 @ 7:06am 
We appreciate you continuing your work on this game!
Texas_Toast Mar 6, 2022 @ 2:08pm 
Hi Steelraven I think you should add a COD style campaign to ravenfeild
hillyhaven Feb 25, 2022 @ 12:54pm 
I use EA26 Its fine but Its Laggy But its Fine no problems
Macros Feb 12, 2022 @ 8:18pm 
cool
PPurpleZ Feb 8, 2022 @ 8:56am 
epic moment:steamhappy: