• Content Count

  • Joined

  • Last visited

Community Reputation

752 Excellent

About Ultroman

  • Rank
    Senior Member

Recent Profile Visitors

4567 profile views
  1. Also, randomly the item icon doesn't show up for items "in your cursor". It just shows the number in the stack.
  2. We're having problems now on our server (non-dedicated), where we can't seem to be allowed to attack things that don't have aggro on us or something like that. The big white rabbits are a good example, because the problem goes away when we pick up meat so they get angry. We can continuously hit but not damage little sleeping rabbits (in Caves) with pickaxes, hammers, etc., but nothing happens to them. They just keep sleeping. Something is definitely wrong with the prioritization. But this part getting an overhaul is very welcome! Thank you!
  3. All equipable items have "onequip" and "onunequip" events you can listen to using ListenForEvent. I can't remember if the keywords have the "on" on there, or if it's just "equip" and "unequip".
  4. Sorry for the late and useless answer: I don't know. It looks correct, but since I can't see the whole code, I can't be sure. The code looks right. Perhaps you have to move the inedibles-list outside the master_postinit, so it doesn't get cleared when the function ends?
  5. Seems like there's a new version of that mod https://steamcommunity.com/sharedfiles/filedetails/?id=2527328931 Editing actions is difficult to get right, unless you know what you're doing OR you have a mod that already has the foundation for doing it. If you don't know how to code at all, then the first thing I'd do in your place, is to ask the mod author if they can add the functionality for you, if it seems like it fits their mod perfectly, which could be the case here. If they refuse, then you'd have to edit that person's mod or make your own, but then you can't use that mod in multiplayer unless you make the server (I'm assuming it's a server-side mod) or you publish the altered mod (but then you should at least try to seek permission from the current author(s) if you're going to republish their work).
  6. You need to read the sacred Lua texts first, young padawan, or you might think Lua works like other languages, when it's a wild primordial beast in comparison :P I bought Beyond Compare 4 and am loving it to bits. Yes, I keep the last extracted contents of the scripts.zip file in a folder, and then after an update, I extract the new scripts.zip file into a different folder, then right-click both and choose to use them for a comparison. It opens a side-by-side window of the folder structures, and it highlights any files with changes. It initially does just a checksum check, I think, but you can make it do a bitwise comparison to get more precision. Then I just have a separate list of the files I know I change things in or use critical things in for my mods, and check to see if any of those files have changed, and then I can double-click on the file to get a side-by-side view of the two files with the changes highlighted, with the option to only show the changed lines, to quickly get an overview. It can also be used to do 2-way and even 3-way merges, when used as an external diff-tool in for example SourceTree. Exactly, I wouldn't want to incur extra performance costs to do this, which is why I just accepted falling back on the diff-tool.
  7. I love this write-up! In few words, you have connected so many dots that I'm even still not feeling 100% confident about, even after writing many mods. Thanks for this! It will surely help many people understand how to "think in Lua". One thought: I can only hope that Klei adds new return values and parameters at the ends, keeping the "assumed structure", and I can only hope that those values still carry the same data, after a change has been made. If we're just slightly pessimistic, would it not be better to have the mod fail and tell you where it is failing, rather than having it working improperly in silence? I would actually rather be notified that some code that my mod is targeting has been changed, but alas, I have to check manually each update (using a diff tool on the previous game code). I get that that's a choice one has to make as a developer, whether to go for maximum uptime or maximum correctness, but I'm interested in your thoughts on this (and anyone else's, for that matter). Happy New Years!
  8. Hmm...not sure what could be wrong. Perhaps they changed the way the code works in the game. I don't have time to find the solution atm.
  9. That makes sense, since you've pasted the code in after the "return inst" line, which completes the fn() function.
  10. Wow, thanks! That is a lot. I'll add them later, when I've figured out how to categorize them all.
  11. Thanks, but I'm no legend, and most definitely not "the legend" XD These people would fit the bill IMO: Rezecib, Serpens (serp), CarlZalph, MobbStar, squeek, star, gregdwilson, fidooop, afro1967 (and the ones I am forgetting), along with the Klei team, especially Zarklord, Cheerio and Jon. Those are my legends
  12. That is true and good to know for people. I will add it. Thanks! EDIT: I have added this tip and also did a pass cleaning up some naming discrepancies and added some more tips on periodic tasks.
  13. Thanks for linking this! I have added @C_Thun's awesome guide to my tutorial collection. We have been needing an updated guide like this for years.
  14. That can work like that. Nice. I'd probably rename the parameter from "inst" to "source" or "caster", though, to make its name say what it is. You've done triple-checks here. You don't need that. if v ~= inst and v:IsValid() and not v:IsInLimbo() then if v:IsValid() and not v:IsInLimbo() then if v ~= inst and v:IsValid() and not v:IsInLimbo() then You only need the first if-statement, because all the if-statements that are under it in the hierarchy are only checked if they pass the first if-statement. -- If myNumber is 1, then only the first if-statement is checked, and since it is false, it goes into the else-statement at the bottom. -- None of the other if-statements within the first if-statement need to check the same things, because they have already been checked. if myNumber ~= 1 then print("Number is not 1") if myNumber ~= 2 then print("Number is neither 1 or 2") else print("Number is 2") end else print("Number is 1") end
  15. Then you need to move the entire doAreaDamage function over into modmain.lua, outside of any other function or closure. Then exchange the code as you proposed. However, since you get the player as a parameter in your function, you should change "ThePlayer" to "player" in the line where you declare and set your x, y and z.