ckkm3

Newbie
Aug 13, 2017
63
127
I doubt Ren'Py has a built in function for this (you'd probably have to delve pretty deep into AST shit or make your own parsing script) but a variant which creates a tree of labels based on how they follow each other in the game, and optionally outputs some sort of a visualization based on that would be insanely helpful.

View attachment 502875

Something to work on if anyone here is familiar with Ren'Py and has too much free time on their hands.
Got a script extracting labels into unique files for further processing.

Wait. . .it froze on a file. . .what?

Oh, right. Just 18000 lines of manual variable declarations instead of sensible math for the crab minigame that nobody likes. Dope.
1577848976977.png
 
Last edited:
  • Like
Reactions: kanatik_
D

Deleted member 436513

Guest
Guest
Got a script extracting labels into unique files for further processing.

Wait. . .it froze on a file. . .what?

Oh, right. Just 18000 lines of manual variable declarations instead of sensible math for the crab minigame that nobody likes. Dope.
View attachment 503077
Heh. Check out the code for the blackjack game from Book 2 if you haven't already, that's always fun.

If you're serious about working on this thing btw, it might be worth looking into the actual Ren'Py parser before doing anything. As far as I remember it does store things like lines, labels, jumps and variables in some kind of data structure, so there might already be a list containing every label as a list of dictionaries or something similar.
 
  • Love
Reactions: ckkm3

ckkm3

Newbie
Aug 13, 2017
63
127
Heh. Check out the code for the blackjack game from Book 2 if you haven't already, that's always fun.

If you're serious about working on this thing btw, it might be worth looking into the actual Ren'Py parser before doing anything. As far as I remember it does store things like lines, labels, jumps and variables in some kind of data structure, so there might already be a list containing every label as a list of dictionaries or something similar.
Ooh. Checking it out.
 

ckkm3

Newbie
Aug 13, 2017
63
127
Heh. Check out the code for the blackjack game from Book 2 if you haven't already, that's always fun.

If you're serious about working on this thing btw, it might be worth looking into the actual Ren'Py parser before doing anything. As far as I remember it does store things like lines, labels, jumps and variables in some kind of data structure, so there might already be a list containing every label as a list of dictionaries or something similar.
Got my script working and completed (with parallel processing, ooOOooOoo) and have the individual labels as .rpy files. Attached in case you want to take a peek. Previous upload was only half-complete because of a dumb logic error in my script (skipped every other label because stupid). Edit: removed some test labels I was using that aren't stock.

Included the label separator powershell script for reuse/posterity.


Haven't looked enough into the renpy parser to see if it can be used for mapping specifically.
 

Nickzz235

Newbie
Sep 9, 2018
37
72
so 4 month / 80,000$ of worth just to get water tribe sub-chapter, messy code but still wanted to push those siege mini-game (no wonder coder got burn-out). grateful for the update, but at least I know what to expect for the next update, maybe around april.
 
D

Deleted member 436513

Guest
Guest
Got my script working and completed (with parallel processing, ooOOooOoo) and have the individual labels as .rpy files. Attached in case you want to take a peek. Previous upload was only half-complete because of a dumb logic error in my script (skipped every other label because stupid). Edit: removed some test labels I was using that aren't stock.

Included the label separator powershell script for reuse/posterity.


Haven't looked enough into the renpy parser to see if it can be used for mapping specifically.
I'm not familiar enough with PowerShell to comment, but good job. From here you could add some kind of filter functionality into the section checking the lines and throw away everything that isn't a menu (ends with :\n but isn't a label), a Python block (starts with  *\$, excluding things like $ renpy.pause()) or control flow (contains jump or call). Then tie those together, and you've got a complete map of the game's logic, like...

Untitled-2.png

Which would ideally be a screen you get by hitting F11 or something in the Ren'Py IDE, which is a thing that exists in the parallel universe that isn't shit like ours.

Otherwise, the cheap solution would be to convert the label and jump statements into Twine code or some type of markup/charting language with everything inbetween kept as literal text lines, then loading the entire blob into an existing visual editor which would render the tree for you.

Untitled.png

A proper Ren'Py oriented visual editor would be fucking sick though. Just imagine being able to filter dialogue/jumps/variables on and off at any time on that chart above, or clicking a line and having a debugger on the right side of your screen display which variables exist and what images have been placed onto the screen at that exact point, THEN clicking those and immediately jumping to the point where they've been defined or changed. Or you could use an import window to select a Photoshop file, have it automatically import all the frames of an animation and create a LiveComposite from the layers, then resize and move it into place on your screen in a matter of seconds. Or you could actually just GO TO A LINE by clicking on it, as opposed to reloading the game, holding Ctrl for five minutes, realizing you've gone too far, scrolling back with the mousewheel, realizing you've gone too far again and then mashing space to get there. OR, get this, you could rename a variable by just RENAMING IT, as opposed to having to Ctrl + F through 18 separate fucking files with a fucking regex search to rename all instances of some_name but not some_name_other or "some_name" or jump some_name or $ some_name().

Anyways, I'll stop derailing this thread now with shit that five people care about. Someone post MITY's new game so we have something to argue over.
 
  • Like
Reactions: Centrophy and ckkm3

ckkm3

Newbie
Aug 13, 2017
63
127
I'm not familiar enough with PowerShell to comment, but good job. From here you could add some kind of filter functionality into the section checking the lines and throw away everything that isn't a menu (ends with :\n but isn't a label), a Python block (starts with  *\$, excluding things like $ renpy.pause()) or control flow (contains jump or call). Then tie those together, and you've got a complete map of the game's logic, like...

View attachment 503213

Which would ideally be a screen you get by hitting F11 or something in the Ren'Py IDE, which is a thing that exists in the parallel universe that isn't shit like ours.

Otherwise, the cheap solution would be to convert the label and jump statements into Twine code or some type of markup/charting language with everything inbetween kept as literal text lines, then loading the entire blob into an existing visual editor which would render the tree for you.

View attachment 503236

A proper Ren'Py oriented visual editor would be fucking sick though. Just imagine being able to filter dialogue/jumps/variables on and off at any time on that chart above, or clicking a line and having a debugger on the right side of your screen display which variables exist and what images have been placed onto the screen at that exact point, THEN clicking those and immediately jumping to the point where they've been defined or changed. Or you could use an import window to select a Photoshop file, have it automatically import all the frames of an animation and create a LiveComposite from the layers, then resize and move it into place on your screen in a matter of seconds. Or you could actually just GO TO A LINE by clicking on it, as opposed to reloading the game, holding Ctrl for five minutes, realizing you've gone too far, scrolling back with the mousewheel, realizing you've gone too far again and then mashing space to get there. OR, get this, you could rename a variable by just RENAMING IT, as opposed to having to Ctrl + F through 18 separate fucking files with a fucking regex search to rename all instances of some_name but not some_name_other or "some_name" or jump some_name or $ some_name().

Anyways, I'll stop derailing this thread now with shit that five people care about. Someone post MITY's new game so we have something to argue over.
Fair enough. Last post about this particular topic unless I have some breakthrough worth time:

Used a similar parser to pull 1:1 mappings of jumps inside each label, put it in a csv, and generated a dot file for it to be parsed in graphviz to generate a tree map. It. . .wasn't pretty.
You don't have permission to view the spoiler content. Log in or register now.

Figured it would be less nightmarish if I wasn't mapping every single label in every book at the same time, so decided to organize the scripts/labels a bit. Changed my script to generate a new directory for each parent .rpy file so that shit in the same area was grouped together, and shoved em all into separate book directories (this could go further, e.g. Bk2 Main vs Ember, Bk 4 Main vs SPole, etc).

So, I did. Here's the still frightening label map (you'll need to zoom in. And give your computer time to render it.):
You don't have permission to view the spoiler content. Log in or register now.

Attached the extracted labels sorted by book and the .dot files for generating the diagrams.


I'm depressed.
 
D

Deleted member 436513

Guest
Guest
Fair enough. Last post about this particular topic unless I have some breakthrough worth time:

Used a similar parser to pull 1:1 mappings of jumps inside each label, put it in a csv, and generated a dot file for it to be parsed in graphviz to generate a tree map. It. . .wasn't pretty.
You don't have permission to view the spoiler content. Log in or register now.

Figured it would be less nightmarish if I wasn't mapping every single label in every book at the same time, so decided to organize the scripts/labels a bit. Changed my script to generate a new directory for each parent .rpy file so that shit in the same area was grouped together, and shoved em all into separate book directories (this could go further, e.g. Bk2 Main vs Ember, Bk 4 Main vs SPole, etc).

So, I did. Here's the still frightening label map (you'll need to zoom in. And give your computer time to render it.):
You don't have permission to view the spoiler content. Log in or register now.

Attached the extracted labels sorted by book and the .dot files for generating the diagrams.


I'm depressed.
That honestly doesn't look too bad. Obviously you'd separate things into books 1-4 first since they act as standalone games for the most part, and do a bit of manual cleanup by dragging things around (and trimming out stupid shit like the 50+ labels used by the crab battles or the 100+ labels of the maze). Color coding the arrows and increasing the vertical spacing between elements might help a lot too. You can still kinda tell how the game works from a glance however - there are major junction points everything starts from which act as hubs of content like they do in the game (bk4_korra_room1, palace_night_menu), with "next" labels on the other side that clean things up and decide where to send you (fnext, love_bk3_next, next_day).

Also I LOVE how the nodes used by minigames visibly take up half of the chart. You can almost hear the coder on the other end saying "yeah I spent 300 days working on the crab battle arena, what about it".
 
  • Haha
Reactions: ckkm3

abblood

Newbie
Dec 29, 2018
24
2
i'm not a comment person, but when i show this game long ago(finished after 2nd book) i love it, i really like anal scenes. most of all mai scenes, i can't wait for next update please, if you see this comment give me a feedback. i also have suggest that if you make a game like naruto or one piece,dagashi kashi and several games(like four element trainer story and graphics).it would be best downloading games.use some famous character as well. thank you
 

Caspicious

Newbie
Dec 29, 2018
72
10
I can't find the equalist in the city streets and I cannot talk to zhu li as a script pops up. I dont know how to progress?
 

assrekt

Member
Mar 14, 2019
294
251
I need help, I'm playing the book 2 - love route for the first time and now I'm in the ember island quest line. So right now I'm in this false memory maze, I've already destroyed the false memory located in the right path but now I can't seem to escape from the dream cause there's no exit. No door is appearing in the left path.
 
  • Like
Reactions: idooonut and jed999
4.50 star(s) 276 Votes