zetake

  • Content Count

    98
  • Joined

  • Last visited

Community Reputation

12 Good

About zetake

  • Rank
    Junior Member
...

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Enable
  1. Hi, My mod requires to have custom ingame config, because settings can only be generated ingame. I know how to do custom config, but I know nothing about screens. Is there any tutorial or mod example with custom ingame config screens? To be precise, I need this to save custom locations of custom widgets in numbers that reflect the resolution position, I mean numbers from GetWorldPosition(). Because my mod allows to change size of custom widgets and will have option to relocate them, to fit them on screen. So I think the best way would be to save changes in custom ingame screen. Nonetheless I can do it via keys or learn how to do it in my own screen. I'm just figuring out what would be the best way to do it, I mean what would be the most comfortable way for players to do it. Do you have any ideas about this? So far, I enable relocate mode by key that open template widget which is copy of original, but with different color, and I do change of position by dragging it. I would like to be able to open relocate mode from custom ingame config and to be able to save position in that screen.
  2. Your tutorial is missing a thing. Handling empty return results. I mean not every function has a return or there might be no need to return. So I think using this would be more convenient. if ret ~= nil then if type(ret) == "table" then if unpack(ret) ~= nil then return unpack(ret) end else return ret end end
  3. local function Func(inst) GLOBAL.TheInput:AddKeyDownHandler(GLOBAL.KEY_V, function() local pt = GLOBAL.TheInput:GetWorldPosition() local angle = inst:GetAngleToPoint(pt) inst.components.locomotor:RunInDirection(angle) end) end AddPrefabPostInit("shadowlumber", Func) But where do you have prefab shadowlumber? I can't find it anywhere.
  4. I have looked at it, and it has many errors. I won't fix them for you, but you can do it yourself. Just take a look at log.txt file. 24881-logs-and-useful-info-for-bug-reports/
  5. After testing it a lot I came to conclusion. Every floatable item has its own ripple animation. The same animation is used, only with a changed size/width depending on a item, with some exceptions. OverrideSymbol doesn't change animation, it just changes textures used in animation. Folders in animations are the Symbols. You can find ripple textures in ripple_build.zip. There is custom ripple animation in log.zip. But it doesn't look smooth after compiling. So I don't know where you can find ripple animation to use. Can someone provide ripple animation file? And tell how to properly compile it? (Optional) EDIT1: Compiler messes up animations. EDIT2: Game animations are in 30fps, but compiler change them to 40fps. That's why it looks wrong. There are 2 options to make it look right. 1. Compile animation in 30fps. I don't know how to do it with Spriter files, but you can do it in BinaryConverter. But with BinaryConverter you can only do it manually. I mean you have to change x, y, scale_x and scale_y up to 180 tags each one of them. In text editor to match your custom item. At least values of them can be generated in Spriter. Can someone tell how to compile Spriter animations in 30fps? 2. Make 40fps animation. Can someone provide 40fps ripple animation? EDIT3: Change of fps in animations is done properly. Issue is with x, y tags of water_ripple. In project file they are the same for every key. But after compilation, they get changed. Any solutions? EDIT4: Nevermind. Even with everything done good, animation still looks wrong. Less wrong, but still not right. So I guess it has to be 30fps or you need to make new textures for 40fps. So to have ripple animation, you have to add idle_water animation to your custom item Spriter file. And in Spriter you need to change your item position to match ripple animation. And you also need to change ripple animation size/width to match your custom item. By default ripple textures are used from ripple_build.zip. Only if symbols in your animation are named "water_ripple" and "water_shadow" So it doesn't make sense to add those textures again with your mod. But I couldn't find better way than replacing ripple textures with 1x1 empty images. What is the way to omit textures but keep properties of them when compiling animations? EDIT: Figured out how it's done. You need to have 2 compiled animations. 1. without symbols and textures that you don't won't to include. 2. with added symbols and textures. Now you just replace anim.bin in 1st animation with the anim.bin from 2nd animation. And again same situation, when you need to add basic game elements to your mod, but game doesn't support it. So instead of using game assents, you end up using copy of them.
  6. Check out log animation file. I mean decompile log,zip and look at spriter animation file. (.scml)
  7. This function makes that items floats. MakeInventoryFloatable(inst, "idle_water", "idle") And absence ot this function makes items sink. idle_water is the name of water animation and idle is the name of land animation. If you don't have them, they should be added in your Spriter Project, About ripples, try this /109159-how-to-make-water-ripples-for-custom-items/.
  8. My bad, I didn't use brackets in an array. red1500.lua
  9. No need for fn. Function onmoonphasechange is not declared before function onbecamehuman. That's why error. Try this red1500.lua
  10. Function fn is in Don't Starve. And I was giving code for it. In Don't Starve Together there is common_postinit and master_postinit. Oh, you have already OnLoad. Not sure how your mod works, but I think you should take onmoonphasechange from here: --monn xdd inst:WatchWorldState("moonphase", onmoonphasechange) --onmoonphasechange(inst, TheWorld.state.moonphase) and put it here. -- When the character is revived from human local function onbecamehuman(inst) -- Set speed when not a ghost (optional) inst.components.locomotor:SetExternalSpeedMultiplier(inst, "red1500_speed_mod", 1.1) onmoonphasechange(inst, TheWorld.state.moonphase) end Because function onbecamehuman is called from OnLoad and it's also called from Event Listener, which makes sense now, my bad.
  11. No, just put the code that I've written in your prefab function which should be named fn. local fn = function(inst) --your other code can be here inst.OnLoad = function() --your other code can be here onmoonphasechange(inst, GLOBAL.GetClock():GetMoonPhase()) --your other code can be here end --your other code can be here end I mean the function you pass to MakePlayerCharacter: OnLoad is called only once when game loads character into world. Which means this code makes no sense to be there. I didn't offered OnSave, because you would need to save things that don't save and then load them. Which would be a lot of work. Instead you can just load again transformation after entering world.
  12. I guess add your function to function OnLoad in your prefab. inst.OnLoad = function() onmoonphasechange(inst, GLOBAL.GetClock():GetMoonPhase()) end Don't know if this will work, but you should get there.
  13. Version 1.15

    58 downloads

    Don't Starve only and only for mods with amulet slots. Live Giving Amulet resurrection fix. Construction Amulet recipe popup fix.
  14. So I didn't return value returned by original function. Thanks, now it works. Ah, I see. If a function has a return, you not only have to call original function, but you also have to return value returned by that original function or post edited value of it. Because original function is meant to return value to wherever it was called from, but after modification it return value to your modified function instead, and your modified function doesn't pass it on, by default. So, if you don't return it like me, it will fail for you also.