pickleplayer

  • Content Count

    428
  • Joined

  • Last visited

 Content Type 

Profiles

Forums

Downloads

Klei Bug Tracker

Game Updates

Hot Lava Bug Reporter

Everything posted by pickleplayer

  1. Oh, yea that would be a pretty simple way to do it. Thanks! I'm sure your method would have worked, but I realized recently that despawning the player after joining would cause other issues with other parts of the mod, so I had to find an alternative. I did finally figure out how to despawn them as they leave though. Attaching "DeleteUserSession(inst)" to a the playercommon's OnDespawn function does the trick for everyone except a local host. Luckily, this doesn't need to apply to the host, so it works out well for me.
  2. So I'm trying to create a scenario where anyone who joins the server, even if they have played on the server previously, is forced to pick a new character and respawn as if it was their first time joining. I imagine the cleanest way to do this would be to run TheWorld:PushEvent("ms_playerdespawnanddelete", player) as the player disconnects, but haven't been able to get this to work because TheWorld:PushEvent("ms_playerdespawn", player) is already pushed as soon as the player disconnects, and so I'm pretty sure it's trying to delete the player twice. It doesn't crash, but the main menu becomes frozen in time and breaks the game until you restart. If I can't get the character to be removed on disconnecting, another lazy alternative would be to just despawnanddelete a player whenever they connect to the server with an existing character. Unfortunately, "ms_playerjoined" happens any time a player spawns, regardless of if it's their first time picking a character, reconnecting to an existing one, or respawning as a new character within the same session. So I'm kind of unsure where to go from here. Maybe there are some other events that I'm not familiar with, but I don't do a whole lot with server events so I'm hoping someone will know more than I do.
  3. In the singelpayer version of Don't Starve, there are world generation settings that generate the world into islands. But last I heard, the devs were unable to bring that feature into the DST version. That was some years ago though, so maybe there have been changes or ways around it discovered since then, but that is the last I heard on that topic.
  4. It looks like one of the anim files I was relying on was removed a while back and I never noticed. Does anyone happen to have a copy of corner_dude.zip?
  5. Each character has their special properties code in their prefab files. so in the games files you'd find it in scripts/prefabs/wortox.lua You'll notice a lot of similarities in the way it's structured compared to the extended character template, like how it also has a common_postinit and master_postinit function. you'll pretty much have to make your template's code look like his. and he has a lot of code to copy over.
  6. Give it a try and see what happens! Don't be afraid to get messy with things that may or may not work. Trying things out and running them in-game to see what they do is the best way to learn how to mod. There's a good chance that what you have is a step in the right direction.
  7. Things are looking pretty good with this change! To test it out I ran the sim at double speed while running a youtube video, rendering a video, and screen-capturing to get the game down to 20 fps. But the result is a 100% hit rate compared to a 30% hit rate without the change. And all without bloating hitbox lifespan under normal conditions. Thanks!
  8. I think Abigail's AOE is more of a health drain than an actual "attack." I think a better place to start would be to look into special attack abilities that characters have. Wigfrid's file (which is wathgrithr.lua for some reason) has a "heal on hit" mechanic would be a great starting point, since the "battleborn_onattack" function has pretty much all the data you'd need there already, minus spreading damage out to nearby enemies. For splash damage, groundpounder.lua has some basics about damaging nearby entities in it. Something like this is a basic start local x, y, z = inst.Transform:GetWorldPosition() local ents = TheSim:FindEntities(x, y, z, 3, nil) for i, v2 in ipairs(ents) do if v2 ~= self.inst and v2:IsValid() and v2.components.health ~= nil and not v2.components.health:IsDead() and self.inst.components.combat:CanTarget(v2) then self.inst.components.combat:DoAttack(v2, nil, nil, nil, self.groundpounddamagemult) end end This was mostly just copied and pasted scraps from that file, so you'd have to replace any of those variables with whatever they would be in your case
  9. Oh man guys, I gotta be real, I'm not so hot with coding terminology but I'll do my best So basically forego the physics collisions for just checking for entity proximity every frame? I guess that would be one way, but I really like being able to use physics entities because you can attach motors and stuff to them. Also with all the varieties of shapes hitboxes can take, mathing them all out would be rough. and I just finished the 3rd hitbox rewrite, i would hate to do another one. But yep, it's for that mod. Things are coming together, now I'm trying to polish off these rough edges that have existed since the beginning. Ok I'm pretty sure I get what you're saying. Spawn a dummy hitbox on top of every hitbox for the purpose of detecting a collision so that it can then be marked as eligible for removal? I was thinking of something similar at one point but I was worried doubling the number of active physics detections on screen would reduce performance. But I've been tinkering around with it for a while and I think I got something started. So this physics partner attaches itself to the hitbox, and as soon as it collides with it once, it marks it and removes itself. Once I'm done messing with it I'll let you know how it turns out, but I think this might do the trick
  10. So I created a hitbox system that spawns an entity with a given shape and size that uses physics collision callbacks to determine if it has come into contact with anything. The hitbox is given a "lifespan" for number of frames it will exist before it gets removed. This has worked pretty good for the most part, but there is one flaw. For cases where the hitbox needs to exist for a very brief period of time (1 frame) if the game goes through a lag spike during that time, it can cause the hitbox to "skip" it's physics collision check before it gets removed on the next frame. I've been trying to think of ways around this, like if I could somehow tell if a physics entity has been active long enough to run at least 1 physics collision check, but I haven't had any luck so far. Currently, making lifespan a 2 frame minimum seems to help, but it's such a lousy solution and is still not 100% safe from lagspikes. Does anyone else have any ideas?
  11. That's quite a few mods... I'm not that surprised it crashes. It's likely there are at least a handful that are causing issues because of incompatibilities with each other. If you can figure out which ones are crashing, you can disable them one by one until you have a set that works. Since you aren't getting a crash screen, you'll probably need to check the crash log for clues. If you're on a pc, it's usually Documents\ klei\DoNotStarveTogether\client_log.txt If you can post that text file in here, that might help
  12. Can you show us some of your code so we can get an idea as to what you're going for? It can be hard to troubleshoot coding issues without the code
  13. Ooo, yes this is exactly what I was looking for, thank you so much! I should've thought to check out caves, I forgot they still use that texture
  14. Kind of a strange one but maybe someone knows something I don't; So when the Turn of Tides update was released, the old wave and cliff textures essentially became unused. They're still there, and there are some settings that let you turn them back on. But the old cliffside texture "falloff.tex" now fades away sharply into the lower Y axis, and hardly any of it is visible anymore, where it used to be visible for quite a ways down. (ignore the green dot lol) My initial thought was that they simply changed the texture and that I could just replace it with the old one. But when I checked the current falloff texture, it looks unchanged to me. This leads me to believe it's probably being done with some sort of texture altering code behind the scenes, and hopefully something that I could just undo in my mod, but I'm not sure where I would find it. (or if thats even the cause in the first place) I know it's not any sort of fog that applies to any sprites below the Y axis, because other sprites I place down there show up just fine. Anyone have any clue as to where I could find a way to undo whatever caused this texture to change?
  15. Ultroman's reply sums it up pretty well, but I'd like to also point out that it isn't "caves" that cause the issue. it's whenever the world isn't being hosted client-side (if i'm using the terminology correctly) Running any world on a dedicated server, even without caves, will run into all of the same issues.
  16. No Problem! And I'm not totally sure how the interactions would differ when it comes to game updates, but I think the mod should still run, and whatever new inventory sprites they added would just be invisible unless you add them to your sprite file. Or it would crash. One of those two
  17. Since you'll be exporting the png into a tex file yourself, you dont need to do anything with the game's autocompiler or exported folder. So you'll just be adding your altered tex file into an "images" folder like this And to get the game to pull that tex file in, you'll put this in the modmain. (your modmain might already have an "Assets" field in it, in which case you would just add that one line into it) Assets = { Asset( "IMAGE", "images/inventoryimages.tex" ), --(and any other assets you might be using) } Do note that although this method is quick and simple, it'll likely mean that this mod will be incompatible with any other mods that alter base inventory files, as well as any official dst updates that add new inventory images to the game. Like I mentioned earlier, there are likely better ways to do this, but this is the first method that came to mind, and it's made harder since all of them are crammed into one tex file. Not really sure why they decided to do it that way. maybe to save on file clutter?? who knows.
  18. I believe you shouldn't need to worry about any export folders with these. Since these are tex files, they don't need to be converted any further after you've turned your edited png back into tex. You can just put the tex file in a folder called images (or whatever folder name you list in the assets, but i used "images" in my example)
  19. Oh wow, you're right. I've never edited the actual inventory images before, I didn't realize they were all just crammed into one file. Were you actually able to get a viewable image from Krane? I didn't think it would work with tex files. For tex files like intentoryimages.tex, you're going to need a different set of tools. KTools comes with TEXTool and TEXCreator. You can use TEXTool to open the tex file you want and save it as a png to edit it, and then use TEXCreator to export it back into a .tex file to throw into your mod's images folder. From there I beleive you can list the asset in your modmain like the last one, but I think you would do it like this instead: Asset("IMAGE", "images/inventoryimages.tex"), You'll have to forgive me, I'm not all that familiar with these types of sprites, so I may be missing a few steps
  20. There are probably better answers than this one, but one way you could do it is replace the texture files with your own. Here is a useful program by Simplex for viewing and editing .anim files. You'll need to grab whatever anim file you want to replace from the anim folder in the game files, unzip it, and put the contents in a folder somewhere you'll remember. To run it, you'll need to open a command prompt and drag the following 3 things into the prompt: the Krane executable, an input folder (with the contents of the unzipped anim file), and an output folder - in that order, and then run it If everything goes well, the output folder should now contain a set of all the image files that item uses in-game, in png format. You can edit it however you want, then place the folder into your mod in an "exported" folder, and the auto-compiler should compile it all for you, much like they do for character sprites. In your modmain you just need to list the asset along with any other assets like this Assets = { Asset( "ANIM", "anim/whateveritscalled.zip" ), }
  21. When you say "online," do you mean joining another player's game / dedicated server? Or just hosting a game yourself in non-offline mode?
  22. That's an interesting solution, but it might get a bit more complicated than that, since the ghost build might not share everything that the player ghost builds have. If you're really lucky and the ghost mob and player ghosts have identical banks, you can probably get away with just changing the build when they turn into a ghost. inst.AnimState:SetBuild("ghost_build") inst.AnimState:PlayAnimation("idle", true) --start the idle animation Otherwise, you'll need to add inst.AnimState:SetBank("ghost") into the mix and forgo any of the ghost player's animation bank, But I imagine this could have some unintended side effects... I'd check to see if the regular ghost mob has all the same animations that the player ghosts do (haunting things, talking(?) doing whatever ghosts do) and all the same animation names. (you can generally find most animations in a mob's stategraph and do a search for "AnimState:PlayAnimation") If the ghost is missing any animation names, your character will just become invisible for those animations.
  23. can confirm. There is also a limit to how big a animation file can be that it will export. Mine stops exporting with scml files with higher than 165 animations in them. I didn't know about the animation bug with less than 34 frames though. I'm very surprised it's not animations less than 25 frames, because the compiler takes frames in inconsistent intervals of 25/25/50/repeat instead of every 33 frames like you might expect
  24. I've been messing with post-world generation world editing and so far I've gotten everything down except roads that are left floating over water when ground is removed. In DST there isn't an option to remove roads in the word-generation settings before creating a world. It isn't an entity that I can just search for and remove (as far as I know) And I haven't been able to find a texture file for me to replace with some random blank file. Does anyone have any ideas as to how I could remove roads? pre or post world generation? Just the texture, the ground multiplier is easy enough to remove with code.
  25. unfortunately, it looks like spider's targeting ignores anything with the tag "monster." Unless you wanted to try some weird method of flipping the monster tag on/off every 1 second, since they check their surroundings every 1 second, I can't think of an easy way to keep natural agro against both spiders and pigs at the same time. Unless you mod the spiders themselves too and alter their targeting behavior