MADNESS: Project Nexus

MADNESS: Project Nexus

Not enough ratings
Simple guide to modifying your AssemblyCSharp.dll [WIP]
By NeoX
This guide will teach you about some surface level stuff about the respective file, which can change quite a lot of the game.
Such as:
- Custom Hirelings
- Custom Troopers
- Custom Hireling HQ quotes
- Custom Phobos quotes
- Custom notifications (hireling level up/death)
- Modified origins skills
- Greater pool of items within the blackmarket
- Enabling Madness difficulty from the start
And so on

Additionally, this guide is made for the beta workshop, but it is also somewhat compatible with the version of the game, of which includes NEM despite it being outdated. Emphasis on "somewhat", more so for NEM since a fair share of things work differently there.
   
Award
Favorite
Favorited
Unfavorite
Appreciation Section
First, I'd like to thank DarkSignal and Your Local Toaster for all the help they have given me with learning all this stuff. Despite how much bother I've might've been to the both of you, I hope we can keep getting along for as long as possible.

Also thanks to all the friends I've made along the way on this journey to modding for helping and supporting me in any way possible!
Requirements
Now to get started you will need a few things:
  • DnSpy or any software capable of modifying .dll files
I personally use DnSpy since that is what I've seen others use and is what I have gotten used to. So I will not make any other guides using any other software.
  • Reading Comprehension
If you don't care to read, then don't hope to get anything done with this guide.
  • Patience
A fair share of trial and error is bound to happen whenever you want to or not.
First Steps
Once you have gotten your hands on DnSpy, you will need to look for the Assembly-CSharp.dll and open it with the application to make any edits

Now that you have it open, you would want it to look as such to be able to get started on anything

To actually make any changes you just need to open a class and select any of its contents, right clicking on the display on the right, either class to be able to edit the whole thing at once, or method to edit just a specific thing
Warnings
I WILL NOT REPEAT MYSELF
First
I am not exactly happy with the workshop community as a whole, even if there are plenty who do not deserve such emotions, I still believe that most are undeserving of knowing how to make such changes to begin with.

Second
Make a backup of your game saves before making any edits, and regularly make backups of your edited .dll file, whenever the game updates the file gets updated, removing all progress done by the user, and such files are not compatible with the different game versions so all edits require to be re-added.
Take note that backups cannot be edited for the most part due to them missing their additional "related" files and neither should you edit the name of the file by any means.

Third
I will be using my modified Assembly across the guide for my own convenience, but it still serves to show what changes one might need to make to reach a similar result as mine.

Fourth
I will be deleting / not answering any non-worthwhile questions or comments because I tire of them and I don't want to see them plague this.
Arena_Manager
Within this class you can modify a fair share of things related to the arena combat features:
  • Imaginary Friends
  • Troopers
  • Offering Ghosts
  • Creber Clones
  • And some other stuff that I haven't really dived into
    So I won't speak about them
Imaginary Friends
OriginCheck_ImaginaryFriend
It has been a long while since I've actually modified this one, so from what I can recall all the conditions required for the imaginary friend to spawn are as followed:
  • Orange - How much of the current wave % progress must've have spawned before meeting the condition.
  • Yellow - How likely a friend is going to spawn at the same time as an enemy (100% - value [1.0f - value f]).
  • Blue - How much % hp of the current corpus you must be missing before a friend can spawn. In this case being at any amount.
  • Red - This condition makes it so that the imaginary friend can only spawn at the final wave, but by adding the "!" (in a way it means "no") it will make it so that the friend can spawn in any wave.
  • Purple and White - The final condition of at what corpus you must be to be able to spawn a friend. As edited allowing it to spawn at any corpus amount.


Update_CreateAndUnleashFriend
This part angers me due to it potentially having the capability of being considered a bug with a far to easy fix, why you might ask?
BECAUSE THE GAME CAN ONLY SPAWN THE RANGED VARIANT, AND DUE TO HOW THE LEVEL GETS CALCULATED IT WILL LOCK IT TO USING SHOTGUNS ONLY ONCE YOU LEVEL UP.
Either way, the list lets you add any character you want to it, those that are edited in are all vanilla characters.
The orange line is the imaginary friend level, which scales with the player who is combatant_Base3. In this case being / 1 aka the same level as the player.

Now on the following screenshot you can edit in red what weapons the ranged variant will spawn with, or at yellow were you can set how much bonus damage unarmed and melee get.
For the ranged variant it uses weapon categories to decide what to give to the friend to spawn with, depending on its level / player level. Essentially if at 25 lv or higher the ranged variant spawns with heavy weapons, while bellow level 5 will spawn with pistols.
For melee and unarmed I'm not really sure what it does exactly, but in this case it should increase the damage by adding their current player level and doubling it ( / 0.5f [50%]), aka at level 25 they gain 50 damage, or something like. (Haven't been able to test this properly)
I've tried to see if it was possible to add melee weapons & throwables depending on the ItemGenre but I wasn't particularly successful.


ImaginaryText_Summon
A tad self-explanatory.
Offering Ghosts
Check_CreateGhost_Offering
The red part lets you change the odds of how often a ghost can spawn each time the Offering kills an enemy if they do not have the SoullLess trait. The vanilla chance is 0.1f (10%).
The yellow part grants the ghosts the "bribed" buff, but this is purely cosmetically so you can remove it.


CreateGhost
As you may see this line of code has been modified to accommodate a list of characters that are randomly chosen for when it triggers the Offering ghost spawn.

It should be possible to clean it up, and instead of duplicating the possible characters within the list, to instead give them a % chance to be selected when spawning them, albeit haven't found out how just yet, so for now, this is what we have.


SummonGhostText
Self-explanatory.
Troopers
Create_MinionSquad
On this part as you may notice in comparison to the vanilla version a fair share has been changed, primarily in this case it allows:
  • Blue - Custom troopers to spawn (thanks To Your Local Toaster)
It require you to create a new method first.
  • Green - Increased (albeit randomized) trooper count
Range 1-5, as in it repeats how many times it spawn a trooper.
  • Deleted - And for them to spawn with no weapons
It sure is fun having unarmed focus troopers to spawn with guns.
You will see soon enough how to create the method when we arrive to it. Albeit its rather simple to do so.

As to answer why no weapons, its because the Troopers use a pre-exiting loadout that I was unable to edit in any shape or form.

I also tried a fair share of things to make them spawn with other weapons without any good results, so the best outcome was to just deny them the weapons so that they can pick them from the stages.



ReturnMinionCost
Self-Explanatory. In this case it returns the cost of max level troopers to around ~3k bucks (being "(num2 * 5), 0.75f").



SpawnMinions
Here you can edit a couple of things in regards to the spawning of the Troopers and you may also notice that in my case it somewhat different, as per why, its due to me removing them gaining the bribed buff.

Other than that, you can also edit how fast the troopers spawn, in this case at the red bit, the troopers have a delay between each other of 1s up to 25s, albeit:
  • This can be abused, the game won't stop spawning troopers even after a wave is completed (No it does not carry over to the HQ).
  • The last trooper will speak the line, but the trooper will need to wait for another cooldown until they actually start talking, being the same duration as their spawn intervals.



Spawn_RandomTrooper
Put as simply as possible, this is how you would want to get it done to allow yourself to have custom troopers to spawn, the tiers being the respective levels of the trooper upgrade.

Creating on the other hand is rather simple, shown in the image below you just need to create a method proceed with editing the class, find your method and fill in with the required content shown in the left. Just be mindful of what you edit and or change.