As of Dec 10, 2016
This page still needs heavy grammar check and how stuff are explained will still change as long as this sentence is here!
Missions are generated for worlds and are basically separated as stories per file. That means you can only use missions if a world is already created and has run at least once.
Mission files can be found in to the missions folder in the data folder of a world.
The mission files are in json format.
The folder will be scanned for json files only if world is started.
Any mistake or error in a json file will result in a crash (usually). So be careful when editing them or creating one.
I like this system because you can even make simple story telling without any objectives or rewards, only the a raw story with choices.
I also plan to make a site for users to share their mission files and thus stories.
A structure of a mission file
Name – The title of the story, for example, if its the main DBC saga, it will be “DBC Main Saga”
Description – Describe the story of the mission.
Authors – Add a name for the Author.
Version – Used if a mission file has been edited or changed while its already in use, to avoid crashes and errors on the players end who already progressed in that story. So if changed players will start from the beginning again.
Mods – This is needed when the story only works for specific mods. Currently supported are DBC and NC. If set to NC the mission can only be used with NC.
Settings – These are not used yet, so they are just placeholders for now.
Missions – where the magic happens.
Here come all the missions for this story.
So let me go through this in more detail.
First is the ID of a mission, the most important part.
It must be unique and the first mission must start with 0.
Then the “translated” can be either true or false. if true It basically will translate everything that is present in the localization files. Including from other mods localization files obviously.
“Props” is responsible to have multiple missions under the same mission ID with specific conditions. But I will talk about this after I explained everything else.
Align is currently only a placeholder but it will be the alignment of the mission itself. It will be used for alignment based TP reward. more about this when i get to the rewards.
Title, subtitle and description are self explanatory, these will tell the story of course. So where you are in the story.
Now to some nifty stuff, the objectives and rewards. So the format of these are not that clean just yet, maybe another time i can make it better.
But for now let me explain how they work
There are a few mission types for now, let me list them and explain them in more detail:
kill – Kill an NPC
killsame – kill objective with multiple npcs to spawn (of the same entity)
item – Obtain an item quest
talk – talk to a specific npc objective,
state – be in a specific transformation state (currently the saiyans have the most support in this),
lvl – Have a specific level (Stats)
dim or biome – Go to dimension or biome OR
bim2 or biome2 – BE in a dimension or biome.
The last 2 are not the same cause one needs you to go to it only once and the other needs you to be there to spawn the kill objective’s npcs.
Of course there are a few other types planned, we will see when i get to it again.
Then to the format how an objective should be used.
the first line in the objective needs to be one of the followings. start, next, skip and restart. these are currently precoded so you must use one of these.
Also Objectives if are completed the mission screen will go to the reward without you choosing it, unless people want me to change it.
Now let me explain the format with an example.
For example one of the Saibaman missions. Its important that the parameters of an objective are separated with a semicolon. (One of these → ; ← )
The first is always the objective type. in this example it uses killsame type which will spawn the amount of npcs that are set at once after pressing the currently set start button.
The next ones order is not important. The important part for these are the first character of every parameter. Those will tell the objective parameters type.
Objective parameter types:
– N stands for name which, in this case, represents the entities name. I added a generated txt file to the missions folder that will include all the entity names that should work for your mod setup. That doesn’t mean that they will actually work, only that they should probably work.
– M means in this cause amount. for this objective it means the amount of npcs that will spawn. for another objective type like gather item it can mean the amount of items needed or for the level type the amount of levels needed to complete objective.
– H means health.
– A means attack damage amount.
– P means kill objective protection, but since by default its enabled the only use for this is “Pno” which means the kill objective will allow any NPC of the same type to be accepted.
Other parameters that can be used for kill or killsame objectives are:
– S for spawning message, or
– D for death message.
It even supports sound files, with these parameters:
– O for spawning sound or
– U for death sound.
There can also be transformations for npcs, but i would suggest only use this for a simple kill objectives. Even for those its not really advised just yet, it might be unstable. The parameter for this is T. You can give multiple transformations for 1 npc, set its spawn time in tick, where 20 ticks should be 1 second, and set the power boost amount which the npc will get multiplied with. For example 2 would mean 2 times its current health and attack damage.
Talk to objectives use 3 parameter types.
– N for the entity name,
– G which is the actual thing the npc will tell the player, and
– B which is the button, the player will need to click. And no you cannot have multiple buttons for now. Put those choices to the rewards part.
This part is very important, because here a player can decide on which mission to go to next.
There are a few reward types.
There is the “nothing” which is actually a placeholder until i figure out something else, or not. You should use this if you don’t want to give any rewards obviously.
There are items, training points, alignment and command rewards.
The item reward is a simplified “give item” with limited function. You can give a player any item with meta data with an amount.
With alignment reward you can give or take alignment percentage, like -10 will take 10% and +10 will give 10% to the alignment of a player. (Quick side note: Positive % is good and negative % is bad alignment)
And there is the command where you can actually run a command with it for the player, BUT this uses command block mechanism, SO you need to enable command blocks for this to be used on your server. Both in server.properties and plugin sided configs.
And the last is the training point reward, which is not just a tp giving reward. It actually has a few subtypes.
These can be fix, align, lvl and lvlalign.
Fix means the player will get a fixed amount of tp, obviously. Like, for example, just 10 tp
Align means tp is based on alignment of the player and based on the alignment of the mission the player can get either nothing, half or the full amount that is given to it.
The lvl subtype means the player level multiplied with the amount given, equals the tp gained. If a player is lvl 300, you can multiply it by 2, so they will get 600 tp
and the lvlalign is the combination of the previous 2.
The rewards take more work to format.
Here as well the parameters are separated with semicolons, but the first part is the actual rewards that will be given. Those can have multiple ones and those are separated with two vertical bars, and also every reward can have parameters and those are separated with a exclamation mark.
So let us look into this a little more.
For example this reward:
This will mean that “tp!fix!100||align!-10” these are the rewards, “jinryuujrmcore.missionSys.Evil” will be the Name of the reward button which in this example uses the “translated” option as true and the last one the “11” will be the ID of the next mission the player can go to.
Then to the rewards.
The rewards are separated with the 2 vertical bars, so we get 2 rewards. “tp!fix!100“ and “align!-10“.
Then the as I said before the reward parameters are separated with an exclamation mark. first parameter tells us that it is a tp giving reward, the second parameter in this case is the subtype which is fix for fixed amount, that means the tp reward will be a fix amount and the last parameter is the amount of the tp given.
The other reward is an alignment modifier which has only 1 additional parameter and that is the percentage amount which the player’s alignment will be changed. In this case -10 to the current amount.
Here is an example of an item reward how it looks like:
In this case there are only 2 params the type and the item data.
The item data first has the name of the item, then if you want to give it a specific meta data number write for example “::1” then separated with a comma at the end is the amount of the item that will be given.
Only if you don’t know blocks are items in this case too and for example the wool blocks have meta numbers and for that the item reward could look like this:
“item!minecraft:wool::3,64” for 64 Light blue wool blocks.
How to have multiple mission under 1 mission id.
And now the thing that I said I will explain after i talked about everything else, the props.
So with this you can transform the mission based on some conditions to another but still keep the mission id.
Currently the following conditions are supported: Race and Class. For Naruto c, Clans.
For dbc races you just have to type in human, saiyan, half-saiyan, namekian and arcosian.
Make note that half-saiyans are considered saiyans here to make it simple but half-saiyans are not saiyans.
For dbc classes you can use MartialArtist, Warrior and Spiritualist.
For Naruto c clans are Clanless, Hyuuga and Uchiha for now.
Here is an example from the dbc main mission file:
You can see that now everything has more values.
The format is important or it will crash. If you have 2 conditions everything must be 2 to always have a match for the conditions.
In this case we change the mission objective for the saiyan race to have the state objective.
Where by default if the conditions not match, there will be only a skip button, basically for everyone else who are not saiyans.
Also for conditions races are prioritized over classes, but later I want to add more conditions for prop, like saiyans who are warriors and such.
And alignment condition will be added sometime as well, like good, neutral or evil.
Don’t forget that this is a json file. That means if the files scanned and there is something out of place, (like missing commas, brackets or Quotation marks) the file either won’t load or minecraft will simply crash (servers as well).
So be careful and watch closely to not make any mistakes, because it’s not always easy to find the problem.