Jump to content

Recommended Posts

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.dll

Getting 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 by Fhav6X
  • Like 6

Share this post


Link to post
Share on other sites
Posted (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.

ENmsSrc.png

Or just download the file

Edited by DiabloStorm

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...