1. Is it possible to edit another config (not the default one of the plugin) using the existing configuration system.
    If, then how?
    Not possible? - Another solution to edit and read from those properly?

    Docs aren't giving me the information I need.

    sincerely

    #Edit thanks to Hatemail, I'm working in C# / LUA, Javascript is also fine.
     
    Last edited by a moderator: Feb 16, 2015
  2. It's possible, if your looking for code samples you'll need to provide the language your working in.
     
  3. I'm working in C# / LUA, Javascript is also fine.
     
  4. you can create a hook in the target plugin that changes a config from the parameters of the hook.
    then just call the hook from the source plugin.
     
  5. basic code example?
     
  6. I'll be home in 3 hours and I can provided some if no one else does.
    [DOUBLEPOST=1424138124,1424121614][/DOUBLEPOST]I must ask why you want to modify the config of another plugin? If you need to share data between plugins using the datafile system is the preferred way.
    Lua is a crapshoot for loading the config of another plugin and trying to modify it :/
    Lua

    Code:
    function PLUGIN:Init ()
        local configPath = self.Plugin.Manager.ConfigPath
        local fileName = configPath .. "/test.json"
        local config = new( self.Plugin.Config:GetType(), nil) -- Make a new DynamicConfigFile object
        config:Load(fileName) --Load from the oxide config dir
        config["Test"] = "hahaha" --Set Values
        config:Save(fileName) -- Save it
    end
    c#
    Code:
    DynamicConfigFile config = new DynamicConfigFile();
    String fileName = Manager.ConfigPath + "/test.json";
    config.Load(fileName);
    config["Test2"] = "tsest2";
    config.Save(fileName);
    
     
  7. I really need this in Javascript? Anyone?