Jump to content
Sign in to follow this  
Badger 2-3

Custom Configs

Recommended Posts

Has anyone had any luck creating custom config classes? 

 

I see we have a ScriptAndConfig type, as well as plain classes with no inheritance. Once I compile/reload scripts I was under the impression I'd at least see this new config type I made in the context menu when you 

right click in resource browser --> new config item --> type in name of file --> should see my config type. Unfortunately it doesn't appear which leads me to believe something else must be done in order to get my custom config to appear as an option... 

 

I even tried inheriting from an existing type, MissionHeader just for giggles. 

 

Currently trying to clean up the attribute soup I have going on and tidy things up into appropriate config types. 

  • Like 2

Share this post


Link to post
Share on other sites

So... I added this attribute, because it's on my other scripts and it "works". So far, the only MissionHeader works as a parent class.... would ideally want a custom class so I don't have random values that aren't needed.

 

[EntityEditorProps(category: "GameScripted/Configs", description: "Faction Information for Attack & Defend Scenario", color: "0 0 255 255")]

 

I have tried the following parent classes with no luck:

ScriptAndConfig (odd this doesn't work considering MissionHeader is a child of it)
ModuleGameSettings

 

Something behind the scenes is adding these, or considering these classes as configs. Node.c is using ScriptAndConfig but doesn't appear in the config menu. Just a matter of figuring out how, if possible, to add custom configs....

  • Like 2

Share this post


Link to post
Share on other sites

Alright.... I finally got it working.

 

[BaseContainerProps(configRoot:true)]

class Badger_TestConfig

{

 

}

  • Like 2

Share this post


Link to post
Share on other sites

To narrow down the scope of selection I did

 

[Attribute("", UIWidgets.Object, params: "conf class=Badger_TestConfig", category: "Configs")]

ref Badger_TestConfig m_pConfig;

 

I have tried this in an array form, but unfortunately it didn't work. Not a big deal. I'm making an attack/defend type of system but thought "what if I want more than 2 sides?" Would be nice to not limit the scenario creator to 2 or 3 sides. Wanna go wild.... go wild. 

  • Like 3

Share this post


Link to post
Share on other sites

Hi just to clarify in case someone has a similar issue:

 

1. This is the wiky entry: https://community.bistudio.com/wiki/Arma_Reforger:Resource_Manager:_Config_Editor#Config_File

2. The SCR_ConfigExample.c file (where you are defining your class) must be placed in yourMod/scripts/Game/ (inside Game you can place it inside other folders).

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×