Closes: #50 Add Mod Support #51

Merged
coolestskinnieinthejungle merged 112 commits from nutbuster/SnootGame:Monster-Update-6 into Monster-Update-6 2021-07-24 00:08:52 +00:00
Member

'Mod Support' is possible, the idea is to just hijack & replace whatever storyline.rpy is doing, so all the modders have to think about is the overall script itself, assets and that's about it. As long as modders don't repeat the same 28k+ line mistake, it should be fine.

I guess a heads up notes for people making their own mods like:
Textbox limitation: ~300 characters / four lines, the maximum in the vanilla game's script is around roughly ~278 and that only barely overflows to four lines, so <200 characters / three lines of text should be fine

rpyc (renpy/python bytecode) is not really needed, scripts in mods by default aren't built see options.rpy: build.classify('game/mods/**', None) ..

Can't have duplicate labels - Not a big deal

some todo stuff is:
Will do a better fix for nameboxes instead of redefining it for specific set of characters, based on the namebox text texture width.
Quick Buttons replaced with not a grid 1 x, instead use the vbox instead
Make the mods menu way better, etc.

'Mod Support' is possible, the idea is to just hijack & replace whatever storyline.rpy is doing, so all the modders have to think about is the overall script itself, assets and that's about it. As long as modders don't repeat the same 28k+ line mistake, it should be fine. I guess a heads up notes for people making their own mods like: Textbox limitation: ~300 characters / four lines, the maximum in the vanilla game's script is around roughly ~278 and that only barely overflows to four lines, so <200 characters / three lines of text should be fine rpyc (renpy/python bytecode) is not really needed, scripts in mods by default aren't built see options.rpy: `build.classify('game/mods/**', None) ..` Can't have duplicate labels - Not a big deal some todo stuff is: Will do a better fix for nameboxes instead of redefining it for specific set of characters, based on the namebox text texture width. Quick Buttons replaced with not a grid 1 x, instead use the vbox instead Make the mods menu way better, etc.
nutbuster added 1 commit 2021-07-04 06:25:29 +00:00
nutbuster closed this pull request 2021-07-04 06:43:40 +00:00
nutbuster reopened this pull request 2021-07-04 06:43:44 +00:00
Owner

mans working fast on this stuff

mans working fast on this stuff
nutbuster added 6 commits 2021-07-05 00:15:28 +00:00
Author
Member

All nameboxes are long by default, unless someone wants to mess around with Ren'Py's displayables/screens, so that they can figure out how long the name (Not in character length, actual width of the texture, due to non-monospace ttf font, ideally you wouldn't actually use bitmaps, do some actual 2d glsl work, something about Model-Based Rendering etc.) - for now it's default textbox_long.png for the sake of making modding easier.

Mod Menu is functional, really the mod folder is there as a suggestion not an absolute rule. It will lists all of the scripts that are automatically added in that have the following init function:

init python:
    # Modding Support variables
    # All mod rpy files must have title of their mod (this shows up on a button)
    # and finally the label that controls the flow of dialogue

    mod_menu_access += [{
        'Name': "Mod Name",
        'Label': "mod_storyline"
    }];
    
label mod_storyline:
    call chapter_1_new

Read the game/mods/README.md for more information

In case anyone gets confused or not:
When you build the game, anything in game/mods_example is not included during the build.

All nameboxes are long by default, unless someone wants to mess around with Ren'Py's displayables/screens, so that they can figure out how long the name (Not in character length, actual width of the texture, due to non-monospace ttf font, ideally you wouldn't actually use bitmaps, do some actual 2d glsl work, something about Model-Based Rendering etc.) - for now it's default `textbox_long.png` for the sake of making modding easier. Mod Menu is functional, really the mod folder is there as a suggestion not an absolute rule. It will lists all of the scripts that are automatically added in that have the following init function: ``` init python: # Modding Support variables # All mod rpy files must have title of their mod (this shows up on a button) # and finally the label that controls the flow of dialogue mod_menu_access += [{ 'Name': "Mod Name", 'Label': "mod_storyline" }]; label mod_storyline: call chapter_1_new ``` Read the `game/mods/README.md` for more information In case anyone gets confused or not: When you build the game, anything in `game/mods_example` is not included during the build.
nutbuster changed title from WIP: #50 Add Mod Support to #50 Add Mod Support 2021-07-05 06:06:20 +00:00
nutbuster force-pushed Monster-Update-6 from 1e6448cac4 to 9fa26bc67b 2021-07-06 04:25:37 +00:00 Compare
nutbuster changed title from #50 Add Mod Support to Closes: #50 Add Mod Support 2021-07-09 02:46:20 +00:00
nutbuster added 104 commits 2021-07-22 11:34:25 +00:00
059a1381bb Remove the Nth times the style was redefined
DO NOT REDEFINE STYLES MULTIPLE TIMES
DO NOT REDEFINE STYLES MULTIPLE TIMES
DO NOT REDEFINE STYLES MULTIPLE TIMES
DO NOT REDEFINE STYLES MULTIPLE TIMES
DO NOT REDEFINE STYLES MULTIPLE TIMES
d6824c5111 CG Gallery EX
Remove Gallery Object
Text & Correct Aspect Ratio Thumbnails
Pan & Scan
a39c3c24e2 Merge branch 'master' into Monster-Update-6
Move mod_menu into it's own file in src/
Author
Member

Similar to 5.1.1, this commit does merge master into MU6 properly

Similar to 5.1.1, this commit does merge master into MU6 properly

reviewing - this is great stuff.
there are a few things i want to call out extra in the documentation for modders as well as build on the examplemod you made to showcase a few more things.

i think the only bug i've found so far is if you call ending from a modded script/storyline it fails because tradwife isn't defined (it's defined in start). not a showstopper and i'll build more off the approved way to package/structure mods.

since i dont't want to deal with git ping pong i'll probably just attach a zip of changes / different "mod" i made with the documentation and whatever if that's fine by you. the "backend" stuff like the UI for the mod menu is fine as is

reviewing - this is great stuff. there are a few things i want to call out extra in the documentation for modders as well as build on the examplemod you made to showcase a few more things. i think the only bug i've found so far is if you call ending from a modded script/storyline it fails because `tradwife` isn't defined (it's defined in `start`). not a showstopper and i'll build more off the approved way to package/structure mods. since i dont't want to deal with git ping pong i'll probably just attach a zip of changes / different "mod" i made with the documentation and whatever if that's fine by you. the "backend" stuff like the UI for the mod menu is fine as is
Author
Member

since i dont't want to deal with git ping pong i'll probably just attach a zip of changes / different "mod" i made with the documentation and whatever if that's fine by you. the "backend" stuff like the UI for the mod menu is fine as is

Yeah that's fine by me, I just want this merge since it contains patchy5 -> 511 -> master changes

> since i dont't want to deal with git ping pong i'll probably just attach a zip of changes / different "mod" i made with the documentation and whatever if that's fine by you. the "backend" stuff like the UI for the mod menu is fine as is Yeah that's fine by me, I just want this merge since it contains patchy5 -> 511 -> master changes

oh yea in that case i'lll go ahead and merge into. all the issues i'm finding are more meta issues that we can fix as we go like "prventing mod variable collisions", "properly loading loose mod files via our binary" and shit

oh yea in that case i'lll go ahead and merge into. all the issues i'm finding are more meta issues that we can fix as we go like "prventing mod variable collisions", "properly loading loose mod files via our binary" and shit
coolestskinnieinthejungle merged commit a17d382802 into Monster-Update-6 2021-07-24 00:08:52 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Cavemanon/SnootGame#51
No description provided.