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

Extension Fails To Detect Scripts Folder #40

Open
Brittank88 opened this issue Jan 13, 2021 · 12 comments
Open

Extension Fails To Detect Scripts Folder #40

Brittank88 opened this issue Jan 13, 2021 · 12 comments
Labels
help wanted Extra attention is needed

Comments

@Brittank88
Copy link

Hi there! I am having an issue whereby this extension refuses to detect that I have the scripts folder open as my workspace:
image
image

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...

@Yesterday17
Copy link
Owner

Yesterday17 commented Jan 13, 2021

Seems the extension cannot find .zsrc file. That's the key of most features provided by this extension.

@Yesterday17 Yesterday17 added the help wanted Extra attention is needed label Jan 13, 2021
@Brittank88
Copy link
Author

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.

@Yesterday17
Copy link
Owner

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.

e32b924c9cb35537d434d35a14b9ba66510429cb
(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.

@Brittank88
Copy link
Author

Wow, thank you for explaining all this with such clarity! This will definitely aid the development process of this modpack I'm working on.

@Brittank88
Copy link
Author

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!

@Yesterday17
Copy link
Owner

Yesterday17 commented Jan 19, 2021 via email

@asdfghjkl403622
Copy link

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?

@Yesterday17
Copy link
Owner

@asdfghjkl403622 Could you please describe how did you use probe and this extension step by step?

@jeengbe
Copy link

jeengbe commented Feb 14, 2021

@Yesterday17 I suggest you change the message a little. (Maybe even hint that a mod is missing)

@Yesterday17
Copy link
Owner

@jeengbe sure.. the hint now seems confusing

@cpriest
Copy link

cpriest commented Jun 25, 2021

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:

  1. Download latest release .jar to your packs mod folder.
  2. Start Minecraft and load into or create a world.
  3. ....
  4. Exit Minecraft, VS Code plugin should now work.

@Xelbayria
Copy link

Xelbayria commented Oct 15, 2022

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???

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

6 participants