How to fix a procedure

Started by GreensilverMega on

Topic category: Help with MCreator software

Last seen on 03:11, 10. May 2024
Joined Dec 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to fix a procedure
Sat, 10/28/2023 - 16:34 (edited)

     So I am working on a mod that has nukes but the explosion size is to small and it caps at 100 I think. So I used structures instead and it loads but it makes the block when I right click in the corner when I want the explosion in the middle. I need help I think I have something but I don't think it will work but ill try

 

 

EDIT: so I found some tutorial on how to make a sphere for an explosion but NOW IT DOES NOT WORK! I can't select it on the when block right clicked it is so annoying :( I will never make a mod because you guys made everything so COMPLICATED to program a big explosion but nope it caps out at 100 so I can't THANKS ALOT. You gotta make us go on a wild goose chase JUST to find how to make actual good explosions.

Edited by GreensilverMega on Sat, 10/28/2023 - 16:34
Last seen on 11:41, 17. May 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Unfortunately, in the world…
Thu, 10/26/2023 - 23:33

Unfortunately, in the world of coding, it can occasionally take more than a single tutorial to make a giant explosion. Please don't blame the people who made an elaborate API specifically to make modding more approachable to beginners, when you can't immediately figure out how to do something extremely complicated.

If you actually want help with something, yelling at people is not a great way to get it. That being said, the reason explosion size has a cap is because updating large amounts of blocks at the same time can cause lag spikes and other issues. If you want a method to actually target blocks in a spherical shape in a way that won't break everything, it's going to involve math, and it's going to require patience. 

 

Last seen on 03:11, 10. May 2024
Joined Dec 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I tried everything even…
Sat, 10/28/2023 - 16:08

I tried everything even making the air filled structure at half the size and tried rotating it but then im always missing one corner

and not just that I still need a way for a mushroom cloud or shockwave of some sort to appear for a second or two so yeah it does not work.

Last seen on 03:11, 10. May 2024
Joined Dec 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
not just that I been working…
Sat, 10/28/2023 - 16:11

not just that I been working on this for a long while now and all I can get is a small cube explosion that is off centered :(

Last seen on 11:41, 17. May 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
The off centered issue is a…
Sat, 10/28/2023 - 16:26

The off centered issue is a pretty straightforward fix: structures load in from the bottom northwest corner, so you need to subtract half of the structure's height/length/width from the x/y/z value when you load it in if you want the position you give it to be the center instead of the corner of the structure. 

If you want to get a structure larger than the 48*48*48 limit, you can make multiple smaller structures and assemble them into a larger one. You could, for example, make a 48*48*48 quarter of a sphere, and then divide it into vertical slices that you stack on top of each other and rotate to make a much larger structure- if you delay these by a small amount of ticks, you could reduce some of the lag. Then, if you want a scorched effect or something on the ground, you could run procedures on the edge of the sphere that replace solid blocks with blackstone, magma rock, etc. (You can modify the 'check for block in 6*6 box' procedure template to replace blocks instead of checking for them.) 

The explosion/mushroom cloud effect will likely be the hardest part. Since you still want your explosion to damage entities, you could generate non-block breaking explosions in the radius of your larger blast, (though even still, loading lots of explosions in at once will cause lag issues), or make your own procedure to damage and launch things based on proximity to the center of the explosion. (Damaging stuff in a radius is easy and just involves an entity iterator and subtraction, launching things away from the center based on their current position requires some basic trigonometry.) You would probably want to design your own particle effects, as too many particles can also very quickly lag out the game.

Last seen on 03:11, 10. May 2024
Joined Dec 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
well how do I subtract the…
Sat, 10/28/2023 - 16:31

well how do I subtract the half of the structures height length width from x/y/z when I load it in???

also NO matter how many none block breaking explosions I do they always stay in the middle.

ALSO how do I assemble them because I had a 48 size structure then I rotated it by clockwise 180 and then another one rotated by counter clockwise the result is IM MISSING a corner. EVERY time too

Last seen on 03:11, 10. May 2024
Joined Dec 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thats all I got but it still…
Sat, 10/28/2023 - 16:37

Thats all I got but it still leaves one corner out also it is still a cube not a sphere crater of air because it only allows cubes SO how would I even make it anyways

Last seen on 03:11, 10. May 2024
Joined Dec 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
MCREATOR IS SO STUPID IT IS…
Sat, 10/28/2023 - 16:48
MCREATOR IS SO STUPID IT IS THE WORST IDEA EVER MADE BECAUSE YOU CAN NOT MAKE NUKES AND MUCH MORE STUFF LIKE SO MANY PEOPLE GIVE UP ON THERE MOD COMPLETELY BECASE OF THERE LIMIT ON CREATIVITY 
Last seen on 03:11, 10. May 2024
Joined Dec 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
@Mindthemoods   MAKE A…
Sat, 10/28/2023 - 16:55

@Mindthemoods

 

MAKE A TUTORIAL THEN IF YOU KNOW HOW TO DO IT. BECAUSE IM DONE WITH STUPID PEOLE THAT EXPECT OTHER PEOPLE TO KNOW HOW TO THAT STUFF. ITS ANNOYING. I JUST WANTED TO MAKE A MOD THAT APPARENTLY IS IMPOSSIBLE BECAUSE OF MCREATORS ANNOYING PEOPLE I JUST WANTED TO MAKE A MOD FOR MY SERVER THAT HAS NUKES BUT NO YOU HAD TO RUIN THAT CHANCE FOR ME SO NOW IM GIVING UP ON THAT SERVER I GUESS IT WILL BE A MOD ABOUT SWORDS OR SOMETHING INSTEAD YOU ANNOYING RUDE MEANIE

Last seen on 03:11, 10. May 2024
Joined Dec 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
@Mindthemoods JUST PLEASEE…
Sat, 10/28/2023 - 17:02

@Mindthemoods JUST PLEASEE HELPPP INSTEAD OF TELLING ME ALL THOSE COMPLICATED THINGS MAYBE SEND A PICTURE OF A PROCEDURE OR SOMETHING IM NEW TO THIS 

Last seen on 11:41, 17. May 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'm sorry you're frustrated,…
Sat, 10/28/2023 - 17:31

I'm sorry you're frustrated, but for the last time, yelling at people doesn't make them want to help you. Please read MCreator's general publishing guide before you post again, or you're going to get flagged at some point by someone less patient than myself. I don't expect everyone to know how to do things, and if you need help you should ask for it, but you should do so in a way that's specific and polite, not spamming and insulting people for trying to be helpful. Honestly, if you'd just asked instead of yelling, I would've been happy to help.

This is a duplicate post anyways, so you should be able to find similar questions elsewhere in the forum or on a youtube tutorial or whatever. Please stop spamming this topic, either way I will not be responding.

Last seen on 03:11, 10. May 2024
Joined Dec 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I have looked everywhere on…
Sat, 10/28/2023 - 17:35

I have looked everywhere on youtube  there is only old videos and there only the size 100. ALSO im sorry but I have been trying to find how to do this for months alsoo the other post just say to use structure but nothing on how to make them spheres, bigger then the limit, or how to fix it from being off centered I can't find anything it is so annoying so might as well just stop this stupid mod because if I can't make it work then it's a dumb idea. So sorry for being rude

Last seen on 11:41, 17. May 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
...It's alright, everyone…
Sat, 10/28/2023 - 19:11

...It's alright, everyone deserves a second chance. What you're trying to do isn't impossible, it's just going to be kind of complicated, since the game wasn't really designed to handle explosions that big. Seriously though, I've got my own projects to work on, but I'll try my best to give you a basic idea:

You're going to need to use 'Structure Voids' if you want to make a sphere shape. These aren't available in the regular inventory, but you can get them by turning on 'Operator Utilities' in your accessibility options, or by just typing the following command:

/give dev structure_void

Minecraft can only save cube shaped structures, but with structure voids, you can make a lot of different shapes. When you save a structure with structure voids, and then load that structure into the world, any structure voids are replaced with whatever block was already there. If you surround a sphere of air with structure voids, and load it into the world, the air will replace solid blocks, but the structure voids won't, so you'll have a spherical indentation in the ground.

When you're building a structure, you'll want to turn on 'show invisible blocks' in the structure block menu so you can see where the structure voids are. You also might want an external tool like world edit, since making a sphere this big by hand could be really painful.

The purple circles are the actual origin points of the structures- where they actually load into the game. If you want to offset a structure so that it's centered on the point you provide it, you could do a procedure like this:

This procedure takes 5 48*48 structures, each 12 blocks high, and stacks them on top of each other, centered on the coordinates you provide it. Subtracting 24 from the x and z coordinates means the bottom northwest corner, (the origin of the structure), will be offset 24 blocks north and 24 blocks west, putting the center of the structure where you want it.

The Y coordinate then increases by 12 each time, stacking each structure on top of the other after a short delay. This is because loading large structures into the game, even within the 48*48 limit, is very resource intensive, and placing one structure at a time can help reduce lag and visual glitches.

Since you want something much bigger than 48*48, you could use four (or more) 48*48 structures to make an even bigger radius. This would like something like this:

It's the same as the first one, we're still stacking structures on top of each other, but this time we're loading in four 48*48 structures, making the explosion radius 96*96 instead. The first diagram shows how you can rotate and position the same original structure to make a full sphere. In this case, the origin point of each structure is one of the corners of the blast radius, so we offset them by 48, but in different directions since they need to be rotated. This can be kind of hard to get used to, but it's really helpful if you want to make large structures with multiple parts.

Since you want an explosion even bigger than 100*100, you would need even more parts, probably something like nine, (one for the center, one for each of the sides, and one for each of the corners, each with multiple slices stacked on top of eachother), which would be a lot of work, and really difficult to load in, but technically not impossible. At this point, a lot of your explosion would be outside of loaded chunks, which could cause even more problems. I've never really tried something bigger than 96*96, so I'm not totally sure this would work, but it might be worth trying.

For damaging players in a radius, you would use something like this:

The top version is a simpler example that basically just kills anything in a 96*96 cube. If you want a more complicated method, the bottom example calculates the player's distance from the center, then damages them the closer they are to the center. (I haven't tested this, but I've done something similar, it probably works.) Launching the player is more complicated, you can refer to this explanation if you really want to make it work properly, though it you're just killing everything outright, it shouldn't make a difference.

Lastly, something like this can be used to randomly spread blocks, if you want the ground to look scorched. You would want to delay this until after the explosion has finished, so that it actually targets the impact crater:

This is a modified version of the 'check for block in 6*6 box' procedure template that replaces grass blocks at world-surface height with blackstone. (you'd actually want to replace world-surface with ocean-floor, this was a mistake.) If you want a more complex version that does a more randomized, circular shape, you would need something like this:

This does the same thing, using the same procedure template, but also takes height into account, randomizes the chance of replacing blocks, and decreases the chance of changing blocks when targeting the edges and corners of the sphere. 

 

Anyways, hope some of this was helpful. Thanks for the apology, and sorry if I was a too harsh.

 

Last seen on 03:11, 10. May 2024
Joined Dec 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
thanks so much and sorry to…
Sat, 10/28/2023 - 20:21

thanks so much and sorry to bug you. Good luck on your project

Last seen on 03:11, 10. May 2024
Joined Dec 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
also should it have a gap…
Sat, 10/28/2023 - 20:49

also should it have a gap between it?