ZenScript
ZenScript copied to clipboard
Extension Fails To Detect Scripts Folder
Hi there! I am having an issue whereby this extension refuses to detect that I have the scripts folder open as my workspace:
Not sure what else to do from here - I've tried running VSCode with administrator privileges, and that .minecraft folder setting appears to no longer exist...
Seems the extension cannot find .zsrc file. That's the key of most features provided by this extension.
I'm still somewhat of a ZenScript newbie - this is my first time ever hearing of .zsrc files! Is there any good resource to go to that explains their purpose? I find a lot of ZS documentations to be somewhat..difficult compared to standard programming documentation.
zsrc
is a file format generated by Probe, and only used by this extension to provide some advanced features.
The purpose of generating such a file is to dump information from the game to the disk, so that information in game can be used without launching Minecraft every time you want to write ZS scripts.
For example, items are only accessible in game. If you want to add a recipe to, for example, <minecraft:diamond>
, you must find its id out first(using /ct hand
), and put it in script(as arguments of functions). But if we can dump information of all items out, then the extension can know what item exist in this modpack. With the information provided, auto completion for items becomes possible.
(Preview image two years ago)
If zsrc
file is not found, all completion features are disabled, because the extension has no way to know what exists in game. But basic features still work, like code highlight and priority tree. But the core feature of this extension is to provide auto completion to ZenScript, so Probe is recommend(And easy to use. The only thing you need to do is to put the mod in mods folder, and launch the game once, then zsrc file will be generated in scripts folder).
ZenScript is actually not well-documented compared to other programming languages. A good way to learn ZenScript is to read scripts written by other modpackers(learn by example). Most modpacks follow this pattern: create one file for each mod and modify recipes of that mod in the file. SevTech creaters used another pattern: they write ZenScript like Java, taking great advantage of classes and callbacks in this language.
Wow, thank you for explaining all this with such clarity! This will definitely aid the development process of this modpack I'm working on.
Hi Yesterday,
After generating the .zsrc file, the plugin works as expected. Should I close the issue now, or would you prefer it remain open as a reminder to work on some things?
Thanks for your time!
Just keep it open. Waiting for a reproducible example when others meet the same problem :)
Brittank88 [email protected] δΊ2021εΉ΄1ζ19ζ₯ε¨δΊ δΈε1:37ειοΌ
Hi Yesterday,
After generating the .zsrc file, the plugin works as expected. Should I close the issue now, or would you prefer it remain open as a reminder to work on some things?
Thanks for your time!
β You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Yesterday17/ZenScript/issues/40#issuecomment-762613104, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACCEFLRRQ7SGGTM4HSTXMSTS2ULAXANCNFSM4WAI7DWA .
Hey!
I'm having this same issue, but when I put the "probe" folder in my mods folder it does not generate the .zsrc file. what do I do?
@asdfghjkl403622 Could you please describe how did you use probe and this extension step by step?
@Yesterday17 I suggest you change the message a little. (Maybe even hint that a mod is missing)
@jeengbe sure.. the hint now seems confusing
I too was left wondering what to do with the Probe mod. You might want to include some quick instructions on what to do with the Probe mod.
ie:
- Download latest release .jar to your packs mod folder.
- Start Minecraft and load into or create a world.
- ....
- Exit Minecraft, VS Code plugin should now work.
Hello,
I am trying to figure out what went wrong. I used the mod probe
to create the file .zsrc
which is in the scripts folder. My workspace is a folder where it contains resource pack
, mods
, scripts
so on and on. It looks like the autocompletion feature is not working. I've run a simple test on this.
Can I get more details on how it works? like does the VSCode have to have a workspace which is within the scripts folder, not the root of the Minecraft directory?
edit:
I got it working by detecting the file .zsrc
. It can be either within the root of the directory where it contains a scripts folder and other folders... OR it can be within the Scripts folder. There is one issue, the autocompletion doesn't show up for any items???