Fhav6X Posted December 12, 2018 Share Posted December 12, 2018 (edited) By modifying Assembly-CSharp.dll one can achieve with ease many frequently requested things that are otherwise not possible or very difficult. I have decided to make this tutorial instead of mods since mods for Assembly-CSharp.dll have some drawbacks (see below).Difficulties with Assembly-CSharp.dll modding- A modified Assembly-CSharp.dll won't be properly recognized by patches. So one has to use the BACKUP and patch the game or reinstall it. After that one has to redo all modifications to the new Assembly-CSharp.dll. It helps if one keeps track of the changes in a text file.- Assembly-CSharp mods are incompatible with any other mod that modifies Assembly-CSharp.dllGetting started- Assembly-CSharp.dll is located in "...\PillarsOfEternityII_Data\Managed".- MAKE A BACKUP of Assembly-CSharp.dll !!!!!- To modify the dll you need a de/compiler like dnspy.- Launch up dnspy and open Assembly-CSharp.dll. The rest should be self explanatory for everyone with little programming skills (else leave your hands out of it!!! and learn programming).What can be done? 1. Helms for godlike under "Equipment" "HasEquipmentSlot" (search it in the window at the bottom). In the main window right click and select "edit class"1.1 now decomment or delete************************************************************************************if (slot == Equippable.EquipmentSlot.Head){return !component || component.CharacterRace != CharacterStats.Race.Godlike;}************************************************************************************1.2 remove line 389************************************************************************************[DebuggerBrowsable(DebuggerBrowsableState.Never)]************************************************************************************and line 395************************************************************************************[DebuggerBrowsable(DebuggerBrowsableState.Never)]************************************************************************************1.3 change line 575************************************************************************************AppearancePiece************************************************************************************to************************************************************************************Game.GameData.AppearancePiece************************************************************************************1.4 compile! 2. Does "waiting" from the rest menu take to long? under "UIWaitManager" "WaitDurationRealSeconds" (search it) right click in the main window and select "edit method"2.1 change from*************************************************************************************************return this.m_totalWaitTime / (this.m_waitSpeed * 3600f);*************************************************************************************************to*************************************************************************************************return this.m_totalWaitTime / (this.m_waitSpeed * 36000f);*************************************************************************************************2.2 compile! 3. XP Gain.You dislike PoE2 xp system? The lines you need to edit are under "Partymanager" "AddPartySizeBonusXP" and "AssignXPToInactiveParty"I prefer no party size and no inactive penalty (changes for that below). This lines can also be modified to have a difficult scaling. 3.1 search "AddPartySizeBonusXP" and right click in the main window and select "edit method"change*************************************************************************************************float num = (float)ExperienceTable.GameData.PartySizeBonusExperiencePercent / 100f;int numActivePrimaryPartyMembers = this.GetNumActivePrimaryPartyMembers();float num2 = 0f;if (numActivePrimaryPartyMembers < 5){num2 = num * (float)(5 - numActivePrimaryPartyMembers);}return Mathf.RoundToInt((float)(xp + Mathf.RoundToInt((float)xp * num2)));*************************************************************************************************to*************************************************************************************************float num3 = (float)ExperienceTable.GameData.PartySizeBonusExperiencePercent / 100f;this.GetNumActivePrimaryPartyMembers();float num2 = num3 * 5f;return Mathf.RoundToInt((float)(xp + Mathf.RoundToInt((float)xp * num2)));*************************************************************************************************3.2 compile!3.3 search "AssignXPToInactiveParty" and right click in the main window and select "edit method"change*************************************************************************************************if (partyMembersOfInactiveStatus != null && partyMembersOfInactiveStatus.Count > 0){foreach (PartyMemberData partyMemberData in partyMembersOfInactiveStatus){if (partyMemberData != null && partyMemberData.MemberType == PartyMemberType.Primary){if (partyMemberData.Level <= GameState.PlayerCharacter.Stats.Level){xp = xp * ExperienceTable.GameData.StoredExperiencePercent / 100;}else{xp = xp * ExperienceTable.GameData.StoredExperienceHigherLevelPercent / 100;}partyMemberData.Experience += xp;*************************************************************************************************to*************************************************************************************************if (partyMembersOfInactiveStatus != null && partyMembersOfInactiveStatus.Count > 0){foreach (PartyMemberData partyMemberData in partyMembersOfInactiveStatus){if (partyMemberData != null && partyMemberData.MemberType == PartyMemberType.Primary){xp = xp;partyMemberData.Experience += xp;**************************************************************************************************3.4 compile! 4. Difficulty scaling under "DifficultyScaling" "public class ScaleData" right click on the token and chose "edit class" this things can be changed... CreatureAttributeBonus CreatureLevelMult = 1f; DetectableDifficultyMult = 1f; DisarmDifficultyMult = 1f; TrapEffectMult = 1f; TrapDamageMult = 1f; SkillCheckMult = 1f; Edited December 12, 2018 by Fhav6X 7 Link to comment Share on other sites More sharing options...
Grape_You_In_The_Mouth Posted December 13, 2018 Share Posted December 13, 2018 Pure amazeballs, dude. Link to comment Share on other sites More sharing options...
DiabloStorm Posted March 26, 2019 Share Posted March 26, 2019 (edited) Wanted to update this in case anybody was interested, don't edit line 575, it's line 574 that you want. (As of this post and current patch) You'll have no problems compiling then.Looking ridiculous but working.Or just download the file Edited March 26, 2019 by DiabloStorm Link to comment Share on other sites More sharing options...
OMGJesuis Posted September 18, 2019 Share Posted September 18, 2019 Is this still working as intended? I tried to download the file linked above, but my game do not launch after the Obsidian logo. Plus, I cannot find the Debugger lines in the code anymore, I do believe they changed the code after last patch to prevent such thing, perhaps? Link to comment Share on other sites More sharing options...
Ethics Gradient Posted September 19, 2019 Share Posted September 19, 2019 @OMGJesuis Things may have shifted around a little since the original post, but it is still possible. Follow the original post to open the .dll in dnSpy, then Game --> Equipment, then "Edit Class". Comment out lines 747-750 with // so it looks like: //if (slot == EquipmentSlot.Head) //{ // return !component || component.CharacterRace != Race.Godlike; //} Then at line 569, change the first AppearancePiece to Game.GameData.AppearancePiece and compile. Save the module, and wear fancy hats. Link to comment Share on other sites More sharing options...
BomeranG Posted November 16, 2019 Share Posted November 16, 2019 Can anyone update this? I will admit not knowing much in the way of programing but I just want to put the Pearlescent Rhomboid Helstone on my godlike character. It even makes sense it not like its even touch the head. @Ethics Gradient's post was a step in the right direction, but I guess an update changed things. Link to comment Share on other sites More sharing options...
BRUNO NEVES OLIVEIRA Posted August 10, 2020 Share Posted August 10, 2020 (edited) Im not sure if I posted it already or not (since it doesnt show), but I will ask again: in the CURRENT patch, I saw some things changed (including the lines position), but I did what EthicsGradient suggested. It DID work. I used the Pearlescent Rhomboid Helsone. It works great! I wonder why this one wasn't default usable by Godlike, as it has NO effect on his head-sike and stuff. Bad decision, Devs. Look: I also tried downloaded his .dll file and replaced the one in the data, but in that case the game then did not open the main menu (only the OBSIDIAN and VersusEvil logos, then black screen). So for future reference: try manually changing the file, do not download his .dll because it's old code. Also, I saw these lines of code below the helmet one and I wonder if it relates to other characters using pet slots... Anyone got code changes to make it happen? Or at least the Eder one (that I know it's coded in-game due to Berath's favors). Edited August 10, 2020 by BRUNO NEVES OLIVEIRA Link to comment Share on other sites More sharing options...
Kvellen Posted August 12, 2020 Share Posted August 12, 2020 On 8/10/2020 at 9:21 PM, BRUNO NEVES OLIVEIRA said: Also, I saw these lines of code below the helmet one and I wonder if it relates to other characters using pet slots... Anyone got code changes to make it happen? Or at least the Eder one (that I know it's coded in-game due to Berath's favors). I don't know the way to achieve it using .ddl modding, but there does exist a .gamedatabundle mod that unlocks pets slot if that's all your looking to do. Link to comment Share on other sites More sharing options...
BRUNO NEVES OLIVEIRA Posted August 26, 2020 Share Posted August 26, 2020 On 8/11/2020 at 9:17 PM, Kvellen said: I don't know the way to achieve it using .ddl modding, but there does exist a .gamedatabundle mod that unlocks pets slot if that's all your looking to do. Doesnt mod block berath's blessings and achievements though? I still got a few of them to get. Link to comment Share on other sites More sharing options...
Kvellen Posted August 26, 2020 Share Posted August 26, 2020 The description for the mod says "Does not prevent achievements". Though I don't have gog achievements enabled, from a very quick test making 5 potions the in game achievements that give points towards Berath's Blessing can be unlocked this mod enabled. As far as I'm aware the only thing that will actually disables unlocking achievements is the "iroll20s" console command. Link to comment Share on other sites More sharing options...
Luckmann Posted September 1, 2020 Share Posted September 1, 2020 (edited) On 12/12/2018 at 4:43 PM, Fhav6X said: On 12/12/2018 at 4:43 PM, Fhav6X said: 1. Helms for godlike Hide contents under "Equipment" "HasEquipmentSlot" (search it in the window at the bottom). In the main window right click and select "edit class" 1.1 now decomment or delete ************************************************************************************ if (slot == Equippable.EquipmentSlot.Head) { return !component || component.CharacterRace != CharacterStats.Race.Godlike; } ************************************************************************************ 1.2 remove line 389 ************************************************************************************ [DebuggerBrowsable(DebuggerBrowsableState.Never)] ************************************************************************************ and line 395 ************************************************************************************ [DebuggerBrowsable(DebuggerBrowsableState.Never)] ************************************************************************************ 1.3 change line 575 ************************************************************************************ AppearancePiece ************************************************************************************ to ************************************************************************************ Game.GameData.AppearancePiece ************************************************************************************ 1.4 compile! This no longer works, and the code actually looks very different: Any idea of what needs to be done to make this work? I'm amazed that there are no regular mods for this available anywhere. Edit: Also, the whole thing refuses to compile even if I change nothing. What a trainwreck. Edited September 1, 2020 by Luckmann 1 Link to comment Share on other sites More sharing options...
BRUNO NEVES OLIVEIRA Posted September 19, 2020 Share Posted September 19, 2020 (edited) On 8/26/2020 at 10:49 AM, Kvellen said: The description for the mod says "Does not prevent achievements". Though I don't have gog achievements enabled, from a very quick test making 5 potions the in game achievements that give points towards Berath's Blessing can be unlocked this mod enabled. As far as I'm aware the only thing that will actually disables unlocking achievements is the "iroll20s" console command. I don' quite understand what would be the "Override directory" as says in the readme: INSTALLATION: Add UnlockPets folder to your Override directory. Nvm, I saw this thread here I understood: Edited September 19, 2020 by BRUNO NEVES OLIVEIRA Link to comment Share on other sites More sharing options...
0mn0 Posted May 28, 2021 Share Posted May 28, 2021 Thanks for the tutorial Ethics Gradient - I had no issues using dnSpy to make the edits and compile the dll, tested with both the original and the six man party mod (with unlock pets enabled). Now my druid godlike can run around with a stupid clipping hat Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now