Jump to content

XP Popout in Assembly-CSharp


Recommended Posts

In an old thread, @Prisma501 posted a modded Assembly-CSharp.dll which removed the XP Popout but left the rest of the popouts intact....


Rather than posting a modded file which will go bad with the next update, does anybody know what needs to be changed in the file?


I am poking around in it using dnspy, and the obvious location is XUiC_CollectedItemList since that is the controller for this according to windows.xml.  But I suspect the link that needs to be broken is somewhere deeper.  My guess is when experience is gained, a call is made to XUiC_CollectedItemList to generate the popout.


I found an AddExpServer inside the GameManager class... which led me to NetPackageEntityAddExpClient... which led me to AddLevelExp... which led me to Progression...






IMPORTANT: This will probably make EAC mad, so if you need EAC enabled, you may want to skip this.


Go to \7 Days To Die\7DaysToDie_Data\Managed\


Make a copy of Assembly-CSharp.dll just in case you mess up.


Open Assembly-CSharp.dll using dnSpy


Navigate to the Progression Class: (Expand the tree labeled { } - immediately below References and immediately above AmplifyMotion)


In the Progression class, find lines 210 through 213:


		if (entityPlayerLocal)
			entityPlayerLocal.PlayerUI.xui.CollectedItemList.AddIconNotification("ui_game_symbol_xp", (int)num, false);


Comment this out.  (Right Click, select Edit Class (C#))


		/* if (entityPlayerLocal)
			entityPlayerLocal.PlayerUI.xui.CollectedItemList.AddIconNotification("ui_game_symbol_xp", (int)num, false);
		} */


Click Compile.


File, Save All, OK.


Start the game and be oblivious to XP gains!


And to go the extra mile, go into sounds.xml and change the zombie death sounds to pain sounds!


This method should work for future versions unless the xp code undergoes a dramatic overhaul.  Note that the line values will change, but if you do a search for the above code, you should be able to find it and kill it... KILL IT WITH FIRE!!!  (Not really... you'll damage your gaming PC)


I'm sure an experienced modder could make a proper modlet for this... but I'm not an experienced modder.

Edited by DanLW
Added EAC warning (see edit history)
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...