Kam297 Posted December 22, 2014 Share Posted December 22, 2014 ugh have to rewrite.Okay so i want to get values from the host, specifically tuning values, but i don't really know how to go about this. I tried stuff like this to no avail. your help would be much appreciated!local function MCMHostValues(inst)print "world_network component NetWorldMCM has been added." inst:AddComponent("NetWorldMCM") inst.components.NetWorldMCM.customteleporting = GetModConfigData("Custom Teleporting") inst.components.NetWorldMCM.teletoggle1 = GetModConfigData("Custom Teleport 1") inst.components.NetWorldMCM.teletoggle2 = GetModConfigData("Custom Teleport 2") inst.components.NetWorldMCM.teletoggle3 = GetModConfigData("Custom Teleport 3") inst.components.NetWorldMCM.teletoggle4 = GetModConfigData("Custom Teleport 4") inst.components.NetWorldMCM.teletoggle5 = GetModConfigData("Custom Teleport 5") inst.components.NetWorldMCM.supertelebasecooldown = GetModConfigData("TeleBase Cooldown")*60 inst.components.NetWorldMCM.recipelist = GetModConfigData("Recipe") inst.components.NetWorldMCM.finitestaff = GetModConfigData("Finite Staff") inst.components.NetWorldMCM.supertelestaffuses = GetModConfigData("Staff uses") inst.components.NetWorldMCM.hidenormies = GetModConfigData("Hide normal recipies")endAddPrefabPostInit("world", function(wrld) wrld:ListenForEvent("playeractivated", function(wlrd, player) if player == GLOBAL.ThePlayer then--if TheNet:--[[GetIsServer]]GetIsMasterSimulation() then AddPrefabPostInit("world_network", MCMHostValues) endAddPrefabPostInit("world", MCMHostValues) end end)end)TUNING.SUPERTELESTAFF = {}AddPrefabPostInit("world", function(wrld) wrld:ListenForEvent("playeractivated", function(wlrd, player) if player == GLOBAL.ThePlayer then --player:AddComponent("myclientsidecomponentwhichdoesntequireanyserversidestuff") local TheWorld = GLOBAL.TheWorld TUNING.SUPERTELESTAFF.CUSTOMTELEPORTING = TheWorld.net.components.clock. --TUNING.SUPERTELESTAFF.CUSTOMTELEPORTING = TheWorld.net.components.NetWorldMCM.customteleporting local TeleConfigKey = GetModConfigData("TeleToggle on ALT+") TUNING.SUPERTELESTAFF.TELETOGGLE1 = TheWorld.net.components.NetWorldMCM.teletoggle1 TUNING.SUPERTELESTAFF.TELETOGGLE2 = TheWorld.net.components.NetWorldMCM.teletoggle2 TUNING.SUPERTELESTAFF.TELETOGGLE3 = TheWorld.net.components.NetWorldMCM.teletoggle3 TUNING.SUPERTELESTAFF.TELETOGGLE4 = TheWorld.net.components.NetWorldMCM.teletoggle4 TUNING.SUPERTELESTAFF.TELETOGGLE5 = TheWorld.net.components.NetWorldMCM.teletoggle5 TUNING.SUPERTELESTAFF.COLORS = GetModConfigData("Teleport Number Colours") TUNING.SUPERTELESTAFF.SUPERTELEBASECOOLDOWN = TheWorld.net.components.NetWorldMCM.supertelebasecooldown TUNING.SUPERTELESTAFF.RECIPELIST = TheWorld.net.components.NetWorldMCM.recipelist TUNING.SUPERTELESTAFF.FINITESTAFF = TheWorld.net.components.NetWorldMCM.finitestaff TUNING.SUPERTELESTAFF.SUPERTELESTAFF_USES = TheWorld.net.components.NetWorldMCM.supertelestaffuses TUNING.SUPERTELESTAFF.HIDENORMIES = TheWorld.net.components.NetWorldMCM.hidenormies end end)end) Link to comment https://forums.kleientertainment.com/forums/topic/47314-help-deriving-tuning-values-from-the-host/ 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