Jump to content

Taien

Members
  • Posts

    48
  • Joined

  • Last visited

Everything posted by Taien

  1. Ok, I tried giving myself the quest and it worked fine and I was able to turn it in. I tried changing the name as well, and I'm still getting the error when the quest is in the trader list. Maybe I'll try making it all lowercase as well, since the other quest names are all lowercase. Nah, still not working. The quest itself works fine, but I can't add it to the trader list without getting a null reference exception. I'm stumped.
  2. Do you know how to do quests which are on the trader lists? I'm trying to do that right now but having trouble.
  3. I'd say it probably is possible. I know there's a trigger for onOtherDamageSelf or something like that. You'd just have to figure out how to deal the damage to the mob.
  4. I've created a new quest on my server as an attempt to learn how to make new quests. The problem is that once I add it to the list of trader quests, the server throws a null reference exception each time it tries to get the list. It's not game-breaking but it is annoying and so I'd like to solve it. I'm certain it has something to do with the quest I added. Here's the xml: <append xpath="/quests"> <quest id="quest_FindMythril"> <property name="name_key" value="quest_FindMythril"/> <property name="subtitle_key" value="quest_FindMythril_subtitle"/> <property name="description_key" value="quest_FindMythril_description"/> <property name="icon" value="ui_game_symbol_mining"/> <property name="repeatable" value="true"/> <property name="category_key" value="quest"/> <property name="offer_key" value="quest_FindMythril_offer"/> <property name="difficulty" value="medium"/> <property name="difficulty_tier" value="3"/> <property name="statement_key" value="quest_FindMythril_statement"/> <property name="response_key" value="quest_FindMythril_response"/> <property name="login_rally_reset" value="true"/> <property name="completiontype" value="TurnIn"/> <property name="completion_key" value="quest_FindMythril_completion"/> <objective type="FetchKeep" id="resourceMythrilPowder" value="100" phase="1"/> <objective type="ReturnToNPC"> <property name="phase" value="2"/> <property name="nav_object" value="return_to_trader" /> </objective> <objective type="InteractWithNPC"> <property name="phase" value="2"/> <property name="nav_object" value="return_to_trader" /> </objective> <reward type="Exp" value="5000"/> <!--<reward type="LootItem" id="groupQuestMods" ischosen="true" value="1"/>--> <reward type="Item" id="casinoCoin" value="800"/> </quest> </append> <append xpath="/quests/quest_list[@id='trader_quests']"> <quest id="quest_FindMythril" /> </append> And here's the error I get from the server: NullReferenceException: Object reference not set to an instance of an object at EntityTrader.PopulateQuestList () [0x00074] in <f6e64c46c798481d83242e5018924c0b>:0 at EntityTrader.OnUpdateLive () [0x00013] in <f6e64c46c798481d83242e5018924c0b>:0 at EntityAlive.OnUpdateEntity () [0x0001e] in <f6e64c46c798481d83242e5018924c0b>:0 at World.TickEntity (Entity e, System.Single _partialTicks) [0x00127] in <f6e64c46c798481d83242e5018924c0b>:0 at World.TickEntitiesSlice (System.Int32 count) [0x00037] in <f6e64c46c798481d83242e5018924c0b>:0 at World.TickEntitiesSlice () [0x00000] in <f6e64c46c798481d83242e5018924c0b>:0 at GameManager.UpdateTick () [0x00026] in <f6e64c46c798481d83242e5018924c0b>:0 at GameManager.gmUpdate () [0x00305] in <f6e64c46c798481d83242e5018924c0b>:0 at GameManager.Update () [0x00000] in <f6e64c46c798481d83242e5018924c0b>:0 For now I'll remove the quest from the list again, but I'm baffled as to what I'm missing. I've added the appropriate entries in Localization.txt and even if I hadn't that wouldn't cause a null ref exception. Any insight from someone who is an expert in the field of adding trader quests? Edit: Ok so thanks to help from the community here the solution is to insert new quests before the quest_list section so that they are the last quests in the list (first in the list also works, but I chose last in the list). This is because if they are added after the quest list section, the quest list is loaded first and references a quest which hasn't been loaded yet, producing a null ref. Here's my current xml: <insertBefore xpath="/quests/quest_list[1]"> <quest id="tier5_find_mythril"> <property name="name_key" value="quest_FindMythril"/> <property name="subtitle_key" value="quest_FindMythril_subtitle"/> <property name="description_key" value="quest_FindMythril_description"/> <property name="icon" value="ui_game_symbol_mining"/> <property name="repeatable" value="true"/> <property name="category_key" value="quest"/> <property name="offer_key" value="quest_FindMythril_offer"/> <property name="difficulty" value="Medium"/> <property name="difficulty_tier" value="5"/> <property name="statement_key" value="quest_FindMythril_statement"/> <property name="response_key" value="quest_FindMythril_response"/> <property name="login_rally_reset" value="true"/> <property name="completiontype" value="TurnIn"/> <property name="completion_key" value="quest_FindMythril_completion"/> <objective type="RandomGotoNPC" phase="1"> <property name="completion_distance" value="20"/> <property name="distance" value="100-200"/> <property name="nav_object" value="quest" /> </objective> <objective type="FetchKeep" id="resourceMythrilPowder" value="1000" phase="2"/> <objective type="Craft" id="resourceMythril" value="50" phase="3"/> <objective type="ReturnToNPC"> <property name="phase" value="4"/> <property name="nav_object" value="return_to_trader" /> </objective> <objective type="InteractWithNPC"> <property name="phase" value="4"/> <property name="nav_object" value="return_to_trader" /> </objective> <reward type="Exp" value="5000"/> <reward type="LootItem" id="schematicsToolsT2" ischosen="true" isfixed="true" value="5"/> <reward type="LootItem" id="schematicsWeaponsArmorT2" ischosen="true" isfixed="true" value="5"/> <reward type="LootItem" id="schematicsToolsT2" ischosen="true" value="5"/> <reward type="LootItem" id="schematicsToolsT2" ischosen="true" value="5"/> <reward type="LootItem" id="schematicsWeaponsArmorT2" ischosen="true" value="5"/> <reward type="LootItem" id="schematicsWeaponsArmorT2" ischosen="true" value="5"/> <reward type="Item" id="casinoCoin" value="800"/> </quest> </insertBefore> <append xpath="/quests/quest_list[@id='trader_quests']"> <quest id="tier5_find_mythril" /> </append>
  5. Super helpful reply Squeegie, thank you. I have never used dnSpy before but will get it immediately. Thanks work22 as well I'll look into these things.
  6. Is there any documentation for the ModAPI? The only thing I've found is that one page on the fandom wiki (which is outdated). I see that it only allows mods to respond to various events. But there's no documentation on how to use it that I can find...and I have several questions: How do I send a message to a player? How do I get a player's information? I'm assuming I should be catching join and leave events to acquire the IDs and be building a player list/dictionary inside the mod? Would it be possible with ModAPI to fix the code for Crafting Time when the player's craftingtime is negative? For example, I have a faster forge on my server, as well as two equippable items that decrease crafting time. When used together, there are some items that have a negative processing time (so they craft instantly). I want to set the crafting time to 0.001 if it's determined to be negative. Which should be a simple matter, provided I'm allowed to make that kind of alteration.
  7. Yup, that was the problem. I had the xml correct the whole time. I just needed to pick up and place down the forge again. EPIC SIGH OF EQUAL PARTS CONTENTMENT AND FRUSTRATION
  8. Oh my god, I think I figured it out. I think I had it right the WHOLE TIME, and that I just needed to pick up and place back down the masterForge because it had been placed before I added the other materials and thus didn't have whatever initialization happens on placement that creates the pools for mythril and adamantite. This at least solved the problem in my single-player world. Going to test it on the server now.
  9. Yep I definitely updated the XUI as well, I wanted to make sure the problem wasn't that I was using the same window for both forges. Thanks for checking though
  10. Here's my units now....still no work. <item name="unit_mythril"> <property name="Extends" value="unit_iron"/> <property name="CustomIcon" value="resourceCrushedSand"/> <property name="CustomIconTint" value="64FDBA"/> <property name="Material" value="Mmythril"/> <property name="CreativeMode" value="None"/> </item> <item name="unit_adamantite"> <property name="Extends" value="unit_iron"/> <property name="CustomIcon" value="resourceCrushedSand"/> <property name="CustomIconTint" value="9E70BB"/> <property name="Material" value="Madamantite"/> <property name="CreativeMode" value="None"/> </item> Tried taking the custom tint out as well and it still didn't work. Not that that should matter. Ugh
  11. Well...it didn't work...:'( I am so frustrated at this point. Honestly, I don't know. It's been a staple metal in practically every game I've played since Final Fantasy 1, so I figured I'd use it. But the true mythology of mythril isn't in my knowledge base. It's in Lord of the Rings, too.
  12. Hey thanks for replying again. So the reason mine is different for the units is instead of extending unit_iron (like you did) I just copied unit_iron's properties. Are you saying I MUST extend unit_iron for it to work? I will try that.
  13. I still cannot get items to melt in the forge. Worse yet is that when I upload this mod to my server, the adamantite forge seems to nuke any item placed inside it, instantly deleting the item. I'm testing with the resourceMythrilPowder item. This is the current state of my alterations. I'm sorry...I don't know what I'm missing... Items.xml: <item name="resourceMythrilPowder"> <property name="HoldType" value="40"/> <property name="Meshfile" value="#Other/Items?Misc/sackPrefab.prefab"/> <property name="DropMeshfile" value="#Other/Items?Misc/sack_droppedPrefab.prefab"/> <property name="CustomIcon" value="resourceCrushedSand"/> <property name="CustomIconTint" value="64FDBA"/> <property name="TintColor" value="100,253,186"/> <property name="Material" value="MmythrilPowder"/> <property name="Weight" value="1"/> <property name="Stacknumber" value="10000"/> <property name="EconomicValue" value="200"/> <property name="EconomicBundleSize" value="1"/> <property name="Group" value="Resources"/> <property name="UnlockedBy" value="resourceMythrilSchematic"/> </item> <item name="resourceAdamantitePowder"> <property name="HoldType" value="40"/> <property name="Meshfile" value="#Other/Items?Misc/sackPrefab.prefab"/> <property name="DropMeshfile" value="#Other/Items?Misc/sack_droppedPrefab.prefab"/> <property name="CustomIcon" value="resourceCrushedSand"/> <property name="CustomIconTint" value="9E70BB"/> <property name="TintColor" value="158,112,187"/> <property name="Material" value="MadamantitePowder"/> <property name="Weight" value="1"/> <property name="Stacknumber" value="10000"/> <property name="EconomicValue" value="300"/> <property name="EconomicBundleSize" value="1"/> <property name="Group" value="Resources"/> <property name="UnlockedBy" value="resourceAdamantiteSchematic"/> </item> <item name="unit_mythril"> <property name="HoldType" value="45"/> <property name="Meshfile" value="#Other/Items?Misc/sackPrefab.prefab"/> <property name="DropMeshfile" value="#Other/Items?Misc/sack_droppedPrefab.prefab"/> <property name="CustomIcon" value="resourceCrushedSand"/> <property name="CustomIconTint" value="64FDBA"/> <property name="TintColor" value="100,253,186"/> <property name="Material" value="Mmythril"/> <property name="Stacknumber" value="30000"/> <property name="Weight" value="1"/> <property name="Group" value="Resources"/> <property name="ResourceUnit" value="true"/> <property name="MeltTimePerUnit" value=".25"/> <!-- forge smelting time --> <property name="UserHidden" value="true"/> <property name="CraftingIngredientTime" value=".5"/> <property name="CreativeMode" value="None"/> </item> <item name="unit_adamantite"> <property name="HoldType" value="45"/> <property name="Meshfile" value="#Other/Items?Misc/sackPrefab.prefab"/> <property name="DropMeshfile" value="#Other/Items?Misc/sack_droppedPrefab.prefab"/> <property name="CustomIcon" value="resourceCrushedSand"/> <property name="CustomIconTint" value="9E70BB"/> <property name="TintColor" value="158,112,187"/> <property name="Material" value="Madamantite"/> <property name="Stacknumber" value="30000"/> <property name="Weight" value="1"/> <property name="Group" value="Resources"/> <property name="ResourceUnit" value="true"/> <property name="MeltTimePerUnit" value=".25"/> <!-- forge smelting time --> <property name="UserHidden" value="true"/> <property name="CraftingIngredientTime" value=".5"/> <property name="CreativeMode" value="None"/> </item> materials.xml: <material id="Mmythril"> <property name="damage_category" value="metal"/> <property name="surface_category" value="metal"/> <property name="forge_category" value="mythril"/> <property name="Hardness" type="float" value="1"/> <property name="stepsound" value="metal"/> <property name="stability_glue" value="300"/> <property name="Mass" type="int" value="1"/> <property name="MaxDamage" value="300"/> <property name="Experience" value="6"/> </material> <material id="MmythrilPowder"> <property name="damage_category" value="metal"/> <property name="surface_category" value="metal"/> <property name="forge_category" value="mythril"/> <property name="Experience" value="6"/> </material> <material id="Madamantite"> <property name="damage_category" value="metal"/> <property name="surface_category" value="metal"/> <property name="forge_category" value="adamantite"/> <property name="Hardness" type="float" value="1"/> <property name="stepsound" value="metal"/> <property name="stability_glue" value="300"/> <property name="Mass" type="int" value="1"/> <property name="MaxDamage" value="300"/> <property name="Experience" value="6"/> </material> <material id="MadamantitePowder"> <property name="damage_category" value="metal"/> <property name="surface_category" value="metal"/> <property name="forge_category" value="adamantite"/> <property name="Experience" value="6"/> </material> recipes.xml: <!--Scrap recipes--> <recipe name="resourceMythrilPowder" count="1" tooltip="ttScrapMetalBrass" always_unlocked="true" tags="salvageScrap"> <wildcard_forge_category /> </recipe> <recipe name="resourceAdamantitePowder" count="1" tooltip="ttScrapMetalBrass" always_unlocked="true" tags="salvageScrap"> <wildcard_forge_category /> </recipe> <!--Forge emptying recipes--> <recipe name="resourceMythrilPowder" count="1" material_based="true" craft_area="forge" craft_time="1" craft_exp_gain="0" always_unlocked="true" use_ingredient_modifier="false"> <ingredient name="unit_mythril" count="1"/> </recipe> <recipe name="resourceAdamantitePowder" count="1" material_based="true" craft_area="forge" craft_time="1" craft_exp_gain="0" always_unlocked="true" use_ingredient_modifier="false"> <ingredient name="unit_adamantite" count="1"/> </recipe> blocks.xml: <block name="masterForge"> <property name="Class" value="Forge"/> <property name="UnlockedBy" value="masterForgeSchematic"/> <property name="Material" value="Mstone_scrap"/> <property name="MaxDamage" value="20000"/> <property name="StabilitySupport" value="true"/> <property name="Weight" value="0"/> <property name="Shape" value="ModelEntity"/> <property name="Path" value="solid"/> <property name="Model" value="Entities/Crafting/forgePrefab"/> <property name="CustomIcon" value="forge"/> <property name="CustomIconTint" value="9E70BB"/> <property name="CustomTint" value="9E70BB"/> <property name="TintColor" value="158,112,187"/> <property name="Place" value="TowardsPlacerInverted"/> <property name="OnlySimpleRotations" value="true"/> <property name="IsTerrainDecoration" value="true"/> <property name="ParticleName" value="forge"/> <property name="ParticleOffset" value="0.5,0,0.5"/> <property name="ImposterDontBlock" value="true"/> <property name="Stacknumber" value="1"/> <property name="HeatMapStrength" value="6"/> <property name="HeatMapTime" value="5000"/> <property name="HeatMapFrequency" value="1000"/> <property name="BuffsWhenWalkedOn" value="buffBurningEnvironment"/> <property name="ActiveRadiusEffects" value="buffCampfireAOE(5)"/> <property class="Workstation"> <property name="CraftingAreaRecipes" value="forge"/> <property name="Modules" value="tools,output,fuel,material_input"/> <property name="InputMaterials" value="iron,brass,lead,glass,stone,clay,mythril,adamantite"/> </property> <property name="WorkstationIcon" value="ui_game_symbol_forge"/> <property name="OpenSound" value="forge_open"/> <property name="CloseSound" value="forge_close"/> <property name="CraftSound" value="forge_smelt_click"/> <property name="CraftCompleteSound" value="forge_item_complete"/> <property name="WorkstationJournalTip" value="forgeTip"/> <property class="RepairItems"> <property name="resourceRockSmall" value="50"/> <property name="resourceClayLump" value="60"/> <property name="resourceLeather" value="20"/> </property> <drop event="Harvest" name="resourceRockSmall" count="40" tag="allHarvest"/> <drop event="Harvest" name="resourceClayLump" count="20" tag="allHarvest"/> <drop event="Harvest" name="resourceLeather" count="5" tag="allHarvest"/> <drop event="Destroy" count="0"/> <drop event="Fall" name="terrDestroyedStone" count="1" prob="0.75" stick_chance="1"/> <property name="TakeDelay" value="15"/> <property name="Group" value="Building,advBuilding"/> <property name="DescriptionKey" value="forgeDesc"/> <property name="EconomicValue" value="1000"/> <property name="FilterTags" value="MC_playerBlocks,SC_decor"/> <property name="SortOrder1" value="70i0"/> </block> windows.xml: <window name="windowMasterForgeInput" width="228" height="204" panel="Right" controller="WorkstationMaterialInputWindow" materials_accepted="iron,brass,lead,glass,stone,clay,mythril,adamantite" valid_materials_color="[green]" invalid_materials_color="[red]" cursor_area="true" > <panel style="header.panel"> <sprite style="header.icon" sprite="ui_game_symbol_forge"/> <label style="header.name" text="INPUT" text_key="xuiSmelting" /> </panel> <sprite depth="2" name="backgroundMain" sprite="menu_empty3px" pos="0,-46" height="228" color="[black]" type="sliced" fillcenter="false" on_press="true" /> <rect name="content" depth="1" pos="0,-46" height="228"> <grid depth="7" rows="3" cols="1" pos="3,-3" cell_width="75" cell_height="75" controller="WorkstationMaterialInputGrid" repeat_content="true"> <item_stack name="0"/> </grid> </rect> <rect name="content2" depth="0" pos="78, -49" width="147" height="223"> <sprite depth="1" color="[mediumGrey]" type="sliced" on_press="true"/> <grid rows="8" cols="1" pos="3,-3" cell_width="147" cell_height="24" repeat_content="true"> <forge_material name="0"/> </grid> </rect> </window>
  14. Gouki, could you also post the materials for those items from your mod? I don't understand how you have them set up differently than me.
  15. Thank you so much for replying and I'm so sorry but I don't fully understand what you mean. Do you mean the unit_mythril must have a different material than resourceMythrilPowder? I think that's what you're saying. Which item is supposed to have the material that points to the forge_material mythril? Or should both have different materials that each have the forge_material mythril line? The intended outcome is this: Mythril Powder (found in the world) is smelted in forge into unit_mythril. And the "forge emptying recipe" for unit_mythril should output Mythril Powder. I tried altering it based on what I thought you meant but I still can't get it working.
  16. Ok, so I added them to that section but it's still not processing them. @KhaineGB would you be so kind as to look through the following and see if you can spot anything I've done wrong? Here's my append to materials (some of these properties are probably unnecessary...) <material id="Mmythril"> <property name="damage_category" value="metal"/> <property name="surface_category" value="metal"/> <property name="forge_category" value="mythril"/> <property name="Hardness" type="float" value="1"/> <property name="stepsound" value="metal"/> <property name="stability_glue" value="300"/> <property name="Mass" type="int" value="1"/> <property name="MaxDamage" value="300"/> <property name="Experience" value="6"/> </material> <material id="Madamantite"> <property name="damage_category" value="metal"/> <property name="surface_category" value="metal"/> <property name="forge_category" value="adamantite"/> <property name="Hardness" type="float" value="1"/> <property name="stepsound" value="metal"/> <property name="stability_glue" value="300"/> <property name="Mass" type="int" value="1"/> <property name="MaxDamage" value="300"/> <property name="Experience" value="6"/> </material> And here's my recipes.xml for scrapping them (this IS what you meant, right?) <append xpath="/recipes"> <!--Scrap recipes--> <recipe name="resourceMythrilPowder" count="1" tooltip="ttScrapMetalBrass" always_unlocked="true" tags="salvageScrap"> <wildcard_forge_category /> </recipe> <recipe name="resourceAdamantitePowder" count="1" tooltip="ttScrapMetalBrass" always_unlocked="true" tags="salvageScrap"> <wildcard_forge_category /> </recipe> <!--Forge emptying recipes--> <recipe name="resourceMythrilPowder" count="1" material_based="true" craft_area="forge" craft_time="1" craft_exp_gain="0" always_unlocked="true" use_ingredient_modifier="false"> <ingredient name="unit_mythril" count="1"/> </recipe> <recipe name="resourceAdamantitePowder" count="1" material_based="true" craft_area="forge" craft_time="1" craft_exp_gain="0" always_unlocked="true" use_ingredient_modifier="false"> <ingredient name="unit_adamantite" count="1"/> </recipe> Here's the items.xml for the units: <item name="unit_mythril"> <property name="HoldType" value="45"/> <property name="Meshfile" value="#Other/Items?Misc/sackPrefab.prefab"/> <property name="DropMeshfile" value="#Other/Items?Misc/sack_droppedPrefab.prefab"/> <property name="CustomIcon" value="resourceCrushedSand"/> <property name="CustomIconTint" value="64FDBA"/> <property name="TintColor" value="100,253,186"/> <property name="Material" value="Mmythril"/> <property name="Stacknumber" value="30000"/> <property name="Weight" value="1"/> <property name="Group" value="Resources"/> <property name="ResourceUnit" value="true"/> <property name="MeltTimePerUnit" value=".25"/> <!-- forge smelting time --> <property name="UserHidden" value="true"/> <property name="CraftingIngredientTime" value=".5"/> <property name="CreativeMode" value="None"/> </item> <item name="unit_adamantite"> <property name="HoldType" value="45"/> <property name="Meshfile" value="#Other/Items?Misc/sackPrefab.prefab"/> <property name="DropMeshfile" value="#Other/Items?Misc/sack_droppedPrefab.prefab"/> <property name="CustomIcon" value="resourceCrushedSand"/> <property name="CustomIconTint" value="9E70BB"/> <property name="TintColor" value="158,112,187"/> <property name="Material" value="Madamantite"/> <property name="Stacknumber" value="30000"/> <property name="Weight" value="1"/> <property name="Group" value="Resources"/> <property name="ResourceUnit" value="true"/> <property name="MeltTimePerUnit" value=".25"/> <!-- forge smelting time --> <property name="UserHidden" value="true"/> <property name="CraftingIngredientTime" value=".5"/> <property name="CreativeMode" value="None"/> </item> I get the feeling I'm missing something in recipes.xml now. You said I need some recipes for smelting in there but I am having trouble finding the same for the vanilla ores. I appreciate any help you can provide.
  17. Awesome, this is almost certainly what I forgot, as I already had them in materials and recipes Thanks Khaine, I will report my success when it is attained
  18. I'm trying to add a new material to the forge. I've set up a new forge block that has the materials in its item list (see InputMaterials property): <block name="masterForge"> <property name="Class" value="Forge"/> <property name="UnlockedBy" value="masterForgeSchematic"/> <property name="Material" value="Mstone_scrap"/> <property name="MaxDamage" value="20000"/> <property name="StabilitySupport" value="true"/> <property name="Weight" value="0"/> <property name="Shape" value="ModelEntity"/> <property name="Path" value="solid"/> <property name="Model" value="Entities/Crafting/forgePrefab"/> <property name="CustomIcon" value="forge"/> <property name="CustomIconTint" value="9E70BB"/> <property name="CustomTint" value="9E70BB"/> <property name="TintColor" value="158,112,187"/> <property name="Place" value="TowardsPlacerInverted"/> <property name="OnlySimpleRotations" value="true"/> <property name="IsTerrainDecoration" value="true"/> <property name="ParticleName" value="forge"/> <property name="ParticleOffset" value="0.5,0,0.5"/> <property name="ImposterDontBlock" value="true"/> <property name="Stacknumber" value="1"/> <property name="HeatMapStrength" value="6"/> <property name="HeatMapTime" value="5000"/> <property name="HeatMapFrequency" value="1000"/> <property name="BuffsWhenWalkedOn" value="buffBurningEnvironment"/> <property name="ActiveRadiusEffects" value="buffCampfireAOE(5)"/> <property class="Workstation"> <property name="CraftingAreaRecipes" value="forge"/> <property name="Modules" value="tools,output,fuel,material_input"/> <property name="InputMaterials" value="iron,brass,lead,glass,stone,clay,mythril,adamantite"/> </property> <property name="WorkstationIcon" value="ui_game_symbol_forge"/> <property name="OpenSound" value="forge_open"/> <property name="CloseSound" value="forge_close"/> <property name="CraftSound" value="forge_smelt_click"/> <property name="CraftCompleteSound" value="forge_item_complete"/> <property name="WorkstationJournalTip" value="forgeTip"/> <property class="RepairItems"> <property name="resourceRockSmall" value="50"/> <property name="resourceClayLump" value="60"/> <property name="resourceLeather" value="20"/> </property> <drop event="Harvest" name="resourceRockSmall" count="40" tag="allHarvest"/> <drop event="Harvest" name="resourceClayLump" count="20" tag="allHarvest"/> <drop event="Harvest" name="resourceLeather" count="5" tag="allHarvest"/> <drop event="Destroy" count="0"/> <drop event="Fall" name="terrDestroyedStone" count="1" prob="0.75" stick_chance="1"/> <property name="TakeDelay" value="15"/> <property name="Group" value="Building,advBuilding"/> <property name="DescriptionKey" value="forgeDesc"/> <property name="EconomicValue" value="1000"/> <property name="FilterTags" value="MC_playerBlocks,SC_decor"/> <property name="SortOrder1" value="70i0"/> </block> This made the game crash whenever I looked at the forge until I used xpath to alter windows.xml to add two more rows to the grid in the content2 section of windowForgeInput (bringing the rows to 8). <window name="windowForgeInput" width="228" height="204" panel="Right" controller="WorkstationMaterialInputWindow" materials_accepted="iron,brass,lead,glass,stone,clay" valid_materials_color="[green]" invalid_materials_color="[red]" cursor_area="true" > <panel style="header.panel"> <sprite style="header.icon" sprite="ui_game_symbol_forge"/> <label style="header.name" text="INPUT" text_key="xuiSmelting" /> </panel> <sprite depth="2" name="backgroundMain" sprite="menu_empty3px" pos="0,-46" height="228" color="[black]" type="sliced" fillcenter="false" on_press="true" /> <rect name="content" depth="1" pos="0,-46" height="228"> <grid depth="7" rows="3" cols="1" pos="3,-3" cell_width="75" cell_height="75" controller="WorkstationMaterialInputGrid" repeat_content="true"> <item_stack name="0"/> </grid> </rect> <rect name="content2" depth="0" pos="78, -49" width="147" height="223"> <sprite depth="1" color="[mediumGrey]" type="sliced" on_press="true"/> <grid rows="8" cols="1" pos="3,-3" cell_width="147" cell_height="24" repeat_content="true"> <forge_material name="0"/> </grid> </rect> </window> So now I can open the masterForge and it will show all the normal materials plus Mythril and Adamantite. But when I try to melt items made of those materials and scrappable into those materials in the forge, they count down as usual but then nothing happens and the item remains. Has anyone messed with adding items to forges before? I know I have seen it done on other servers but I don't have access to their xml to see how they did it and learn from their alterations.
  19. Ok turns out I do have it right and items which have a weight greater than 1 can be scrapped into mythril powder as intended (because of the game only giving you 3/4 of material back). The game's just not allowing them to melt in the forge for some reason. The forge has been altered to have mythril and adamantite as units as well, but for some reason I can't get the powder (or any mythril item) to melt in the forge. They count down as if they would melt, but then nothing happens. It's very confusing. I've seen this working on other servers so I'm certain there's a way to do it.
  20. I'm having a lot of trouble figuring out how to make the new items I've added be scrappable by the player. The main goal of this is for these items to be able to be melted in the forge to a new material that I've created. But for the life of me, I can't figure out how it is done. I've seen in recipes.xml that there are lines near the top defining a scrap recipe for each basic material, for example iron: <recipe name="resourceScrapIron" count="1" tooltip="ttScrapMetalIron" always_unlocked="true" tags="salvageScrap"> <wildcard_forge_category /> </recipe> I've added my own metal in this fashion: <recipe name="resourceMythrilPowder" count="1" tooltip="ttScrapMetalBrass" always_unlocked="true" tags="salvageScrap"> <wildcard_forge_category /> </recipe> <recipe name="resourceAdamantitePowder" count="1" tooltip="ttScrapMetalBrass" always_unlocked="true" tags="salvageScrap"> <wildcard_forge_category /> </recipe> I've also added materials to represent the powder forms of each ore, or 1 unit in the forge: <material id="Mmythril"> <property name="damage_category" value="metal"/> <property name="surface_category" value="metal"/> <property name="forge_category" value="mythril"/> <property name="Hardness" type="float" value="1"/> <property name="stepsound" value="metal"/> <property name="stability_glue" value="300"/> <property name="Mass" type="int" value="1"/> <property name="MaxDamage" value="300"/> <property name="Experience" value="6"/> </material> <material id="Madamantite"> <property name="damage_category" value="metal"/> <property name="surface_category" value="metal"/> <property name="forge_category" value="adamantite"/> <property name="Hardness" type="float" value="1"/> <property name="stepsound" value="metal"/> <property name="stability_glue" value="300"/> <property name="Mass" type="int" value="1"/> <property name="MaxDamage" value="300"/> <property name="Experience" value="6"/> </material> Here's the items.xml for the powders: <item name="resourceMythrilPowder"> <property name="HoldType" value="45"/> <property name="Meshfile" value="#Other/Items?Misc/sackPrefab.prefab"/> <property name="DropMeshfile" value="#Other/Items?Misc/sack_droppedPrefab.prefab"/> <property name="CustomIcon" value="resourceCrushedSand"/> <property name="CustomIconTint" value="64FDBA"/> <property name="TintColor" value="100,253,186"/> <property name="Material" value="Mmythril"/> <property name="Weight" value="1"/> <property name="Stacknumber" value="10000"/> <property name="EconomicValue" value="200"/> <property name="EconomicBundleSize" value="1"/> <property name="Group" value="Resources"/> <property name="UnlockedBy" value="resourceMythrilSchematic"/> </item> <item name="resourceAdamantitePowder"> <property name="HoldType" value="45"/> <property name="Meshfile" value="#Other/Items?Misc/sackPrefab.prefab"/> <property name="DropMeshfile" value="#Other/Items?Misc/sack_droppedPrefab.prefab"/> <property name="CustomIcon" value="resourceCrushedSand"/> <property name="CustomIconTint" value="9E70BB"/> <property name="TintColor" value="158,112,187"/> <property name="Material" value="Madamantite"/> <property name="Weight" value="1"/> <property name="Stacknumber" value="10000"/> <property name="EconomicValue" value="200"/> <property name="EconomicBundleSize" value="1"/> <property name="Group" value="Resources"/> <property name="UnlockedBy" value="resourceAdamantiteSchematic"/> </item> I also added items for the units in the forge, just as they were made in the base game files for unit_iron, etc: <item name="unit_mythril"> <property name="HoldType" value="45"/> <property name="Meshfile" value="#Other/Items?Misc/sackPrefab.prefab"/> <property name="DropMeshfile" value="#Other/Items?Misc/sack_droppedPrefab.prefab"/> <property name="CustomIcon" value="resourceCrushedSand"/> <property name="CustomIconTint" value="64FDBA"/> <property name="TintColor" value="100,253,186"/> <property name="Material" value="Mmythril"/> <property name="Stacknumber" value="30000"/> <property name="Weight" value="1"/> <property name="Group" value="Resources"/> <property name="ResourceUnit" value="true"/> <property name="MeltTimePerUnit" value=".25"/> <!-- forge smelting time --> <property name="UserHidden" value="true"/> <property name="CraftingIngredientTime" value=".5"/> <property name="CreativeMode" value="None"/> </item> <item name="unit_adamantite"> <property name="HoldType" value="45"/> <property name="Meshfile" value="#Other/Items?Misc/sackPrefab.prefab"/> <property name="DropMeshfile" value="#Other/Items?Misc/sack_droppedPrefab.prefab"/> <property name="CustomIcon" value="resourceCrushedSand"/> <property name="CustomIconTint" value="9E70BB"/> <property name="TintColor" value="158,112,187"/> <property name="Material" value="Madamantite"/> <property name="Stacknumber" value="30000"/> <property name="Weight" value="1"/> <property name="Group" value="Resources"/> <property name="ResourceUnit" value="true"/> <property name="MeltTimePerUnit" value=".25"/> <!-- forge smelting time --> <property name="UserHidden" value="true"/> <property name="CraftingIngredientTime" value=".5"/> <property name="CreativeMode" value="None"/> </item> But no matter what I do, I cannot make items scrappable into Mythril Powder. And I can't get the Mythril Powder to melt in the forge into the new forge material I added (unit_mythril). Does anyone have a simple way to explain to me how to make an item scrappable and how to define what it scraps/melts into? Or know of a tutorial that does so? I have searched youtube and google...
  21. Ok, I did my research. In case anyone comes here looking for this answer in the future... As far as I can tell, you can't set multiple possible items for forge tool slots unless you get rid of the restriction that only matching items can be placed there. So the solution (which others have done) is to create a second forge, which uses different items for its tool slots. The tool slots are in XUi/windows.xml. It's best to create a separate tool window for the second forge you've made and then assign it to your custom forge in XUi/xui.xml.
  22. I've already added a third slot to my forges for input items, but I'm trying to provide another way that players can make it go faster. I've created an item called "Superior Bellows" and I want to make it usable in the forge, but I can't find where to add it. I duplicated the original bellows exactly but the new item won't go into the bellows slot. I imagine this is because somewhere there's a line of code that specifies only the toolBellows item for that slot. Is there a way to alter this with XML? I've already tried creating a skill in the tree for CraftingSmeltTime but it has no effect on the forge. I'm assuming because the forge is in possession of the bellows usually and thus the buff is being applied to the forge, not the player. So...is there any way to buff smelting speed?
  23. The tutorial in the fandom.com website for 7 days is a bit unhelpful. It mostly tells you to look at the ServerTools mod for all info related to modding with the API. I've reached the extent of the things I can do with xml modding and want to move into API modding to make some things like a warning message for the server restarts that my server undergoes, some special game events, etc. I'm experienced with C# coding but can't find any info on the ModAPI for this game. I've been vigorously scouring YouTube and Google but am coming up short. So let me ask two simple questions: 1. Does anyone have any links to some good info on ModAPI? Youtube videos or tutorial webpages? 2. To help me solve my immediate problem...how would I create a new ChatMessage rather than just catching one with a handler? I want the server to send one on GameUpdate at the appropriate times before a restart, and I can code that, but I don't know how to actually send the message.
×
×
  • Create New...