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

Script manager #129

Merged
merged 9 commits into from
Jun 8, 2024
Merged

Script manager #129

merged 9 commits into from
Jun 8, 2024

Conversation

white-axe
Copy link
Collaborator

Connections

Description
Adds a "Script Manager" under the Tools menu in the top bar that can be used to extract the scripts from Scripts.rxdata, create Scripts.rxdata from scripts or convert Scripts.rxdata to another format (JSON/YAML/RON).

Testing
I tested that it's capable of extracting the scripts from the following example games from https://www.rpgmakerweb.com/additional-downloads:

  • KNight-Blade (RPG Maker XP)
  • Legionwood (RPG Maker VX)
  • Crysalis (RPG Maker VX Ace)

Checklist

  • Run cargo fmt.
  • Run cargo clippy. If applicable, add:
    • --target wasm32-unknown-unknown -Z build-std=std,panic_abort
  • Run cargo build --release
  • If applicable, run trunk build --release

@white-axe white-axe requested a review from a team as a code owner June 5, 2024 21:12
@Speak2Erase
Copy link
Member

Speak2Erase commented Jun 6, 2024

This is awesome!
It'd be really nice to be able to extract scripts from an rgssad, or the currently loaded project though.

The order of scripts is pretty important as well- Main (or an equivalent) has to be the last loaded script, so it'd be really nice if the tool could order scripts too!

@white-axe
Copy link
Collaborator Author

The extract mode already does try loading the scripts file from the currently loaded project by default. I'll add the ability to select a .rgssad archive and have it look for the scripts file inside the archive automatically, though. As for the ordering of the scripts, I'll make it write the order of the scripts to _scripts.txt in the output folder when extracting and then read _scripts.txt from the input folder when creating.

In the "Extract" and "Convert" parts of the script manager, you can now
select a .rgssad archive. It'll look for a scripts file inside that
archive automatically.
@Speak2Erase
Copy link
Member

@zimberzimber since you requested this feature, I figured you might want to review it?

luminol.zip

This fixes a bug where if the project's script path is set to something
beginning with "Game", the script manager searches for that in the root
directory of the project instead of the Data directory of the project.

The script manager now searches for the project's script path in the
Data directory regardless of what the script path is set to.
Copy link
Member

@zimberzimber zimberzimber left a comment

Choose a reason for hiding this comment

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

seemsgood

@Speak2Erase Speak2Erase merged commit ca524cc into Astrabit-ST:dev Jun 8, 2024
5 checks passed
@white-axe white-axe deleted the scripts branch June 8, 2024 14:55
MolassesLover pushed a commit to MolassesLover/luminol-molasses that referenced this pull request Jul 23, 2024
* feat: implement script manager for RPG Maker XP

* feat: script manager now works for VX/VXA scripts as well

* fix: fix error when extracting every script at the same time

* feat: script manager now supports JSON/YAML/RON

* feat: add scripts conversion to script manager

* chore: clippy

* feat: allow selecting .rgssad archive as scripts file

In the "Extract" and "Convert" parts of the script manager, you can now
select a .rgssad archive. It'll look for a scripts file inside that
archive automatically.

* feat: read/write script order to _scripts.txt

* fix: fix edge case in `get_scripts_from_filesystem`

This fixes a bug where if the project's script path is set to something
beginning with "Game", the script manager searches for that in the root
directory of the project instead of the Data directory of the project.

The script manager now searches for the project's script path in the
Data directory regardless of what the script path is set to.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement RMXP Extractor Into the Editor
3 participants