nebul.amnesia

Newbie
Jan 6, 2025
35
84
79
Hello there again, Ive seen, that you want to inject textures. So I looked into it and its simpler than you think.

Ellens textures are stored in Player_Ani, and for modding inconviently in private fields named SPR_xx_index. Where xx is attack/naked/etc a and index number. So for example SPR_Naked_1 is array with sprites for naked Ellen animation.

And for example if we want to change that, i wrote example code that will on capslock replace ellens naked idle textures to some image x.png
Code:
 if (Input.GetKey(KeyCode.CapsLock))
    {
        GameObject player = GameObject.Find("Player");
        Texture2D newT = new Texture2D(1920, 1080);
        var b = File.ReadAllBytes("x.png");
        newT.LoadImage(b);

        Player_Ani ani = player.GetComponentInChildren<Player_Ani>();
   
       
        FieldInfo f = typeof(Player_Ani).GetField("Spr_Naked_1", BindingFlags.NonPublic | BindingFlags.Instance);
        var sprites = f.GetValue(ani) as Sprite[];
        for (int i = 0; i < sprites.Length; i++)
        {
        var spr = sprites[i];
         Sprite newSprite = Sprite.Create(
             newT,
             new Rect(0, 0, newT.width, newT.height),
             new Vector2(0.5f,0.5f),
             spr.pixelsPerUnit,
             0,
             SpriteMeshType.Tight,
             spr.border
         );

       
         sprites[i] = newSprite;
        }

        f.SetValue(ani, sprites);
   
}
And as real example I provide gif, with ellen changing to some random image.

View attachment 5621955
As you can see, i really changed ellens idle texture to pipe(that was first image i found) at runtime. But Id recommend writing something better, because this has to process the image on cpu and causes lag on change, you can even see it on the gif. So load all textures on game start and then just swap, but as concept works.
There are multiple sprites on Ellen but I change them all because I am lazy to just target the head or body sprite.
Man you are one step ahead of everyone here. It may be just a concept but it's one that works.
Also the factory must grow


I believe someone had made a TextureReplacer BepInEx plugin and even made a version of that plugin that specifically works best with AQE and from the looks of it, it was not only efficient but practical to use with an option to switch between texture sets.

Now, I'm only a web developer, I don't know C/C++ or whatever is used to make script mods but maybe you could look into that ?
 

kwanlier

Active Member
Oct 26, 2019
597
1,096
379
Hello there again, Ive seen, that you want to inject textures. So I looked into it and its simpler than you think.

Ellens textures are stored in Player_Ani, and for modding inconviently in private fields named SPR_xx_index. Where xx is attack/naked/etc a and index number. So for example SPR_Naked_1 is array with sprites for naked Ellen animation.

And for example if we want to change that, i wrote example code that will on capslock replace ellens naked idle textures to some image x.png
Code:
 if (Input.GetKey(KeyCode.CapsLock))
    {
        GameObject player = GameObject.Find("Player");
        Texture2D newT = new Texture2D(1920, 1080);
        var b = File.ReadAllBytes("x.png");
        newT.LoadImage(b);

        Player_Ani ani = player.GetComponentInChildren<Player_Ani>();
    
        
        FieldInfo f = typeof(Player_Ani).GetField("Spr_Naked_1", BindingFlags.NonPublic | BindingFlags.Instance);
        var sprites = f.GetValue(ani) as Sprite[];
        for (int i = 0; i < sprites.Length; i++)
        {
        var spr = sprites[i];
         Sprite newSprite = Sprite.Create(
             newT,
             new Rect(0, 0, newT.width, newT.height),
             new Vector2(0.5f,0.5f),
             spr.pixelsPerUnit,
             0,
             SpriteMeshType.Tight,
             spr.border
         );

        
         sprites[i] = newSprite;
        }

        f.SetValue(ani, sprites);
    
 }
And as real example I provide gif, with ellen changing to some random image.

View attachment 5621955
As you can see, i really changed ellens idle texture to pipe(that was first image i found) at runtime. But Id recommend writing something better, because this has to process the image on cpu and causes lag on change, you can even see it on the gif. So load all textures on game start and then just swap, but as concept works.
There are multiple sprites on Ellen but I change them all because I am lazy to just target the head or body sprite.
This is...quite a discovery if you ask me
So...
1. Where do we have to put the modded sprite sheet(s) in order to make this script work?
2. Is it possible to make a multiple variants of 1 sprite sheet? (think of something like, multiple costumes)
3. Where does this code go?
 

FinFenni

Newbie
Dec 16, 2024
31
15
44
This is...quite a discovery if you ask me
So...
1. Where do we have to put the modded sprite sheet(s) in order to make this script work?
2. Is it possible to make a multiple variants of 1 sprite sheet? (think of something like, multiple costumes)
3. Where does this code go?
What do you think? what could this discovery make possible? Excuse me as i'm not an expert on these, i'm more of a writer than a model-maker haha!
 

nebul.amnesia

Newbie
Jan 6, 2025
35
84
79
What do you think? what could this discovery make possible? Excuse me as i'm not an expert on these, i'm more of a writer than a model-maker haha!
I think it just means you were able to mod the game in a non-destructive manner, a.k.a a way that doesn't involve tampering with the game files.
 

kwanlier

Active Member
Oct 26, 2019
597
1,096
379
What do you think? what could this discovery make possible? Excuse me as i'm not an expert on these, i'm more of a writer than a model-maker haha!
You see...in KMod, we actually had a plan to do more of art stuff, however due to lack of experience, mostly me, we only managed to do the art stuff on the in-game menu babydoll (mostly because of different between how the in-game menu babydoll load and how sprite load).

If we know how to quote on quote "switch" character's sprite sheet around, not only we get to switch Ellen's outfit around, we may even get PREGNANT ELLEN too though the editing of the in-game menu babydoll is limited to the existing area of the image, which will make pregnant Ellen look weird.
 
  • Hey there
Reactions: Runningaway

nebul.amnesia

Newbie
Jan 6, 2025
35
84
79
You see...in KMod, we actually had a plan to do more of art stuff, however due to lack of experience, mostly me, we only managed to do the art stuff on the in-game menu babydoll (mostly because of different between how the in-game menu babydoll load and how sprite load).

If we know how to quote on quote "switch" character's sprite sheet around, not only we get to switch Ellen's outfit around, we may even get PREGNANT ELLEN too though the editing of the in-game menu babydoll is limited to the existing area of the image, which will make pregnant Ellen look weird.
Hope this doesn't come out as harsh but what is KMod ? I only ever heard of BonedMod and HornyEve
 

nebul.amnesia

Newbie
Jan 6, 2025
35
84
79
I guess I was right, most of the gameplay textures are duplicates of one another which makes the editing a lot faster :D
It's 8AM here though and I've been awake all night so I can only promise I'll work as much as possible on the full mod when I wake up and hopefully get them all done by the end of the day
You don't have permission to view the spoiler content. Log in or register now.
 

__Aksil__

Newbie
Aug 4, 2022
32
3
18
Man you are one step ahead of everyone here. It may be just a concept but it's one that works.
Also the factory must grow


I believe someone had made a TextureReplacer BepInEx plugin and even made a version of that plugin that specifically works best with AQE and from the looks of it, it was not only efficient but practical to use with an option to switch between texture sets.

Now, I'm only a web developer, I don't know C/C++ or whatever is used to make script mods but maybe you could look into that ?
Unity uses C# (MUCH easier than C/C++), but old .Net 3.5 (so no async stuff). I dont know about that TextureReplacer, but all replacers that Ive seen are replacing asset files. This creates texture for unity at runtime and sets it. And only thing to optimize here is to load all textures at startup and prepare them (as all games do) and then just change reference.

Indeed, the factory must grow.
 
Last edited:

__Aksil__

Newbie
Aug 4, 2022
32
3
18
This is...quite a discovery if you ask me
So...
1. Where do we have to put the modded sprite sheet(s) in order to make this script work?
2. Is it possible to make a multiple variants of 1 sprite sheet? (think of something like, multiple costumes)
3. Where does this code go?


The image files can go anywhere, for now its in game root directory (the directory where AlienQuest-EVE.exe is). But in future, it will be better to have it in some folder.

You can have as much variants as you want, but for that it will require better implementation.

That code can go almost anywhere. Because there are no instance dependant references. Unity handles all, such as getting player gameobject and animation component references. Then due to reflection .Net itself will handle changing fields in animation component.
But as always, you should put it somewhere in game loop. So some gameManager.Update idk your code structure.
 

__Aksil__

Newbie
Aug 4, 2022
32
3
18
I think it just means you were able to mod the game in a non-destructive manner, a.k.a a way that doesn't involve tampering with the game files.
Well not really, you still have to put the code somewhere in the game. Unless you use bepinex. You will have to always change something.
 

nebul.amnesia

Newbie
Jan 6, 2025
35
84
79
Well not really, you still have to put the code somewhere in the game. Unless you use bepinex. You will have to always change something.
No yeah, I just meant you don't have to manually edit the game textures to see the change. You can just place some PNGs down somewhere and the game will load these instead.
 
4.50 star(s) 130 Votes