### Example config.json Structure Source: https://puffish.net/skillsmod/docs/creators/configuration/files/config This is an example of the config.json file, showing the structure for version, show_warnings, and categories. ```json { "version": 3, "show_warnings": true, "categories": [ "combat", "mining" ] } ``` -------------------------------- ### Example connections.json Structure Source: https://puffish.net/skillsmod/docs/creators/configuration/files/connections This example shows the basic structure of the connections.json file, which is an array of pairs. Each pair is an array of two skill IDs representing a connection. ```json [ ["skill_1", "skill_2"], ["skill_3", "skill_1"] ] ``` -------------------------------- ### Skills JSON Structure Example Source: https://puffish.net/skillsmod/docs/creators/configuration/files/skills This example demonstrates the structure of the skills.json file, showing how skills are defined with their x, y coordinates, definition ID, and root status. Use the editor for modifications. ```json { "skill_1": { "x": 0, "y": 32, "definition": "definition_1", "root": true }, "skill_2": { "x": 64, "y": 16, "definition": "definition_2", "root": true }, "skill_3": { "x": -16, "y": 0, "definition": "definition_2" } } ``` -------------------------------- ### Get Server Source: https://puffish.net/skillsmod/docs/creators/configuration/calculations/prototypes/built-in/world Retrieves the `minecraft:server` prototype associated with the world. ```APIDOC ## Get Server ### Description Retrieves the `minecraft:server` prototype associated with the world. ### Operation `get_server` ``` -------------------------------- ### Points Reward Example Source: https://puffish.net/skillsmod/docs/creators/configuration/rewards/built-in/points Grants a player 3 points in the 'example:phantom' category for each unlocked skill. ```json { "type": "puffish_skills:points", "data": { "category": "example:phantom", "points": 3 } } ``` -------------------------------- ### Check Entity Tag for Experience Source: https://puffish.net/skillsmod/docs/creators/configuration/calculations/operations/built-in/has-tag This example demonstrates how to use the 'has_tag' operation to award experience only when a killed entity has the 'example' tag. It converts the killed entity to an entity, checks for the tag, and assigns experience accordingly. ```json { "type": "puffish_skills:kill_entity", "data": { "variables": { "exp_value": { "operations": [ { "type": "get_killed_living_entity" }, { "type": "as_entity" }, { "type": "puffish_skills:has_tag", "data": { "tag": "example" } }, { "type": "switch", "data": { "true": 5, "false": 0 } } ] } }, "experience": "exp_value" } } ``` -------------------------------- ### Switch Operation Example for Mining Stone Source: https://puffish.net/skillsmod/docs/creators/configuration/calculations/operations/built-in/switch This example demonstrates how to use the switch operation to award 5 experience points when a player mines stone. It tests if the mined block is stone and assigns 5 experience if true, otherwise 0. ```json { "type": "puffish_skills:mine_block", "data": { "variables": { "exp_value": { "operations": [ { "type": "get_mined_block_state" }, { "type": "puffish_skills:test", "data": { "block": "stone" } }, { "type": "switch", "data": { "true": 5, "false": 0 } } ] } }, "experience": "exp_value" } } ``` -------------------------------- ### Test World Operation Example Source: https://puffish.net/skillsmod/docs/creators/configuration/calculations/operations/built-in/test-world This example demonstrates how to use the test world operation to check if the player is in the Nether. If the condition 'is_nether' is true, the player receives 5 experience points. ```json { "type": "puffish_skills:kill_entity", "data": { "variables": { "is_nether": { "operations": [ { "type": "get_player" }, { "type": "get_world" }, { "type": "puffish_skills:test", "data": { "dimension": "minecraft:the_nether" } } ] } }, "experience": [ { "condition": "is_nether", "expression": "5" } ] } } ``` -------------------------------- ### Example category.json Configuration Source: https://puffish.net/skillsmod/docs/creators/configuration/files/category This JSON object demonstrates how to configure general properties for a category, including title, icon, background, and unlock behavior. ```json { "unlocked_by_default": true, "exclusive_root": true, "title": "Something", "icon": { "type": "item", "data": { "item": "dirt" } }, "background": "textures/gui/advancements/backgrounds/stone.png" } ``` -------------------------------- ### Experience Configuration Example Source: https://puffish.net/skillsmod/docs/creators/configuration/files/experience Defines experience required per level using an expression and configures experience gain from killing entities, including anti-farming measures. ```json { "experience_per_level": { "type": "expression", "data": { "expression": "min(level ^ 1.432 + 10, 200)" } }, "sources": [ { "type": "puffish_skills:kill_entity", "data": { "variables": { "dropped_xp": { "operations": [ { "type": "get_dropped_experience" } ] }, "max_health": { "operations": [ { "type": "get_killed_living_entity" }, { "type": "get_max_health" } ] } }, "experience": "dropped_xp + max_health / 20", "anti_farming": { "limit_per_chunk": 15, "reset_after_seconds": 300 } } } ] } ``` -------------------------------- ### Get Player's Luck Attribute Source: https://puffish.net/skillsmod/docs/creators/configuration/calculations/operations/built-in/get-attribute This example demonstrates how to get the 'generic.luck' attribute of a player and use its value to modify experience drops. It first gets the player, converts them to a living entity, retrieves the attribute instance, and then gets its value. ```json { "type": "puffish_skills:kill_entity", "data": { "variables": { "luck_value": { "operations": [ { "type": "get_player" }, { "type": "as_living_entity" }, { "type": "puffish_skills:get_attribute", "data": { "attribute": "generic.luck" } }, { "type": "get_value" } ], "fallback": 0 }, "dropped_experience": { "operations": [ { "type": "get_dropped_experience" } ] }, }, "experience": "dropped_experience + luck_value * dropped_experience" } } ``` -------------------------------- ### Test Item Operation Example Source: https://puffish.net/skillsmod/docs/creators/configuration/calculations/operations/built-in/test-item This example demonstrates how to use the test item operation to award experience based on the tool used. It checks if the mined block was done with a golden pickaxe and awards 5 experience if true, otherwise 0. ```json { "type": "puffish_skills:mine_block", "data": { "variables": { "exp_value": { "operations": [ { "type": "get_tool_item_stack" }, { "type": "get_item" }, { "type": "puffish_skills:test", "data": { "item": "golden_pickaxe" } }, { "type": "switch", "data": { "true": 5, "false": 0 } } ] } }, "experience": "exp_value" } } ``` -------------------------------- ### Get Player Score from Objective Source: https://puffish.net/skillsmod/docs/creators/configuration/calculations/operations/built-in/get-score This snippet demonstrates how to retrieve a player's score from the 'example' objective. It's used within a larger JSON structure to influence game mechanics like experience drops. ```json { "type": "puffish_skills:kill_entity", "data": { "variables": { "score": { "operations": [ { "type": "get_player" }, { "type": "as_entity" }, { "type": "puffish_skills:get_score", "data": { "objective": "example" } } ], "fallback": 0 }, "dropped_experience": { "operations": [ { "type": "get_dropped_experience" } ] }, }, "experience": "dropped_experience * score*" } } ``` -------------------------------- ### Command Reward: Grant Item on Unlock Source: https://puffish.net/skillsmod/docs/creators/configuration/rewards/built-in/command This example shows how to give a player an item when a skill is unlocked using the immediate command. This is suitable for non-revocable rewards. ```json { "type": "puffish_skills:command", "data": { "command": "give @s minecraft:diamond" } } ``` -------------------------------- ### Test Damage Type Example Source: https://puffish.net/skillsmod/docs/creators/configuration/calculations/operations/built-in/test-damage-type This example demonstrates how to use the 'test damage type' operation to award experience only when an entity is killed by a projectile. It checks the damage type and switches the experience value accordingly. ```json { "type": "puffish_skills:kill_entity", "data": { "variables": { "exp_value": { "operations": [ { "type": "get_damage_source" }, { "type": "get_type" }, { "type": "puffish_skills:test", "data": { "damage_type": "#is_projectile" } }, { "type": "switch", "data": { "true": 5, "false": 0 } } ] } }, "experience": "exp_value" } } ``` -------------------------------- ### Test Stat Operation Example Source: https://puffish.net/skillsmod/docs/creators/configuration/calculations/operations/built-in/test-stat This example demonstrates how to use the test stat operation to check if the player has accumulated exactly 5 jumps. If the condition is true, 5 experience is awarded; otherwise, 0 experience is awarded. ```json { "type": "puffish_skills:mine_block", "data": { "variables": { "exp_value": { "operations": [ { "type": "get_stat" }, { "type": "puffish_skills:test", "data": { "stat": "minecraft.custom:minecraft.jump" } }, { "type": "switch", "data": { "true": 5, "false": 0 } } ] } }, "experience": "exp_value" } } ``` -------------------------------- ### Power Reward Example Source: https://puffish.net/skillsmod/docs/creators/configuration/rewards/origins-add-on/power This JSON configuration grants the 'sprint_jump' power from Origins when the associated skill is unlocked. ```json { "type": "puffish_skills_origins:power", "data": { "power": "origins:sprint_jump" } } ``` -------------------------------- ### Get Effect Example Source: https://puffish.net/skillsmod/docs/creators/configuration/calculations/operations/built-in/get-effect Retrieves the 'luck' effect level from a player and uses it to modify experience gained from dropped experience. If the player does not have the 'luck' effect, the luck_level defaults to 0. ```json { "type": "puffish_skills:kill_entity", "data": { "variables": { "luck_level": { "operations": [ { "type": "get_player" }, { "type": "as_living_entity" }, { "type": "puffish_skills:get_effect", "data": { "effect": "luck" } }, { "type": "get_level" } ], "fallback": 0 }, "dropped_experience": { "operations": [ { "type": "get_dropped_experience" } ] }, }, "experience": "dropped_experience + luck_level * dropped_experience" } } ``` -------------------------------- ### Skill Definition Example Source: https://puffish.net/skillsmod/docs/creators/configuration/skill This JSON object defines a skill with its coordinates, a reference to its definition, and its root status. Use the editor for manual configuration. ```json { "x": 0, "y": 32, "definition": "definition_1", "root": true } ``` -------------------------------- ### Advancement Frame Example Source: https://puffish.net/skillsmod/docs/creators/configuration/appearance/frame Uses the 'task' advancement frame type for a skill. This is a simple way to integrate skills with vanilla advancement visuals. ```json { "type": "advancement", "data": { "frame": "task" } } ``` -------------------------------- ### Craft Bread Experience Source: https://puffish.net/skillsmod/docs/creators/configuration/experience-sources/built-in/craft-item Awards 3 experience to the player when bread is crafted. This example shows how to configure the source for a different item. ```json { "type": "puffish_skills:craft_item", "data": { "variables": { "is_bread": { "operations": [ { "type": "get_crafted_item_stack" }, { "type": "puffish_skills:test", "data": { "item": "minecraft:bread" } } ] } }, "experience": [ { "condition": "is_bread", "expression": "3" } ] } } ``` -------------------------------- ### Smelt Iron Ingot for 5 Experience Source: https://puffish.net/skillsmod/docs/creators/configuration/experience-sources/built-in/smelt-item This example demonstrates how to configure the Smelt Item Experience Source to award 5 experience points each time a player smelts an iron ingot. It uses a variable 'is_iron_ingot' to check if the smelted item is an iron ingot. ```json { "type": "puffish_skills:smelt_item", "data": { "variables": { "is_iron_ingot": { "operations": [ { "type": "get_smelted_item_stack" }, { "type": "puffish_skills:test", "data": { "item": "minecraft:iron_ingot" } } ] } }, "experience": [ { "condition": "is_iron_ingot", "expression": "5" } ] } } ``` -------------------------------- ### Get Item Operation Source: https://puffish.net/skillsmod/docs/creators/configuration/calculations/prototypes/built-in/item-stack Retrieves the `minecraft:item` prototype associated with this item stack. ```APIDOC ## Get Item ### Description Retrieves the `minecraft:item` prototype associated with this item stack. ### Operation `get_item` ``` -------------------------------- ### Command Reward: Grant and Revoke Advancement Source: https://puffish.net/skillsmod/docs/creators/configuration/rewards/built-in/command This example demonstrates granting and revoking an advancement using unlock and lock commands. It's recommended for items/effects that can be revoked. ```json { "type": "puffish_skills:command", "data": { "unlock_command": "advancement grant @s only example:skill", "lock_command": "advancement revoke @s only example:skill" } } ``` -------------------------------- ### Get World Source: https://puffish.net/skillsmod/docs/creators/configuration/calculations/prototypes/built-in/entity Retrieves the world prototype associated with the entity. ```APIDOC ## Get World ### Description Returns the `minecraft:world` prototype for the entity. ### Operation `get_world` ``` -------------------------------- ### Grant 5 Experience on Jump Source: https://puffish.net/skillsmod/docs/creators/configuration/experience-sources/built-in/increase-stat This example grants 5 experience points to the player each time they jump. It uses a variable 'is_jump' to check for the jump statistic. ```json { "type": "puffish_skills:increase_stat", "data": { "variables": { "is_jump": { "operations": [ { "type": "get_stat" }, { "type": "puffish_skills:test", "data": { "stat": "minecraft.custom:minecraft.jump" } } ] } }, "experience": [ { "condition": "is_jump", "expression": "5" } ] } } ``` -------------------------------- ### Grant Experience for Magic Damage Source: https://puffish.net/skillsmod/docs/creators/configuration/calculations/operations/built-in/damage-type-classification This example demonstrates how to grant experience based on damage type. It uses the 'is_magic' operation to check if the damage source is magic and awards 5 experience if true, otherwise 0. ```json { "type": "puffish_skills:kill_entity", "data": { "variables": { "exp_value": { "operations": [ { "type": "get_damage_source" }, { "type": "puffish_skills:is_magic" }, { "type": "switch", "data": { "true": 5, "false": 0 } } ] } }, "experience": "exp_value" } } ``` -------------------------------- ### Tag Reward Example Source: https://puffish.net/skillsmod/docs/creators/configuration/rewards/built-in/tag This reward adds a tag named 'something' when a skill is unlocked and removes it when the skill is locked. ```json { "type": "puffish_skills:tag", "data": { "tag": "something" } } ``` -------------------------------- ### Skill Tree Configuration Source: https://puffish.net/skillsmod/docs/creators/tutorials/creating-skill-trees The config.json file within the puffish_skills namespace specifies the version of the configuration and lists the categories included in the skill tree. The 'example' category is included by default when using the template generator. ```json { "version": 2, "categories": [ "example" ] } ``` -------------------------------- ### Get Entity Type Source: https://puffish.net/skillsmod/docs/creators/configuration/calculations/prototypes/built-in/entity Retrieves the entity type prototype for a given entity. ```APIDOC ## Get Entity Type ### Description Returns the `minecraft:entity_type` prototype for the entity. ### Operation `get_type` ``` -------------------------------- ### Give 1 Experience for Breaking with Iron Shovel Source: https://puffish.net/skillsmod/docs/creators/configuration/experience-sources/built-in/break-block This example grants 1 experience point when a player breaks a block using an iron shovel. It defines a variable 'is_shovel' to check the tool used. ```json { "type": "puffish_skills:break_block", "data": { "variables": { "is_shovel": { "operations": [ { "type": "get_tool_item_stack" }, { "type": "puffish_skills:test", "data": { "item": "iron_shovel" } } ] } }, "experience": [ { "condition": "is_shovel", "expression": "1" } ] } } ``` -------------------------------- ### Set Scoreboard Objective Reward Source: https://puffish.net/skillsmod/docs/creators/configuration/rewards/built-in/scoreboard This example demonstrates how to configure a scoreboard reward. It sets the score for a specified scoreboard objective based on the number of skills unlocked by the player. ```json { "type": "puffish_skills:scoreboard", "data": { "objective": "scoreboard_objective_name_here" } } ``` -------------------------------- ### Get Time Of Day Source: https://puffish.net/skillsmod/docs/creators/configuration/calculations/prototypes/built-in/world Retrieves the current time of day from the server, represented as a `puffish_skills:number` property. ```APIDOC ## Get Time Of Day ### Description Retrieves the current time of day from the server, represented as a `puffish_skills:number` property. ### Operation `get_time_of_day` ``` -------------------------------- ### Take Damage Experience Source Example Source: https://puffish.net/skillsmod/docs/creators/configuration/experience-sources/built-in/take-damage Grants experience equal to 25% of the damage taken by the player. This configuration uses the 'get_taken_damage' operation to capture the damage value and then applies a multiplier. ```json { "type": "puffish_skills:take_damage", "data": { "variables": { "damage": { "operations": [ { "type": "get_taken_damage" } ] } }, "experience": "damage * 0.25" } } ``` -------------------------------- ### Give 5 Experience for Breaking Stone Source: https://puffish.net/skillsmod/docs/creators/configuration/experience-sources/built-in/break-block This example grants 5 experience points specifically when a player breaks a stone block. It defines a variable 'is_stone' to check the broken block's type. ```json { "type": "puffish_skills:break_block", "data": { "variables": { "is_stone": { "operations": [ { "type": "get_broken_block_state" }, { "type": "puffish_skills:test", "data": { "block": "stone" } } ] } }, "experience": [ { "condition": "is_stone", "expression": "5" } ] } } ``` -------------------------------- ### Unlock Category Power Type Example Source: https://puffish.net/skillsmod/docs/creators/add-ons/origins This JSON configuration demonstrates how to use the 'unlock_category' power type to unlock a specific category in Origins. ```json { "type": "puffish_skills_origins:unlock_category", "category": "example:phantom" } ``` -------------------------------- ### Get Block Operation Source: https://puffish.net/skillsmod/docs/creators/configuration/calculations/prototypes/built-in/block-state The `get_block` operation retrieves the `minecraft:block` prototype associated with a block state. ```APIDOC ## get_block ### Description Retrieves the `minecraft:block` prototype for a given block state. ### Operation `get_block` ### Returns `minecraft:block` prototype ``` -------------------------------- ### Short Color Specification Source: https://puffish.net/skillsmod/docs/creators/configuration/appearance/color Use this format to specify only the fill color, leaving the stroke color unchanged. This example sets the fill color to red. ```json "#ff0000" ``` -------------------------------- ### Grant Experience per Centimeter Swam Source: https://puffish.net/skillsmod/docs/creators/configuration/experience-sources/built-in/increase-stat This example grants experience based on the amount a player has swam, measured in centimeters. It uses 'get_increase_amount' to capture the exact increase and applies it as experience. Be cautious with the experience curve as this can grant a large amount of experience. ```json { "type": "puffish_skills:increase_stat", "data": { "variables": { "is_swim": { "operations": [ { "type": "get_stat" }, { "type": "puffish_skills:test", "data": { "stat": "minecraft.custom:minecraft.swim_one_cm" } } ] }, "amount": { "operations": [ { "type": "get_increase_amount" } ] } }, "experience": [ { "condition": "is_swim", "expression": "amount" } ] } } ``` -------------------------------- ### Example Skill Definition Source: https://puffish.net/skillsmod/docs/creators/configuration/definition This JSON defines a skill that grants the player an additional heart (2 health points) upon unlocking. It includes the skill's title, icon, and the reward attribute modification. ```json { "title": "+1 Heart", "icon": { "type": "effect", "data": { "effect": "health_boost" } }, rewards": [ { "type": "puffish_skills:attribute", "data": { "attribute": "generic.max_health", "value": 2, "operation": "addition" } } ] } ``` -------------------------------- ### Example Skill Definition: +1 Heart Source: https://puffish.net/skillsmod/docs/creators/configuration/files/definitions This JSON snippet defines a skill that grants the player an additional heart (2 max health points) upon unlocking. It specifies the title, icon, and reward type. ```json { "health+2": { "title": "+1 Heart", "icon": { "type": "effect", "data": { "effect": "health_boost" } }, "rewards": [ { "type": "puffish_skills:attribute", "data": { "attribute": "generic.max_health", "value": 2, "operation": "addition" } } ] } } ``` -------------------------------- ### Experience Per Level: Before Migration Source: https://puffish.net/skillsmod/docs/creators/configuration/migrations/to-version-1 Shows the previous array-based format for defining experience required for each level. ```json "experience_per_level": [ 10, 11, 13, 15, 17, ... 173, 179, 186, 193, 200 ] ``` -------------------------------- ### Experience Source: After Migration Source: https://puffish.net/skillsmod/docs/creators/configuration/migrations/to-version-1 Demonstrates the updated structure for experience sources, including a 'parameters' section and an 'experience' array for defining how experience is awarded. ```json { "type": "puffish_skills:kill_entity", "data": { "parameters": { "dropped_xp": { "type": "entity_dropped_experience" } }, "experience": [ { "expression": "dropped_xp" } ], "anti_farming": { "enabled": true, "limit_per_chunk": 15, "reset_after_seconds": 300 } } } ``` -------------------------------- ### Experience Source: Before Migration Source: https://puffish.net/skillsmod/docs/creators/configuration/migrations/to-version-1 Shows the previous structure for defining an experience source, specifically for killing entities. ```json { "type": "puffish_skills:kill_entity", "data": { "anti_farming": { "enabled": true, "limit_per_chunk": 15, "reset_after_seconds": 300 } } } ``` -------------------------------- ### Categories: After Migration (config.json) Source: https://puffish.net/skillsmod/docs/creators/configuration/migrations/to-version-1 Illustrates the new structure where categories are defined within the main 'config.json' file under a 'categories' key. ```json { "version": 1, "categories": [ "combat", "mining" ] } ``` -------------------------------- ### Get Entity Score Source: https://puffish.net/skillsmod/docs/creators/configuration/calculations/prototypes/built-in/entity Retrieves the score of a living entity for a given scoreboard objective. ```APIDOC ## Get Entity Score ### Description Returns a `minecraft:number` prototype representing the score of the living entity in the specified objective scoreboard. ### Operation `puffish_skills:get_score` ``` -------------------------------- ### Get Count Operation Source: https://puffish.net/skillsmod/docs/creators/configuration/calculations/prototypes/built-in/item-stack Retrieves the `puffish_skills:number` prototype representing the count of items in this stack. ```APIDOC ## Get Count ### Description Retrieves the `puffish_skills:number` prototype which represents the count of this item stack. ### Operation `get_count` ``` -------------------------------- ### Custom Background Configuration Source: https://puffish.net/skillsmod/docs/creators/configuration/appearance/background Configure a custom background with specific texture, dimensions, and positioning. Defaults to centered with original size if position is not set. ```json { ... "background": { "texture": "minecraft:textures/gui/title/background/panorama_0.png", "width": 1024, "height": 1024, "position": "fill" } ... } ``` -------------------------------- ### Get Nutrition Source: https://puffish.net/skillsmod/docs/creators/configuration/calculations/prototypes/built-in/item Retrieves the nutrition value of an item. This operation returns a `puffish_skills:number` prototype. ```APIDOC ## Get Nutrition ### Description Retrieves the nutrition of this item. ### Operation `get_nutrition` ### Returns `puffish_skills:number` - The nutrition of the item. ``` -------------------------------- ### Get Saturation Modifier Source: https://puffish.net/skillsmod/docs/creators/configuration/calculations/prototypes/built-in/item Retrieves the saturation modifier of an item. This operation returns a `puffish_skills:number` prototype. ```APIDOC ## Get Saturation Modifier ### Description Retrieves the saturation modifier of this item. ### Operation `get_saturation_modifier` ### Returns `puffish_skills:number` - The saturation modifier of the item. ``` -------------------------------- ### Experience Per Level: After Migration (Values) Source: https://puffish.net/skillsmod/docs/creators/configuration/migrations/to-version-1 Demonstrates the new 'values' type for experience_per_level, using an array of specific experience points. ```json "experience_per_level": { "type": "values", "data": { "values": [ 10, 11, 13, 15, 17, ... 173, 179, 186, 193, 200 ] } } ``` -------------------------------- ### Get Duration Source: https://puffish.net/skillsmod/docs/creators/configuration/calculations/prototypes/built-in/status-effect-instance Retrieves the remaining duration of the status effect instance. The duration is returned as a `puffish_skills:number` prototype. ```APIDOC ## Get Duration ### Description Operation `get_duration` returns `puffish_skills:number` prototype which represents the duration left of this effect. ### Operation `get_duration` ``` -------------------------------- ### Get Level Source: https://puffish.net/skillsmod/docs/creators/configuration/calculations/prototypes/built-in/status-effect-instance Retrieves the current level of the status effect instance. The level is returned as a `puffish_skills:number` prototype. ```APIDOC ## Get Level ### Description Operation `get_level` returns `puffish_skills:number` prototype which represents the level of this effect. ### Operation `get_level` ``` -------------------------------- ### Advancement Background Configuration Source: https://puffish.net/skillsmod/docs/creators/configuration/appearance/background Use this to set a background texture for advancements, similar to vanilla behavior. The texture should be 16x16 and will tile. ```json { ... "background": "minecraft:textures/gui/advancements/backgrounds/adventure.png" ... } ``` -------------------------------- ### Get Base Value Source: https://puffish.net/skillsmod/docs/creators/configuration/calculations/prototypes/built-in/entity-attribute-instance Retrieves the base value of the entity attribute instance, before any modifiers. This operation returns a 'puffish_skills:number' prototype. ```APIDOC ## Get Base Value ### Description Retrieves the base value of the entity attribute instance, before any modifiers. ### Operation `get_base_value` ### Returns `puffish_skills:number` - The base value of the attribute. ``` -------------------------------- ### Categories: Before Migration (categories.json) Source: https://puffish.net/skillsmod/docs/creators/configuration/migrations/to-version-1 Shows the previous method of defining categories in a separate 'categories.json' file. ```json [ "combat", "mining" ] ``` -------------------------------- ### Experience Per Level: After Migration (Expression) Source: https://puffish.net/skillsmod/docs/creators/configuration/migrations/to-version-1 Illustrates the new 'expression' type for experience_per_level, allowing dynamic calculation of experience based on level. ```json "experience_per_level": { "type": "expression", "data": { "expression": "min(level ^ 1.432 + 10, 200)" } } ``` -------------------------------- ### Item Icon Configuration Source: https://puffish.net/skillsmod/docs/creators/configuration/appearance/icon Use an item as a skill icon by specifying its namespaced ID. ```json { "type": "item", "data": { "item": "minecraft:bow" } } ``` -------------------------------- ### Get Value Source: https://puffish.net/skillsmod/docs/creators/configuration/calculations/prototypes/built-in/entity-attribute-instance Retrieves the current value of the entity attribute instance. This operation returns a 'puffish_skills:number' prototype representing the attribute's value. ```APIDOC ## Get Value ### Description Retrieves the current value of the entity attribute instance. ### Operation `get_value` ### Returns `puffish_skills:number` - The current value of the attribute. ``` -------------------------------- ### Attribute Reward Example Source: https://puffish.net/skillsmod/docs/creators/configuration/rewards/built-in/attribute This reward grants the player an additional 2 max health for each unlocked skill. It uses the 'puffish_skills:attribute' type with an 'addition' operation. ```json { "type": "puffish_skills:attribute", "data": { "attribute": "generic.max_health", "value": 2, "operation": "addition" } } ``` -------------------------------- ### Player Prototype Operations Source: https://puffish.net/skillsmod/docs/creators/configuration/calculations/prototypes/built-in/player This section details the operations available for the Player Prototype. ```APIDOC ## Player Prototype The ID of this prototype is `minecraft:player`. ### Operations #### As Living Entity Operation `as_living_entity` returns `minecraft:living_entity` prototype. #### As Entity Operation `as_entity` returns `minecraft:entity` prototype. #### Get World Operation `get_world` returns World prototype in which the player currently is. #### Get Stat Value Operation `puffish_skills:get_stat_value` returns `minecraft:number` prototype that represents a value of a given statistic. ``` -------------------------------- ### Kill Entity with Dropped XP and Max Health Calculation Source: https://puffish.net/skillsmod/docs/creators/configuration/experience-sources/built-in/kill-entity Calculates experience based on dropped XP and half of the killed entity's max health. Includes anti-farming limits per chunk and a reset timer. ```json { "type": "puffish_skills:kill_entity", "data": { "variables": { "dropped_xp": { "operations": [ { "type": "get_dropped_experience" } ] }, "max_health": { "operations": [ { "type": "get_killed_living_entity" }, { "type": "get_max_health" } ] } }, "experience": [ { "expression": "dropped_xp + max_health / 20" } ], "anti_farming": { "limit_per_chunk": 15, "reset_after_seconds": 300 } } } ``` -------------------------------- ### Custom Texture Frame (All Textures) Source: https://puffish.net/skillsmod/docs/creators/configuration/appearance/frame Specifies textures for all skill states except 'Affordable'. This provides granular control over the visual appearance of each skill state. ```json { "type": "texture", "data": { "unlocked": "example:textures/frames/unlocked.png", "available": "example:textures/frames/available.png", "locked": "example:textures/frames/locked.png", "excluded": "example:textures/frames/excluded.png" } } ``` -------------------------------- ### Get Player's Zombie Kills Statistic Source: https://puffish.net/skillsmod/docs/creators/configuration/calculations/operations/built-in/get-stat-value Retrieves the value of the 'minecraft.killed:minecraft.zombie' statistic for the player. This is useful for dynamically adjusting game mechanics based on player actions. ```json { "type": "puffish_skills:kill_entity", "data": { "variables": { "is_zombie": { "operations": [ { "type": "get_killed_living_entity" }, { "type": "get_type" }, { "type": "puffish_skills:test", "data": { "entity_type": "minecraft:zombie" } } ] }, "zombie_kills": { "operations": [ { "type": "get_player" }, { "type": "puffish_skills:get_stat_value", "data": { "stat": "minecraft.killed:minecraft.zombie" } } ], } }, "experience": { "condition": "is_zombie", "experience": "100 / zombie_kills" } } } ``` -------------------------------- ### Grant 5 Experience for Eating Bread Source: https://puffish.net/skillsmod/docs/creators/configuration/experience-sources/built-in/eat-food This configuration grants the player exactly 5 experience every time they eat bread. It defines a variable 'is_bread' to check if the eaten item is bread and then applies the experience. ```json { "type": "puffish_skills:eat_food", "data": { "variables": { "is_bread": { "operations": [ { "type": "get_eaten_item_stack" }, { "type": "puffish_skills:test", "data": { "item": "minecraft:bread" } } ] } }, "experience": [ { "condition": "is_bread", "expression": "5" } ] } } ``` -------------------------------- ### Custom Texture Icon Configuration Source: https://puffish.net/skillsmod/docs/creators/configuration/appearance/icon Use a custom texture as a skill icon by providing its namespaced path. Ensure the texture is located within a resource pack. ```json { "type": "texture", "data": { "texture": "example:textures/icons/texture.png" } } ``` -------------------------------- ### Enchant Item: Give 5 XP for Enchanting Books Source: https://puffish.net/skillsmod/docs/creators/configuration/experience-sources/built-in/enchant-item This configuration grants exactly 5 experience points every time a player enchants a book. It uses a variable to check if the enchanted item is a book. ```json { "type": "puffish_skills:enchant_item", "data": { "variables": { "is_book": { "operations": [ { "type": "get_enchanted_item_stack" }, { "type": "puffish_skills:test", "data": { "item": "enchanted_book" } } ] } }, "experience": [ { "condition": "is_book", "expression": "5" } ] } } ``` -------------------------------- ### Heal Experience Source Configuration Source: https://puffish.net/skillsmod/docs/creators/configuration/experience-sources/built-in/heal Configures the Heal Experience Source to award experience equal to 3 times the healed health amount. It uses the 'get_heal_amount' operation to retrieve the healed value and a variable 'amount' to store it before calculation. ```json { "type": "puffish_skills:heal", "data": { "variables": { "amount": { "operations": [ { "type": "get_heal_amount" } ] } }, "experience": "amount * 3" } } ``` -------------------------------- ### Block Prototype Operations Source: https://puffish.net/skillsmod/docs/creators/configuration/calculations/prototypes/built-in/block Provides access to block properties like hardness and blast resistance, and allows for testing block conditions. ```APIDOC ## Block Prototype (`minecraft:block`) ### Description Represents a block in the game, providing methods to query its properties and test conditions. ### Operations #### Get Hardness Retrieves the hardness of the block. - **Returns**: `puffish_skills:number` (The hardness value of the block) #### Get Blast Resistance Retrieves the blast resistance of the block. - **Returns**: `puffish_skills:number` (The blast resistance value of the block) #### Test Tests if the block matches a given condition. - **Parameters**: - `condition` (any) - Required - The condition to test against. - **Returns**: `puffish_skills:boolean` (True if the block matches the condition, false otherwise) ``` -------------------------------- ### Test Item Stack for Specific Item Source: https://puffish.net/skillsmod/docs/creators/configuration/calculations/operations/built-in/test-item-stack This snippet tests if the tool used is a golden pickaxe. It's used when the experience source should grant 5 experience only when a golden pickaxe is used. ```json { "type": "puffish_skills:mine_block", "data": { "variables": { "exp_value": { "operations": [ { "type": "get_tool_item_stack" }, { "type": "puffish_skills:test", "data": { "item": "golden_pickaxe" } }, { "type": "switch", "data": { "true": 5, "false": 0 } } ] } }, "experience": "exp_value" } } ```