How to make a config file!

Started by DerexXD on Mon, 03/22/2021 - 00:46

Topic category: User side tutorials

Last seen on 20:32, 24. Nov 2021
Joined Jan 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How to make a config file!
Mon, 03/22/2021 - 01:16 (edited)

Yes! It's finally possible and here's a guide on how! This is a guide on how to make a CONFIG, not a guide on Goldorion's file plugin. I'm assuming you already know the basics the self explanatory blocks in the procedure (file tab) say. 

 

Now without further ado...

 

First get Goldorion's file creator plugin: (https://mcreator.net/forum/64639/file-creator-plugin?page=2%2C0) 

Or if you know java, it's just some simple write to file lines 

 

Next, you should start with the creation of a file variable block obviously as if you don't have it in a procedure the file object won't exist. When it asks for directory, here comes the cool part.

 

We're going to concatenate two strings. First, grab the "get the game directory" string block from the "File Manager" procedure tab. Next, grab any empty string block (you can find them in the "text" procedure tab). Then, get a "create text with" block from the "text" procedure tab and then first put in the "get game directory" block then add below it "\config". Be sure that you're creating the file (check the box).

 

Run the game. You should find that your config is in your mcreator workspace directory! (To get here, go to your mcreator project and the minecraft simulated environment is in the "run" folder)

Config file in the run directory

From here, you can input your own values and variables into the config (like if a mob spawns). That part is up to you to do.

 

 

Edited by DerexXD on Mon, 03/22/2021 - 01:16
Last seen on 20:32, 24. Nov 2021
Joined Jan 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
EDIT: USE BACKSLASH NOT…
Mon, 03/22/2021 - 01:16

EDIT: USE BACKSLASH NOT SLASH IM SO SORRY

Last seen on 01:06, 28. Nov 2021
Joined Aug 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Nice tutorial :D However,…
Mon, 03/22/2021 - 16:07

Nice tutorial :D However, instead to write the / yourself, you should use the File separator block, so it will be compatible with all OS.

You could extend your tutorial to explain the JSON blocks (if you understand how they work) because it seems some users don't know how to use it. I

Last seen on 20:32, 24. Nov 2021
Joined Jan 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
ah yes i just wanted to make…
Mon, 03/22/2021 - 20:46

ah yes i just wanted to make a quick one but good idea 

Last seen on 10:48, 13. May 2021
Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Hey man, can you give me a…
Tue, 05/04/2021 - 07:23

Hey man, can you give me a specific example, I still don't understand

Pretty sorry because my English is bad, I'm not from America

Last seen on 20:32, 24. Nov 2021
Joined Jan 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Wdym it's pretty self…
Mon, 05/10/2021 - 02:18

Wdym it's pretty self explanatory. What do you not understand? 

Last seen on 00:50, 28. Nov 2021
Joined Jul 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Is there any way I can read…
Sun, 09/12/2021 - 02:45

Is there any way I can read the files? There doesn't seem to be a way to access the files without overwriting them

Last seen on 04:24, 28. Nov 2021
Joined Jan 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Soo yeah it creates the…
Wed, 09/15/2021 - 12:37

Soo yeah it creates the Config but like now what, I can't edit them since they keep being overwritten and I can't access them since its a Local Variable lol