Skip to content

Conversation

@EliteMasterEric
Copy link
Member

@EliteMasterEric EliteMasterEric commented Jul 3, 2025

This version of Polymod includes the following:

New Language Features/Syntax

  • Allow accessing static fields of other scripted classes.
  • Added support for variables with getters and setters.
  • Added support for defining enums in scripts.
  • Partial FULL support for abstracts. You can finally use FlxColor properly!
    • Note that you can't access instance methods of abstracts directly, but you can still use them by calling the static method and passing the instance as the first argument.
  • Added support for aliased imports (import funkin.graphics.FunkinSprite as Sprite;)
  • Fixed try-catch blocks being pretty much completely broken (the catch block will run if there's an error, and the code afterwards will now be run properly!)

Additional Fixes

  • Linux now detects file paths as case-insensitive.
  • Stricter handling of invalid syntax with good error reporting
    • NOTE: This will break some mods but only if they had bad syntax to begin with!
  • Scripts now throw an error when attempting to declare a variable or function with the same name as an existing field.
    • The previous behavior was that the last function in the file with that name gets used. I spent 4 hours trying to figure out why changing a function didn't do anything, this also breaks a couple mods but only if they had redundant/broken code to begin with. Consider this change a blessing.
  • Fixed being able to modify final variables (like values from Constants).
  • Fixes for calling a function on a nullable object with ?. throwing an error instead of returning null.
  • Variable types will now sometimes be queried when initializing Arrays or Maps to ensure the correct class is instantiated.
  • Fixes to Assets.list() returning inconsistent values, and fixed library.list() returning values from every library.

I'm still merging stuff so continue testing to make sure everything works okay.

@github-actions github-actions bot added status: pending triage Awaiting review. pr: haxe PR modifies game code. size: huge A huge pull request with more than 500 changes. and removed status: pending triage Awaiting review. labels Jul 3, 2025
@EliteMasterEric EliteMasterEric changed the base branch from main to develop July 3, 2025 22:49
@AbnormalPoof AbnormalPoof added type: enhancement Involves an enhancement or new feature. topic: mods Related to the creation or use of mods. topic: dependencies Related to one or more of the game's required internal libraries. status: reviewing internally Under consideration and testing. labels Jul 3, 2025
@github-actions github-actions bot added size: tiny A tiny pull request with 4 or fewer changes. and removed pr: haxe PR modifies game code. size: huge A huge pull request with more than 500 changes. labels Jul 3, 2025
@lunacynne
Copy link
Contributor

yess this is everything i needed

pucci-jojo

@MAZ12211
Copy link

MAZ12211 commented Jul 4, 2025

FULL support for abstracts. You can finally use FlxColor properly!
Scripts now throw an error when attempting to declare a variable or function with the same name as an existing field.
Fixes for calling a function on a nullable object with ?. throwing an error instead of returning null.

Instant 10/10

@lemz1
Copy link
Contributor

lemz1 commented Jul 4, 2025

Partial FULL support for abstracts. You can finally use FlxColor properly!
Note that you can't access instance methods of abstracts directly, but you can still use them by calling the static method and passing the instance as the first argument.

Keep in mind that operator functions have to be called explicitly.

Meaning, when adding two FlxColors together you cant just do: color1 + color2, instead you have to do FlxColor.add(color1, color2)

@CrusherNotDrip
Copy link
Contributor

type of shit my body felt upon discovering this pr IMG_9228

@charlesisfeline
Copy link
Contributor

the ultimate pr 🎉

@EliteMasterEric
Copy link
Member Author

Just fixed a bug with variable resolution in static functions.

@EliteMasterEric
Copy link
Member Author

New update fixes being able to modify final variables, complete with a custom error message:

463350505-462eb250-2d94-4604-bc25-d2d974cdfa83

@AbnormalPoof AbnormalPoof added status: planned Planned to be implemented some time in the future. and removed status: reviewing internally Under consideration and testing. labels Jul 8, 2025
@AbnormalPoof AbnormalPoof added this to the 0.7.1 milestone Jul 8, 2025
@AbnormalPoof AbnormalPoof added status: reviewing internally Under consideration and testing. and removed status: planned Planned to be implemented some time in the future. labels Jul 8, 2025
@AbnormalPoof AbnormalPoof removed this from the 0.7.1 milestone Jul 8, 2025
@AbnormalPoof AbnormalPoof added status: planned Planned to be implemented some time in the future. and removed status: reviewing internally Under consideration and testing. labels Jul 9, 2025
@AbnormalPoof AbnormalPoof added this to the 0.7.1 milestone Jul 9, 2025
@sphis-sinco
Copy link
Contributor

It got delayed??????????

@AbnormalPoof AbnormalPoof force-pushed the feature/polymod-experimental branch from 6baae7d to 2ba1977 Compare July 17, 2025 05:11
Copy link
Member

@AbnormalPoof AbnormalPoof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

THATS FUCKING HSCRIPT RIGHT THERE. NONE OF THAT PANSY ASS EInvalidAccess BULLSHIT. PEOPLE class.someVariable, PEOPLE get_ ON THE VARIABLES, PEOPLE DELIVER THEIR NEW MODS ON THE BEST POLYMOD BRANCH. FUCKING HARD CORE import path.to.enum; FUCK IT class.someFunction() IT new ClassName() TIME SHIT. TAKE IT TO THE ClassName extends Object. STATIC FIELDS IN PLACES YOU DON’T EVEN REMEMBER. WE WIN TOGETHER WE CELEBRATE TOGETHER. HSCRIPT IS BACK BABY.

@AbnormalPoof AbnormalPoof merged commit 203e8eb into develop Jul 17, 2025
2 of 6 checks passed
@AbnormalPoof AbnormalPoof added status: accepted PR was approved for contribution. If it's not already merged, it may be merged on a private branch. and removed status: planned Planned to be implemented some time in the future. labels Jul 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: tiny A tiny pull request with 4 or fewer changes. status: accepted PR was approved for contribution. If it's not already merged, it may be merged on a private branch. topic: dependencies Related to one or more of the game's required internal libraries. topic: mods Related to the creation or use of mods. type: enhancement Involves an enhancement or new feature.

Development

Successfully merging this pull request may close these issues.

9 participants