
Originally Posted by
Sqeegie
A list of modification locations for A17 that is mostly accurate.
Code:
PATCH TYPES:
FALSE:
Delete all & append:
ldc.i4.0
ret
TRUE:
Delete all & append:
ldc.i4.1
ret
ZERO:
Delete all & append:
ldc.r4 : operand of 0
ret
ONE:
Delete all & append:
ldc.r4 : operand of 1
ret
SINGLE:
Delete all & append:
ldc.r4 : operand of 99999
ret
RETURN:
Delete all & append:
ret
Get achievements whilst in creative mode:
Location: -/AchievementUtils/IsCreativeModeActive(): Boolean
Type: FALSE
Disable damage received from blocks (such as cacti):
Location: -/BlockDamage/OnEntityCollidedWithBlock(WorldBase, Int32, Vector3i, BlockValue, Entity): Boolean
Type: FALSE
Disable mines from detonating when stepped on:
Location: -/BlockMine/OnEntityWalking(WorldBase, Int32, Int32, Int32, BlockValue, Entity): Void
Type: RETURN
Disable tripwire activation:
Location: -/BlockTripWire/OnBlockActivated(Int32, WorldBase, Int32, Vector3i, BlockValue, EntityAlive): Boolean
Type: FALSE
Disable radiation sensitivity:
Location: -/EntityAlive/isRadiationSensitive(): Boolean
Type: FALSE
Notes:
Affects zombies/animals in singleplayer.
Display all players on the map:
Location: -/EntityPlayer/IsDrawMapIcon(): Boolean
Type: TRUE
Disable backpack drop upon death or quit:
Location: -/EntityPlayerLocal/dropBackpack(Boolean): Void
Type: RETURN
Disable fall damage:
Location: -/EntityPlayerLocal/FallImpact(Single): Void
Type: RETURN
Change player map icon color:
Location -/EntityPlayerLocal/GetMapIconColor(): Color
Type: CUSTOM
Change the operand for the method call at line 0 from UnityEngine.Color::get_White() to any other color's get_<Color>() method inside the UnityEngine.Color class.
Notes:
The all the colors are properties in the UnityEngine.Color class, so they will need to be expanded in order to see the .get_<Color>() method.
It is also possible to create a custom RGB color instead of using a present. See the Unity Color.Color docs.
Disable drowning:
Location: -/EntityPlayerLocal/isHeadUnderwater(Single): Boolean
Type: FALSE
Disable recoil:
Location: -/EntityPlayerLocal/OnFired(): Void
Type: RETURN
Enable Universal Owner (Vehicles; Part 1):
Location: -/EntityVehicle/IsOwner(String): Boolean
Type: TRUE
Enable Universal Owner (Vehicles; Part 2):
Location: -/EntityVehicle/IsUserAllowed(String): Boolean
Type: TRUE
Enable creative and debug menus:
Location: -/GameManager/<startGameCo>c__Iterator1/MoveNext(): bool
Type: CUSTOM
Replace lines 127-129 (ldarg.0, ldfld, ldfld) with ldc.i4.1.
Change line 132 from ldc.i4.0 to ldc.i4.1.
Notes:
The <startGameCo>c__Iterator1 nested class is not displayed in ILSpy unless the decompiler language is set to IL or IL with C#.
Enable console commands:
Location: -/GUIWindowConsole/EnterCommand(): Void
Type: CUSTOM
Change line 28 (brtrue) to brfalse
Notes:
The brtrue is the one after Steam::get_Network() and NetworkCommon::get_IsClient() calls.
Changing this without an additional/different check will cause console commands to error whilst in singleplayer.
Enable instant crafting repair:
Location: -/ItemActionEntryRepair/OnActivated(): Void
Type: CUSTOM
Change line 119 (ldloc.s->var 10) to ldc.i4.0.
Notes:
Located right after a virtual call to DataItem`1/get_Value() and right before a conversion to float32 (conv.r4). Look right above a reference to Recipe::craftingTime (stfld).
Enable instant scrapping:
Location: -/ItemActionEntryScrap/OnActivated(): Void
Type: CUSTOM
Change line 135 (ldloc.s->var 10) to ldc.i4.0.
Notes:
Located right after a refrence to ItemClass:CraftComponentTime (ldfld) and right before a conversion to float32 (conv.r4). Look right above a reference to Recipe::craftingTime (stfld).
Disable ammunition consumption:
Location: -/ItemActionRanged/ConsumeAmmo(ItemActionData): Void
Type: RETURN
Display all players on the compass:
Location: -/MapObject/IsOnCompass(): Boolean
Type: TRUE
Notes:
Untested for A17. May have additional/alternative effects.
Display all player homes on the map:
Location: -/MapObjectSleepingBag/IsOnCompass(): Boolean
Type: TRUE
Notes:
This doesn't appear to be working correctly for A17-b240.
Enable instant looting:
Location: -/TileEntityLootContainer/GetOpenTime(): Single
Type: ZERO
Enable Universal Owner (TileEntities)
Locations: -/TileEntityPoweredRangedTrap/IsOwner(String): Boolean
-/TileEntityPoweredTrigger/IsOwner(String): Boolean
-/TileEntityPowerSource/IsOwner(String): Boolean
-/TileEntitySecure/IsOwner(String): Boolean
-/TileEntitySecure/IsUserAllowed(String): Boolean
-/TileEntitySecureLootContainer/IsOwner(String): Boolean
-/TileEntitySecureLootContainer/IsUserAllowed(String): Boolean
-/TileEntitySign/IsOwner(String): Boolean
-/TileEntitySign/IsUserAllowed(String): Boolean
-/TileEntityVendingMachine/IsOwner(String): Boolean
-/TileEntityVendingMachine/IsUserAllowed(String): Boolean
Type: TRUE
Disable trader force teleport:
Location: -/TraderArea/IsWithinTeleportArea(Vector3i): Boolean
Type: FALSE
Disable player land protection:
Location: -/World/GetLandProtectionHardnessModifier(Vector3i, EntityAlive, PersistentPlayerData): Single
Type: ONE
Disable trader land protection:
Location: -/World/IsWithinTraderArea(Vector3i): Boolean
Type: FALSE
Notes:
Affects zombies/animals in singleplayer.
Enable instant crafting:
Location: -/XUiM_Recipes/GetRecipeCraftTime(XUi, Recipe): Single
Best,
Sqeegie
Hi Sqeegiet, thanks for the work.
i tried to modify the assembly file, but i'm stuckked. i Just need to modify the player on map, the achievements in creative and no recoil, and this is all ok... but i want the creative and debug menus too, but i cant find the lines u said... (sry for my bad english....)
i set ILSpy language to L and go to the game manager/start game/movenext, but editing what u said (lines 127, 128, 129 and 132 to ldc i41), whe i start a game, i got che console say "InvalidProgramException: Invalid IL code in GameManager/<startGameCo>c_Iterator1:MoveNext (): IL_0362: ret...
idk how i have to do....
i see your Assembly csharp loaded here, but the lines are different...
i try to upload 2 screens
pls help me
Edit - IDK how delete the post... anyway, solved it:
i changed the line 132 to ldc i41
after i change the line 127 in ldc i41 and then i deleted the line 128 and 129...
i'm noob to use this program, but i'm happy to solved this.
tnx