larsiusprime / polymod

Atomic modding framework for Haxe
MIT License
162 stars 62 forks source link

Add the option of custom append and merge files #75

Closed Cheemsandfriends closed 2 years ago

Cheemsandfriends commented 2 years ago

The option of appending and merging stuff is really cool but, It's kinda strict and kinda bad that it's not customisable the folder. This can add a new customisation to the stuff

Cheemsandfriends commented 2 years ago

Idk how to add more than one commit on more than a file srry

Cheemsandfriends commented 2 years ago

But basically it's just replacing the "_append" and "_merge" with Util.appendFile and Util.mergeFiles

EliteMasterEric commented 2 years ago

Great idea! I will do that cleanup for you soon and merge it.

Thank you so much for contributing!

Cheemsandfriends commented 2 years ago

Great idea! I will do that cleanup for you soon and merge it.

Thank you so much for contributing!

Yeah, Glad you liked the idea! And maybe there should be a Polymod function like "setComplementaryFiles". That would make like instead of the _polymod_meta, _polymod_pack and stuff You could customise the way you want it. So instead of _polymod_meta you could add your custom name like metaFile or something like that lol

Cheemsandfriends commented 2 years ago

I discovered how to make more than One commit, I'll add new stuff

Cheemsandfriends commented 2 years ago

I think that the some old version that worked I think to I think it could work... Maybe Idk Is really optional and maybe it could break. But the customisation of append files and Polymod can work

EliteMasterEric commented 2 years ago

Hey, I'm going to rework how the logic for these config options works overall, but since I want to give you credit for contributing to the project, I'll merge your PR first before doing that.

Thank you very much for helping out! You will be credited in the changelogs for 1.3.1 and I greatly appreciate any further feedback or contributions you may bring to Polymod in the future.

EliteMasterEric commented 2 years ago

@Cheemsandfriends Yeah, it looks like you undid a lot of the file system changes I made so this'll take some work.

EliteMasterEric commented 2 years ago

Okay, I've completed a new system for setting configurable options.

To set the append folder for mods, you have two options:

  1. Add a <haxedef name="POLYMOD_APPEND_FOLDER" value="_append" /> to your project.xml.
  2. Add PolymodConfig.appendFolder = "_append"; to your code somewhere. Make sure it's before you call Polymod.init and before you load any assets.

The functions that were added to set all the values were removed since you can now just set the values directly.

The value defined in code override the values defined in your project XML, which override the defaults.

Cheemsandfriends commented 2 years ago

Okay, I've completed a new system for setting configurable options.

To set the append folder for mods, you have two options:

  1. Add a <haxedef name="POLYMOD_APPEND_FOLDER" value="_append" /> to your project.xml.
  2. Add PolymodConfig.appendFolder = "_append"; to your code somewhere. Make sure it's before you call Polymod.init and before you load any assets.

The functions that were added to set all the values were removed since you can now just set the values directly.

The value defined in code override the values defined in your project XML, which override the defaults.

Sounds good! Sorry for undoning all the stuff, I basically was copying my Polymod version. (Which is an old one but with the removed deprications and stuff) At least I helped the project on something lol