MineColonies

MineColonies

53M Downloads

Barbarians raid

bob0bob opened this issue ยท 15 comments

commented

Minecolonies version

minecolonies-1.12.2-0.8.9646

Expected behavior

  • In the config file I have barbarians no more than 10. I'm getting 30+ spawn on they are unstoppable when the config has difficulty of 4.
commented

Random thoughts.

Ok. equalizeBarbarianSpawns function doesn't function as described." Reduces barbarian spawns to less than the maximum allowed (set via the config)".
it check if total > MAX_SIZE. if so then returnValue = total - MAX_SIZE;

That doesn't reduce max size to below the max size. It just subtracts max_size from the total. My total is 50 hordes. It pulls out 8.

I would completely rewrite the numberOfSpawns and equalizeBarbarianSpawns. It makes no sense with the maxbarbarianHordeSize.

What I would do is use the MAX_SIZE for the largest Horde size possible.
The function getColonyRaidLevel should be based off the Difficulty level, It has nothing to do with the raid raise and difficulty level should reflect the raid size.
Use the Multipliers as a percentage of each type per raid level.
I would not use getColonyRaidLevel to indicate how many barbarians attack. I would use it to indicate quality of barbarians, such as hit points and armor.

Another option:
I would suggest difficulty level being used as a percentage. So after getColonyRaidLevel returns, then use difficulty to reduce the raid level based on the difficulty settings. And if that relates to larger than MAX_SIZE, set raidlevel to MAX_SIZE. Then figure out arches and such based on the modifier as a percentage of the raidlevel. Only thing is make those three different kinds of barbarians adds up to 100%.

commented

I have 33 citizens with a total citizen level of 128. So that is the hordeRaidLevel.

I've looked into the barbarian raids an located the code that is wrong about the spawn size based on the config file. I would like to adjust it but I don't want to break the thought behind the raids.
I think the function barbarianEvent needs a bunch of rewrote to make it function of the config. I have a max horde of 8 and I'm getting 45+ hordes. Difficulty has nothing to do with horde size and it should be part of the function.
Maybe hordesize should be figured and then the difficulty should be used to reduce the horde size. For like me setting it to 2. would result in
2 = 4 barbarians, 2 archers, 1 chief.
3 = 10 barbarians, 5 archers, 2 chiefs.
5 = 21 barbarians, 10 archers, 4 chiefs.

Then difficulty defines raid levels. While at this moment difficulty is almost pointless based on the code.
I would say difficulty should affect hit points, armors and reaction times of the hordes.
Also, rangers really need some major rework. They love to be 1 block away from the mob. Being a range weapon, they should try and keep their distance but they run up to the mob and kind of mob.
If you like that idea on the barbarian, I would like to make those changes. This way the difficulty of the raid will reflect the difficulty settings from the config file.

commented

THis is still going on. Below are settings from the config. Barbarians spawn more than 8. I'm still getting 15+ barbarians. The difficulty appears to be about their hit points not their ability to fight.

    I:maxBarbarianHordeSize=8
    I:barbarianHordeDifficulty=2
    B:doBarbariansSpawn=true
commented

I'm rewriting some of the spawning system of the barbarians. Where it determines how many are spawned and it will based on difficulty value in the config now. The difficulty was basically not used when it comes to barbarians. The max size was coded wrong and not working at all.

I don't think there will be a max size anymore. You can just change difficulty to adjust how many spawn in the future.

commented
commented

Good point. I'll make sure for max barbarians to work like people think it should because the original didn't do that at all.

commented
commented

Here is an idea. Tell me what you think.
Instead of using difficulty to determine how many bars to spawn. Create a new config variable that has a value 1 - 5 to determine how many to spawn.
1 = very little spawn.
3 = normal amount of spawn
5 = spawn a heavy amount of bars.

This way people can also control how many spawn without changing the difficulty of the bars.

commented
commented

yeah, i've seen some config vs real stuff differences, so we disabled raids for now on our server.
as it lags like hell (after i removed Cook and switch from release-then-beta-then-alpha) now - there is no place for Barbs

commented

I was not going to remove difficulty. Difficulty would be related to how strong the bars that spawn are. The other idea I pictured was the number of barbs spawn only.

commented
commented

Yes.
One config variable that determines how many spawn.
One config variable that would control max spawn
One config variable that determines how tough they are

commented
commented

When I get home tonight. I'll take a look at it.