Knuckle Cracker

Particle Fleet => Feedback, Features, and Suggestions => Topic started by: GoodMorning on February 13, 2017, 09:39:34 PM

Title: [Suggestion] PRPL Console
Post by: GoodMorning on February 13, 2017, 09:39:34 PM
PRPL would be significantly easier to learn and use with a console, where we might (attempt to) run commands immediately.

Currently, we need to leave the editor, create a tiny, only-used-once script, surround it in once commands, recompile (potentially resetting something you want to debug), add a Core, apply the script, run until the bug comes up...

With a console, we could potentially type "X Y 3 0 GetUnitsInRange" to find the UID of the Emitter, or quickly run "512 'Interface.prpl' 'Target' GetScriptVar" to find out what a script is doing.

This would also greatly simplify the learning of PRPL (faster, more specific feedback on their scripts, easily seen effects), and aid people who want to use it only in setting up a map (for example, circles drawn with SetLandBulk).

The output of this could go in the trace, along with (perhaps inevitable) compilation errors for the mini-script typed.

This would need to call upon the PRPL compiling code with user-input strings, to run exactly once. The console would require its own stack, but many commands would not need to be implemented (anything referring to "Self" would need to raise an error in the script.)
Title: Re: [Suggestion] PRPL Console
Post by: Nicant on February 14, 2017, 09:13:10 PM
Support!
Title: Re: [Suggestion] PRPL Console
Post by: kajacx on March 01, 2017, 02:48:18 PM
Great idea, my scripts usually start with 30 lines of commented code because I was testing some functions. The question is what to do with the Self command (probably compilator error or compilation warning and push -1 to stack) or how to handle variables.

Actually you could just have a special variable pool, clearable with ClearLocals, that would work (I think).

Also it would be usefull to see unit's UID when you mouse over it, so that you can run commands on it directly from this console.
Title: Re: [Suggestion] PRPL Console
Post by: GoodMorning on March 01, 2017, 06:58:59 PM
The UID-on-mouseover has an independent suggestion thread already, and PRPL Cores now show UID when selected in-editor. See here (http://knucklecracker.com/forums/index.php?topic=23058.msg155214#msg155214) for my workaround.

I was thinking of something similar w.r.t. variables, given that it's just another stack to work on. Also in map setup, it would be useful for Cores which need to point to specific other Cores and for setting up globals.