Is Ren'py games designed to handle adding image packs?

MrGhostRider

Member
Jun 7, 2017
419
219
I am planning to develop a brothel simulation type game in Ren'py, so the game logic and mechanics remains the same while i plan to add lot of girl packs with images later in the game, so is it possible in Renpy ?? If not, which game engine would be best suited in that case?
 

79flavors

Well-Known Member
Respected User
Jun 14, 2018
1,611
2,258
Simple answer: Yes.
Less simple answer: Yes... But...

The solution that comes to my mind is that RenPy allows you to use dynamic names for filenames... including image filenames.

I'm imagining something where you have an array of a list of girls... Each "girl pack" could include all the images and a .rpy file that adds her to the list of available girls at the game startup. Each set of images would be in it's own subfolder.
If you set up the options.rpy file correctly, you could have a .rpa (renpy archive) per girlpack... which would make distributing them a lot easier... where the options file picks up the images subfolder and the .rpy file that adds the girl's name into the "list of girls array".

Then whenever you interact with the girls, you pick which girl you are planning to interact with... and her name is stored as your "current selection"... then use that current selection variable to determine the name of the image files that will be used in the scenes that the player is seeing.

You might need another array or similar structure, if you plan to store things like affection/love points or some other sort of tracking stat.

Sorry, I'm not giving you actual code to look at... it's not something I've done. But RenPy should be capable of it.

I guess going down this route... if you can get it working for 2 girls, there would be no upper limit. 2 or 22... it's all the same code. (But 2 is easier to test).

If none of that makes sense to you as an outline... maybe try for something a little less challenging than girl packs.

I can think of a couple of games that use dynamic girls type templates... not exactly girl packs, but more "random personalities" or "random selection of girls from a pool" to keep the player on their toes. I'm not sure any of them are "good" example of coding that would help you... but they might offer some insights...
I'm sure there are others. But these are the ones that came to mind.
 

Epadder

Programmer
Game Developer
Oct 25, 2016
568
1,064
It is completely possible to do this in Ren'py, but it is a lot of work. I'm specifically building a system like this into my next update.

Brothel King.

Is pretty much the type of game your describing and is written in Ren'py, looking at the code helped me develop my own automatic system (I was by hand defining all of them at the start :sick:).
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,979
16,236
It is completely possible to do this in Ren'py, but it is a lot of work.
Sorry, but I need to stop you here. There's absolutely nothing difficult and it absolutely don't need a lot of work. You apparently picked the wrong game to look how to to it. It's something that Super Powered do since at least two years now. And despite its good that sometimes give me nightmares, last time I looked at it, it was still the only one that handle the problem correctly.

Adding a girl to a game, especially a brothel management game, is something totally easy because Ren'py is way more dynamical than it looks (and that sometimes the doc tell it).
The Image statement can perform real time text substitution, while the jump and call statement can take an expression. So, all you have to do is to never directly refer to a girl, but instead refer to a variable that represent the actual girl.

First, have this structure for your images :
  • images
    • sarah
    • linda
    • amanda
And obviously keep the same name for the same kind of image.

Then have a images.rpy file where you'll define your images without taking care of the girl :
Code:
image girlIdle = "[girlDir]/idle.png"
image girlSuck = "[girlDir]/suck.png"
[...]
To this, add something like a list to handle all the available girls. It will be enough for the brothel management approach. But for a more complex game you'll have to find another way, mostly using objects to represent the girls.
script.rpy
Code:
init python:
    # All the girls will go here
    girlsList = []
And finally have a rpy file by girls :
sarah.rpy
Code:
init +1 python:
    # Add a new girl
    girlsList.append( ( "Sarah Connor", "sarah" )  )

# Define the labels representing the interactions with this girl
label sarahFirstEncounter:
    sa "Hi, I'm the new girl. I appear with this update only, but the game don't care and act like if I was planed from the start."
    [...]
linda.rpy
Code:
init +1 python:
    girlsList.append( ( "Linda X", "linda" )  )

label lindaFirstEncounter:
    li "Who are you ?"
    [...]
And so on.

A practical example (with the brothel management approach) :
Code:
screen selectGirl:
    vbox:
        for info in girlsList:
            $ name = info[0]
            textbutton "[name]":
                action Return( info[1] )

label blabla:
    "Which girl do you want ?"
    call screen selectGirl
    $ girlDir = _return
    show girlIdle
    jump expression girlDir + "FirstEncounter"
And that's all. With this, you can add as many girls as you want without having to change a single line of the main code. All you have to do is put the image and add the correct labels in the rpy file for this girl. That's all and that's far to be difficult.
 
  • Like
Reactions: MrGhostRider

Epadder

Programmer
Game Developer
Oct 25, 2016
568
1,064
Let me expand my statement for clarity, Creating this type of game and system leads to a fair amount of work and depending on the complexity of the 'brothel/harem' management systems in the game may make the prospect easier or harder.

The amount of work in my mind does not just include the code but the building of image packs and creating a standard format that can be used by others to add possible characters.

The 'image packs' in my project are used to build template characters that are then spawned into the actual characters you have interaction with.

To add a 'pack' into my project does not require any code, but just to have the required amount of images and to follow the specific directory structure and file naming scheme I have created.

Also to clarify, Brothel King's method is only an inspiration that I adapted for my own project, so any amount of work I added on to myself is my own fault through my own inexperience and the complexity of what I wanted to accomplish.
 
  • Like
Reactions: MrGhostRider

MrGhostRider

Member
Jun 7, 2017
419
219
Thanks guys, i have gained much insight. Now that i know this is infact possible in Ren'py, i'll continue with my development.