Getting started with the ContentPack editor
There is some general concepts to understand. If you just want a quick view, jump to the chapter "Open and explore the Vanilla content pack".
General concepts
Stats
Every players and creatures have stats to define how strong, fast and powerful they are. These stats can change with item bonuses or with alterations, using value modifier (e.g. an ice spike can slows down for X seconds using a value modifier of speed). Some elements can use them individually, or in a mixed way, to define for example how much damage a sword hit will do.
- Strength: Increases maximum health and armor.
- Agility: Increases speed.
- Intelligence: Does nothing, just to be used as value modifier.
- Maximum health: The maximum health points.
- Armor: Reduces the amount of damage taken.
- Speed: The movement speed.
Items
Here, clothes make the man. Items can give bonus stats and are the way to have abilities. Weapons have a base ability (left click), and sometimes special ability (space bar), accessories can also have an ability (Q and E). Items can be obtained by harvesting, killing creatures, or crafting.
Elements type
You will have to create various kind of elements, and link elements to each other to set the shape of your content pack. Here is the exhaustive list, with a short description:
- Item: Items are the central interaction elements of the game. They can be of different type: edible, weapon, clothing, a simple resource etc... Some of them are equipable, granting you bonus stats and abilities. They can be obtained by harvesting map elements, killing creatures, or crafting. They are stored in the inventory, with a maximum stack size, acting as weight.
- Creature: Creatures have stats like players, abilities, behaviors, and can drop items on death. They can appear naturally on the map, or appear from a "wave" event, or being summoned by an ability.
- Structure: Static elements of the map, like a tree, a rock, a building. They can be solid (obstacles). They can be harvestable and so, drop items.They also can be destroyed.
- Item craft: A craft available to players, which produces an item and consumes a list of recipes. It has a crafting duration and may requires to be close to a specific structure.
- Item reward: It's a list of items, that will be dropped in some ways: death of a creature, harvest of a structure. Items can have a probability between 0 and 1 to appear.
- Sprite sheet: A sprite sheet must be created for any image that needs to be used (except for item's icons and tiles). It defines the width and height of each frames, and other drawing information. It uses an animation template to know how to animate it and if needed, an equipment offset to know how to position weapons (see below)
- Animation template: Used by sprite sheets to animate them, there is a list of static actions that must be defined depending on the type of element that will uses the sprite sheet.
- Equipment offset: Used by sprite sheets of clothing and weapons to know how to place them between each other.
- Ability set: A list of abilities to be used by creatures.
- Behavior set: The "IA" of creatures, it is made of a list of different behaviors linked to each other by conditions.
- Effect: Any kind of physical thing that can move and interact to entities with alterations. For example, a fire ball thrown by a magic wand, an arrow shoot, or simply the hit of a sword. They are produced by abilities and other ways through "Following element" alterations.
- Tile: A tile of the map, they are 8x8 images, can be animated, solid, or slow down the movement speed.
- Map generator: A procedural map generator, using the perlin noise algorithm. It defines how tiles and structures are generated, using a prioritized list of them, conditioned by heightmaps. Heightmap are parameterizable to obtain different kind of results.
- Ecosystem: Defines "natural" spawning of creatures in the map, structures are used as "flags" to spawn them. Using different structures, you can defines different spawns and thus, create kind of "biomes".
- Game mode: Here we are, game mode is the final element, which defines the rules of a game mode, its map, using a map generator, creature spawning via ecosystem and a list of events (creatures waves...).
Alterations
Alterations are central. They are not "root" elements, but elements use them at many places. Alterations are the way to perform modification to an entity, or do something, of any kind: Apply damage, heal, modify stat, generate an effect or a creature, "bump", stun, modify its SpriteSheet, silence, play a sound, etc...
An alteration has an origin, which inherit from its stats if required, and is applied to a target ("apply to" property). Source and target are implicit depending on the situation. For an ability's alteration, target, self and origin is the same: its user.
Let's take an example with the image below, we take the point of view of the wood bow effect, focusing on the alteration of the "Targets" tab.
Note that the target is not exactly the target at this moment, but it will be when the arrow will collide with it.
The drop-down list "target" is set to "All ennemies", meaning "any enemy colliding with this effect".
The "Apply to" drop-down list is set to Target, sometimes you will want to set it to the origin, for example for a "life stealing" effect.
The type of the alteration is "Instant damage", it will deal damage to the target, according to the "Amount" formula, which depends of the origin's agility stat.
The "Destroy when collide" checkbox is checked, the arrow will be destroyed when colliding with an enemy, if not, it would apply damage every frame of the game, instant damage is not made for that.
Open and explore the Vanilla content pack
Launch the content-pack-editor.jar file to run the editor. The first thing you can do, is to explore the Vanilla content pack itself, on the top left, click on File -> Open, then go to the directory "contentPacks" in the installation directory of the game and open the "Vanilla_1.0.zip" file.
The contentPacks directory is the place for installed and playable content packs, the file name operates as the identification of the content pack, and must respect the format [name]_[major version number].[minor version number].zip, with no special character. For example, "Improved-Vanilla_1.0.zip" is a valid name, but "My Super Pack.zip" is not a valid name, and thus, will not be shown in the content pack selection menu in the game.
It is highly recommended to do not modify and replace the default Vanilla itself, or you will have to re-download the original, or connect to a server with the good version. To avoid mistakes before exploring, first go to File -> Save as... and save it with a different name, for example: "Improved-Vanilla_1.0.zip".
You can now explore the Vanilla content, you may be SPOILED of everything that makes the Vanilla content, if you don't want to, play it first, NOW!
On the left side, you can explore all the elements of the content pack, organized by folders, a right click to this left side allows you to add / remove / rename elements. Open folders, and click on an element to see its content appears in the center panel.
Modify items
You think that the Iron armor is too expensive? On the left side, Go to Items -> Clothing and click on the element (Item Craft) iron_armor. On the recipes list, you can see that it actually requires 20 irons, you can reduce this number, or change the required item, by clicking on it, and typing on the search popup for example "wood". You now have an iron armor made with wood, weird.
You think that the iron armor should boost your movement speed? On the same folder, click on the element (Item) iron_armor, on the "Stats modifiers" list, click on the "Add" button, in the new row, choose the stat "Speed", the operation "additive", and the value you want, 10 for example, which means the character equipped with this armor will move 10 meters per second faster, where one meter is one tile. You now have an iron armor made of wood which boost your speed, super weird.
The wood sword doesn't do enough damage for you? Go to Items -> Weapons -> Wood sword and click on the element (Item) wood_sword. On the "Base ability" part, you can see in the alteration list that the ability produces the effect "wood_sword_hit", so open it, it is placed in the same folder on the left side (smart, right?). Effect's definition is separated into different tabs (at the top), open the "Targets" tab, this tab defines which alteration is applied to which type of target when the effect collides with this target (usually a creature, or another player). There is only one alteration here, which deals damage to any enemy hit, click on the value of the "amount" and change the base value, for example "100". Now the wood sword is the strongest weapon, ultra weird.
Modify creatures
Fire dragons are too hard to kill? Go to Creatures -> Bosses -> Fire dragon and click on the element (Creature) fire_dragon, and in the "Stats" part, reduce the Strength value to zero, which will fix his maximum health to 100 and his armor to 0. negative values are allowed to give less than 100 health points.
Bored of running after these vanishing pixies ? Go to Creatures -> Pixie and click on the element (Behavior Set) pixie, this is the behavior, the "AI", of the creature. It is made of a list of behavior, that the creature will follow. When just spawned, the creature will follow the first behavior of the list (at the top of the list), so for the example of the pixie, the default behavior is "Wander". these behaviors have a list of "Change condition", when a change condition is respected, the creature will switch to the behavior selected in this change condition. You can see in the "Wander" behavior that, if the closest enemy is at a distance less than 12, then the creature will switch to the "Get away" behavior. Remove this boring condition by clicking on the big red cross on the condition area. Now he will only get away when you are already dealing damage to him, cruel.
Note : There is actually a bug if you change the "Type" of the behavior, you will have to re-select it from every change conditions where it is referenced into. The red colorization on the left side will help you to see if the element is valid or not. This kind of bug also applies to items and structures.
Not finished yet!
This document will be finished soon!
Get Pixurvival
Pixurvival
A pixelized top-down mega sandbox. Play or create solo / cooperative survival, team battle, and more !
Status | In development |
Author | SharkHendrix |
Genre | Survival |
Tags | Crafting, Creative, Game engine, Multiplayer, Pixel Art, Retro, Sandbox, Team-Based, Top-Down |
Languages | English, French, Polish |
Accessibility | Configurable controls |
More posts
- [Changelogs] Alpha 14bJul 06, 2024
- [Changelogs] Alpha 14May 31, 2024
- [Hotfix] Alpha 13bMar 09, 2023
- [Changelogs] Alpha 13Feb 28, 2023
- [Changelogs] Alpha 12C - The voodoo dollApr 17, 2021
- [Hotfix] Alpha 12bFeb 21, 2021
- [Changelogs] Alpha 12 - Chests & Factories!Feb 21, 2021
- [Changelogs] Alpha 11 - Custom soundsFeb 04, 2021
- [Changelogs] Alpha 10Jan 31, 2021
- [Changelogs] Alpha 9Jan 24, 2021
Leave a comment
Log in with itch.io to leave a comment.