Darkaisa Posted October 9, 2016 Share Posted October 9, 2016 (edited) Hello. I am a casual modder, meaning I have made "light" mods for other games before, however due to the complexity of this game's modding system I feel that I need to ask this beautiful community (Yes, I read some topics before writing this and the people here amazed me) to help me find out what I'm doing wrong on my MOD. My mod is about adding a bit less difficult time on some characters while trying to change some global tweaks to make life less complicated for all players. This is the "modsettings.lua" that I got after trying to use my mod: -- Use the "ForceEnableMod" function when developing a mod. This will cause the -- game to load the mod every time no matter what, saving you the trouble of -- re-enabling it from the main menu. -- -- Note! You shout NOT do this for normal mod loading. Please use the Mods menu -- from the main screen instead. --ForceEnableMod("kioskmode_dst") -- Use "EnableModDebugPrint()" to show extra information during startup. --EnableModDebugPrint() -- Use "EnableModError()" to make the game more strict and crash on bad mod practices. --EnableModError() My mod should be uploaded and attached as a zip file. Please, help? Dont Darken Together.rar Edit: If nobody can help me with the whole mod, then at least I want help to use the "tuning.lua" effectively. Thanks in advance to the community for your help. Edited October 9, 2016 by Darkaisa Link to comment Share on other sites More sharing options...
Serpens Posted October 9, 2016 Share Posted October 9, 2016 I think it would be a good idea to tell us what is not working as expected and for what you need help and what you already know For changing values from tuning.lua, just put in your modmain TUNING.XYZ = 123 (so just change the value you want to change) Link to comment Share on other sites More sharing options...
Darkaisa Posted October 9, 2016 Author Share Posted October 9, 2016 5 hours ago, Serpens said: I think it would be a good idea to tell us what is not working as expected and for what you need help and what you already know For changing values from tuning.lua, just put in your modmain TUNING.XYZ = 123 (so just change the value you want to change) OK, I'm going to start with baby steps. Let's start with tuning. I want to change a few variables in tuning.lua. How or what do I need t write on modmain.lua? Do I need to do something like LOCAL GLOBAL.TUNING...... bla bla bla I'm not being rude in any way, I was actually laughing while writing this, but there's no way to express a friendly attitude in text. Can anybody help me step by step how to change tuning.lua in the modmain.lua? Link to comment Share on other sites More sharing options...
CarlZalph Posted October 9, 2016 Share Posted October 9, 2016 21 minutes ago, Darkaisa said: OK, I'm going to start with baby steps. Let's start with tuning. I want to change a few variables in tuning.lua. How or what do I need t write on modmain.lua? Do I need to do something like LOCAL GLOBAL.TUNING...... bla bla bla I'm not being rude in any way, I was actually laughing while writing this, but there's no way to express a friendly attitude in text. Can anybody help me step by step how to change tuning.lua in the modmain.lua? GLOBAL.TUNING.PIG_DAMAGE = 9999 GLOBAL.TUNING.BEEFALO_DAMAGE.DEFAULT = 9999 Just a couple of examples. Link to comment Share on other sites More sharing options...
Darkaisa Posted October 9, 2016 Author Share Posted October 9, 2016 21 minutes ago, CarlZalph said: GLOBAL.TUNING.PIG_DAMAGE = 9999 GLOBAL.TUNING.BEEFALO_DAMAGE.DEFAULT = 9999 Just a couple of examples. And I can do that below other code lines in the modmain.lua file? I do not need a LOCAL -- END tag or anything like that? Link to comment Share on other sites More sharing options...
. . . Posted October 9, 2016 Share Posted October 9, 2016 (edited) @Serpens Can I ask you a quick question? So, you said to override tuning values from tuning you just have to do something like " GLOBAL.TUNING.WILSON_HUNGER = 999 " in modmain.lua but nothing's happening, can you tell me why, please ? Edited October 11, 2016 by SuperDavid Link to comment Share on other sites More sharing options...
Darkaisa Posted October 9, 2016 Author Share Posted October 9, 2016 (edited) 12 minutes ago, SuperDavid said: You should just put them at the top of your modmain & everything should be fine, you don't need a end or anything like that for "local bla bla bla" jajaja, nice way to remind me of me. Thank you, fellow gamer. I will try all I learned through this forum. Edited October 9, 2016 by Darkaisa Link to comment Share on other sites More sharing options...
Darkaisa Posted October 9, 2016 Author Share Posted October 9, 2016 (edited) Thanks for your help. I have another question. If I want to change a character stat, I imagine that's not " GLOBAL". How do I do it? Edited October 9, 2016 by Darkaisa Link to comment Share on other sites More sharing options...
Darkaisa Posted October 9, 2016 Author Share Posted October 9, 2016 Thanks for your help. I have another question. If I want to change s character stat, I imagine that's not " GLOBAL". How do I do it? Link to comment Share on other sites More sharing options...
. . . Posted October 9, 2016 Share Posted October 9, 2016 @Darkaisa This should be good because it worked for me, if this code isn't good someone please tell me . Put this in your "modmain.lua" in this example it makes Wilson have 999 health, you can probably do other readjustments too. AddPrefabPostInit("wilson", function(inst) if not GLOBAL.TheWorld.ismastersim then return end inst.components.health:SetMaxHealth(999) end) Link to comment Share on other sites More sharing options...
Darkaisa Posted October 10, 2016 Author Share Posted October 10, 2016 Thanks for your help, everyone. Link to comment Share on other sites More sharing options...
Darkaisa Posted October 11, 2016 Author Share Posted October 11, 2016 So far a bit of progress... Still long ways to go... Dont Darken Together.rar Link to comment Share on other sites More sharing options...
Serpens Posted October 11, 2016 Share Posted October 11, 2016 On 9.10.2016 at 11:51 PM, SuperDavid said: @Serpens Can I ask you a quick question? So, you said to override tuning values from tuning you just have to do something like " GLOBAL.TUNING.WILSON_HUNGER = 999 " in modmain.lua but nothing's happening, can you tell me why, please ? It should work, at least I know no reason why it should not. Is this everything you put in modmain? (maybe you put something different there that is preventing or undoing it?) When changing those values you also should check where it is used ingame. Do search through all lua files in the scripts folder with help of notepad++ and you will see that this value is also used for wolfgang (*2) and for wes. So changing this value will also change the hunger of those two. Link to comment Share on other sites More sharing options...
. . . Posted October 11, 2016 Share Posted October 11, 2016 @Serpens Here's the modmain.lua if you can check it that would be great because I have no idea why it doesn't override the default tunings 14 minutes ago, Serpens said: When changing those values you also should check where it is used ingame Yeah, i'm just using that as example but I will remember in future ! Link to comment Share on other sites More sharing options...
Serpens Posted October 11, 2016 Share Posted October 11, 2016 13 minutes ago, SuperDavid said: @Serpens Here's the modmain.lua if you can check it that would be great because I have no idea why it doesn't override the default tunings Yeah, i'm just using that as example but I will remember in future ! I think it looks fine... Just create a test mod were all you put is this Tuning testline and see if it works. If it also does not work, I have no clue why. If it works, but you modmain does not, copy half of your modmain into your testmod and see if it works. Repeat until it works, so will find out what is causing the problem Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now