Serpens Posted August 19, 2016 Share Posted August 19, 2016 (edited) Hi =) I was very disappointed that bigfoot does not exist in DST, but I found a mod from DarkXero that adds him http://steamcommunity.com/sharedfiles/filedetails/?id=556027744 Unfortunaltey it seems the mod is not up to date. The animation as a client stucks and bigfoot makes no damage to mobs. But damage to players and structures works. And regarding to a comment on the mod page, it seems also the blueprint does not appear at glommers statue.@DarkXero what to do to fix this? Edited August 21, 2016 by Serpens Link to comment https://forums.kleientertainment.com/forums/topic/69654-solved-darkxeros-bigfoot-mod/ Share on other sites More sharing options...
DarkXero Posted August 19, 2016 Share Posted August 19, 2016 (edited) The what gets stuck? The shockwave doesn't deal damage. It only works nearby stuff. Damage only applies to mobs that stand right under the footprint. Also by design, no blueprints are used. I made the statue regenerate every full moon, and it teaches the recipe to the person that mines it. This way you don't have a trillion blueprints filling your base if you decide to mine the statue. You can also pick the variant where the recipe can be built at a ancient pseudoscience station in the ruins. Edited August 19, 2016 by DarkXero Link to comment https://forums.kleientertainment.com/forums/topic/69654-solved-darkxeros-bigfoot-mod/#findComment-804869 Share on other sites More sharing options...
Serpens Posted August 19, 2016 Author Share Posted August 19, 2016 Ah sry, I did not wrote which animation. I mean the animation from the char ringing the bell. Ah yes, the damage for mobs right under the foot works Hm... I would like to tweak it a bit. I think the shockwave should deal 1/5 of the foot damage and stun all mobs for ~5 seconds. How could I achieve this? Thank you for clarifying the thing with the blueprint Link to comment https://forums.kleientertainment.com/forums/topic/69654-solved-darkxeros-bigfoot-mod/#findComment-804980 Share on other sites More sharing options...
Serpens Posted August 19, 2016 Author Share Posted August 19, 2016 (edited) shockwave damage question solved I just had to add areadamage to the foot: inst.components.combat:SetAreaDamage(14, 4/100) --> 4% from 2500 is 100 dmg. since the damagerings from groudnpounder are 2 by default, you will get twice 100 dmg if too close to the foot. If normal close 100 dmg. Stunning is not needed I think. BUT Animation would be nice if someone knows a fix. Animation when ringing the bell as client. Edited August 19, 2016 by Serpens Link to comment https://forums.kleientertainment.com/forums/topic/69654-solved-darkxeros-bigfoot-mod/#findComment-805018 Share on other sites More sharing options...
DarkXero Posted August 19, 2016 Share Posted August 19, 2016 Oh yes, it seems the play state in the server doesn't match the beginning animations of the play state on the client. So there are two solutions: 1) AddStategraphPostInit("wilson", function(sg) sg.states.play_bell.tags.nopredict = true end) 2) local EQUIPSLOTS = GLOBAL.EQUIPSLOTS local FRAMES = GLOBAL.FRAMES local State = GLOBAL.State local TimeEvent = GLOBAL.TimeEvent local EventHandler = GLOBAL.EventHandler AddStategraphState("wilson", State { name = "play_bell", tags = {"doing", "playing"}, onenter = function(inst) inst.components.locomotor:Stop() inst.AnimState:PlayAnimation("action_uniqueitem_pre") inst.AnimState:PushAnimation("bell", false) inst.AnimState:OverrideSymbol("bell01", "bell", "bell01") inst.AnimState:Show("ARM_normal") inst.components.inventory:ReturnActiveActionItem(inst.bufferedaction ~= nil and inst.bufferedaction.invobject or nil) end, timeline = { TimeEvent(15 * FRAMES, function(inst) inst.SoundEmitter:PlaySound("dontstarve_DLC001/common/glommer_bell") end), TimeEvent(60 * FRAMES, function(inst) inst:PerformBufferedAction() end), }, events = { EventHandler("animover", function(inst) if inst.AnimState:AnimDone() then inst.sg:GoToState("idle") end end), }, onexit = function(inst) if inst.components.inventory:GetEquippedItem(EQUIPSLOTS.HANDS) then inst.AnimState:Show("ARM_carry") inst.AnimState:Hide("ARM_normal") end end, }) Link to comment https://forums.kleientertainment.com/forums/topic/69654-solved-darkxeros-bigfoot-mod/#findComment-805128 Share on other sites More sharing options...
rons0n Posted August 20, 2016 Share Posted August 20, 2016 (edited) Alright I used the second method~ Also thanks DarkXero! Also also I reduced the damage to 2000 from 2500. Hope no one minds. Edited August 20, 2016 by rons0n Link to comment https://forums.kleientertainment.com/forums/topic/69654-solved-darkxeros-bigfoot-mod/#findComment-805220 Share on other sites More sharing options...
Serpens Posted August 20, 2016 Author Share Posted August 20, 2016 (edited) @DarkXero I added the bigfoot mod to a game I started without the mod and I already destroyed the glommer statue. Now the mod is active, but the glommers statue did not regenerate at fullmoon. Why? Can I change this, so the mod also works in a game started without it? The mod is active, since I'm able to c_give("bell",1) Edited August 20, 2016 by Serpens Link to comment https://forums.kleientertainment.com/forums/topic/69654-solved-darkxeros-bigfoot-mod/#findComment-805402 Share on other sites More sharing options...
DarkXero Posted August 21, 2016 Share Posted August 21, 2016 57 minutes ago, Serpens said: Why? The bell recipe can be accessed by either the ancient pseudoscience station, or by mining the statue, exclusively. By default, the recipe can be crafted at the ruins. The statue only regenerates when the recipe can only be obtained by mining the statue yourself. So check at your mod configuration that you selected "Statue". Link to comment https://forums.kleientertainment.com/forums/topic/69654-solved-darkxeros-bigfoot-mod/#findComment-805414 Share on other sites More sharing options...
Serpens Posted August 21, 2016 Author Share Posted August 21, 2016 ... what a shame ... you are right, it was ruins... I did not expected that, cause when I implemented the areadamage, I also set "statue" to default setting. Thank you Link to comment https://forums.kleientertainment.com/forums/topic/69654-solved-darkxeros-bigfoot-mod/#findComment-805425 Share on other sites More sharing options...
Serpens Posted September 17, 2016 Author Share Posted September 17, 2016 (edited) @DarkXero I experienced the following regarding glommer statue: - I destroyed the statue shortly before fullmoon and got the recipe. - On fullmoon, the statue was complete again and I tried to pick up the glommer flower. - When hovering over it, it said "rightclik -> Pick" (I still had pickaxe in hands). When I did rightclick, wilson did the slow pickup animation but did not pickup anything. - I unequipped the pickaxe and hit Space, finally I got the flower. I think it was without the long pickup animation, but not sure... - But the look of the statue did not change. It still had the image with the flower. - The fullmoon ended and the statue finally looked correct. Can you imagine what might be wrong? What is the command to make it fullmoon? That way I could better test if changes to script are helping. Edited September 17, 2016 by Serpens Link to comment https://forums.kleientertainment.com/forums/topic/69654-solved-darkxeros-bigfoot-mod/#findComment-814790 Share on other sites More sharing options...
DarkXero Posted September 17, 2016 Share Posted September 17, 2016 1 hour ago, Serpens said: Can you imagine what might be wrong? Did you have caves enabled or not? I can't seem to replicate it. 1 hour ago, Serpens said: What is the command to make it fullmoon? That way I could better test if changes to script are helping. Start world, LongUpdate(10*480), now it will be full moon. After that, c_regenerateworld(). Maybe pick winter as starting season so a full moon lasts longer during your tests. The issue with full moons is that the phase gets calculated right when the night starts. So if you change the full moon phase after the night begins, some stuff won't work properly (like the blue ambient lighting). And if you change it before, you lose the change because again, moon phase changes at the start of the phase. Something else you can do, if copypaste clock.lua into the components folder of a mod, and edit CalculateMoonPhase to return "full" every time. Link to comment https://forums.kleientertainment.com/forums/topic/69654-solved-darkxeros-bigfoot-mod/#findComment-814821 Share on other sites More sharing options...
Serpens Posted September 17, 2016 Author Share Posted September 17, 2016 yes had caves enabled. I will test it again within the next minutes, if I can reproduce it... I also had "Auto Actions" mod active, maybe this caused the problem? Link to comment https://forums.kleientertainment.com/forums/topic/69654-solved-darkxeros-bigfoot-mod/#findComment-814823 Share on other sites More sharing options...
Serpens Posted September 17, 2016 Author Share Posted September 17, 2016 (edited) @DarkXeroit is not that easy to get fullmoon O.ô I tried it first with starting game, type in console: LongUpdate(10*480) , but this did not much, still day and the following night was normal. Then I entered c_regenerateworld() and again LongUpdate(10*480) and directly after it regenerate, but nothing. But this is exactly what you wrote.. or not? So I tried the clock.lua solution, but you can't simply put clock.lua in mods components, cause this throws error in line 186. So now I tried to do the hack trick, but I'm not sure how this works for components, I tried: local function GetUpvalue(func, name) local debug = GLOBAL.debug local i = 1 while true do local n, v = debug.getupvalue(func, i) if not n then return nil, nil end if n == name then return v, i end i = i + 1 end end local function SetUpvalue(func, ind, value) local debug = GLOBAL.debug debug.setupvalue(func, ind, value) end local function HackClock() local clock_fn = GLOBAL.require("components/clock") local CalculateMoonPhase, CalculateMoonPhase_index = GetUpvalue(clock_fn, "CalculateMoonPhase") local old_CalculateMoonPhase = CalculateMoonPhase local new_CalculateMoonPhase = function(cycles) print("HIER") return "full"--MOON_PHASE_CYCLE[cycles % #MOON_PHASE_CYCLE + 1] end SetUpvalue(clock_fn, CalculateMoonPhase_index, new_CalculateMoonPhase) end AddComponentPostInit("clock", HackClock) but clock_fn is a table, not a function... Edit: I will try clock_fn.fn again.. okay, this is nil.... edit2: I tried to find out what clock_fn contains, and it contains these things: [00:00:40]: WatchWorldState = function: 16B531E0 [00:00:40]: is_a = function: 4EBBDC20 [00:00:40]: StopWatchingWorldState = function: 16B53260 [00:00:40]: __index = table: 4ED85160 [00:00:40]: _ctor = function: 4EBBDA40 But I think that does not help? Edited September 17, 2016 by Serpens Link to comment https://forums.kleientertainment.com/forums/topic/69654-solved-darkxeros-bigfoot-mod/#findComment-814843 Share on other sites More sharing options...
DarkXero Posted September 17, 2016 Share Posted September 17, 2016 1 hour ago, Serpens said: I tried it first with starting game, type in console: LongUpdate(10*480) , but this did not much, still day and the following night was normal. That advances the clock 10 days. In the night of day 11, you have a full moon night. If you are playing with caves enabled, remember to have the "Remote:" on the left. If you are copypasting, you most likely turned it off by pressing the Ctrl key. 1 hour ago, Serpens said: Then I entered c_regenerateworld() and again LongUpdate(10*480) and directly after it regenerate, but nothing. But this is exactly what you wrote.. or not? It should. On the night of day 11 you have a full moon night. 1 hour ago, Serpens said: So now I tried to do the hack trick, but I'm not sure how this works for components, I tried: local function GetUpvalue(func, name) local debug = GLOBAL.debug local i = 1 while true do local n, v = debug.getupvalue(func, i) if not n then return nil, nil end if n == name then return v, i end i = i + 1 end end local function SetUpvalue(func, ind, value) local debug = GLOBAL.debug debug.setupvalue(func, ind, value) end local function HackClock(self) local update_fn = self.OnUpdate local CalculateMoonPhase, CalculateMoonPhase_index = GetUpvalue(update_fn, "CalculateMoonPhase") local old_CalculateMoonPhase = CalculateMoonPhase local new_CalculateMoonPhase = function(cycles) return 5 end SetUpvalue(update_fn, CalculateMoonPhase_index, new_CalculateMoonPhase) end AddComponentPostInit("clock", HackClock) In this particular case (because self.OnUpdate exists after the component is constructed), you do it like this. Link to comment https://forums.kleientertainment.com/forums/topic/69654-solved-darkxeros-bigfoot-mod/#findComment-814884 Share on other sites More sharing options...
Serpens Posted September 17, 2016 Author Share Posted September 17, 2016 (edited) okay, thank you @DarkXero I was able to reproduce it, the same way I already described. I'm quite sure, that the old removed glommer statue is removed AFTER fullmoon. And the old statue is causing the trouble. If you play without caves, the only bug is, that the look from statue seems to not change (cause the destroyed statue als shows the flower), until fullmoon is gone. If you play with cave, you can't collect flower with rightclick, I guess because he tries to collect it from the old statue or simular. edit: or the old removed statue, spawns an unreachable flower shortly before it is removed Edited September 17, 2016 by Serpens Link to comment https://forums.kleientertainment.com/forums/topic/69654-solved-darkxeros-bigfoot-mod/#findComment-814931 Share on other sites More sharing options...
DarkXero Posted September 17, 2016 Share Posted September 17, 2016 2 hours ago, Serpens said: I was able to reproduce it, the same way I already described. Very well. I wrote a different modmain. Try it out. modmain.lua Link to comment https://forums.kleientertainment.com/forums/topic/69654-solved-darkxeros-bigfoot-mod/#findComment-814986 Share on other sites More sharing options...
Serpens Posted September 17, 2016 Author Share Posted September 17, 2016 (edited) Thanks! ah, good to see you also added locomotor:stop thing, cause in the previous modmain it happend that I don't learn bell, if I move meanwhile. Everything seems to work now In the previous modmain, if every night is fullmoon, every night a new glommer spawned (if the old one was dead already). In the new modmain, the new glommer will spawn after 4-5 days. I think this is a some kind of counter in the glommer statue, and since the statue is not replaced in new modmain, the counter works. But I think in normal game, were it is not every night fullmoon, this will be no problem. Edited September 17, 2016 by Serpens Link to comment https://forums.kleientertainment.com/forums/topic/69654-solved-darkxeros-bigfoot-mod/#findComment-815003 Share on other sites More sharing options...
DarkXero Posted September 17, 2016 Share Posted September 17, 2016 24 minutes ago, Serpens said: ah, good to see you also added locomotor:stop thing, cause in the previous modmain it happend that I don't learn bell, if I move meanwhile. Yes. I noticed it was missing when I when examining the state again. I also added a failsafe on onexit so the recipe is learned even if you are interrupted with a hit or anything. 25 minutes ago, Serpens said: In the previous modmain, if every night is fullmoon, every night a new glommer spawned (if the old one was dead already). In the new modmain, the new glommer will spawn after 4-5 days. I think this is a some kind of counter in the glommer statue, and since the statue is not replaced in new modmain, the counter works. But I think in normal game, were it is not every night fullmoon, this will be no problem. Yes that was what happened, since I replaced an old statue for a brand new one. Now I just give the workable and lootdropper components back to the same statue. This way I keep everything else flower/glommer related. Normally, the statue has a timer with a 3 day cooldown before it can spawn a new flower, so that's intended. My code was actually the game-breaking one. Link to comment https://forums.kleientertainment.com/forums/topic/69654-solved-darkxeros-bigfoot-mod/#findComment-815011 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