Hanako Games

News, Walkthroughs, and Chat about Anime Games

What about modding?


SET

What about modding?

#1 by SET - Dec 28 2013

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

Re: What about modding?

#2 by Ohana - Dec 28 2013

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

Re: What about modding?

#3 by SET - Dec 29 2013

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

Re: What about modding?

#4 by Zerion - Dec 29 2013

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][Could not load http://puu.sh/629o2.jpg][/hide]

SET

Re: What about modding?

#5 by SET - Dec 29 2013

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

Re: What about modding?

#6 by Ohana - Dec 30 2013

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

Re: What about modding?

#7 by Zerion - Jan 2 2014

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

Ohana

Re: What about modding?

#8 by Ohana - Jan 2 2014

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
chaingrad.png
chains.png
coronation.jpg
doomforest.jpg
epilogged-top.png
epilogged.jpg
girl_fadein_gradient.jpg
girl_only.png
goldglow.png
gradialdent.png
heads\arisse-dossier.png
heads\arisse.png
heads\armand-dossier.png
heads\armand.png
heads\banion-dossier.png
heads\banion.png
heads\bennett-dossier.png
heads\bennett.png
heads\brin-dossier.png
heads\brin.png
heads\briony-dossier.png
heads\briony.png
heads\charlotte-dossier.png
heads\charlotte-happy.png
heads\charlotte-scared.png
heads\corisande-dossier.png
heads\corisande.png
heads\fabian-dossier.png
heads\fabian.png
heads\gwenelle-dossier.png
heads\gwenelle.png
heads\ignatius-dossier.png
heads\ignatius.png
heads\joslyn-dossier.png
heads\joslyn.png
heads\julianna-dossier.png
heads\julianna.png
heads\kevan-dossier.png
heads\kevan.png
heads\laurent-dossier.png
heads\laurent.png
heads\lieke-dossier.png
heads\lieke.png
heads\lucille-dossier.png
heads\lucille.png
heads\selene-dossier.png
heads\selene.png
heads\severin-dossier.png
heads\severin.png
heads\sirin-dossier.png
heads\sirin.png
heads\talarist-dossier.png
heads\talarist.png
heads\togami-dossier.png
heads\togami.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
ribbon_only_fademask-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\menu-hover.png
sidebar\menu.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
tentaclefade.png
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\loadgame.png
ui\loadgame_hover.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

Re: What about modding?

#9 by Zerion - Jan 2 2014

Thanks! That's very nice of you!

SET

Re: What about modding?

#10 by SET - Jan 2 2014

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

Re: What about modding?

#11 by SET - Jan 2 2014

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.

hanako

Re: What about modding?

#12 by hanako - Jan 3 2014

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

Re: What about modding?

#13 by SET - Jan 3 2014

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.
# 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:
                if isinstance(statement.next, renpy.ast.Menu):
                    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

Re: What about modding?

#14 by GSN22 - Jan 3 2014

hanako:

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

Re: What about modding?

#15 by JackMackerel - Jan 4 2014

I kind of want to mod in a playable Togami campaign, make it similar to Elodie's rise to power. (And making slaying Fidelia and taking over Nova optional.)

At the very least, making Julianna and your dad less useless in the game would be cool, too.

Ohana

Re: What about modding?

#16 by Ohana - Jan 5 2014

honestly as long as we can avoid direct "script patching" it should be pretty benign to mod the game...with script injection like SET is using if anything goes wrong all you need to do is trash the modded files...same goes for images, which is why I encourage that approach.

Trimead

Re: What about modding?

#17 by Trimead - Jan 29 2014

would it be possible to mod the numbers from the skills tab to the classes one? (at least what increases and decreases you're getting for that particular mood and how it may affect learning that particular category)? also would it be possible to make it so when you start up the game from week 0 you can have 25 points in like elegance, presence, divination, meditation, and -choose fifth and sixth option here-? (i was going to say 3 random categories but i read online somewhere that this game doesn't random too well =[, so i picked the two hardest categories to fulfill b4 day 10).

if not then oh well i tried Razz.
Hanako forum archive - Topic list