penguin0616

  • Content Count

    33
  • Joined

  • Last visited

Community Reputation

9 Neutral

About penguin0616

  • Rank
    Junior Member
...

Recent Profile Visitors

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

Enable
  1. @tacticalweapon1 Yes, class is like a struct. I'm not experienced with C, but a quick google search seems to confirm my thoughts on what a struct is. It's not really a keyword. It's mostly used in metatables to reference the object. However, it's different in that it acts like a variable. http://www.lua.org/manual/5.1/ This is quite helpful. Most of the game's code revolves around using meta tables, so I suggest you make sure you understand that section.
  2. You don't import anything in a modinfo file. Did you check your log files for information about the error crashing you?
  3. I don't there's a particular "proper" way to do so, it's a matter of preference. I personally just open the file in notepad++ and accept the "reload the file" prompt when I believe something of significance has appeared.
  4. Your configuration_options should not be in quotes. Also, it belongs in modinfo.lua GetModConfigData works pretty much exactly as you think it does, from how you're using it.
  5. You need to include it in PrefabFiles.
  6. Make sure you use the Asset function to load it in the game.
  7. The code for DS and DST is quite different. You'll probably end up having to make several changes to make your character work if you port from one to the other.
  8. You can use TheWorld:ListenForEvent("ms_playerjoined") and TheWorld:ListenForEvent("ms_playerleft") to figure out when a person joins and leaves. You can use Health:SetMaxHealth(amount) to change the player's maxhealth as well.
  9. You'd probably have to modify either Combat.CanBeAttacked, or Combat.CanTarget
  10. @Qiiiii It's not in tuning, it's set directly inside the prefab.
  11. If this is for DST, you'd be better off asking on the mod forum there.
  12. If you're looking to mod for DST, you should head over to their mod section.
  13. Feel free to ask further questions if something doesn't make sense.
  14. I don't know what you mean by "under master.postinit". I'm assuming you're making your own follower, and I am now assuming this follower is following the player. Because of that, you'll want to add the follower component during construction and you don't have to worry about adding the leader component. Since the leader is a player, you can just "prefab.components.follower:SetLeader(GetPlayer())".