0 of 0

File information

Last updated

Original upload

Created by

Nixos

Uploaded by

dremor8484

Virus scan

Safe to use

Tags for this mod

11 comments

  1. TheSavatar
    TheSavatar
    • member
    • 0 kudos
    how to install this
    1. dremor8484
      dremor8484
      • member
      • 8 kudos
      substitute original .dll file with the modded one

      mod tested on gog version 1.3.4 with dlc installed
    2. TheSavatar
      TheSavatar
      • member
      • 0 kudos
      could you make a steam version as well, if not thanks anyway for your works
    3. dremor8484
      dremor8484
      • member
      • 8 kudos
      did you try to use this mod on your steam game... does it work ?

      you need to substitute the dll file...
  2. timarik
    timarik
    • member
    • 0 kudos
    Привет, можно более подробное описание действий dnSpy, как и что нужно вставить для корректной работы
    1. dremor8484
      dremor8484
      • member
      • 8 kudos
      software: https://github.com/0xd4d/dnSpy
      download: dnSpy-netcore-win64.zip
      file, open, c:\GOG Games\Cuphead\Cuphead_Data\Managed\Assembly-CSharp.dll

      sometimes it is impossible to recompile unless text is altered
      example:
      a debugging line like [global::System.Diagnostics.DebuggerBrowsable(global::System.Diagnostics.DebuggerBrowsableState.Never)]
      need to be excluded like //[global::System.Diagnostics.DebuggerBrowsable(global::System.Diagnostics.DebuggerBrowsableState.Never)]

      when the recompiler is confused about using a unity function or a common function it is better to tell the recompiler to use unity function

      when the recompiler is confused about vector 3 or 2, i solved the problem adding (Vector2) before the confusing point.
      this. something + new Vector 2 something else    becomes    (Vector2)this.something + new Vector 2 something else

      ---
      usually i modify class to be able to alter the code, in rare cases i am forced to modify method when the compiler refuses to recompile altered code.

      ---

      take the standard bullet weapon:

      Peashooter + Mega Blast:
      WeaponProperties
      LevelWeaponPeashot
      Basic
      ***
      public static readonly float damage = 4f;
      into
      public static readonly float damage = 6f;
      ***
      WeaponProperties
      LevelWeaponPeashot
      Ex
      ***
      public static readonly float damage = 8.334f;
      public static readonly float maxDamage = 25f;

      into

      public static readonly float damage = 11.112f;
      public static readonly float maxDamage = 37.5f;
      ***

      you expand Assembly-CSharp.dll
      expand - and you see a long list of words... one of them is WeaponProperties
      you expand and see all charms and all super arts and all weapons used in the game...

      this is the starting weapon LevelWeaponPeashot
      you can alter basic damage, and its ex damage.

      in my case i changed 4f into 6f +50% damage

      ---
      there is a search utility that helps you find code to alter...
      if you place inside this word: CalculateHealthMax then it takes you to the place that decide how much hearts you gain.

      that part is under
       
      {}
      PlayerStatsManager
      CalculateHealthMax

      the code says: this.HealthMax = 3; and you can change to this.HealthMax = 4; this way cuphead and mugmen starts with 4 hearts, miss chalice with 5 (infact later it is also written: if 1 heart charm is used, +1 health... if 2 hearts charm is used +2 hearts... if miss chalice +1 heart)
    2. timarik
      timarik
      • member
      • 0 kudos
      Yes I understand the work with classes, just how do I add lines of code in dnSpy, I just do not know the sequence of actions in the program, it would be nice if you send an example with increasing damage, just I click on compile and gives errors with syntax, maybe not there add lines of code
    3. dremor8484
      dremor8484
      • member
      • 8 kudos
      which syntax error do you get ?
      which weapon do u want to mod ?

      edit:

      right click on text,
      select modify class or modify method
      change text
      click compile

      if error, solve error and compile
    4. timarik
      timarik
      • member
      • 0 kudos
      using System;
      using System.Diagnostics;
      using System.Reflection;
      using System.Runtime.CompilerServices;
      using System.Security;
      using System.Security.Permissions;

      [assembly: AssemblyVersion("0.0.0.0")]
      [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
      [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
      [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
      WeaponProperties.LevelWeaponCrackshot.Basic 
          public static readonly float initialDamage = 15.84f;
          public static readonly float crackedDamage = 10.05f;

      Error CS1585 The member modifier "public" must be specified before the member type and name. main.cs 13
      Error CS0116 A namespace cannot directly include members such as fields or methods.main.cs 13
    5. timarik
      timarik
      • member
      • 0 kudos
      I understood the workings of the app
    6. dremor8484
      dremor8484
      • member
      • 8 kudos
      there is no reason why it should not recompile...

      i made these changes:

      Crackshot + P. Turret
      WeaponProperties
      LevelWeaponCrackshot
      Basic
      ***
      public static readonly float initialDamage = 10.56f;
      public static readonly float crackedDamage = 6.7f;
      into
      public static readonly float initialDamage = 15.84f;
      public static readonly float crackedDamage = 10.05f;
      ***

      just changing 10.56f into 15.84f and recompiling should give no error... then you should do: file, save module

      on my left i have the "assembly explorer" with WeaponProperties
      i expand WeaponProperties and find inside LevelWeaponCrackshot
      i expand LevelWeaponCrackshot and find Basic and Ex
      i click Basic and on the right side i get the text to modify

      i move my mouse cursor on the number 10.56f, right click and select "modify class c#", i change the number, then click the button compile.

      then file, save module

      **************
      plz notice the very often it is better to use "right click, modify class c#" exactly in the point that you want to modify
      if you select the big file that contains all function within you risk to get many recompile errors....

      if you carefully use the "modify class c#" on the text you want to change, you will get no serious error... at worse you can try "modify method c#"