Elden Ring Dll Modding (Getting a seamless coop style setting system in your mod)

As much as I would love to just jump straight in, I feel there is a bit of clarification needed on the areas of modding and their different use cases. This will help you decide if this is the pathway you want to go down or whether another avenue is more suitable.

Types of Elden Ring modding

There are many different types of mods as I am sure you are aware, however these can be broken down into Major and Minor categories. Minor categories are things like spell modding, moveset modding, spirit summon modding, map modding, event/talk script modding and many many more, however we will be focusing here on the Major areas of modding of which there are 3 and each can effectively do all the minor categories of modding albeit in very different ways with different pros and cons.

Regulation Bin Modding:

This is done primarily with Smithbox and involves changing game parameters statically (i.e. before launching the game) so that when the game runs it loads the values you have changed. These might be things like changing the health of enemies, or adding new weapons or armour. Note that the key feature here is that changes are made before the game runs. It cannot make any dynamic or live changes while the game is running. You simply change the files in smithbox, which creates a new regulation.bin file and that reg bin is loaded and run when playing. This is the best area of modding for beginners to start with, you can get some simple changes to take effect very quickly and although it can be overwhelming to figure out how everything interconnects it is straightforward when it comes to making changes.

  1. Programmatic file editing (SoulsFormats): In a similar vein to the regulation bin modding this is (in my understanding) an alternative process to doing the same thing. Except instead of using smithbox you can code the changes you want with C# and the soulsformats library. I have limited understanding of this so if I am not giving it the accolades it deserves please tell me.
  2. Programmatic file editing (python): You can also always just write python code to edit the csv outputs from smithbox and then import them back in, this is how I built the entirety of Lord of Ashes lol

HKs (HavocScript):

HKs are whack and can do a lot, primarily they are for altering behavior of enemies and the player but apparently with dynamic params you can begin to do a lot of pretty crazy things. If you want to edit things like player movement speed, or jump height, or change enemy ai, battle operations and so on these are your go to. They can technically alter things dynamically so you could have them edit values of items or other things in games but I have read mixed reviews on this and will not be advising for or against this myself here. Check out F_wangs guide Hks for fun and profit for a great run through on using HKs.

Dll (Dynamic Linked Library) mods:

Most of you are probably familiar with the black magic that is Dll modding in some way or another, either from using the glorious merchant mod and wondering why every other mod isn't that mergeable because what a world that would be right, or seamless coop where there was the settings file to tweak difficulty and you asked yourself the same thing about why every mod didn't have similar settings. This is because this is one of the most powerful, yet unfortunately, one of the most difficult areas of modding basically reserved for the geniuses and most capable/stubborn among the modding community. It has the ability to dynamically edit things in game in real time based on various triggers. Yep you read that right, I did just say it can do basically anything. Due to its complexity this modding method is typically reserved for mods that need to update things in real time while playing elden ring, not before Elden ring loads, or for when merging, compatibility or making sweeping changes of other mods is required as these can run after the other mod has loaded and make edits to them without having compatibility issues.

Thinking Time, do you really need dlls?

Now that you have a bit of insight into the types of mods the different areas are suitable for I recommend having a think about your mod idea. In many cases a programmatic solution with smithbox can deal with 90% of all mods, but if you really need dynamic updates, or compatibility is essential for your mod, then I still urge you have another think, especially if you are not a programmer or have little to no programming knowledge because this will be very overwhelming for you. You will need to go and research the rust programming language and do a tutorial run through or 2, get your environment set up and probably spend a whole bunch of time with the LLM of your choice asking it what the f*** is going on, but it is doable if you have patience and persistence, or are really really stubborn.

DLLs

Ok well if I haven't scared you off then you must really need dlls for your mod, or you are really confused, but either way hello! My goal with this guide is to prevent others from going through the experience I had of feeling like a total idiot having no idea what I was doing for 2 full days. You see, I am not one of those geniuses I mentioned earlier, no, luckily for you I am just a big dumb sucker for punishment, I overcome my general lack of genius with pure unadulterated hard work. This bodes well for you because most programmers are so deep in the complexity and have understood their field for so long they forget the intro points scrubs like us struggle with like setting up an environment to work in, or having no idea what a library is, or even how to run that code snippet they sent, headers? wtf are they I just run the lines right? they will work right? RIGHT?! cries.

Now I can't make any big promises, I can't make this easy. At the end of the day you are going to need to be able to understand and read the code, no matter how much help you get from chatgpt, it will get confused, and not understand what you want and drill down rabbit holes, so you need to be able to redirect it, call it out for its bullshit and keep things going in the right direction. But what I can do is give you a starting point, because that is the worst thing, when you need to start and have no idea where to do it. So let's get you up and running with your environment and a few examples to give you a point to develop from.

The Tutorial (Finally jeez this guy waffles on)

Ok so the best place to start with this is the incredible Fromsoftware-rs by the geniuses I mentioned earlier vswarte/chainfailure and the whole team behind it. It is a rust based library which has bindings to directly access a heap of things directly in game with code.