making a zombie virus, need help.

Started by bolognaguy on

Topic category: Help with modding (Java Edition)

Last seen on 06:31, 21. Jan 2024
Joined Aug 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
making a zombie virus, need help.

in my mod, I want to add a dimension overrun by various zombie types. I also want to introduce a zombie virus feature that makes it so that when hit you get a status effect that when it runs out or you die, it makes you a primitive zombie that later evolves into a special zombie type at random, or if an animal gets infected and transformed it becomes a zombie animal. i just have no clue how to integrate this. I also plan to use only custom mobs for this and do not wish to mess with vanilla zombies.

Last seen on 06:31, 21. Jan 2024
Joined Aug 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
iI forgot to mention this in…
Mon, 08/09/2021 - 20:09

iI forgot to mention this in the post but I would like for it to work on players.

Last seen on 11:52, 29. Sep 2021
Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I think it is feasible to do…
Mon, 08/09/2021 - 20:43

I think it is feasible to do this.
You need first to create a new advancement like so:
advancement

Make sure that it won't show the toast when completed, nor would it announce it in the chat (unless you want that, of course.)

Then add a procedure to this part of the mob triggers:

mob trigger

Then add a procedure block where it applies a new potion effect (Which will be the "Virus") Only to the player (you'll see the procedure below)
Make it so once the potion effect ends, (in the triggers), the player dies. (Change how long the potion stays in the below procedure, the "60" part. It is in ticks, each 20 tick is 1 second)

procedure3

Now add a global procedure, and set it to when player respawns, and add the If player has completed the achievement block, like so:
ifblock

Then for the player being a zombie part, you can't really edit the model of the player, nor the texture afaik with MCreator general capacity, but if that doesn't bother you; you can create a new potion effect, let's call it "ZombiePhase1." This potion will be applied to the player upon respawning, and having done the achievement of getting the virus. Like so:
potionvirus

You can now edit the new "ZombiePhase1" potion however you'd like, giving it triggers that suit your needs, and apply beneficial or bad traits to the player. (Make it so when the potion ends, it reapplies it, so you don't lose the potion effect, as this will be necessary for later on.)

So with this, the player is now a "Zombie." 

 

For the part where you want to randomly evolve the player's Zombie state, simply add a new procedure trigger to the potion effect (The When potion is applied/started trigger) with a random variable that would evolve the player into a new potion effect, let's call it "ZombiePhase2." Of which again you can apply all the traits you want for it. (Making sure that when it ends, it gets reapplied, so you don't lost it; if you want to make more phases.) The procedure we made now that will get triggered by the ZombiePhase1 gets applied potion, will look like so:
procedure

 At number 1: The number 20 should any number you want the potion effect to wait until it gets randomly applied to the player. Keeping in mind that each 20 ticks is 1 second. Therefore if you want the new ZombiePhase2 to be applied after, say, 15 minutes, (or more correctly, randomly within the next 15 minutes), add 18000 instead of 20. (As each 15 minutes is 900 seconds, and 900 * 20 (ticks) = 18000)
You can also see that we added the "Clear all.." block, as we don't want the old potion effect to get removed. This may pose a problem as it will remove any other potion effect the player might have, and I'm not too sure if you can specify which potion effect to remove. You can do more research on that.

At number 2: Simply add in the new potion effect we made "ZombiePhase2" here.

Rinse and repeat for each phase you want, and you have yourself a mutating virus via the use of advancements and potion effects.

As for the part where it will zombify other mobs, add a procedure to this trigger in the Mob's trigger section:
mob trigger

Add a block that will spawn in the new zombified mob. For this, simply create a new mob with the same model as the normal one, but with a zombified texture. Make sure that it doesn't spawn naturally as well.
The procedure will now look like so: (Ignore the player respawns in this procedure, I forgot to remove it)
procedure2

At number 1: just set it for your new zombified mob to spawn.

 

That should be it. If you find yourself stuck and not finding the procedures, you can search for them in the search tab in the procedure window. (or check the templates)

 

 

That should be it, if I missed something or something isn't working as intended. Let me know, I'll try to help out some more.

 

Last seen on 06:31, 21. Jan 2024
Joined Aug 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
thanks for the help, ill put…
Mon, 08/09/2021 - 20:57

thanks for the help, ill put it in my mod soon.