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

DynRPG whitelist + easyrpg_raw command #3137

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

jetrotal
Copy link
Contributor

@jetrotal jetrotal commented Oct 30, 2023

Whitelist selected dynRPG commands, so people can use them without enabling the dynRPG plugin.
image


Invoke a command using raw input, similar to how maniacs patch raw work.
easyRPG raw syntax:

@easyrpg_raw 10110, "test", [1,2,3,4,V1],1 
//Message box
@easyrpg_raw $ShowMessage, T1, [1,2,3,4,V1],1
//Also Message box

@Ghabry
Copy link
Member

Ghabry commented Oct 30, 2023

We need to parse deeper

grafik

@Ghabry
Copy link
Member

Ghabry commented Oct 30, 2023

The crossover nobody asked for

grafik

@Ghabry
Copy link
Member

Ghabry commented Oct 30, 2023

btw that "frame pushing" looks like a safe solution for this Call Command thing of Maniacs. Is this event command hard to implement?

@jetrotal
Copy link
Contributor Author

btw that "frame pushing" looks like a safe solution for this Call Command thing of Maniacs. Is this event command hard to implement?

https://jetrotal.github.io/CSA/#MNC%20|%20Call%20Command
image

It's similar but uses an array of variables in sequence for the arguments

@Ghabry
Copy link
Member

Ghabry commented Oct 30, 2023

That PR is kinda the wrong location for this, so one final question before we move this maybe somewhere else:

I think that CSA example needs more permutations and a 3rd argument to figure out how this works. E.g.

@cmd 1, "", .args v[2], 3 gives parameters: 0, 1, 2, 3. How is v[2] encoded? o_O

@jetrotal
Copy link
Contributor Author

jetrotal commented Oct 30, 2023

@Ghabry I also set up a collection of useful constants, that came from destinyScript. Those could be useful for parsing common values:
image

made in two formats, the second one is a Map, I guess that's the one that would work with current code:
https://www.diffchecker.com/YAS7V0Mi/

copy the text at the bottom of the page.

@jetrotal
Copy link
Contributor Author

image
image

@jetrotal
Copy link
Contributor Author

jetrotal commented Nov 1, 2023

image

@jetrotal jetrotal force-pushed the dynRPG-WhiteList branch 7 times, most recently from d2be8f8 to 5fd9447 Compare November 1, 2023 17:23
@jetrotal jetrotal force-pushed the dynRPG-WhiteList branch 2 times, most recently from 5660b7f to 1b99aff Compare November 6, 2023 20:26
@jetrotal
Copy link
Contributor Author

jetrotal commented Nov 6, 2023

Hey guys, I removed a lot of repeated code, and included some functions we already have in Utils.

I think this is good enough for a working raw command interpreter.
I wanted to break it into a multi-line command interpreter, but Ghabry suggested writing in the future an eval command for that
(maybe easyrpg_eval "prefix", "string" ?)

Other things that may be important for this in the future is setting up the "constants.h" content as
auto-generated entries from liblcf.


As soon as this this pr is aproved, I can rework #3124 as you guys asked.

@jetrotal
Copy link
Contributor Author

jetrotal commented Nov 11, 2023

Ok, multi-line is done.
I had to add something similar to the "," on the part of the code that parses text to arg[n]:
It parses ';' as ',' too with an extra input in case of being "easyrpg_raw". I hope that's not too invasive...

image

@fdelapena fdelapena requested a review from Ghabry November 20, 2023 20:05
@fdelapena fdelapena added the Awaiting Rebase Pull requests with conflicting files due to former merge label Nov 20, 2023
@Ghabry
Copy link
Member

Ghabry commented Nov 20, 2023

I talked with Jetrotal: I will help getting this in when I'm done with my remaining issues for 0.8.1 milestone. Likely in one or two weeks.

My current plan is to split it into two PRs. One for the DynRPG refactor, one for easyrpg_raw. Makes reviewing this a bit easier :)

@Ghabry Ghabry added this to the 0.8.1 milestone Nov 22, 2023
@Ghabry
Copy link
Member

Ghabry commented Nov 22, 2023

Would you mind when I swap the argument order to:

$ControlVars "A", 1, 0, 3, 4, 6, 8

Makes "indent" the 2nd parameter and the numeric list everything from 3rd to the end. Makes the parsing simpler and is not ambigious.

@jetrotal
Copy link
Contributor Author

Would you mind when I swap the argument order to:

$ControlVars "A", 1, 0, 3, 4, 6, 8

Makes "indent" the 2nd parameter and the numeric list everything from 3rd to the end. Makes the parsing simpler and is not ambigious.

hm... I made it this way to let people ignore the indent parameter, and read each type of parameter by group

@jetrotal
Copy link
Contributor Author

jetrotal commented Nov 22, 2023

@Ghabry asked for me to post the event2string command I was working on, here it is:
https://gist.github.com/jetrotal/e8b35118b94ddbe8ee10885e220f706c
image

@Ghabry Ghabry removed the Awaiting Rebase Pull requests with conflicting files due to former merge label Jan 4, 2024
jetrotal and others added 14 commits January 4, 2024 15:43
whitelisting easyRPG commands so they can be called even when dynRPG is off.
Invoke a command using raw values, similar to how maniacs patch raw work.
NOTE FIXME PLS.
This makes cleanup of state easier when switching between games.
@easyrpg_raw @ShowMessage, "This is new"
implementation is a bit ugly, need help to clear this
removed repeated code, and overcomplex logic.
Managed to make it work, but the code is a bit messy and its syntax is not very flexible;
Store commands inside a Stringvariable.

//$storeCommands "preffix",[evtType_isVar, evtType, evtId_isVar, evtId, evtPage_isVar, evtPage, targetStrVar_isVar, targetStrVar]

// 2099, "@easyrpg_raw", [1,4, 1,5, 1,6, 1,7], 0;
@fdelapena fdelapena added the Awaiting Rebase Pull requests with conflicting files due to former merge label Jul 2, 2024
@Ghabry Ghabry added the EasyRPG New functionality exclusive to EasyRPG Player label Sep 1, 2024
@Ghabry Ghabry modified the milestones: 0.8.1, 0.8.2 Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Rebase Pull requests with conflicting files due to former merge EasyRPG New functionality exclusive to EasyRPG Player Enhancement
Development

Successfully merging this pull request may close these issues.

3 participants