Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
258 changes: 258 additions & 0 deletions Nakama+Hiro/definitions/dev1/base-inventory.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,258 @@
{
"items": {
"iron_sword": {
"name": "Iron Sword",
"description": "A sharp sword made of iron.",
"category": "weapons",
"item_sets": ["common_weapons"],
"max_count": 99,
"stackable": false,
"consumable": false,
"string_properties": {
"equipment_slot": "right_hand",
"rarity": "common"
},
"numeric_properties": {
"rank": 1
},
"disabled": false
},
"gold_stack": {
"name": "Gold Stack",
"description": "A stack of golden coins. So shiny!",
"category": "currency",
"max_count": 99,
"stackable": true,
"consumable": true,
"string_properties": {
"rarity": "common"
},
"keep_zero": true,
"consume_reward": {
"guaranteed": {
"currencies": {
"coins": {
"min": 100
}
}
}
}
},
"bomb": {
"name": "Bomb",
"description": "Goes BOOM!",
"category": "weapons",
"max_count": 99,
"stackable": true,
"consumable": true,
"string_properties": {
"rarity": "uncommon"
},
"keep_zero": true,
"consume_reward": {
"guaranteed": {
"currencies": {
"coins": {
"min": 100
}
}
}
}
},
"small_crafting_bag": {
"name": "Small Crafting Bag",
"description": "A small bag of miscellaneous crafting materials.",
"category": "crafting_materials",
"max_count": 99,
"stackable": false,
"consumable": true,
"string_properties": {
"rarity": "uncommon"
},
"consume_reward": {
"max_rolls": 2,
"weighted": [
{
"items": {
"ruby_gem": {
"min": 1,
"max": 3
}
},
"weight": 40
},
{
"currencies": {
"coins": {
"min": 50,
"max": 200,
"multiple": 10
}
},
"weight": 60
}
]
}
},
"wooden_shield": {
"name": "Wooden Shield",
"description": "A basic shield made from reinforced wood.",
"category": "armor",
"item_sets": ["shield", "common_armor"],
"max_count": 99,
"stackable": false,
"consumable": false,
"string_properties": {
"equipment_slot": "left_hand",
"rarity": "common"
},
"numeric_properties": {
"defense": 15,
"block_chance": 10
},
"disabled": false
},
"mana_potion": {
"name": "Mana Potion",
"description": "A vial of blue liquid that restores magical energy.",
"category": "potions",
"item_sets": ["consumables"],
"max_count": 99,
"stackable": true,
"consumable": true,
"string_properties": {
"rarity": "uncommon"
},
"keep_zero": true,
"consume_reward": {
"guaranteed": {
"energies": {
"mana": {
"min": 30,
"max": 60
}
}
}
}
},
"iron_shield": {
"name": "Iron Shield",
"description": "A sturdy shield forged from iron. Provides solid protection.",
"category": "armor",
"item_sets": ["shield", "common_armor"],
"max_count": 99,
"stackable": false,
"consumable": false,
"string_properties": {
"rarity": "rare"
},
"numeric_properties": {
"defense": 25,
"rank": 1
},
"disabled": false
},
"magic_gem": {
"name": "Magic Gem",
"description": "A precious gemstone that radiates magical energy.",
"category": "crafting_materials",
"item_sets": ["materials", "gems"],
"max_count": 5,
"stackable": true,
"consumable": true,
"string_properties": {
"rarity": "epic"
}
},
"golden_key": {
"name": "Golden Key",
"description": "An ornate golden key that opens special treasure chests.",
"category": "keys",
"item_sets": ["special_items"],
"max_count": 9,
"stackable": false,
"consumable": true,
"string_properties": {
"rarity": "rare"
},
"keep_zero": true,
"consume_reward": {
"guaranteed": {
"currencies": {
"coins": {
"min": 500,
"max": 1000,
"multiple": 100
}
}
},
"max_rolls": 1,
"weighted": [
{
"items": {
"ruby_gem": {
"min": 1,
"max": 3
}
},
"weight": 50
},
{
"currencies": {
"gems": {
"min": 10,
"max": 25,
"multiple": 5
}
},
"weight": 50
}
]
}
},
"lucky_charm": {
"name": "Lucky Charm",
"description": "A four-leaf clover that brings good fortune when used.",
"category": "artifacts",
"item_sets": ["consumables", "buffs"],
"max_count": 5,
"stackable": true,
"consumable": true,
"string_properties": {
"rarity": "epic"
},
"keep_zero": false,
"consume_reward": {
"guaranteed": {
"currencies": {
"coins": {
"min": 50,
"max": 150
}
}
}
}
},
"evil_eye": {
"name": "Eye of Sauron",
"description": "It is said to have the power to control the minds of others.",
"category": "artifacts",
"item_sets": ["special_items"],
"max_count": 1,
"stackable": false,
"consumable": false,
"string_properties": {
"rarity": "legendary"
},
"keep_zero": false
}
},
"limits": {
"categories": {
"armor": 10
},
"item_sets": {
"shield": 5
}
}
}
3 changes: 2 additions & 1 deletion Nakama+Hiro/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ func InitModule(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runti
hiro.WithBaseSystem(fmt.Sprintf("definitions/%s/base-system.json", env), true),
hiro.WithLeaderboardsSystem(fmt.Sprintf("definitions/%s/base-leaderboards.json", env), true),
hiro.WithChallengesSystem(fmt.Sprintf("definitions/%s/base-challenges.json", env), true),
hiro.WithEconomySystem(fmt.Sprintf("definitions/%s/base-economy.json", env), true))
hiro.WithEconomySystem(fmt.Sprintf("definitions/%s/base-economy.json", env), true),
hiro.WithInventorySystem(fmt.Sprintf("definitions/%s/base-inventory.json", env), true))
if err != nil {
return err
}
Expand Down
56 changes: 56 additions & 0 deletions UnityHiroInventory/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@

# Created by https://www.gitignore.io/api/unity
# Edit at https://www.gitignore.io/?templates=unity

# Jetbrain Rider Cache
.idea/
Assets/Plugins/Editor/JetBrains*

# Visual Studio Code
.vscode/


### Unity ###
/[Ll]ibrary/
/[Tt]emp/
/[Oo]bj/
/[Bb]uild/
/[Bb]uilds/
/[Ll]ogs/
/[Uu]ser[Ss]ettings/
Assets/AssetStoreTools*
# Unity local user project setting
UserSettings/

# Visual Studio cache directory
.vs/

# Autogenerated VS/MD/Consulo solution and project files
ExportedObj/
.consulo/
*.csproj
*.unityproj
*.sln
*.suo
*.tmp
*.user
*.userprefs
*.pidb
*.booproj
*.svd
*.pdb
*.opendb
*.VC.db

# Unity3D generated meta files
*.pidb.meta
*.pdb.meta

# Unity3D Generated File On Crash Reports
sysinfo.txt

# Builds
*.apk
*.unitypackage

# End of https://www.gitignore.io/api/unity
8 changes: 8 additions & 0 deletions UnityHiroInventory/Assets/UnityHiroInventory.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions UnityHiroInventory/Assets/UnityHiroInventory/Editor.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading