How to

DISCLAIMER: Work in Progress

Project Inventories can get pretty complicated. Here I will go over a couple of things real quick to help get started.

To start probably the most confusing for people at first is that inventories are not bound to any one world, and worlds are not bound to any one inventory. Inventories can be assigned to as many worlds as you have, and worlds can have as many inventories as you like to give them. Get as creative as you want!

Now if you do decide to assign multiple inventories to one world You will want to players access to /inv get. This command will allow players to switch between inventories assigned to the world they are in. You cannot switch to an inventory if it is not assigned to a world.

Again going with the assumption you have multiple inventories in a world, you will want to look at default-on-world-change in your pjp config file. Every world has a default inventory, which can be set when adding the inventory to a world by adding the flag --default to the command arguments.

/inv add world inv2  --default

default-on-world-change sets whether or not the inventory is changed to the assigned default for that world when teleporting between worlds.

world1=inv1[default],inv2
world2=inv2,inv3[default]

Lets say playerX is in world1 and is using inv2 now with default-on-world-change set to false, if the player teleports to world2, his inventory will remain set to inv2 because it’s assigned to both worlds.

However if default-on-world-change is set to true, players inventory will be set to inv3 because that’s the default assigned inventory for that world.

Another thing that may confuse people at first, is there is a built in inventory called DEFAULT. This inventory cannot be deleted, however can be removed from all worlds. This design is to ensure that no matter what changes are made, there is a inventory to fallback on.

DEFAULT is assigned to all worlds on first install. If you plan on doing a multi-world inventory setup, it’s recommended to remove this inventory from all worlds with newly assigned inventories

Lets go over a simple example, where you only want one separate inventory for each world. For the sake of simplicity we’ll stick with the basic vanilla worlds world, DIM-1 and DIM1.

First we need to create 3 new inventories. You can name them whatever you want, but again simplicity we’ll name them the same as the worlds, they will be added to.

/inv create world
/inv create dim-1
/inv create dim1

OK, now that you have the inventories created, lets assign them to their respected worlds and make them default.

/inv add world world --default
/inv add DIM-1 dim-1 --default
/inv add DIM1 dim1 --default

Now we have a multi-world inventory setup..but we’re not quite done yet because DEFAULT is still assigned to every world. Remembering from before, if default-on-world-change is false, and players are still using DEFAULT, nobody’s inventory is going to change. Changing default-on-world-change to true will help, however, if you don’t plan on using DEFAULT, like in our case, it’s better just to remove it.

/inv remove world DEFAULT
/inv remove DIM-1 DEFAULT
/inv remove DIM1 DEFAULT

Because the other inventories we added were set to default, this should run no problem, however if you skipped that, you will notice that /inv remove fails. You cannot remove the default inventory for a world. No problem, most commands can be run multiple times for safe easy updating. so simple run /inv add again remembering to add the flag --default to it.

Category: Gameplay

Published on Oct 7, 2017

views

stars

watchers

total downloads

Licensed under MIT

Promoted Versions

Members