Mod Ren'Py Abandoned Love & Sex: Second Base - Gallery Mod [0.14.0 alpha][Anonymous50000]

5.00 star(s) 1 Vote

prisoner416

Newbie
Jan 3, 2018
62
24
The game's new gallery is just a glorified image viewer. Either that, or I don't know how to use it. This mod keeps the context and plot around the images which is what I want out of a gallery.

Here is my update making it work. Mind that I have no idea of Renpy, nor this mod, and I'm just tweaking variables and seeing what sticks. My list of changes (not using version control so this is what I can remember):

1. Fix hero init (mod/Anonymous5000_Gallery/label/hero_setup.rpy:3): Seems at some point the game author changed the hero initialization function and now it requires more parameters
2. Fix scenes loader script reading files in bytes (mod/Anonymous5000_Gallery/functions/addAllSceneToPersistent.rpy:9): For some reason it was reading the other .rpy files in bytes, even though the code then uses string/Unicode operations. Maybe the Renpy version of the game changed at some point and renpy.file had changes as well? No clue, it works now, though.
3. Fix hero initialize function using an undefined variable (cl/class_hero.rpy:97): This is an actual game file, not the mod's, so it might break with future updates if the dev touches this one. For some reason, the initialize function is using a variable heroname that I cannot find defined anywhere. Perhaps this function is legacy in the base game, and that's why the dev never noticed the issue?
4. Added a few scenes: New Cementery Threesome (Violaine and Vincent). Tweaked the Bree when her father comes to visit scene so you can choose to have her collared or not.

I'm not looking to take over this mod, or maintain it. I'm just sharing what I have since I managed to get it working. I haven't tested all the scenes, so some might be broken, or I might have broken them without knowing it. Also, I've only tried it in Windows, no idea about other platforms.

I can't seem to get this to work or show up in game. I've tried installing into the base folder and the game folder, but I'm not seeing any form of a gallery option anywhere. Can someone walk me though it, or is it broke on the latest build?
 

Lamayo

Member
Nov 30, 2019
234
149
I can't seem to get this to work or show up in game. I've tried installing into the base folder and the game folder, but I'm not seeing any form of a gallery option anywhere. Can someone walk me though it, or is it broke on the latest build?
You have to unlock new game+ I'm pretty sure
 

DGM

Newbie
May 29, 2017
29
19
You can fix the mod by doing the following:

Anonymous50000_Gallery\functions\addAllSceneToPersistent.rpy
Replace
Code:
lines[i] = lines[i].replace("\r\n", "\n")
With
Code:
lines[i] = lines[i].decode('utf-8').replace("\r\n", "\n")
This change will decode the bytes-like object to a string before trying to replace "\r\n" with "\n".

Anonymous50000_Gallery\label\hero_setup.rpy

Replace
Code:
$ hero.initialize(Anonymous50000_var.gallery_anonymous50000_chars["hero"]["first.name"], Anonymous50000_var.gallery_anonymous50000_chars["hero"]["last.name"], 500, 1, 1, 1999)
with
Code:
$heroname = Anonymous50000_var.gallery_anonymous50000_chars["hero"]["first.name"]
hero.initialize(heroname, Anonymous50000_var.gallery_anonymous50000_chars["hero"]["last.name"], str(500), str(1), str(1), str(1999), True)
This just fixes the error I encountered and isn't a guarantee everything works.
I can play scenes and change settings.
 

NCV26

New Member
Dec 4, 2017
6
3
EDIT: Your code was just missing the '$' infront of hero.initialize. Added that and it worked perfectly. It must have gotten skipped in copying. Thanks again for fixing the mod you absolute chad.


You can fix the mod by doing the following:

Anonymous50000_Gallery\functions\addAllSceneToPersistent.rpy
Replace
Code:
lines[i] = lines[i].replace("\r\n", "\n")
With
Code:
lines[i] = lines[i].decode('utf-8').replace("\r\n", "\n")
This change will decode the bytes-like object to a string before trying to replace "\r\n" with "\n".

Anonymous50000_Gallery\label\hero_setup.rpy

Replace
Code:
$ hero.initialize(Anonymous50000_var.gallery_anonymous50000_chars["hero"]["first.name"], Anonymous50000_var.gallery_anonymous50000_chars["hero"]["last.name"], 500, 1, 1, 1999)
with
Code:
$heroname = Anonymous50000_var.gallery_anonymous50000_chars["hero"]["first.name"]
hero.initialize(heroname, Anonymous50000_var.gallery_anonymous50000_chars["hero"]["last.name"], str(500), str(1), str(1), str(1999), True)
This just fixes the error I encountered and isn't a guarantee everything works.
I can play scenes and change settings.
Tried that and got an error.


```
I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.


File "game/mod/Anonymous50000_Gallery/label/hero_setup.rpy", line 4: expected statement.
hero.initialize(heroname, Anonymous50000_var.gallery_anonymous50000_chars["hero"]["last.name"], str(500), str(1), str(1), str(1999), True)
^

Ren'Py Version: Ren'Py 8.1.3.23091805
Thu Dec 28 13:23:21 2023
```

Could just be that I am an idiot and can't copy paste correctly. But any thoughts would be apprciated.
 
Last edited:

Ghost_freak

New Member
Jun 13, 2020
8
4
Code:
I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.


File "game/game/mod/Anonymous50000_Gallery/label/hero_setup.rpy", line 5: Line is indented, but the preceding one-line python statement statement does not expect a block. Please check this line's indentation. You may have forgotten a colon (:).
    $ hero.charm = Anonymous50000_var.gallery_anonymous50000_chars["hero"]["charm"]
    ^

Ren'Py Version: Ren'Py 8.1.3.23091805
Sat Dec 30 15:01:32 2023

this is my error any one has any solution i tried chatgpt but no avail
 

NCV26

New Member
Dec 4, 2017
6
3
Check your indentation. The part you pasted is probably nested and shouldn't be. I ran into that too.
 

NTDW

Newbie
Mar 18, 2020
37
25
Code:
I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.


File "game/mod/Anonymous50000_Gallery/label/hero_setup.rpy", line 5: Line is indented, but the preceding one-line python statement statement does not expect a block. Please check this line's indentation. You may have forgotten a colon (:).
    $ hero.heroname = Anonymous50000_var.gallery_anonymous50000_chars["hero"]["first.name"]
    ^

Ren'Py Version: Ren'Py 8.1.3.23091805
Mon Jan  1 02:01:42 2024
I am curious how to solve this. If I indent it equivalently with the other statements in the rpy file, the exe stops working, and if I indent it any less, I get this.

Edit: To be clear, this is the problem:

Code:
While running game code:
  File "game/mod/Anonymous50000_Gallery/init.rpy", line 1, in script
    init 1005 python:
  File "game/mod/Anonymous50000_Gallery/init.rpy", line 1, in script
    init 1005 python:
  File "game/mod/Anonymous50000_Gallery/init.rpy", line 33, in <module>
    addAllSceneToPersistent()
  File "game/mod/Anonymous50000_Gallery/functions/addAllSceneToPersistent.rpy", line 15, in addAllSceneToPersistent
    lines[i] = lines[i].decode('utf-8').replace("\r\n", "\n")
AttributeError: 'str' object has no attribute 'decode'
So it might be that I am doing something wrong with the string replacement thing
 

NCV26

New Member
Dec 4, 2017
6
3
I would say go back to the original version and replace it again from there, making sure the indent remains the same. I didn't have that issue & I am by no means a coder so I'm sorry I cant help more.
 

peters_99

Newbie
Apr 13, 2018
60
279
To be clear this is the correct code:
Code:
    $ heroname = Anonymous50000_var.gallery_anonymous50000_chars["hero"]["first.name"]
    $ hero.initialize(heroname, Anonymous50000_var.gallery_anonymous50000_chars["hero"]["last.name"], str(500), str(1), str(1), str(1999), True)
Notice the spaces instead of tabs and the $ sign

Here the fixed script, works for me for v23.12.0
 
Last edited:

Bautinho88

Newbie
Feb 9, 2020
26
5
To be clear this is the correct code:
Code:
    $ heroname = Anonymous50000_var.gallery_anonymous50000_chars["hero"]["first.name"]
    $ hero.initialize(heroname, Anonymous50000_var.gallery_anonymous50000_chars["hero"]["last.name"], str(500), str(1), str(1), str(1999), True)
Notice the spaces instead of tabs and the $ sign

Here the fixed script, works for me for v23.12.0
Works even with android version. Is this mod up to date with all scene from newer updates?
 
5.00 star(s) 1 Vote