Reworked this whole post as I was able to make the change I wanted with dnSpy. Thought I'd share what I did in case it helps anyone else.
I thought it would be cool to do a DOM TM build that relies on Bilocation instead of Neural Overload. This is a bad enough idea considering NO can get tons of damage buffs from feats / crit chance / headbands, but the 10 turn cooldown on Bilocation is what really kills it. I was hoping to find a way to reduce the cooldown to 1 turn. Then at least I could do some cheese with Tranquility + Mental Breakdown + Temporal Increment to get 3 force ghosts on an enemy in 1 turn. :)
I tried using UFE to transplant the Stygian Exorcist's robe effect that reduces cooldown onto another item, but there don't seem to be any other item rules that use that class. There are some craftables that have cooldown reduction for Sprint and Dirty Kick, but crafted items in the global.dat file don't seem to use the same structure as the static item rules. Stygian Exorcist robe effect: { "class": { "name": "MCFE", "id": 746, "members": { "SE2:P": 0, "SE2:C": null, "SE2:V": false, "MSFE:V": -9, "MCFE:C": { "class_id": { "name": "eCC", "id": -751, "ref_id": -147, "members": { "value__": 201 } } } } } },
I've been using BepInEx and the custom plugin which is amazing. Thank you onlynumbersandletters! I increased spec points per level, carry weight, max psi slots and utility slots. It's great!
... but making a custom plugin just to tweak Bilocation was a little out of my depth. So I downloaded dnSpy and opened up the Underrail.exe executable. I made a backup beforehand.
Class eqr seems to be the Bilocation ability. I was able to find it by running File -> Export to Project, and using Windows to do a string search for Bilocation within all the files in the exported directory.
It has the damage scaling, duration, cooldown, etc. This is the line for the cooldown: private static readonly int b = 10 * d0l.b; d01.b is 5000. Underrail turns are 5 seconds, so I figured d01.b is in milliseconds and this was the cooldown.
You can get to the classes by going to Underrail -> Underrail.exe -> {} -
Since I couldn't get manual changes to the method to compile, I right clicked on the line I wanted to change and used Edit IL Instructions. That let me change the 10 to a 1. Clicked OK, then File -> Save Module. Booted up Underrail and the cooldown was reduced to 1 turn. BepInEx and the custom plugin seem unaffected and still work fine.
Maybe that was all obvious, but I struggled a bit to figure it out lol.
I love this, thank you for sharing this; I haven't used bepinex but I'm often bashing around in dnspy/IL. I'm curious what your issue with decomp was - I used to have trouble getting some things to recomp unless I did some elaborate reference/project import voodoo, but it's been so long since I had the issue I don't even remember what game I was mucking around in (probably Starcom).
Point being, thanks for posting your experience with it, I will likely refer back to this because I love doing this and similar things and it's a privilege to see this sort of thing shared for others. Thank you!
Hello; whenever I attempt to launch the framework executable, it gives me an error message and the only prompt I'm given is to close it. Can anyone give me a pointer as to what I've done wrong? The error message is as follows.
"Unhandled exception System.TypeInitializationException: The type initializer for 'BepInEx.Paths' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'SemanticVersioning, Version=2.0.2.0, Culture=neutral, PublicKeyToken=a89bb7dc6f7a145c' or one of its dependencies. The system cannot find the file specified. at BepInEx.Paths..cctor() --- End of inner exception stack trace --- at BepInEx.Paths.set_ExecutablePath(String value) at BepInEx.Paths.SetExecutablePath(String executablePath, String bepinRootPath, String managedPath, Boolean gameDataRelativeToManaged, String[] dllSearchPath) at BepInEx.NET.Framework.Launcher.NetPreloaderRunner.OuterMain(String[] args, String filename) at BepInEx.NET.Framework.Launcher.Program.Main(String[] args) Press enter to exit..."
EDIT: The file appears after running the game with the mod. My suggestion would be to mention this in the installation instructions, otherwise some people might think there is something wrong with their download or the mod.
So to activate the mod:
install the framework and the plugin
run the game from the framework executable
the mod config file will appear
edit the mod config file to your liking
run the game again with changes enabled.
Some of the changes can be altered from Underrail\BepInEx\config\GameplayChangesMod.cfg config file.
No such file in any of the downloads (framework, plugin, project). Only the dll file is present in the plugin download. Only the BepInEx.cfg file is present in the config folder after complete installation.
I have checked all downloads for this mod. None of the downloads contain the GameplayChangesMod.cfg file.
base_carry_weight is useless in Expedition because it makes the jet ski overloaded. I couldn't find a way to patch the total weight of the jet ski specifically(for version 0.22 bcw.k() broke something), but a possible solution was to patch the method for getting the total inventory weight in the player class (ee4.k()). I'm not sure if this can break anything in the game, but it seems to work well.
When I launch the game from the BepInEx executable, the controls think I'm on a much smaller screen and I can't interact with the main menu except the first 2 options (New Game, Resume Game). My game is running full screen, borderless window mode: 2560x1600. Is there a way to fix this?
Is it only from BepinEx or normally as well? If you look up there are issues with the game in higher resolutions and fullscreen, though I had no issues with 2 monitors and running the game on a similar resolution. Simplest thing you can try is to rename \Documents\My Games\Underrail\config.dat to something else so game will fallback to windowed and lowest resolution when re-creating config, then set options again and restart the game.
It's only with this version. If I run the regular exe it works fine.
I'll try the method you suggest this evening.
EDIT: I've finally gotten it to work. I basically incrementally changed the resolutions from the default 4:3 aspect ratio low resolution (I can't remember what it was) to 16:9, then 16:10. Not sure why doing it this way works and just jumping to the 16:10 resolution doesn't work, though.
I did some digging, here are some values that might be helpful, no pressure to add them I just use the accuracy uncapping in my private fork. Values are accurate as of 1.2.0.22. Values appear to be for both player and enemies.
as6.a7 min ranged accuracy (default 0.1) as6.a8 max ranged accuracy (default 0.95)
as6.bb min melee accuracy (default 0.1) as6.bc max melee accuracy (default 0.95)
as6.bu maximum mechanical damage received reduction (default 0.95) (there might be 1 more value controlling this, unsure) as6.bq maximum mechanical damage resistance (default 0.95)
HP values that I added also turned out to be common for all entities so it kind of makes it less useful as users generally want to adjust them separately (e.g. user might want to have dominating difficulty of combat and encounters but normal HP).
126 comments
"Game folder location and the framework .exe here" -- %command%"
Run the game from Steam and overlay should work. I believe achievements also work but not sure yet.
I thought it would be cool to do a DOM TM build that relies on Bilocation instead of Neural Overload. This is a bad enough idea considering NO can get tons of damage buffs from feats / crit chance / headbands, but the 10 turn cooldown on Bilocation is what really kills it. I was hoping to find a way to reduce the cooldown to 1 turn. Then at least I could do some cheese with Tranquility + Mental Breakdown + Temporal Increment to get 3 force ghosts on an enemy in 1 turn. :)
I tried using UFE to transplant the Stygian Exorcist's robe effect that reduces cooldown onto another item, but there don't seem to be any other item rules that use that class. There are some craftables that have cooldown reduction for Sprint and Dirty Kick, but crafted items in the global.dat file don't seem to use the same structure as the static item rules. Stygian Exorcist robe effect:
{
"class": {
"name": "MCFE",
"id": 746,
"members": {
"SE2:P": 0,
"SE2:C": null,
"SE2:V": false,
"MSFE:V": -9,
"MCFE:C": {
"class_id": {
"name": "eCC",
"id": -751,
"ref_id": -147,
"members": {
"value__": 201
}
}
}
}
}
},
I've been using BepInEx and the custom plugin which is amazing. Thank you onlynumbersandletters! I increased spec points per level, carry weight, max psi slots and utility slots. It's great!
... but making a custom plugin just to tweak Bilocation was a little out of my depth. So I downloaded dnSpy and opened up the Underrail.exe executable. I made a backup beforehand.
Class eqr seems to be the Bilocation ability. I was able to find it by running File -> Export to Project, and using Windows to do a string search for Bilocation within all the files in the exported directory.
It has the damage scaling, duration, cooldown, etc. This is the line for the cooldown:
private static readonly int b = 10 * d0l.b;
d01.b is 5000. Underrail turns are 5 seconds, so I figured d01.b is in milliseconds and this was the cooldown.You can get to the classes by going to Underrail -> Underrail.exe -> {} -
Since I couldn't get manual changes to the method to compile, I right clicked on the line I wanted to change and used Edit IL Instructions. That let me change the 10 to a 1. Clicked OK, then File -> Save Module. Booted up Underrail and the cooldown was reduced to 1 turn. BepInEx and the custom plugin seem unaffected and still work fine.
Maybe that was all obvious, but I struggled a bit to figure it out lol.
Point being, thanks for posting your experience with it, I will likely refer back to this because I love doing this and similar things and it's a privilege to see this sort of thing shared for others. Thank you!
"Unhandled exception
System.TypeInitializationException: The type initializer for 'BepInEx.Paths' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'SemanticVersioning, Version=2.0.2.0, Culture=neutral, PublicKeyToken=a89bb7dc6f7a145c' or one of its dependencies. The system cannot find the file specified.
at BepInEx.Paths..cctor()
--- End of inner exception stack trace ---
at BepInEx.Paths.set_ExecutablePath(String value)
at BepInEx.Paths.SetExecutablePath(String executablePath, String bepinRootPath, String managedPath, Boolean gameDataRelativeToManaged, String[] dllSearchPath)
at BepInEx.NET.Framework.Launcher.NetPreloaderRunner.OuterMain(String[] args, String filename)
at BepInEx.NET.Framework.Launcher.Program.Main(String[] args)
Press enter to exit..."
So to activate the mod:
I have checked all downloads for this mod. None of the downloads contain the GameplayChangesMod.cfg file.
Thanks!
I'll try the method you suggest this evening.
EDIT: I've finally gotten it to work. I basically incrementally changed the resolutions from the default 4:3 aspect ratio low resolution (I can't remember what it was) to 16:9, then 16:10. Not sure why doing it this way works and just jumping to the 16:10 resolution doesn't work, though.
as6.a7 min ranged accuracy (default 0.1)
as6.a8 max ranged accuracy (default 0.95)
as6.bb min melee accuracy (default 0.1)
as6.bc max melee accuracy (default 0.95)
as6.bu maximum mechanical damage received reduction (default 0.95) (there might be 1 more value controlling this, unsure)
as6.bq maximum mechanical damage resistance (default 0.95)