Jump to content
  • 0

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
    };

Share this post


Link to post
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.  

Share this post


Link to post
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.

Share this post


Link to post
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...

Share this post


Link to post
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

Share this post


Link to post
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...?

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Similar Content

    • By Knives
      So i saw some cool vids depicting a giant rock monster called the Construct and theres a page about it on the epoch wiki, is this thing still being added to the game?
      personally i think i giant raid boss is an exellent idea. would be cool if he had more than a base melee attack tho, like if he would throw parts of buildings, rocks, and cars at people.
    • By Ma12tian
      I did a quick search and didnt see any threads mentioning this idea.
       
      I thought it would really add to the game to have an aerial antagonist. We are used to only having to be concerned with the enemies on the ground and feel like we are nigh untouchable while flying. An aerial antagonist that could attack players on the ground as well as those in the air would add huge amounts of suspense.
       
      Just imagine being in a helicopter and suddenly you hear a screech, you start looking around frantically trying to get a glimpse of your aggressor. You spot the beast closing in on you from behind and immediately go full nose down in your helo to try and squeeze out just a little more speed. As you crest the next hill you glance back to see nothing but blue sky. You have escaped...for now.

      You land at your base and climb out of your aircraft, you are obviously shaken by the event. You breathe a sigh of relief and begin walking to your door but by the time you hear it it's too late.A shrill cry pierces the air and you are lifted into the sky! The last thing you know in this life is that the ground that was getting smaller is now getting exceptionally big...exceptionally fast.

      What do you guys think? Is it viable?
  • Advertisement
  • Donation Box

    Please donate to support the community.
    We appreciate all donations!
  • Advertisement
  • Supporters
  • Latest Donations

  • Advertisement
  • Discord

×