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

SET_VARIABLE allows only for int, float, string, bool, other variable #214

Open
Jeremi360 opened this issue Apr 25, 2023 · 4 comments
Open
Assignees
Labels
enhancement New feature or request proposal proposal how improve Rakugo RakuScript Rakugo Scripting Dialogue Langue

Comments

@Jeremi360
Copy link
Contributor

Need to fix this we should be able, thanks to how godot is coded,
easy be able to suport any variable type that GDScript supports.

@Jeremi360 Jeremi360 self-assigned this Apr 25, 2023
@Jeremi360 Jeremi360 added enhancement New feature or request RakuScript Rakugo Scripting Dialogue Langue proposal proposal how improve Rakugo labels Apr 25, 2023
@Jeremi360
Copy link
Contributor Author

Our discord discussion stooped on this:

I was thinking that we just update SET_VARIABLE regex to just "(?<lvar_name>{VARIABLE}) = ((?.+)"
And use str_to_var() then var_to_bytes()
But I see that for example there can be problem if some one will try something like Object.new()in rkscript - for that we would need to run somehow gdsript code - I don't have idea how yet. Or maybe there is something different I don't see here ?

this only way I find to execute gdscipt code from string:
https://godotengine.org/qa/339/does-gdscript-have-method-to-execute-string-code-exec-python

@Jeremi360
Copy link
Contributor Author

Jeremi360 commented Apr 26, 2023

@theludovyc I also just realize that our SET_VARIABLE is almost just DEFINE_VARIABLE,
in script is only possible to do x = 2 and x = 3, but can't do x = 2 + 1 or x += 1 or logic in it x = a or b - this is bad!
It means that now for base math and logic user need to add custom regex and it shouldn't be this way.
I just have idea how to handle it, but I need to test it first.

@theludovyc
Copy link
Collaborator

theludovyc commented May 8, 2023

in script is only possible to do x = 2 and x = 3, but can't do x = 2 + 1 or x += 1 or logic in it x = a or b - this is bad

We can think about this for later version. You can make an issue 😊

we will need to convert Rakugo variables to GDScript variables before executing this code.
I just have idea how to handle gdscript code, but I will post code of here it later.

Okay. I have just one question I cannot answer now, it is : if we convert them to gdscript variable how can we access them ?

@Jeremi360
Copy link
Contributor Author

Jeremi360 commented May 17, 2023

We can think about this for later version. You can make an issue 😊

I made new issue #237 for it @theludovyc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request proposal proposal how improve Rakugo RakuScript Rakugo Scripting Dialogue Langue
Projects
None yet
Development

No branches or pull requests

2 participants