Custom events are events that are registered via Brutal's builtin custom event system via JSON. Custom events are simple to learn as well.
Custom events are an overhaul to the CustomMonsterEvents system that existed in older versions of BCMER.
While custom events can handle most features that events can use, they lack the ability to have custom event logic support that external events can do. Please note some features the custom event may use from other mods may not work with the custom event system
The custom event system handles the following functionalities
There are limitations however that the custom event cannot support due to how its created. Consider external events if you need more.
menemies and mitems commands respectively in the terminal to retrieve their names.Before getting started, navigate to CoreProperties.cfg and go to the Enable Custom Events option, and make sure it is set to True. This will be required if one wants to use Custom Events.
You will have to navigate to your BrutalCompanyMinusExtraReborn\CustomEvents directory inside your config folder and create a file that ends in the .json filetype. For some variable
There are a few important points to note regarding the ranges, and how things work in the code.
A lot of options in the config will contain a scale, a scale will contain a Base, Increment, MinCap and MaxCap.
The formula used to compute the scale is Base + (DaysPassed * Increment).
MinCap is the value that the computed value wont go below.
MaxCap is the value that the computed value wont go above.
Due to how the mod may represent percentages, or integers in different ways from scale to scale, and other variables, this section was created to help aleviate any confusions regarding how the code works.
You are only required at minimum to have the following in your json file (Other fields depend on what you are adding):
[
{
"Name": "TestEvent",
"Type": "VeryGood",
"Weight": 50000,
"Color": "#FF0000",
"Descriptions": [
"TEST EVENT",
"EVENT TIME"
],
"Enabled": true,
"Weather": "StormyWeatherName"
"AddEventIfOnly": ["ModPluginGUIDHere"],
"Items": {
"TransmuteAmount": [
1,
0,
1,
1
],
"ScrapAmount": [
2.4,
0,
2.4,
2.4
],
"ScrapValue": [
100,
0,
100,
100
],
"Items": [
{
"Name": "BigBolt",
"Rarity": 50
},
{
"Name": "BottleBin",
"Rarity": 50
}
]
},
"Enemies": [
{
"Name": "Flowerman",
"InsideRarity": [
100,
0.5,
100,
100
],
"OutsideRarity": [
100,
0.5,
100,
100
],
"MinInside": [
1,
0.015,
10,
20
],
"MaxInside": [
31,
0.067,
32,
32
],
"MinOutside": [
12,
0.015,
12,
22
],
"MaxOutside": [
32,
0.067,
32,
43
]
}
],
"Hazards": [
{
"PrefabName": "Landmine",
"Type": "Inside",
"MinSpawn": [22, 1, 22, 23],
"MaxSpawn": [33, 1, 33, 34],
"SpawnOptions": {
"FacingAwayFromWall": false,
"FacingWall": true,
"BackToWall": false,
"BackFlushWithWall": false,
"RequireDistanceBetween": true,
"DisallowNearEntrances": false
}
},
{
"PrefabName": "SpikeRoofTrapHazard",
"Type": "Outside",
"MinDensity": [
0.005,
0.001,
0.005,
0.018
],
"MaxDensity": [
0.021,
0.001,
0.021,
0.027
]
}
],
"EventsToRemove": [
"BlackFriday"
],
"EventsToSpawnWith": [
"EarlyShip"
]
}
]
[
{
"Name": "String",
"Type": "String",
"Weight": "Integer",
"Color": "String",
"Descriptions": [
"String",
"String"
],
"Enabled": Boolean,
"Weather": String,
"AddEventIfOnly": [
"String"
],
"Items": {
"TransmuteAmount": [
"Float",
"Float",
"Float",
"Float"
],
"ScrapAmount": [
"Float",
"Float",
"Float",
"Float"
],
"ScrapValue": [
"Integer",
"Integer",
"Integer",
"Integer"
],
"Items": [
{
"Name": "String",
"Rarity": "Integer"
},
{
"Name": "String",
"Rarity": "Integer"
}
]
},
"Enemies": [
{
"Name": "String",
"InsideRarity": [
"Integer",
"Float",
"Integer",
"Integer"
],
"OutsideRarity": [
"Integer",
"Float",
"Integer",
"Integer"
],
"MinInside": [
"Integer",
"Float",
"Integer",
"Integer"
],
"MaxInside": [
"Integer",
"Float",
"Integer",
"Integer"
],
"MinOutside": [
"Integer",
"Float",
"Integer",
"Integer"
],
"MaxOutside": [
"Integer",
"Float",
"Integer",
"Integer"
]
}
],
"Hazards": [
{
"PrefabName": "String",
"Type": "String",
"MinSpawn": [
"Integer",
"Integer",
"Integer",
"Integer"
],
"MaxSpawn": [
"Integer",
"Integer",
"Integer",
"Integer"
],
"SpawnOptions": {
"FacingAwayFromWall": "Boolean",
"FacingWall": "Boolean",
"BackToWall": "Boolean",
"BackFlushWithWall": "Boolean",
"RequireDistanceBetween": "Boolean",
"DisallowNearEntrances": "Boolean"
}
},
{
"PrefabName": "String",
"Type": "String",
"MinDensity": [
"Float",
"Float",
"Float",
"Float"
],
"MaxDensity": [
"Float",
"Float",
"Float",
"Float"
]
}
],
"EventsToRemove": [
"String"
],
"EventsToSpawnWith": [
"String"
]
}
]