• Content Count

  • Joined

  • Last visited

Community Reputation

36 Excellent

About Argonwolf

  • Rank
    Junior Member

Recent Profile Visitors

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

  1. I just finished my first mods for DST and now I have to uninstall it. What a gut punch... shame it's now just another path through which the CCP sinks its hooks into the western world in its ultimate goal to have its heel firmly planted on the throat of anyone who won't treat their power-tripping leaders like gods.
  2. No, no... the torture of a DIFFERENT Muslim. A Chinese one.
  3. Good to know the profits driven by Klei's IPs are being put to good use slaughtering Chinese muslims in concentration camps.
  4. Oh. My. God. You can't be serious. EDIT: He was serious. That's so much more intuitive than I expected it to be. Still, thank you very much for replying.
  5. My mod currently uses prefab names to organize objects, but I'd like to use their display name (the name that shows when you mouse over the object in-world) for certain user interface aspects. How can I get this name? I looked through the component files but without knowing the name of whatever component displays those names, I couldn't find anything.
  6. Perfect, thank you. I already have code that when a wormhole is destroyed, it removes the target wormhole's target so it can't be used and crash the game.
  7. In my mod I require the ability for players to create and link wormholes. I've got it working fine, but players can also destroy wormholes that were player-built. The problem is, a player can link a wormhole that's been destroyed to an existing one. If someone jumps in, it crashes the game because the wormhole no longer exists. However, when I check that the prefab is not equal to nil, it always comes back true even if it has been deleted. I tried getting the prefab of an object that's already been deleted, and it returns the correct prefab. How can I check if something exists? I'd have thought its values in memory would be manually deleted by the game engine, but it seems they're left for garbage collection, which won't remove them since I still have references to that object in my mod that aren't components of the prefab and therefore don't get automatically deleted when the wormhole does. Is there a method that returns whether a prefab exists or not?
  8. I have a mod with a command that takes alphanumeric arguments. The command does different things depending on whether it was given a number or a letter string. What I'd like to know is how to convert (or try to convert) a string to a number so I can do this. I'd really like to not have two separate commands, but when i tried tonumber (a supposed Lua standard function) it crashed saying tonumber is a nil value. which I found extremely odd. Any help is much appreciated.
  9. Actually i think I'll leave this here for posterity, because I found another way to do it. Since virtually every naturally-spawned object in the game always exists at a y-coordinate of 0, I can identify mod objects by encoding their "tags" in their y-coordinate values. Whenever the mod spawns an object, it places it at an infinitesimally higher y coordinate than most (I eventually settled on 0.008 after encountering some strange aberrations in the saving/loading of objects' y-coordinate). Not enough to even visually register, but enough to detect in code. Using that I can easily "mark" objects as mod-spawned by their altitude! Thought I'd post this solution on the off chance that anybody else has a similar problem.
  10. Whenever a server resets, tags I added to distinguish certain objects built using the mod from otherwise-identical naturally-spawning equivalents are removed. I know I can probably just iterate through every single entity with that tag and save the exact position in a file, then load said positions upon server restart and tag any entity within a very, very small radius of said positions. However, that's complicated, so I was wondering if there's a simple, easy way to permanently tag a prefab so that it stays tagged even after the server restarts?
  11. That did the trick, thank you very much for your help, both of you. I may acquaint myself with this game's odd engine structure yet!
  12. Certainly! AddPlayerPostInit(function(inst) inst:DoPeriodicTask(0.25, function(inst) inst.components.inventory:GiveItem("boards") end) end) I tried this and it says SpawnPrefab is a nil value.
  13. I tried using the following code: inst.components.inventory:GiveItem("boards",3) But it tells me that components is a nil value, even though I know inst is a reference to a player. The same syntax is used in the consolecommands.lua file to give the player an item with the c_give command. Anybody know what I'm doing wrong?