Content
@
https://warpcast.com/~/channel/b3
0 reply
0 recast
0 reaction
Wolf
@wolfonchain
Day 2 of building a smart contract-based inventory system for EthgardLegends.com on B3. Imagine you find a cool sword and want to equip it to your hero to gain benefits in the game. That's what I'm building. In technical terms, the goal is to allow items (ERC1155/ERC721) to be equippable on ERC721 tokens (i.e., Heroes).
1 reply
0 recast
0 reaction
Wolf
@wolfonchain
Today's progress: Finalised the ERC721 ItemSystem contract from yesterday. Added logic to batch mint multiple items (weapons, armor, accessories) and improved a few more things. Also wrote tests for ItemSystem and started refactoring the tests from InventorySystem - but this still needs further work. One of the bigger chunks of work today was put into research and refining the different item types. While new weapon types may be added in the future, the current list provides a good range. Weapons: - TWOHAND_SWORD, ONEHAND_SWORD - TWOHAND_AXE, ONEHAND_AXE - TWOHAND_MACE, ONEHAND_MACE - TWOHAND_POLEARM, ONEHAND_POLEARM - TWOHAND_STAFF, ONEHAND_STAFF - DAGGER - BOW - CROSSBOW - SHIELD - GENERIC (Generic type) Decided on three major armor types as well: - Cloth - Leather - Plate
1 reply
0 recast
0 reaction
Wolf
@wolfonchain
Last but not least, spent significant time researching and finalizing the initial item list which function as a starting point to develop more of the feature, including UI and more. Currently, there are 32 items, including 10 Weapons, 1 Shield, 3 Armor Sets × 6 pieces each (might be expanded to include a few more), 3 Accessories. Later on, these items will be randomized with stats within a given range, making each NFT unique compared to the base version.
1 reply
0 recast
0 reaction
Wolf
@wolfonchain
Todays lesson: Designing around immutable code really is stressful. Games evolve over time, and ensuring everything is designed correctly from the start is nearly impossible. Still, as mentioned yesterday, it's critical to get it as right as possible before deployment. However, defining the different weapon and armor categories and finalize the item list took quite a bit of work. Once items are minted onchain and in circulation, changes become significantly harder, increasing the pressure to get things right from the start. This led to a lot more thinking and iteration than expected - but, I got a first list down, which is good and a step into the right direction.
0 reply
0 recast
0 reaction