Add the Axe, and determine how easy it was to add a new tool to the mod. Do a write-up of the process on the wiki.
SigmundGranaas opened this issue ยท 1 comments
There are currently only to Tools added by Forgero. The goal for the mod is to create a framework for adding your own composable equipment. The process for creating and adding tools to the Mod should be very simple and straightforward. I will try to add an Axe to the mod, And I will determine if the process of adding additional tools is satisfactory or not.
Process of adding a new tool:
Item and registry
- Create a new ToolItem class
Every new type of tool needs it's own class. Adding vanilla tools is easy, but custom tools, like combined tools and hammers require som new configuration. - Create a new ForgeroToolType
Same as above - Add axeItems to ItemFactory
- Create an axehead
- Add axehead to ToolPartFactory
- Add axehead to ToolPartHeadBuilder
- Register new patternItems
Patterns is currently a manual process. When I add many skins and custom attributes to patterns, I will probably need to add a system for patterns. - Add translation for tool and head
Tags and translations are really error prone and can really easily be generated. I should look into frameworks which allow me to generate them. - Add new Tag for axes to be dynamicAttributeTool and available for recipes
Manually adding these tags is extremely error prone, as I have already forgotten to add materials. This task could be automated. - Add pickaxehead to strategyfactory
- Add axe to createBaseToolPartsFromMaterial
- Add axe head to toolpartheadbuilder
Recipe
- Manually create a new TemplateRecipe
Recipe is essentially the same as all other heads. I should find a way to generate these recipes more efficiently. - Add recipe to recipeCreator and factory
- Add recipeType
- Add Axeheadrecipetype to recipe loader
Texture and model
- Add AXEHEAD to model types
- Create new Axehead template texture
- Create new Axehead binding
- Create new Axehead Gem
- Create secondary textures for everything
- Add gem models and binding models and secondary textures
Estimated time for creating the axe - 2.5 hours
Takaways:
I need a system for automating the process of adding tags and translations. The combination of materials is what makes the process very error prone. Adding all of the enums etc is quite necessary to register everything in the system