. . . Posted June 21, 2017 Share Posted June 21, 2017 (edited) Hello, if someone can help me with this that'd really help be great ! So, how can I use " GetModConfigData(" ") " in my character.lua? The game crashes & says "use ModIndex:GetModActualName( )" or something like that, but I try to use that instead of the other & I get crash " variable 'ModIndex' is not declared"... Help would be appreciated .. Thanks for looking at my problem, have a good time ! Edited June 23, 2017 by SuperDavid Link to comment Share on other sites More sharing options...
MorickClive Posted June 21, 2017 Share Posted June 21, 2017 (edited) I'd be interested to see if anyone has directly linked data from that function straight to a character (from what I can tell it's mod utility specific, so I assume it's for the mod initialise only), I have merely used it to adjust my character's mechanic by reading the function value from main. Sample: local Mad_enabled = GetModConfigData("Mad_CHK") -- if mad disabled if not Mad_enabled then AddPrefabPostInit("warrick", function(inst) inst.madness = 1 end) end I've tested the impact of the code via network and client - it all matches up even though inst.madness is network specific (past pristine/not world etc). Hope this helps some! Edited June 22, 2017 by MorickClive Link to comment Share on other sites More sharing options...
Serpens Posted June 22, 2017 Share Posted June 22, 2017 (edited) the easiest way would be to store your modsetting in TUNING. So in modmain you do GLOBAL.TUNING.MYMODNAME_SPEED = GetModConfigData("characterspeed") and then use TUNING.MYMODNAME_SPEED in your other game files. Edited June 22, 2017 by Serpens 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