scarstalgia Posted January 24, 2017 Share Posted January 24, 2017 Hello! I am working on a character mod that has her own Abigail-like ghost. Currently I'm still fighting with how to get the flower to show up on the map and being able to craft the flower if it gets lost. What should I check and what do I need to add to the main.lua file and character prefab?? I've been working on this for a week now, but I still can't understand much of the coding... Any help please? Link to comment https://forums.kleientertainment.com/forums/topic/73586-crafting-abigails-flower-to-character-mod/ Share on other sites More sharing options...
RedHairedHero Posted January 24, 2017 Share Posted January 24, 2017 (edited) There is a lua file called abigail_flower.lua in the prefab folder. For it to show up on the map you want to use inst.MiniMapEntity:SetIcon("Example.png"). As far as crafting goes there are a few threads around mentioning how to make a custom item and adding it in as a recipe, if I can find a link to one of the threads I'll update this. Here's the thread for custom recipe's Edited January 24, 2017 by RedHairedHero Link to comment https://forums.kleientertainment.com/forums/topic/73586-crafting-abigails-flower-to-character-mod/#findComment-860952 Share on other sites More sharing options...
scarstalgia Posted January 25, 2017 Author Share Posted January 25, 2017 Thank you for your reply and linking me! I have the inst. code set in the abigail_flower.lua: local function common_postinit(inst) -- Minimap icon inst.MiniMapEntity:SetIcon("abigailflower.png") end but it still doesn't seem to show up..? Or did I put that under the wrong local function? Also what seems to happen when I add a recipe to my modmain.lua is that the game crashes due to an error and tells me to check my log... But nothing seems to say anything about what caused the error... Link to comment https://forums.kleientertainment.com/forums/topic/73586-crafting-abigails-flower-to-character-mod/#findComment-861217 Share on other sites More sharing options...
scarstalgia Posted January 26, 2017 Author Share Posted January 26, 2017 I am still new to this Forum, so I'm not sure how to edit a post. I've also copied it over inst.MiniMapEntity:SetIcon("abigail_flower.png") to her local function fn () still doesn't seem to show up.. Link to comment https://forums.kleientertainment.com/forums/topic/73586-crafting-abigails-flower-to-character-mod/#findComment-861442 Share on other sites More sharing options...
RedHairedHero Posted January 26, 2017 Share Posted January 26, 2017 Sorry, try adding the below code into the common_postinit function inst.entity:AddMiniMapEntity() inst.MiniMapEntity:SetIcon( "example.tex" ) just replace example.tex with the name of your images tex file. As far as the error goes if you can share your error log it would be helpful, you can find it in Documents/Klei/DontStarveTogether and it should say something like log.txt. Link to comment https://forums.kleientertainment.com/forums/topic/73586-crafting-abigails-flower-to-character-mod/#findComment-861443 Share on other sites More sharing options...
scarstalgia Posted January 26, 2017 Author Share Posted January 26, 2017 (edited) I have done this, but it still doesn't show up... I even tried renaming the map files because I thought it would conflict with the others that were named the same...This is what I got from the client_log This is what I added to my modmain.lua local Ingredient = GLOBAL.Ingredient local customrecipe = AddRecipe("scarlia_ghost_flower", {Ingredient("petals", 6), Ingredient("nightmarefuel", 1)}, GOBAL.RECIPETABS.MAGIC, GLOBAL.TECH.SCIENCE_ONE, "bestfriend_crafter", nil, nil, nil, nil, "images/inventoryimages/abigailflower.xml", "abigailflower.tex") Do I have to add an extra prefab flower for the recipe? Edited January 26, 2017 by scarstalgia Link to comment https://forums.kleientertainment.com/forums/topic/73586-crafting-abigails-flower-to-character-mod/#findComment-861455 Share on other sites More sharing options...
RedHairedHero Posted January 26, 2017 Share Posted January 26, 2017 35 minutes ago, scarstalgia said: I have done this, but it still doesn't show up... I even tried renaming the map files because I thought it would conflict with the others that were named the same... This is what I got from the client_log This is what I added to my modmain.lua local Ingredient = GLOBAL.Ingredient local customrecipe = AddRecipe("scarlia_ghost_flower", {Ingredient("petals", 6), Ingredient("nightmarefuel", 1)}, GOBAL.RECIPETABS.MAGIC, GLOBAL.TECH.SCIENCE_ONE, "bestfriend_crafter", nil, nil, nil, nil, "images/inventoryimages/abigailflower.xml", "abigailflower.tex") Do I have to add an extra prefab flower for the recipe? You typed in GOBAL.RECIPETABS.MAGIC This is most likely the reason it crashed. I would also attempt to load the game without any other mods. I'd have to do more research to see about the map icon and get back to you. Link to comment https://forums.kleientertainment.com/forums/topic/73586-crafting-abigails-flower-to-character-mod/#findComment-861467 Share on other sites More sharing options...
scarstalgia Posted January 26, 2017 Author Share Posted January 26, 2017 Hmm.. What is it I need to type in instead? Is it not the magic tab for the recipe that needs to be used? I tried typing in "TOWN" instead and it still crashes. I don't really have any other mods running except my own. Every time I try to load my local server to test the mod out, it crashes... But thank you for your continuous help! Link to comment https://forums.kleientertainment.com/forums/topic/73586-crafting-abigails-flower-to-character-mod/#findComment-861475 Share on other sites More sharing options...
Lumina Posted January 26, 2017 Share Posted January 26, 2017 21 minutes ago, scarstalgia said: Hmm.. What is it I need to type in instead? I guess problem is that you typed GOBAL instead of GLOBAL. Link to comment https://forums.kleientertainment.com/forums/topic/73586-crafting-abigails-flower-to-character-mod/#findComment-861490 Share on other sites More sharing options...
scarstalgia Posted January 26, 2017 Author Share Posted January 26, 2017 omg, sorry. I didn't see that typo. I'm an idiot. Thank you! Link to comment https://forums.kleientertainment.com/forums/topic/73586-crafting-abigails-flower-to-character-mod/#findComment-861508 Share on other sites More sharing options...
Lumina Posted January 26, 2017 Share Posted January 26, 2017 Nothing idiot about not seeing a typo, it's hard to see because when we read something we autocorrect small mistake like this. It took me some time to see it too. Link to comment https://forums.kleientertainment.com/forums/topic/73586-crafting-abigails-flower-to-character-mod/#findComment-861509 Share on other sites More sharing options...
scarstalgia Posted January 26, 2017 Author Share Posted January 26, 2017 1 hour ago, Lumina said: Nothing idiot about not seeing a typo, it's hard to see because when we read something we autocorrect small mistake like this. It took me some time to see it too. Heheh.. Yes. It's very confusing. Thank you for understanding. (: The game has stopped crashing, but I still don't see Abigail's Flower in the magic crafting tab.. Continuing to look around what I might have done wrong for trying to have her flower show up Link to comment https://forums.kleientertainment.com/forums/topic/73586-crafting-abigails-flower-to-character-mod/#findComment-861548 Share on other sites More sharing options...
RedHairedHero Posted January 27, 2017 Share Posted January 27, 2017 For the recipe under Prestihatator you want to do GLOBAL.RECIPETABS.MAGIC, GLOBAL.TECH.MAGIC_TWO for the Shadow Manipulator just change out the word TWO for THREE. I'm not quite sure about the minimap icon unfortunately. Link to comment https://forums.kleientertainment.com/forums/topic/73586-crafting-abigails-flower-to-character-mod/#findComment-861691 Share on other sites More sharing options...
Lumina Posted January 27, 2017 Share Posted January 27, 2017 For minimap icon, in addition to minimap code on the item, i usually need this line in modmain : AddMinimapAtlas("minimap/yourprefab.xml") And the asset in modmain too. But if you use game assets i don't know what you need exactly... Link to comment https://forums.kleientertainment.com/forums/topic/73586-crafting-abigails-flower-to-character-mod/#findComment-861725 Share on other sites More sharing options...
scarstalgia Posted January 27, 2017 Author Share Posted January 27, 2017 (edited) Quote GLOBAL.RECIPETABS.MAGIC, GLOBAL.TECH.MAGIC_TWO I used this code, but now my crafting tabs are swapped... meaning, the first few craftable items (flower garland, straw hat etc...) in the survival tab have now moved to the magic tab, and in the magic tab the other way around... Whoops.. I think it was always like that... ;;; This is what it looks like now, but I still don't see it being craftable... local Ingredient = GLOBAL.Ingredient local customrecipe = AddRecipe("scarlia_ghost_flower", {Ingredient("petals", 6), Ingredient("nightmarefuel", 1)}, GLOBAL.RECIPETABS.MAGIC, GLOBAL.TECH.MAGIC_TWO, "bestfriend_crafter", nil, nil, nil, nil, "images/inventoryimages/abigailflower.xml", "abigailflower.tex") 8 hours ago, Lumina said: For minimap icon, in addition to minimap code on the item, i usually need this line in modmain : AddMinimapAtlas("minimap/yourprefab.xml") And the asset in modmain too. But if you use game assets i don't know what you need exactly... I added both the asset and the minimapatlas to my modmain... Still nothing.. ): Edited January 27, 2017 by scarstalgia Link to comment https://forums.kleientertainment.com/forums/topic/73586-crafting-abigails-flower-to-character-mod/#findComment-861770 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now