Jump to content
  • 0

CfgEpochClient.hpp epoch 1.0.0


looonytoonz@gmail.com

Question

can i get a short explanation of how these settings might be changed and the effects of the changes... i get the idea but wonder what the limits are for these "antagonistChances[]" the second part of each item "0.06" what are the ranges what happens if i change it to "0.50" can it be changed to "1.75"  and some of them have "0" what does this mean ?

 

antagonistChances[] = {
        // {"type", chance}
        "Epoch_Cloak_F",0.06,
        "GreatWhite_F",0,
        "Epoch_Sapper_F",0.12,
        "Epoch_SapperG_F",0.06,
        "Epoch_SapperB_F",0.03,
        "I_UAV_01_F",0.12,
        "PHANTOM",0.03,
        "B_Heli_Transport_01_F",0,
        "EPOCH_RyanZombie_1",0.12,
        "I_Soldier_EPOCH",0
    };

Link to comment
Share on other sites

13 answers to this question

Recommended Posts

  • 0

It's a weighted array. The chances given in there are weighted by BI's selectRandomWeighted() function to generate an overall chance of a particular antagonist to be spawned on a player. These are not the chances of an antagonist spawning, just the weighted percentage of which one will spawn on a player. 

This is the reason that Great White (sharks for water which are actually spawned like non-adversary animals if a player is in deep water - below 50m - and not in a vehicle), B_Heli_Transport (supply drop) and I_Soldier_EPOCH (used as part of the UAV deployment spawn) have a weighted chance of 0.

So if you play with the numbers then bear in mind that you are playing with weighted chances of selecting each type. So putting 1.75 for one of them will mean that most of the time that is what will be spawned on a player.  

Link to comment
Share on other sites

  • 0

In CfgEpochClient.hpp see this line:

antagonistRngChance = 100; // increase number to reduce chances and reduce to increase. Default 100

Slightly misnamed I think. In the actual masterloop code it populates the _antagonistRndChance. The reason for the increase of this variable to reduce antagonist spawn chances and reduction to increase chances is that it is used in this code in epoch_code/compile/setup/masterLoop/event6.sqf:

_spawnChance = ((_playerNuisance + _playerSoiled)/2) max 1;
if (random _antagonistRndChance < _spawnChance) then {
	// selectRandomWeighted arma 1.76 or higher
	(selectRandomWeighted _antagonistChances) call EPOCH_unitSpawnIncrease;
};

So if the number is smaller there is an increased chance of 'random _antagonistRndChance' being less that _spawnChance.

Link to comment
Share on other sites

  • 0

i did lower that number and dont see any impact... i also seem to be seeing less than regular players. i wonder if there is something with being logged in as an admin through infistar that prevents them from targeting and spawning on me. i notice that when playing as a regular player and no imfistar options are turned on, i still seem to not be seeing any unless i am playing with other players who are not added within infistar...

Link to comment
Share on other sites

  • 0
22 minutes ago, [email protected] said:

i did lower that number and dont see any impact... i also seem to be seeing less than regular players. i wonder if there is something with being logged in as an admin through infistar that prevents them from targeting and spawning on me. i notice that when playing as a regular player and no imfistar options are turned on, i still seem to not be seeing any unless i am playing with other players who are not added within infistar...

never mind seems i needed to lower it a little more

Link to comment
Share on other sites

  • 0

That's actually an interesting question that caused me to delve further into the code. No, I don't think infiSTAR will reduce the chances of antagonist spawns for admins, but I do notice one change that I had not realized had happened (at least I think it happened). Note that I do not use Epoch antagonists on any of my servers except for UAVs so I don't really know how common they are.

The change in question came with Epoch 1.0 and involved the removal of spawns based on the amount of looting you do:

Quote

- We no longer spawn antagonists on opening loot containers or trash.
Instead we have the client spawn them from a new weighted array. Note:
Admins can control what AI are spawning by removing from array
(antagonistChances) or setting chance to 0
- moved EPOCH_spawnIndex and EPOCH_spawnLimits to master loop init
instead of both_init as it is only needed client side.
- loot table updates for extra logic condition.

It seems like this change would decrease the number of antagonist spawns by a lot, since the checks on antagonist spawns are now based in event6.sqf in the masterLoop. This only runs every 5 minutes and the percentage chances based on the variables in my last post would be small, especially if you are not soiled or firing a lot (thus increasing your nuisance stat). Seems like you need to play with that antagonistRngChance until you get a level of antagonist spawns that fits your concept for the server.

Note that before these changes, antagonist spawn chances were based on a couple of entries in CfgLootTable.hpp in epoch_server_settings, one for normal loot containers and another for trash. The default one included:

        antagonists[] = {
                { "Zombie", 40 },
                { "UAV", 15 },
                { "Cloak", 10 }, // Night = Epoch_Cloak_F, Day = Epoch_Sapper_F
                { "Sapper", 20 },
                { "SapperB", 10 },
                { "PHANTOM", 5 }
         };

And when you looted an object, this code was run:

    if ((random 1) <= EPOCH_antagonistChanceLoot) then{
        _antagTable = [_type, "CfgMainTable", "antagonists"] call EPOCH_weightedArray;
        _antagTableArray = _antagTable select 0;
        if !(_antagTableArray isEqualTo[]) then{
            _weightedArray = _antagTable select 1;
            _triggerType = _antagTableArray select(selectRandom _weightedArray);
            [_player, _triggerType] call EPOCH_server_triggerEvent;
        };
    };

The new code will reduce the chances of antagonists since the old chance when looting that decided whether the antagonist spawned (in EpochServer.hpp) was:

antagonistChanceTrash = 0.09; //9% chance when player loot a trash object
antagonistChanceLoot = 0.09; //9% chance when player click "SEARCH" on a loot object

This was a comparison in a random number between 0 and 1 though. The equivalent with no soiled or nuisance value now would be a 0.01 chance if the 0-100 range is converted to a 0-1 range...

In addition rather than being checked every time you looted an object it is now only checked every five minutes. That will reduce the overall chances quite a lot.

I think this is accurate...?

Link to comment
Share on other sites

  • 0

Until they are added in - soon - you could manually edit the loot table used on your server (CfgLootTable.hpp for non-CUP Weapons servers, CfgLootTable_CUP.hpp for servers with CUP weapons) in epoch_server_settings/configs to change the lines that read:

	class Repairs
	{
		items[] = {
				{ { "VehicleRepair", "magazine" }, 30 },
				{ { "SpareTire", "magazine" }, 10 },
				{ { "EngineParts", "magazine" }, 10 },
				{ { "EngineBlock", "magazine" }, 10 },
				{ { "ItemGlass", "magazine" }, 15 },
				{ { "ItemDuctTape", "magazine" }, 20 },
				{ { "ItemRotor", "magazine" }, 5 }
		};
	};

to:

    class Repairs
    {
        items[] = {
                { { "VehicleRepair", "magazine" }, 30 },
                { { "SpareTire", "magazine" }, 10 },
                { { "EngineParts", "magazine" }, 10 },
                { { "EngineBlock", "magazine" }, 5 },
                { { "ItemPipe", "magazine" }, 5 },
                { { "ItemGlass", "magazine" }, 15 },
                { { "ItemDuctTape", "magazine" }, 20 },
                { { "ItemRotor", "magazine" }, 5 }
        };
    };

Given they could be found as exhaust pipes or as industrial loot you may also want to change:

	class GenericLarge
	{
		items[] = {
				{ { "VehicleDocs", "CfgLootTable" }, 4 },
				{ { "MortarBucket", "magazine" }, 16 },
				{ { "CinderBlocks", "magazine" }, 17 },
				{ { "Repairs", "CfgLootTable" }, 16 },
				{ { "CircuitParts", "magazine" }, 17 },
				{ { "ItemCorrugated", "magazine" }, 17 },
				{ { "ItemSolar", "magazine" }, 5 },
				{ { "ItemBattery", "magazine" }, 5 },
				{ { "ItemCables", "magazine" }, 5 },
				{ { "ItemSafe", "magazine" }, 1 },
				{ { "ItemBarrelE", "magazine" }, 1 }


		};
	};

to:

	class GenericLarge
	{
		items[] = {
				{ { "VehicleDocs", "CfgLootTable" }, 4 },
				{ { "MortarBucket", "magazine" }, 16 },
				{ { "CinderBlocks", "magazine" }, 17 },
				{ { "Repairs", "CfgLootTable" }, 16 },
				{ { "CircuitParts", "magazine" }, 17 },
				{ { "ItemCorrugated", "magazine" }, 12 },
				{ { "ItemPipe", "magazine" }, 5 },
				{ { "ItemSolar", "magazine" }, 5 },
				{ { "ItemBattery", "magazine" }, 5 },
				{ { "ItemCables", "magazine" }, 5 },
				{ { "ItemSafe", "magazine" }, 1 },
				{ { "ItemBarrelE", "magazine" }, 1 }


		};
	};

RePBO epoch_server_settings and upload to your server to be able to find them. They are in CfgPricing already.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Discord

×
×
  • Create New...