• Content Count

  • Joined

  • Last visited

Community Reputation

133 Excellent


About Eusong

  • Rank

Recent Profile Visitors

1145 profile views
  1. Yeah probably. I was never a fan of lureplant utility though. Too easy for them to get killed by accident.
  2. Finally now I can get rid of stingers without opening the console. My worlds can now last a few hundred days longer than before.
  3. Global variables can be called anywhere in the game. When in your modmain you need to specify if a variable is global before calling it, which is why there it might say something like GLOBAL.TUNING.WHATEVER whereas in every other file in the mod it's just TUNING.WHATEVER I'm not completely sure why the modmain is different from everywhere else in the mod like that, but it is. Local variables can only be called inside the function they're defined in (or if defined outside any functions, within the file they're defined in) So what you should do in your modmain to define the variable to be used elsewhere is GLOBAL.variablename = GetModConfigData("speedoption") Then in whatever file you need just do if variablename == whatyouwant then --do the thing end From what I understand you can have a variable that is a mix between global and local, in that it can be called anywhere *inside your mod specifically* but won't be callable elsewhere. In the instance of calling mod configuration, this might be a better idea than globals for compatibility reasons. I'm not totally sure but I think all you do to define it is put env. before it, like this env.variablename = GetModConfigData("speedoption") Keep in mind I haven't tried using that env. yet so if it doesn't work, I can't help you. It might be worth a shot though. EDIT: The reason people do local _G = GLOBAL in their mods is because it's shorter and thus quicker to type, and also because _G is how global variables are normally referenced in lua. For some reason Klei made it so you have to call GLOBAL instead of _G, and so many people will put local _G = GLOBAL at the top of their mod.
  4. Something I've noticed a lot of people have been struggling with is adding stories for Walter to tell that will be compatible with ones that are already there. Many people replace his story table, which means no other stories will be told other than the ones in that specific mod. In some cases you might want this, say if you're making a joke or a meme mod. However in most cases people want these stories to be told alongside other mods and the vanilla game, so here I will show how you do it properly. In its most basic form, this all will go in your modmain. (The forums hate me when it comes to formatting, so I'll provide a download link as well) This can be used in mods that aren't exclusively for stories as well. Imagine having secrets in your mod that are hinted about by Walter when he tells stories... If someone else's mod isn't compatible and people use it alongside yours, you can still let your stories show up by putting this line at the bottom of your modinfo. priority = -10 What this does is cause your mod to load after other mods by lowering the priority of it. Their mod will have already replaced the story table by the time yours adds stories to it. Hopefully this can help people who want to add stories. I love seeing the lore-friendly ideas other people have, it's fun to read them. modmain.lua
  5. Alright, here's the code. Right now it doesn't crash, but no opal gem is spawned when the shield breaks. lightshield.lua
  6. It's not actually a tool, it's a piece of armor. So finite uses may not work normally.
  7. I personally don't want to risk it when it likely won't work anyway. Not a bad suggestion though.
  8. Well, we're making progress. owner.AnimState:OverrideSymbol("HAND", "swap_buckler", "swap_buckler") edit: It's the Wilsonmobile!
  9. Basically I'm making an item that I want to show up in front of the player's arm (or completely in front of the player if needed) rather than behind. Here's what it currently looks like I want the arm to be invisible behind the object while it's held. Any help will be greatly appreciated!
  10. It works! Thank you so much ptr. I really appreciate the help, guys.
  11. Title basically says it all, but here's the modmain and exported anims.
  12. I'm trying to make an item that modifies a component when a player is near it. I'm experiencing a crash and there's no log. I know how to check for one- there is no log. At all. Sooo....I'm stumped. Any thoughts of what could be wrong?
  13. Part of me wonders if it's a problem with the Spriter project, but Idk how to tell if that's it. Any help? :c
  14. ^That shows the bug in action.