Tips and tricks for the new procedure system

Published by Klemen on Sun, 05/06/2018 - 17:44
Tips and tricks for the new procedure system

There have been many questions on MCreator's website on how to use procedure system. We have decided to create a getting started guide for the new procedure system.

We have created a separate wiki page for this purpose. Old event related pages were marked as "legacy" on our wiki, but we will keep them on the website for the users of older MCreator versions.

Many users complained that they can not make things that were possible in event system before. This is not true, however. Just the way how to achieve the same effect is now different. Everything that was possible before is still possible, even with many more options and combinations. This new procedure system is very similar to the one found in Scratch editor. The block system framework we use is called Blockly and is developed by Google. It allows us to make a visual programming experience that was never possible before.

On the procedures wiki page, there are examples of procedures including the explanation of trigger and dependencies. Below, you can see an example of how to make a random possibility condition in the new procedure system.

Random possibility

In this example, we show how to create an if condition that triggers in 70% of the cases. In case it is triggered, the block at x, y, z (these coordinates depend on the trigger that provides actual coordinate values) is removed.

Random possibility of event in the procedure editor

Examples such as the one provided in the citation above and many others can be found on our wiki on the new page dedicated to procedures.

Procedure system wiki page

We will update this wiki page with more examples in the future. If you would like to see a specific example, comment on this post and we will select the best requests and add them to the wiki page. Right now, only some procedures that were most commonly asked are shown. These include examples of how to create conditions that could previously be made using the event condition text box.

Share this on:


Submitted by TDplay on Wed, 06/13/2018 - 15:43

You've seriously opened up the "mod generator" aspect of MCreator. I think it's great how you've integrated the code and the generator - most other programs literally follow what I will call the Vazkii Rule On Mod Generators (because Vazkii said it) - that you only work within a set boundary lest the program frown at you and say "Ni".
I thought code snippets was good, but now procedures (that can have code snippets in :D) really does remove the boundaries, or at least set them as farther out than the world border, and then the snippets of code really destroy the boundaries of this for good!
Congratulations, Pylo, you've pulled it off perfectly again.

Thank you very much for your review of the 1.7.9 update :) With new procedure system, there are really many new options, and we will work to add even more of them in the future updates.

How is possible to make a Random Dungeon Generator with this? i'm planning to do a Random Generated Dungeon with Presetted tiles (like Path, Crossway, Curved way etc) but i don't know how to make those structures randomly generate, can you help me out?
For more contact, Skype:Misterboy64 (italy)

I've been using this system a bit, and I'm impressed by how well it works, and how easy to use it is. Nice job!

So, here's what I'm trying to do right now:
I'm trying to create a simple power system, and a lot of it is working.
So far, I've got a block that uses the systems from the other tutorial to turn input items into output items. I also have a generator that will consume a piece of coal to add 16 to a local "energy" variable.
Where I still need help is: How can I read a local variable of one procedure from a different procedure?
For example, If I have a setup of [generator] [wire] [machine] I'll want to have a energy value in the machine read by the wire, and then the energy value being read by the wire measured by the machine, and consumed when the player presses the 'craft' button. Outside that, I don't think there's any form of Forge Energy implementation yet, but ideally I could use that instead of a normal variable, or at least translate that to or from forge energy.

(cont. 1000 characters is kind of a low limit)

Finally, and unrelatedly, because I haven't talked long enough, am I able to do anything at all involving the ore dictionary?

Even if nothing here is actually possible, there are still about a billion new things that I can do with my mod after this update, so thank you for all the hard work!

I am glad to hear you got a good grip of the new procedure system.

Regarding accessing local variables from another procedure, this is not possible as the variables are local. You can use global variables for this purpose, but right now they are global for all worlds. This will be implemented in the future.

We plan to support both energy system and ore dictionary in future updates. There are two active tickets for both of these requests on our issue tracker:

One more thing, as long as I've got you here, would it be possible to change the new-line character in item's description text to something else? I find myself wanting to put commas in like 50% of item descriptions, and other symbols like '~' or '*' essentially never.

@RaolTheBest: Yes, right now they are global per whole local Minecraft session and get reset when one closes the Minecraft. This is a very big limitation that will be fixed in the upcoming updates, where we will make global variables global, stored per world and even introduce location-specific variables later on too.