Fredson Posted May 18, 2015 Author Share Posted May 18, 2015 also i got an issue on another mod, when ever i try to mine it pops this: its a pickaxe prefab Link to comment Share on other sites More sharing options...
DarkXero Posted May 18, 2015 Share Posted May 18, 2015 @Fredson, I tracked down the issue.Your friends shouldn't crash anymore. Regarding your other crash, I don't know what mods affect your pickaxes.Maybe check a mod regarding tool durability?Or were you using a pickaxe from like, the steampunk mod?JacketRedux.zip Link to comment Share on other sites More sharing options...
Fredson Posted May 20, 2015 Author Share Posted May 20, 2015 thanks ill uptade the mod, on the other hand the pickaxe is a custom pickaxe, here:candyshredder.lua Link to comment Share on other sites More sharing options...
Hyaciao Posted May 20, 2015 Share Posted May 20, 2015 (edited) Question related to this. How are you guys going about dealing with the current stat vs max stat issue?I tried to mimic this, and found simply changing the max changes the current hp as well to match the max stat is there a way to maintain the old hp? For example the base character max hp was 20 and then they equip the item it becomes 120. But it also heals them to 120 which means they can always just swap it on and off to recover to full.local function onequip(inst, owner)owner.components.health.maxhealth = 120 owner.components.health:DoDelta(0)endlocal function onunequip(inst, owner) owner.components.health.maxhealth = 20 owner.components.health:DoDelta(0)end Edited May 20, 2015 by Hyaciao Link to comment Share on other sites More sharing options...
DarkXero Posted May 20, 2015 Share Posted May 20, 2015 @Hyaciao, what you posted should do the trick. Using the function SetMaxHealth bumps your current health to the max picked.But doing like that just edits the max value. Link to comment Share on other sites More sharing options...
DarkXero Posted May 20, 2015 Share Posted May 20, 2015 I'm confused as to how the pickaxe is supposed to work.What is supposed to happen after attacking.candyshredder.lua Link to comment Share on other sites More sharing options...
Fredson Posted May 20, 2015 Author Share Posted May 20, 2015 after mining a rock it crashes stating that fn is not especificated Link to comment Share on other sites More sharing options...
DarkXero Posted May 20, 2015 Share Posted May 20, 2015 @Fredson, anyway I think I got it.Look for JacketRedux and candyshredder from me, a bit up from here. Link to comment Share on other sites More sharing options...
Fredson Posted May 23, 2015 Author Share Posted May 23, 2015 thanks dark, no more crashes ) is there any way to make the light thing ? (alias nightvison) Link to comment Share on other sites More sharing options...
DarkXero Posted May 23, 2015 Share Posted May 23, 2015 @Fredson, currently you either have:1) Servers hosted by person2) Servers hosted by computer If server is hosted by person, if the host has nightvision, it will protect everyone near him.The light the host gets is the light used by the game to calculate sanity penalty and the grue attacks. If the server is hosted by the computer, that does't happen, since the lights in all the client worlds are fake.This gets achieved by doing something like this: http://forums.kleientertainment.com/topic/49419-dedicated-server-working-nightvision-component/ There's a reason moggles aren't here. Link to comment Share on other sites More sharing options...
Fredson Posted May 24, 2015 Author Share Posted May 24, 2015 and to make a character craft something already in the game at low cost ? or another ingridient Link to comment Share on other sites More sharing options...
DarkXero Posted May 25, 2015 Share Posted May 25, 2015 @Fredson,You can make alternative recipes for the same item, as shown here:http://forums.kleientertainment.com/topic/54230-helpcould-i-make-some-different-items-to-create-the-a-same-new-item/You can use tags (like sociopath) to limit them to somebody in particular. To make somebody craft something at low cost, look at how the green amulet works:local function onequip_green(inst, owner) owner.AnimState:OverrideSymbol("swap_body", "torso_amulets", "greenamulet") owner.components.builder.ingredientmod = TUNING.GREENAMULET_INGREDIENTMOD inst.onitembuild = function() inst.components.finiteuses:Use(1) end inst:ListenForEvent("consumeingredients", inst.onitembuild, owner)endlocal function onunequip_green(inst, owner) owner.AnimState:ClearOverrideSymbol("swap_body") owner.components.builder.ingredientmod = 1 inst:RemoveEventCallback("consumeingredients", inst.onitembuild, owner)endIt modifies the ingredientmod of the builder component. Link to comment Share on other sites More sharing options...
Fredson Posted May 28, 2015 Author Share Posted May 28, 2015 and if im trying to make the prehatitator and shadow manipulator and low cost to a character specific ? i need to add placer ? Link to comment Share on other sites More sharing options...
DarkXero Posted May 28, 2015 Share Posted May 28, 2015 Placer is the glowy figure you see when trying to place something.In this example, I make what I did in other thread to make alternative board recipes.But with the labs. I also override the function of the builder replica in order to edit the CanLearn function and remove the older recipes from the bar.example.zip Link to comment Share on other sites More sharing options...
Fredson Posted May 31, 2015 Author Share Posted May 31, 2015 it worked, but after modifying the recipe it gives me this: CURL ERROR: Failed to connect to lobby.c.kleientertainment.com port 443: Timed out[00:03:33]: Failed to send server broadcast message[00:05:26]: WARNING! Could not find region 'OUTOFSPACE' from atlas 'images/inventoryimages.xml'. Is the region specified in the atlas?[00:05:26]: Looking for default texture '(null)' from atlas 'images/inventoryimages.xml'.[00:05:26]: images/inventoryimages.xmlLUA ERROR stack traceback: scripts/widgets/image.lua(30,1) in function 'SetTexture' scripts/widgets/image.lua(11,1) in function '_ctor' scripts/class.lua(181,1) in function 'Image' scripts/widgets/ingredientui.lua(28,1) in function 'constructor' scripts/modutil.lua(72,1) in function '_ctor' scripts/modutil.lua(80,1) in function 'IngredientUI' scripts/widgets/recipepopup.lua(280,1) in function 'Refresh' scripts/widgets/recipepopup.lua(290,1) in function 'SetRecipe' scripts/widgets/craftslot.lua(160,1) in function 'Refresh' scripts/widgets/craftslot.lua(169,1) in function 'SetRecipe'... scripts/widgets/crafttabs.lua(238,1) in function 'OnControl' scripts/widgets/widget.lua(115,1) in function 'OnControl' scripts/widgets/widget.lua(115,1) in function 'OnControl' scripts/widgets/widget.lua(115,1) in function 'OnControl' scripts/widgets/widget.lua(115,1) in function 'OnControl' scripts/widgets/widget.lua(115,1) in function 'OnControl' scripts/screens/playerhud.lua(353,1) in function 'OnControl' scripts/frontend.lua(270,1) in function 'OnControl' scripts/input.lua(163,1) in function 'OnControl' scripts/input.lua(362,1)[00:05:26]: images/inventoryimages.xmlLUA ERROR stack traceback: scripts/widgets/image.lua(30,1) in function 'SetTexture' scripts/widgets/image.lua(11,1) in function '_ctor' scripts/class.lua(181,1) in function 'Image' scripts/widgets/ingredientui.lua(28,1) in function 'constructor' scripts/modutil.lua(72,1) in function '_ctor' scripts/modutil.lua(80,1) in function 'IngredientUI' scripts/widgets/recipepopup.lua(280,1) in function 'Refresh' scripts/widgets/recipepopup.lua(290,1) in function 'SetRecipe' scripts/widgets/craftslot.lua(160,1) in function 'Refresh' scripts/widgets/craftslot.lua(169,1) in function 'SetRecipe'... scripts/widgets/crafttabs.lua(238,1) in function 'OnControl' scripts/widgets/widget.lua(115,1) in function 'OnControl' scripts/widgets/widget.lua(115,1) in function 'OnControl' scripts/widgets/widget.lua(115,1) in function 'OnControl' scripts/widgets/widget.lua(115,1) in function 'OnControl' scripts/widgets/widget.lua(115,1) in function 'OnControl' scripts/screens/playerhud.lua(353,1) in function 'OnControl' scripts/frontend.lua(270,1) in function 'OnControl' scripts/input.lua(163,1) in function 'OnControl' scripts/input.lua(362,1) Link to comment Share on other sites More sharing options...
DarkXero Posted May 31, 2015 Share Posted May 31, 2015 @Fredson, what did you change? Link to comment Share on other sites More sharing options...
Fredson Posted May 31, 2015 Author Share Posted May 31, 2015 Just the recipe ingredients local cheap_one = AddRecipe("researchlab3_dummy",{Ingredient("log", 8), Ingredient("flint", 3)}, RECIPETABS.MAGIC, TECH.NONE, "researchlab3_placer",nil, nil, nil,"cheapmagic", "images/inventoryimages.xml", "researchlab3.tex")cheap_one.sortkey = 2local cheap_two = AddRecipe("researchlab4_dummy",{Ingredient("flower", 4), Ingredient("log", 2)}, RECIPETABS.MAGIC, TECH.NONE, "researchlab4_placer", nil, nil, nil, "cheapmagic", "images/inventoryimages.xml", "researchlab4.tex")cheap_two.sortkey = 1STRINGS.NAMES.RESEARCHLAB3_DUMMY = "Shadow Manipulator"STRINGS.NAMES.RESEARCHLAB4_DUMMY = "Prestihatitator"STRINGS.RECIPE_DESC.RESEARCHLAB3_DUMMY = "Shadows come cheap."STRINGS.RECIPE_DESC.RESEARCHLAB4_DUMMY = "Wood To Magic!"local mycharacter = "yin"AddPrefabPostInit(mycharacter, function(inst) inst:DoTaskInTime(0, function() local old = inst.replica.builder.CanLearn inst.replica.builder.CanLearn = function(self, recipename) if recipename == "researchlab3" or recipename == "researchlab4" then return false end return old(self, recipename) end end) inst:AddTag("cheapmagic")end) Link to comment Share on other sites More sharing options...
DarkXero Posted May 31, 2015 Share Posted May 31, 2015 @Fredson, there is no such thing as a flower ingredient.You are thinking of petals, probably. If you have a mod flower prefab though, that can be used, you will need to specify the atlas.LikeIngredient("myprefab", 2, "images/inventoryimages/myprefab.xml") Link to comment Share on other sites More sharing options...
Fredson Posted May 31, 2015 Author Share Posted May 31, 2015 lol, i messed so bad haha my fault Link to comment 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