Warning - Enter at your own risk! This is an area for people to experiment with changing the way the game works.
Message
Author
SET
Posts: 22
Joined: Sat Dec 28, 2013 9:59 pm

I found this game a few days ago when it was up for the Steam sale voting and after getting a few good and a lot of bad endings I'm wondering if there are any fan-made mods out there.
I tried it for a bit and modding by itself seems to be very easy, while actually giving that mod to someone else (without copying the whole game, which if obviously not an option) seems to be rather hard. Is there an officially approved way of modding at all?
As for my first test mod (quickly thrown together in one afternoon): New Game Plus, which allows to to restart the game after getting a non-death end while keeping a fraction (10%? 50%? Not sure yet) of your skills. It's an unlockable Easy Mode, essentially.

Ohana
Posts: 13
Joined: Sat Dec 21, 2013 11:16 am

If you are familiar with ren'py, you can just add rpyc files to the "game" folder and they will be loaded and parsed by the engine executable automatically. The harder part is figuring out how best to hook into existing events without modifying the original scripts. There are some other options you could use but I'm not sure how much Hanako and co. would appreciate their discussion because it involves breaking much more into the internals of the game than a typical modder would need to.

SET
Posts: 22
Joined: Sat Dec 28, 2013 9:59 pm

That's what I meant with easy to mod (just some minor changes to the existing .rpy and it works, yay) but hard to share (need to change the existing files, can't just add new files. Python functions and classes can be redefined but most of the game is Ren'Py script, which can't be modified after the fact (I think)). Note that I code Python for a living but never saw Ren'Py before today, so I might be missing something here, hence my question.
As for my first question, no existing modder community for this game, I guess.

Zerion
Posts: 3
Joined: Sun Dec 29, 2013 7:33 am

I'm sort of interested in modding this game to suit my taste aswell.
If anyone knows how to replace the sprites, I'm willing to put my drawing skills on the table

[hide][/hide]

SET
Posts: 22
Joined: Sat Dec 28, 2013 9:59 pm

Just replacing existing images seems to be very easy. Some images simply exist in the file system (e.g. LongLiveTheQueen/game/heads/alice-smile.png) so you can simply replace it with another file. Most files however are in the llq.rpa archive file (e.g. heads/charlotte-happy.png). But you don't actually need to change that because the game engine always looks for files in your file system first and only if it can't find them there it checks the archive. So simply creating a file called "charlotte-happy.png" in the LongLiveTheQueen/game/heads/ directory will do the trick.
If you want to create completely new images for something not in the game yet you'll have the same problem I had: It's doable with some Python/Ren'Py coding, but you can't really share it because you have to modify the original game files.

Ohana
Posts: 13
Joined: Sat Dec 21, 2013 11:16 am

The base Ren'Py engine executable will always load EVERY script in the game directory, even if the script has no functionality that ties it to another script...in that way it is kind of a "dumb loader" which makes certain types of drop-in mods very easy to create...but in order to neatly modify events defined in other scripts you would need to understand the internals of the engine well enough to take advantage of it. There is almost certainly a way to do it, but it would take some research to find it.

Zerion
Posts: 3
Joined: Sun Dec 29, 2013 7:33 am

I'm somewhat unsure what to name the files, could I please have a filename list? at least for the princess?

Ohana
Posts: 13
Joined: Sat Dec 21, 2013 11:16 am

Alphabetical list of most of the images from the game that you can override. If there is a slash that means you need it in that sub-folder for it to override properly. I guess you could mod outfits and such by knowing what files they are...another interesting case is translating the bitmap buttons into other languages.

ballroom.jpg
bubble.png
calendar-center.png
calendar-month.png
calendar-pendulum.png
calendarbase.png
caloris.png
chains.png
coronation.jpg
doomforest.jpg
epilogged-top.png
epilogged.jpg
girl_only.png
goldglow.png
heart.png
heartytransition.png
henshin_base-small.png
histoheartytransition.png
icon-32.png
icon-big.png
map\ball.png
map\bg.jpg
map\court.png
map\dungeons.png
map\explore.png
map\garden.png
map\hunt.png
map\service.png
map\sneak.png
map\sports.png
map\star.png
map\tomb.png
map\toys.png
map\treasury.png
moodbg.png
ocean-fog.png
ocean-fog2.png
ocean.jpg
outside.jpg
princess\afraid.png
princess\agility.png
princess\angry.png
princess\animals.png
princess\art.png
princess\athletics.png
princess\boarding_school.png
princess\body.png
princess\cheerful.png
princess\conversation.png
princess\depressed.png
princess\economics.png
princess\faith.png
princess\history-glasses.png
princess\history.png
princess\intrigue-lens.png
princess\intrigue.png
princess\lonely.png
princess\lumen.png
princess\medicine.png
princess\military.png
princess\neutral.png
princess\pressured.png
princess\royal_demeanour.png
princess\weapons.png
princess\willful.png
princess\yielding.png
redswirl.png
ribbon_only-small.png
roundrect.png
royal_crystal.png
royal_crystal_glow.png
schedulebg.jpg
selene_crystal.png
selene_crystal_glow.png
sidebar\classes-hover.png
sidebar\classes.png
sidebar\log-hover.png
sidebar\log.png
sidebar\mood-hover.png
sidebar\mood.png
sidebar\outfit-hover.png
sidebar\outfit.png
sidebar\skills-hover.png
sidebar\skills.png
spinnypulsy.png
stars\constellation.png
stars\small.png
stars\small2.png
statsbackdrop.png
statsbg.jpg
transformation_music.ogg
tutorial\moodcomposite.png
ui\bar-left.png
ui\bar-right.png
ui\bar-thumb.png
ui\bareprefbg.jpg
ui\big_ribbonbox.png
ui\bigbar_left.png
ui\bigbar_right.png
ui\bonus.png
ui\bonus_hover.png
ui\bubble-fail.png
ui\bubble-mood.png
ui\bubble-success.png
ui\buttblue.png
ui\buttframe.png
ui\buttgreen.png
ui\button-disabled.png
ui\button-hover.png
ui\button.png
ui\buttpurple.png
ui\buttred.png
ui\buttwhite.png
ui\checklist.png
ui\checklist_hover.png
ui\checklistbg.jpg
ui\crown.png
ui\divider.png
ui\dossierbg.png
ui\dossierbutt.png
ui\dossierdiv.png
ui\emptythumb.png
ui\filepane.png
ui\logo.png
ui\preferences.png
ui\preferences_hover.png
ui\prefs-text.png
ui\prefsbar.png
ui\prefsthumb.png
ui\quit.png
ui\quit_hover.png
ui\schedtextbox.png
ui\startgame.png
ui\startgame_hover.png
ui\textbox.png
ui\titlebright.jpg
ui\titledark.jpg
ui\wandtip.png
ui\weekendbox.png
ui\ynpromptbg.jpg
ursul_crystal.png
ursul_crystal_glow.png

Zerion
Posts: 3
Joined: Sun Dec 29, 2013 7:33 am

Thanks! That's very nice of you!

SET
Posts: 22
Joined: Sat Dec 28, 2013 9:59 pm

Okay, looking deeply into the Ren'Py code I found one thing useful for drop-in mods: config.label_overrides
This basically allows you to make your own label replace an existing label. This works well for small label blocks like "plan_do_week" but is rather pointless for huge label blocks like the main script and doesn't work at all for non-block labels.
It looks like huge label blocks have to be modified in-place by changing the in the parsed AST objects around. This is ugly at best but I am slightly optimistic that it might work out to create actual working drop-in mods using this method. I'll report back when I get results, one way or the other.

SET
Posts: 22
Joined: Sat Dec 28, 2013 9:59 pm

Proof of concept mod to get rid of the question if you want to see the tutorial if you have already finished the game at least once. Save as "autoskiptutorial.rpy" into the "LongLiveTheQueen/game" directory. To remove it delete both the "autoskiptutorial.rpy" and "autoskiptutorial.rpyc" files from that directory. No guarantees at all that it actually works or doesn't break anything. But it should work. Probably. Possibly. Hopefully.

EDIT: Code removed due to changes, it's two posts further down now.
Last edited by SET on Fri Jan 03, 2014 1:34 am, edited 1 time in total.

hanako
Posts: 3511
Joined: Fri Apr 13, 2007 1:44 am

I'm not really sure what our official policy on modding should be, which is why we've been staying out of it so far, but I'm slightly nervous about random code being posted openly on the forum where it might be mistaken for something we're supporting ourselves, which could get messy if something does break. On the other hand we kind of want to be able to see what you make.

I'm considering pushing this off to a subforum or something where we can put big 'ENTER AT YOUR OWN RISK' labels on it.

SET
Posts: 22
Joined: Sat Dec 28, 2013 9:59 pm

Second attempt: Better mod insertion, better error messages and a big fat warning at the top, as requested.
If you actually try this, please post results. I tested this with the Steam version, but any version should do as long as it's 1.2.13. And possibly even some other versions.

Save as "autoskiptutorial.rpy" into the "LongLiveTheQueen/game" directory. To remove it delete both the "autoskiptutorial.rpy" and "autoskiptutorial.rpyc" files from that directory.

Code: Select all

# autoskiptutorial
# Skips the question if you want to see the tutorial if you have already finished the game at least once (reached coronation).
# Written for version 1.2.13
# WARNING: UNOFFICIAL AND BARELY TESTED, USE AT YOUR OWN RISK!
init:
python:
try:
# "tutorial" is the content of the block of the "tutorial" label. It's defined in tutorial.rpy, but that's not important.
tutorial = renpy.game.script.lookup('tutorial').get_children()
# Now looking for the last statement before the menu that we're trying to get rid of.
for statement in tutorial:
break
else:
raise Exception('Could not find the tutorial menu')
# "mytut" is the "if" statement below.
mytut = renpy.game.script.lookup('mod_autoskiptutorial_perhapsskip').get_children()[0]

# Now stuffing the new statement right into the middle of the current control flow.
mytut.chain(statement.next)
statement.chain(mytut)
except Exception, e:
raise Exception('Exception "%s" while trying to apply mod "autoskiptutorial".\nPlease delete the files autoskiptutorial.rpy and autoskiptutorial.rpyc from your game directory to get rid of this error.' % (e, ))

label mod_autoskiptutorial_perhapsskip:
if persistent.checklist_crowned:
return


GSN22
Posts: 100
Joined: Wed Dec 12, 2012 6:23 am

hanako wrote:I'm not really sure what our official policy on modding should be, which is why we've been staying out of it so far, but I'm slightly nervous about random code being posted openly on the forum where it might be mistaken for something we're supporting ourselves, which could get messy if something does break. On the other hand we kind of want to be able to see what you make.

I'm considering pushing this off to a subforum or something where we can put big 'ENTER AT YOUR OWN RISK' labels on it.

Paradox does it all the time with all their games like CK and EU.

Modding hasn't been too big an issue since Morrowind when the scene really started to take off and gain mainstream acceptance.

JackMackerel
Posts: 17
Joined: Wed May 30, 2012 1:56 am