Micah Holmes Posted January 9 Report Posted January 9 Working on adding a Game Mechanic into the handbook but having trouble getting it to work. the vanilla game starts on page 0 and ends at page 30. So I created my page starting at page 31. However, I don't think the text really matters. Location: /Mods/Craftsmanship/assets/craftsmanship/config/handbook Code: { pageCode: "gamemechanicinfo-mushroomgrowing", title: "gamemechanicinfo-mushroomgrowing-title", text: "gamemechanicinfo-mushroomgrowing-text" } In my lang files I have: code: "gamemechanicinfo-mushroomgrowing-title": "Game Mechanic: Growing Mushrooms", "gamemechanicinfo-mushroomgrowing-text": "<strong>Growing Mushrooms</strong><br>Growing mushrooms takes very little effort but needs a lot of time.<br><br><strong>Basic Materials</strong><br>Mushrooms grow using mostly pasteurized wood or pasteurized grass or other pasteurized items. Pasteurization is a fundamental step in growing spores that will later sprout mushrooms. Start by gathering logs to make wood chips or growing certain crops like wheat for example.<br><br><strong>Pasteurization</strong><br>To start the process of pasteurizing a item, you need to boil it in a cooking pot. Next, place it in a barrel with water so the bacteria can grow.<br><br><strong>Growing</strong><br>Once you have pasteurized some wood or an item; its time to start growing mushrooms. Growing will require 1 barrel, a pasteurized item, water, saltwater or limewater and time. Different mushrooms require different types of woods or items in order to grow. Most mushrooms take about 10 days to grow.<br><br><strong>Uses</strong><br>Obviously mushrooms are a good food source. However, some poisonous mushrooms can be used in medicine. The Bitter Bolete is dangerous to eat freshly picked or grown but it can be used in medicine to cure fevers and heal you. Several poisonous mushrooms can be used in medicines. To see which ones are helpful, search the handbook for medicine and discover useful mushrooms.<br><br>Growing mushrooms in a barrel is also a great way to farm even during winter months. Because mushrooms can be grown in barrels. You can place them in a nice dark, warm area in your home and grow them all year round. Additionally, because they can be a source of medicine as well. You will always have a source for medical supplies when needed.<br><br><strong>Recipes</strong><br>Below is a list of a few mushrooms you will be able to grow in a barrel.<a href=\"handbook://gamemechanicinfo-mushroomgrowing\">farming</a><br><ul><li>Almond Mushroom</li><li>Lime Water</li><li>Pasteurized Walnut</li><br><li>Bearded Tooth Mushroom</li><li>Lime Water</li><li>Pasteurized Oak</li><br><li>Bitter Bolete Mushroom</li><li>Salt Water</li><li>Pasteurized Pine</li>",
Brady_The Posted January 9 Report Posted January 9 (edited) 1 hour ago, Micah Holmes said: { pageCode: "gamemechanicinfo-mushroomgrowing", title: "gamemechanicinfo-mushroomgrowing-title", text: "gamemechanicinfo-mushroomgrowing-text" } The domains shouldn't be needed here. 1 hour ago, Micah Holmes said: "gamemechanicinfo-mushroomgrowing-title": "Game Mechanic: Growing Mushrooms", "gamemechanicinfo-mushroomgrowing-text": "[...]", game:mechanici... Edited January 9 by Brady_The
Solution The Insanity God Posted January 9 Solution Report Posted January 9 (edited) 3 hours ago, Brady_The said: The domains shouldn't be needed here. I think that was just meant as a short form for "Game Mechanic Information" not an actual domain The issue is actually precisely that the domain was not specified... those language strings defined in the handbook config don't automatically get the domain added (they aren't even considered AssetLocations but just plain strings) so when it ends up looking for the code it actually ends up looking for "game:gamemechanicinfo-mushroomgrowing" 4 hours ago, Micah Holmes said: { pageCode: "gamemechanicinfo-mushroomgrowing", title: "gamemechanicinfo-mushroomgrowing-title", text: "gamemechanicinfo-mushroomgrowing-text" } On the other hand... the language file does automatically add the domain so it ends up searching in the wrong domain, simply prefixing this stuff with "craftsmanship:" should do the trick. Edited January 9 by The Insanity God 1
Brady_The Posted January 9 Report Posted January 9 (edited) 28 minutes ago, The Insanity God said: I think that was just meant as a short form for "Game Mechanic Information" not an actual domain Oh. 28 minutes ago, The Insanity God said: On the other hand... the language file does automatically add the domain so it ends up searching in the wrong domain, simply prefixing this stuff with "craftsmanship:" should do the trick. To be fair, I haven't done any handbook texts yet, so I only orientated myself on other mod. I should have taken a look at the wiki page... Anyway, you can do it both ways. I don't think that there are any advantages or disadvantages to either of them. You just have to settle for one. { "pageCode": "brady-test", "title": "brady-test-title", "text": "bradya:brady-test-text" } { "game:brady-test-title": "Test title", "brady-test-text": "Test text" } Edited January 9 by Brady_The 1
Recommended Posts