Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Mod Menu #4223

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

KoloInDaCrib
Copy link
Contributor

@KoloInDaCrib KoloInDaCrib commented Feb 24, 2025

Note

UI is inspired by lemz' take of a mod menu (currently lost media) however it has some additions.

The menu

This mod menu allows you to not only load and unload specific/all mods, but to also view some information about the mod, like the description or the list of contributors.
i had the editor since the stage editor engine i.e. fork that used to have my stage editor

Oh and also once the assets sorting experiment gets merged I'll update this to include a sort of mod maker thing that eric talked about there

Footage

2025-02-27.06-57-14.mp4

@github-actions github-actions bot added size: large A large pull request with more than 100 changes. status: pending triage Awaiting review. pr: haxe PR modifies game code. labels Feb 24, 2025
@Starexify
Copy link

Starexify commented Feb 24, 2025

Why are contributors in a button? 😭 There's so much space left aswell for the mods page to look bigger

Tho respect the work.
Also would suggest add buttons for enabling / disabling the mods better so its more understandable

@KoloInDaCrib
Copy link
Contributor Author

Why are contributors in a button? 😭 There's so much space left aswell for the mods page to look bigger

Because it opens a different window and I'm not sure how long a typical mod's description is - could be only a sentence or an entire paragraph long, which is why the description takes a lot of space

@Starexify
Copy link

Starexify commented Feb 24, 2025

Because it opens a different window and I'm not sure how long a typical mod's description is - could be only a sentence or an entire paragraph long, which is why the description takes a lot of space

Place it over Dependencies , not in Description
Also would suggest adding a new menu entry in the main menu for mods instead, since I don't see them as options really

@KoloInDaCrib
Copy link
Contributor Author

Also would suggest adding a new menu entry in the main menu for mods instead, since I don't see them as options really

I'm sorry but that would require me to draw an asset for the main menu and not only would it be out of place but it would also probably not be something typically in line for a code pr
Besides, the currently unused mods menu is also in options

@AbnormalPoof AbnormalPoof added type: enhancement Involves an enhancement or new feature. topic: mods Related to the creation or use of mods. labels Feb 24, 2025
@lemz1 lemz1 deleted the mod-menu-my-take-yeah branch February 24, 2025 20:47
@lemz1
Copy link
Contributor

lemz1 commented Feb 24, 2025

Wait a minute, fuck our repos are linked

managed to restore it, i need to stop forgetting i linked my repo to yours

@lemz1 lemz1 restored the mod-menu-my-take-yeah branch February 24, 2025 20:52
@KoloInDaCrib
Copy link
Contributor Author

Wait a minute, fuck our repos are linked

Is it cause of that one time we collabed on the character creator?

@lemz1
Copy link
Contributor

lemz1 commented Feb 24, 2025

Is it cause of that one time we collabed on the character creator?

yup

@Lasercar
Copy link
Contributor

The unused mod menu class could probably be deleted in this https://github.com/FunkinCrew/Funkin/blob/develop/source/funkin/ui/options/ModMenu.hx

@cyn0x8
Copy link
Contributor

cyn0x8 commented Feb 24, 2025

this looks awesome

a couple suggestions i think would be cool!!

  • mod view as just a single full panel instead of windowed (i dont think ppl really need to open multiple)
  • currently viewed mod highlighted in list (dependencies too in another color?)
  • mod priority order buttons in list instead of window (and/or drag&drop order?)
  • dependencies cant go after mods that require them
  • preserve mod priority even when enabling/disabling
  • description and contributors as tabs for the large text field instead of popup window
  • priority goes first-bottom last-top instead of vice versa (more intuitive for dependencies to be visually "below" methinks)
  • open a dependency into the mod view when clicked on in dependency tab

@amyspark-ng
Copy link
Contributor

image
i thought you could double click these files to open them, that would be crazy

@cyn0x8
Copy link
Contributor

cyn0x8 commented Feb 25, 2025

i thought you could double click these files to open them, that would be crazy

that would be cool but it probably wouldnt work with zipped mods?

@AbnormalPoof
Copy link
Collaborator

AbnormalPoof commented Feb 25, 2025

It could work but it'd require decompressing the zip like how FNFCs do it probably (If we're opening them in-game)

@KoloInDaCrib
Copy link
Contributor Author

KoloInDaCrib commented Feb 27, 2025

I've added most of the requested features above + some of my own (for example disabling a dependency disables all of the mods that depend on it while enabling a mod that requires dependencies also enables the dependencies)
(also in terms of color-coordination orange are required dependencies while yellow are optional ones)

If there are any more critiques or suggestions, let me know!

2025-02-27.06-57-14.mp4

@Starexify
Copy link

Starexify commented Feb 27, 2025

If there are any more critiques or suggestions, let me know!

So I would say some additions that could be good if they aren't already in the PR:

  • Resizeable mod sidebar, so you can adjust it by dragging it left and right and it would make the mod info side bigger and list smaller, so you can see more from the mod (tho it's just a tweak)
  • Would be cool if you would have backgrounds behind the dark bg of the mod info side
  • A button to disable/enable the mod from the mod info panel (near/under the Visit Homepage)
  • Visit Source and Visit Wiki buttons like for GitHub and Wiki or stuff like that
  • I would say the Files should be moved on right side and be a panel that you can open or close
  • Also show the contributors role
  • And the mod icons should be shown right side of the name tbf in the mod list (on left side)

I did this edit if it would help give you an idea of how it should look like in my head:
image

⚠️Also DO NOT enable/disable the dependent mods if the dependency is enabled/disabled(if required do disable), that would make people not be able to turn off dependent mods (which should let people have disabled dependent mods), they will be stuck with them unless they move them out of the folder/deltete (if you added that)

@cyn0x8
Copy link
Contributor

cyn0x8 commented Feb 28, 2025

  • Would be cool if you would have backgrounds behind the dark bg of the mod info side
  • Visit Source and Visit Wiki buttons like for GitHub and Wiki or stuff like that

these would both probably require either changes to polymod (cuz ModMetadata) or some new "mod registry" thingy? but idk which would be better

Also DO NOT enable/disable the dependent mods if the dependency is enabled/disabled(if required do disable), that would make people not be able to turn off dependent mods (which should let people have disabled dependent mods), they will be stuck with them unless they move them out of the folder/deltete (if you added that)

also this confuses me... this is kinda how most dependency systems in games are supposed to work

if a mod is a required dependency of another and is disabled then the dependent mod should also be disabled as it cant reliably run without it and might error or crash or whatever

and if a mod has required dependencies and is enabled it should also enable those dependencies for the same reason as above (or stay disabled/do nothing if one or more arent found in the list)

@cyn0x8
Copy link
Contributor

cyn0x8 commented Feb 28, 2025

also some more suggestions

  • a bit darker highlight/lighter mod entry border for visual clarity/consistency
  • idk if im viewing it wrong but just in case!! dependency colors should be just relative only to whatever mod is currently being viewed so theres no ambiguity as to who is dependent to who
  • file tree ui should be much more compact (less passing, text smaller idk) as itll feel kinda cramped otherwise
    • should also be scrollable both horizontally and vertically or itll be impossible to navigate to certain parts

@Starexify
Copy link

Starexify commented Feb 28, 2025

and if a mod has required dependencies and is enabled it should also enable those dependencies for the same reason as above (or stay disabled/do nothing if one or more arent found in the list)

Alright so what I mean:

  • If enabled/disabled mod has required dependencies -> enable/disable the mod that needs them, not the dependencies

  • If enabled/disabled mod has optional dependencies -> don't enable/disable them, only the mod

  • If required dependency (mod2) is enabled -> don't enable mod1 that requires it, because the dependency (mod2) doesn't have the mod as dependency

  • But if required dependency is disabled -> disable the mod that needs it

  • If optional dependency is enabled/disabled -> don't enable/disable the mod

@cyn0x8
Copy link
Contributor

cyn0x8 commented Feb 28, 2025

Alright so what I mean:

  • If enabled/disabled mod has required dependencies -> enable/disable the mod that needs them, not the dependencies

  • If enabled/disabled mod has optional dependencies -> don't enable/disable them, only the mod

  • If required dependency (mod2) is enabled -> don't enable mod1 that requires it, because the dependency (mod2) doesn't have the mod as dependency

  • But if required dependency is disabled -> disable the mod that needs it

  • If optional dependency is enabled/disabled -> don't enable/disable the mod

ohhh wait the confusion was from how "dependency" was defined lol

i agree with that

i meant "dependencies" of a mod as in the list of mods it requires (optionally or not) to function
just how the word is used in the polymod json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: haxe PR modifies game code. size: large A large pull request with more than 100 changes. status: pending triage Awaiting review. topic: mods Related to the creation or use of mods. type: enhancement Involves an enhancement or new feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants