Arlesienne Posted October 27, 2016 Share Posted October 27, 2016 Ladies and gentlemen, I'm preparing two new servers with a twist. By such, I'd like to request your help on deciphering what certain character perks (governed by local function common_postinit(inst) from what I understand) mean. Thanks in advance! From Webber (webber.lua): local function common_postinit(inst) inst:AddTag("spiderwhisperer") inst:AddTag("monster") inst:AddTag(UPGRADETYPES.SPIDER.."_upgradeuser") I think the one in bold lets him befriend spiders. Would a character with this inst:AddTag be able to do the same? The second is easy: mobs attacking monsters will view Webber as a monster. The third one... upgrading spider dens? From Willow (willow.lua): local prefabs = { "lighter", } and local function common_postinit(inst) inst:AddTag("pyromaniac") inst:AddTag("expertchef") end Is the one in bold what governs cooking with the lighter? After all when I give lighters to other people, they can't cook. The first function is probably dealing with lower fire damage and possibly freezing when insane, but I deal with it through tuning.lua to make her more like the singleplayer self anyway. Local prefabs may deal with only Willow capable of crafting the lighter, instruct me if that's the case please. From Wickerbottom (wickerbottom.lua): local prefabs = { "book_birds", "book_tentacles", "book_gardening", "book_sleep", "book_brimstone", } local start_inv = { "papyrus", "papyrus", } local function common_postinit(inst) inst:AddTag("insomniac") inst:AddTag("bookbuilder") --reader (from reader component) added to pristine state for optimization inst:AddTag("reader") end local function master_postinit(inst) inst:AddComponent("reader") Bookbuilder (and maybe local prefabs) governs crafting books, right? And reader is shared by Maxwell. Basically the usage of books. Insomniac - can't use bedrolls and tents. From Wendy (wendy.lua): local prefabs = { "abigail_flower", } local function common_postinit(inst) inst:AddTag("ghostlyfriend") end Is ghostlyfriend what makes Wendy capable of using the flower? Or just crafting it? And if adding this function to another, do I need the rest of the code pertaining to Abigail? From Maxwell (waxwell.lua): local prefabs = { "shadow_despawn", "statue_transition_2", } and local function common_postinit(inst) inst:AddTag("shadowmagic") inst:AddTag("dappereffects") --reader (from reader component) added to pristine state for optimization inst:AddTag("reader") end local function master_postinit(inst) inst:AddComponent("reader") I think dappereffects deals with the fast sanity regen, shadowmagic (plus a lot of code I didn't mention since only Maxwell is asinine at home with THEM enough to use puppets, the other magic user in the group wouldn't touch them, so I don't need to figure out this function) - puppets and reader - using books. Local prefabs probably govern summoning and dispelling puppets... From Wes (wes.lua): local prefabs = { "balloons_empty", } local function common_postinit(inst) inst:AddTag("mime") inst:AddTag("balloonomancer") end Balloonomancer is all about making balloons, right? Damn, I'd give it to participants of those wild DST parties... Aaand a disclaimer: I don't consider myself even remotely apt at LUA. I can alter server limits, item durability and protection, mobs' health and attack ratio, speed of characters, code examination quotes and make Willow more of her fiery self. That's the end of it. Please bear with me. If something is too complicated for me (let's face it, it probably is! ), tell me openly. I'm only reading the files' contents and trying to figure it all out through comparison to what happens in the game. It's fumbling in the dark. For plot reasons (in a nutshell: my group will soon get new players for the RPG and a PVP event, and I'd rather limit mods, since singleplayer werebeaver tweaks ave a long history of messing the game up for me)! Thank you so much in advance! Best regards, Arlesienne Link to comment https://forums.kleientertainment.com/forums/topic/71195-deciphering-vanilla-perks-from-prefab-files/ Share on other sites More sharing options...
Serpens Posted October 27, 2016 Share Posted October 27, 2016 Sidenote: If you use code-tags, there is nothing "bold" To the questions: I don't know. I would have to just add these to a character and test it ingame. If it works, fine. If it does not, I would search more in the files to find it out. But you can do this as well =P But maybe another modder is here that knows some of these. I can imagine that @SuperDavid knows if some of those Tags are enough to give the ability. Link to comment https://forums.kleientertainment.com/forums/topic/71195-deciphering-vanilla-perks-from-prefab-files/#findComment-830040 Share on other sites More sharing options...
Lumina Posted October 27, 2016 Share Posted October 27, 2016 You can look at "recipes.lua" in the script folder. In the recipe, when a tag is used to give access to the recipe, it's like this : Recipe("abigail_flower", {Ingredient("petals", 6), Ingredient("nightmarefuel", 1)}, RECIPETABS.MAGIC, TECH.NONE, nil, nil, nil, nil, "ghostlyfriend") or Recipe("spear_wathgrithr", {Ingredient("twigs", 2), Ingredient("flint", 2), Ingredient("goldnugget", 2)}, RECIPETABS.WAR, TECH.NONE, nil, nil, nil, nil, "valkyrie") Meaning that only the character with the related tag will be able to make the recipe. It doesn't mean that only this character will be able to use the item. For example, only Wigfrid is able to do her spear/helmet, but everyone could use it. If you look at the file, you can see how recipe are exclusive or not to some characters. Link to comment https://forums.kleientertainment.com/forums/topic/71195-deciphering-vanilla-perks-from-prefab-files/#findComment-830083 Share on other sites More sharing options...
. . . Posted October 27, 2016 Share Posted October 27, 2016 (edited) inst:AddTag("spiderwhisperer") This allows access to crafting spider dens & taming spiders. inst:AddTag("monster") Makes it that you take no penalty from eating monster meat, spiders don't aggro but pigs & bunnymen do. inst:AddTag(UPGRADETYPES.SPIDER.."_upgradeuser") This allows you to upgrade spider dens with silk. inst:AddTag("expertchef") This allows Willow to cook with the lighter. inst:AddTag("pyromaniac") This allows Willow to craft Willow's Lighter & Bernie, & some other unique stuff for Willow. inst:AddTag("insomniac") This prevents characters from sleeping inst:AddTag("bookbuilder") This allows a character to craft books inst:AddTag("reader") Reader tag is not really needed for a character to read books, all you need is reader component in masterpostinit inst:AddTag("ghostlyfriend") This allows a character to craft Abigail's Flower, I think it also allows for taming Abigail but I haven't tested it yet inst:AddTag("shadowmagic") I'm sure this is what allows a character to craft maxwell shadow minions & maybe use them too. inst:AddTag("dappereffects") I don't really know what this does but I assume it's for doing unique things for Maxwell? inst:AddTag("mime") This makes your character not able to talk. inst:AddTag("balloonomancer") This allows your character to use & craft balloons. This's what all those tags do but you guessed most of them your self ! Edited October 27, 2016 by SuperDavid Link to comment https://forums.kleientertainment.com/forums/topic/71195-deciphering-vanilla-perks-from-prefab-files/#findComment-830105 Share on other sites More sharing options...
Arlesienne Posted October 28, 2016 Author Share Posted October 28, 2016 @Serpens, @lumina, @superdavid, thank you so much, all. Forever beholden ! 19 hours ago, Serpens said: Sidenote: If you use code-tags, there is nothing "bold" To the questions: I don't know. I would have to just add these to a character and test it ingame. If it works, fine. If it does not, I would search more in the files to find it out. But you can do this as well =P But maybe another modder is here that knows some of these. I can imagine that @SuperDavid knows if some of those Tags are enough to give the ability. I'm so sorry! Forum formatting hates me, trust me on that ! Just think of spoilers... I suppose I will create a folder somewhere where the game doesn't dwell, so to speak, copy the relevant prefab files into it for a backup, and try if I can make another character have other perks. 16 hours ago, Lumina said: You can look at "recipes.lua" in the script folder. In the recipe, when a tag is used to give access to the recipe, it's like this : Recipe("abigail_flower", {Ingredient("petals", 6), Ingredient("nightmarefuel", 1)}, RECIPETABS.MAGIC, TECH.NONE, nil, nil, nil, nil, "ghostlyfriend") or Recipe("spear_wathgrithr", {Ingredient("twigs", 2), Ingredient("flint", 2), Ingredient("goldnugget", 2)}, RECIPETABS.WAR, TECH.NONE, nil, nil, nil, nil, "valkyrie") Meaning that only the character with the related tag will be able to make the recipe. It doesn't mean that only this character will be able to use the item. For example, only Wigfrid is able to do her spear/helmet, but everyone could use it. If you look at the file, you can see how recipe are exclusive or not to some characters. Very handy, thank you a lot! 15 hours ago, SuperDavid said: inst:AddTag("spiderwhisperer") This allows access to crafting spider dens & taming spiders. inst:AddTag("monster") Makes it that you take no penalty from eating monster meat, spiders don't aggro but pigs & bunnymen do. inst:AddTag(UPGRADETYPES.SPIDER.."_upgradeuser") This allows you to upgrade spider dens with silk. inst:AddTag("expertchef") This allows Willow to cook with the lighter. inst:AddTag("pyromaniac") This allows Willow to craft Willow's Lighter & Bernie, & some other unique stuff for Willow. inst:AddTag("insomniac") This prevents characters from sleeping inst:AddTag("bookbuilder") This allows a character to craft books inst:AddTag("reader") Reader tag is not really needed for a character to read books, all you need is reader component in masterpostinit inst:AddTag("ghostlyfriend") This allows a character to craft Abigail's Flower, I think it also allows for taming Abigail but I haven't tested it yet inst:AddTag("shadowmagic") I'm sure this is what allows a character to craft maxwell shadow minions & maybe use them too. inst:AddTag("dappereffects") I don't really know what this does but I assume it's for doing unique things for Maxwell? inst:AddTag("mime") This makes your character not able to talk. inst:AddTag("balloonomancer") This allows your character to use & craft balloons. This's what all those tags do but you guessed most of them your self ! Wow, much obliged! I swear it was just blind guessing... My coding doesn't exceed HTML for my ooold, ooold site, heh. Nice logic applies to this language too . As for the reader tag in postmasterinit, would it suffice to put just this after end of AddTag in order to let a character read books? local function master_postinit(inst) inst:AddComponent("reader") Link to comment https://forums.kleientertainment.com/forums/topic/71195-deciphering-vanilla-perks-from-prefab-files/#findComment-830416 Share on other sites More sharing options...
. . . Posted October 28, 2016 Share Posted October 28, 2016 (edited) 6 hours ago, Arlesienne said: As for the reader tag in postmasterinit, would it suffice to put just this after end of AddTag in order to let a character read books? local function master_postinit(inst) inst:AddComponent("reader") My character has just the reader component in master_postinit & he can read books fine. Reader component is all you need to read books, ignore the reader tag it does nothing. Edited October 28, 2016 by SuperDavid Link to comment https://forums.kleientertainment.com/forums/topic/71195-deciphering-vanilla-perks-from-prefab-files/#findComment-830516 Share on other sites More sharing options...
Arlesienne Posted October 28, 2016 Author Share Posted October 28, 2016 Just now, SuperDavid said: My character has just the reader component in master_postinit & he can read books fine. Reader component is all you need to read books, ignore the reader tag it does nothing. Much appreciated, thank you. I'll now see if my blind shenanigans will work! Willow the guinea pig, I think... Link to comment https://forums.kleientertainment.com/forums/topic/71195-deciphering-vanilla-perks-from-prefab-files/#findComment-830517 Share on other sites More sharing options...
Arlesienne Posted October 28, 2016 Author Share Posted October 28, 2016 A quick edit: rejoice, for very bad things are about to happen! Well, already have. I blew my game up. Link to comment https://forums.kleientertainment.com/forums/topic/71195-deciphering-vanilla-perks-from-prefab-files/#findComment-830543 Share on other sites More sharing options...
. . . Posted October 28, 2016 Share Posted October 28, 2016 (edited) @Arlesienne Lol you made a very beginner mistake, here I fixed it for you willow.lua Edited October 29, 2016 by SuperDavid Link to comment https://forums.kleientertainment.com/forums/topic/71195-deciphering-vanilla-perks-from-prefab-files/#findComment-830547 Share on other sites More sharing options...
Arlesienne Posted October 28, 2016 Author Share Posted October 28, 2016 2 hours ago, SuperDavid said: @Arlesienne Lol you made a very beginner mistake, here I fixed it for you willow.lua Skipped one crucial end, am I right ? Thank you SO MUCH! I can't wait to see it in the morning. Forever beholden for your help! Link to comment https://forums.kleientertainment.com/forums/topic/71195-deciphering-vanilla-perks-from-prefab-files/#findComment-830572 Share on other sites More sharing options...
chromiumboy Posted October 29, 2016 Share Posted October 29, 2016 Quick tip; if you use a text editor which can search across files (like notepad++) you can search for 'HasTag("tag_name")' and see where its used in the code (for the most part). Most of the code is pretty intuitive, so you should be able to divine the use of unknown tags once you have some context Link to comment https://forums.kleientertainment.com/forums/topic/71195-deciphering-vanilla-perks-from-prefab-files/#findComment-830603 Share on other sites More sharing options...
Arlesienne Posted October 29, 2016 Author Share Posted October 29, 2016 46 minutes ago, chromiumboy said: Quick tip; if you use a text editor which can search across files (like notepad++) you can search for 'HasTag("tag_name")' and see where its used in the code (for the most part). Most of the code is pretty intuitive, so you should be able to divine the use of unknown tags once you have some context Thank you a lot, much appreciated! Link to comment https://forums.kleientertainment.com/forums/topic/71195-deciphering-vanilla-perks-from-prefab-files/#findComment-830620 Share on other sites More sharing options...
Leonardo Cox Posted October 30, 2016 Share Posted October 30, 2016 "inst:AddTag("monster") Makes it that you take no penalty from eating monster meat, spiders don't aggro but pigs & bunnymen do." Actually the monster tag does not make you immune to the penalties of eating monster meat but this does: inst.components.eater.strongstomach = true Also I don't know if they ever changed this since RoG came to DST but the "monster" tag wouldn't make all spiders be nuetral to you (specifically cave spiders), "spiderwhisperer" tag will though. Link to comment https://forums.kleientertainment.com/forums/topic/71195-deciphering-vanilla-perks-from-prefab-files/#findComment-831068 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