CREATE YOUR AI CUM SLUT ON CANDY.AI TRY FOR FREE
x
4.50 star(s) 120 Votes

kwanlier

Active Member
Oct 26, 2019
510
991
Continuing the theme of "turning this thread into a code analysis thread"

If anyone who is still interested in modding this game

Here is my "failed attempt" on creating a "press button to spawn monster"
Code:
GameObject[] Spawn_Mon;
int Spawn_Mon_Length
int Spawner_Random
Vector3 Spawn_Mon_Local

//// Need to find the right location to place these ////
Spawn_Mon = GameObject.FindGameObjectsWithTag("Mon");
Spawn_Mon_Length = Spawn_Mon.Length;
///////

//// I put these in the GameManager ////
if (Input.GetKeyDown(KeyCode.Return) || Input.GetKeyDown(KeyCode.KeypadEnter)) //Change to any key you want
{
    Spawn_Mon_Local = new Vector3(GameObject.Find("Player").transform.position.x + 5f, GameObject.Find("Player").transform.position.y, 0f); // Change to any value you want
    Spawn_Mon_Random =  UnityEngine.Random.Range(0, this.Spawn_Mon_Length);
    GameObject gameObject = UnityEngine.Object.Instantiate(Spawn_Mon[Spawn_Mon_Random], Spawn_Mon_Local, base.transform.rotation) as GameObject;
    gameObject.transform.parent = base.transform.parent;
}
My plan is to a way to "instantiate" a monster that set to spawn in that particular room, which, if possible, may be able to expand further to spawn any monster in the game at player's location

So far, I only managed to spawn
1. Hatched egg
2. Tentacle that do nothing to player
and
Code:
NullReferenceException
  at (wrapper managed-to-native) UnityEngine.Object:INTERNAL_CALL_Internal_InstantiateSingle (UnityEngine.Object,UnityEngine.Vector3&,UnityEngine.Quaternion&)

  at UnityEngine.Object.Internal_InstantiateSingle (UnityEngine.Object data, Vector3 pos, Quaternion rot) [0x00000] in <filename unknown>:0

  at UnityEngine.Object.Instantiate (UnityEngine.Object original, Vector3 position, Quaternion rotation) [0x00000] in <filename unknown>:0

  at GameManager.Spawner () [0x00000] in <filename unknown>:0

  at GameManager.Update () [0x00000] in <filename unknown>:0
 
(Filename:  Line: -1)
I hope that someone with too many free time stumble on this and continue further and make this become reality
 

pentane

Newbie
Nov 8, 2020
91
107
Continuing the theme of "turning this thread into a code analysis thread"

If anyone who is still interested in modding this game

Here is my "failed attempt" on creating a "press button to spawn monster"
Code:
GameObject[] Spawn_Mon;
int Spawn_Mon_Length
int Spawner_Random
Vector3 Spawn_Mon_Local

//// Need to find the right location to place these ////
Spawn_Mon = GameObject.FindGameObjectsWithTag("Mon");
Spawn_Mon_Length = Spawn_Mon.Length;
///////

//// I put these in the GameManager ////
if (Input.GetKeyDown(KeyCode.Return) || Input.GetKeyDown(KeyCode.KeypadEnter)) //Change to any key you want
{
    Spawn_Mon_Local = new Vector3(GameObject.Find("Player").transform.position.x + 5f, GameObject.Find("Player").transform.position.y, 0f); // Change to any value you want
    Spawn_Mon_Random =  UnityEngine.Random.Range(0, this.Spawn_Mon_Length);
    GameObject gameObject = UnityEngine.Object.Instantiate(Spawn_Mon[Spawn_Mon_Random], Spawn_Mon_Local, base.transform.rotation) as GameObject;
    gameObject.transform.parent = base.transform.parent;
}
My plan is to a way to "instantiate" a monster that set to spawn in that particular room, which, if possible, may be able to expand further to spawn any monster in the game at player's location

So far, I only managed to spawn
1. Hatched egg
2. Tentacle that do nothing to player
and
Code:
NullReferenceException
  at (wrapper managed-to-native) UnityEngine.Object:INTERNAL_CALL_Internal_InstantiateSingle (UnityEngine.Object,UnityEngine.Vector3&,UnityEngine.Quaternion&)

  at UnityEngine.Object.Internal_InstantiateSingle (UnityEngine.Object data, Vector3 pos, Quaternion rot) [0x00000] in <filename unknown>:0

  at UnityEngine.Object.Instantiate (UnityEngine.Object original, Vector3 position, Quaternion rotation) [0x00000] in <filename unknown>:0

  at GameManager.Spawner () [0x00000] in <filename unknown>:0

  at GameManager.Update () [0x00000] in <filename unknown>:0

(Filename:  Line: -1)
I hope that someone with too many free time stumble on this and continue further and make this become reality
Neat, life has been busy (and still is) and im trying another crack at modding Kmod

I think (but want to experiment more) or a better way of de-compiling, modifying and recompiling the code.

Using Visual Studio 2022 and ILSpy i was able to get the whole solution decompiled at once, but im having trouble getting changes in (text changes work no problem) i am concerned about this new method having assembly issues.

Btw does hitting the "pause" key in KMOD not toggle debug mode?
 

leequangson

Member
Oct 27, 2018
236
193
which KMOD version did you make this for for? no matter which one i try and use it on, the values are all mixed up, and some of them don't seem to have the correct pointers.
I have the one with longest name in yellow
  • Updated_KMod_Ver_Pregnancy_Horny_EVE_editionModified -> This is the KMod with pregnancy game over + modified Horny EVE addon + the controller fix from KingJulien
I've checked, the pointers work fine. Other kmod versions shift the last offset to the correct addresses by a fixed amount, so maybe you can figure out the number by doing a normal search for HP or something
 
Last edited:
  • Like
Reactions: mrhable

Starcalled

Newbie
Jun 11, 2023
24
28
Other kmod versions shift the last offset to the correct addresses by a fixed amount, so maybe you can figure out the number by doing a normal search for HP or something
man i sure am glad i saw this really simple and easy solution AFTER scouring youtube for cheat engine tutorials in order to try and jury rig your table.

unrelated, but here's a jury rigged cheat engine table for KMod_Ver1_Var1_FixedControllerKingJulien.7z.
also contains a couple lua scripts like godmode, godclothes, infinite potions, and granting all Movement Abilities. i was gonna make a script for all Keycards, but after 3 (quick) playthroughs my balls are empty and i'm just kinda tired of this game. might do it later, might not. if someone wants to do it for me please go right ahead.

p.s. if you make fun of my code i will fucking bite you
 

TalRash4

Member
Feb 27, 2023
280
246
Ok, i'm just a stranger here: does cheat mod compatible with KMod? And can still beat the game in "corrupted" state?
 

Starcalled

Newbie
Jun 11, 2023
24
28
Ok, i'm just a stranger here: does cheat mod compatible with KMod? And can still beat the game in "corrupted" state?
1. as far as i can tell it's one or the other. i have a Cheat Engine table that i posted a few messages up, which isn't QUITE the same as the cheatmod, but eh you take what you can get ig
2. your mental state affects speech bubbles and how hard it is to mash out of h-scenes. pretty sure that's it. you can reset your mental state thru mana potions (which the CE table lets you easily get infinite of)
 
  • Like
Reactions: mrhable

TalRash4

Member
Feb 27, 2023
280
246
1. as far as i can tell it's one or the other. i have a Cheat Engine table that i posted a few messages up, which isn't QUITE the same as the cheatmod, but eh you take what you can get ig
2. your mental state affects speech bubbles and how hard it is to mash out of h-scenes. pretty sure that's it. you can reset your mental state thru mana potions (which the CE table lets you easily get infinite of)
1) Well, common sense said that if two things use the same assembly-sharp, then they are mutually exclusive, but nevertheless. Thanks.
2) Mhm, so "corrupted" state doesn't prevent me from beating the game. Thanks again.
 
4.50 star(s) 120 Votes