View Full Version : Raging Barbarians in FF
Sarisin Sep 23, 2008, 06:08 AM The past week I have been trying to play FF again. When the modmod first came out I really enjoyed playing, but I went through a spate of CTDs and that drove me away. I had been reading good things on the FFH forum from Gekko and others and decided to try it again. Honestly, I have had mixed results so far and would like to share my thoughts based on the 5 games I have 'played' so far.
1. Has anyone been able to play an Epic speed game with the raging barbarian option selected? All three of my efforts have ended with me getting a Conquest Victory BEFORE TURN 160! All, I have had to do is build 5-6 units to defend my sole city (Warriors did fine) and just sit back and hit ENTER while the AI civs went down one by one.
I think there is a problem with the when and maybe the how those raging barbs arrive on the scene. In FFH their arrival is tied to the number of cities on the map. In FF it has been my experience that they come between turns 40-50 no matter what. I think this is really too early for an Epic speed game. Yes, I can build my defenders and sit back and wait for the Conquest Victory, but there is not much fun in that each game. The AI is unable to cope with the onslaught and goes down fast.
Also, the early appearance of the barbs IMO ruins one of the most fun parts of FF/FFH - the early exploration. When the barbs come, you can forget about sending your Scout out to explore lairs/dungeons, capture animals, pop goodie huts and graveyards. 45 turns is not much time to do anything in an Epic speed game.
The barbs generally show up around turn 200 of an Epic FFH game. I really recommend you consider using a different timeframe or mechanism in introducing the raging barbs in the slower speed games.
2. I decided to skip the raging barbs and try a game without that option selected. Sadly, I ran into those damn CTDs again and had to give up both games. They came around Turn 200 and they were those that if you re-load they might not come for a few turns, but eventually you get the CTD. That was with .42G and I am now playing a new game with .42L and hoping it makes a difference. I am at Turn 175 now.
Also, while using the raging barb option in an Epic speed game makes the game a wipeout for the AI, I'm finding the opposite true when you DON'T select that option. As I said, I am up to Turn 175 now and I don't think I have had 3 barbs set foot inside my borders. I have seen some lallygagging around, but they certainly don't make a beeline for your cities/improvement. They seem almost comatose. ;)
As a result, the AI has gone bananas with its expansion and in Turn 175 there are 3 civs (12 on a Huge map) with more than 10 cities. Yes, I know you can go out eventually and take them down, but the growth (and this is only at Prince difficulty) is just out of control!
3. One reason I really wanted to try FF was the explorable lairs/dungeons I have been reading so much about. I hate to say it, but what a disappointment! As I said, in a raging barb game you are really limited to how many you can go out and explore. I would say in my six games I have been only able to explore 10-12. Only once did I get what you might call a positive result - I got a Traveler's Cloak, which was pretty neat. However, the other times I received a damaged or dead explorers for my trouble. Are the odds that bad for exploring these things, or am I just having a run of bad luck?
Another problem I found was that almost immediately in the game the lair/dungeon gets a guard, usually a Skeleton preventing you from exploring. No way a Scout is going to take out a fortified Skeleton, so no exploration. Once I was amazed when I had moved my Scout to a Lair for my next turn to explore. I couldn't believe that a Skeleton had appeared on the Lair and pushed my Scout off! That doesn't seem right!:eek:
I am a little overwhelmed with all the new civs, units, buildings (a Dowsing Bldg?), etc. and it will take a while to get used to it all. I just hope the CTDs leave me alone for a bit. ;)
Vehem Sep 23, 2008, 07:58 AM The past week I have been trying to play FF again. When the modmod first came out I really enjoyed playing, but I went through a spate of CTDs and that drove me away. I had been reading good things on the FFH forum from Gekko and others and decided to try it again. Honestly, I have had mixed results so far and would like to share my thoughts based on the 5 games I have 'played' so far.
1. Has anyone been able to play an Epic speed game with the raging barbarian option selected? All three of my efforts have ended with me getting a Conquest Victory BEFORE TURN 160! All, I have had to do is build 5-6 units to defend my sole city (Warriors did fine) and just sit back and hit ENTER while the AI civs went down one by one.
The only thing I can think of that may be an issue with Raging barbs is the change that allowed animals to spawn for the whole duration of the game. This possibly means that barbarians are spawning earlier too (and so when they reach the turn in which they're allowed to use "Attack" AI rather than explore, there are so many of them that the AI civs are really struggling. Xienwolf would know better on this one though as he made that tweak.
Sarisin Sep 23, 2008, 12:32 PM The only thing I can think of that may be an issue with Raging barbs is the change that allowed animals to spawn for the whole duration of the game. This possibly means that barbarians are spawning earlier too (and so when they reach the turn in which they're allowed to use "Attack" AI rather than explore, there are so many of them that the AI civs are really struggling. Xienwolf would know better on this one though as he made that tweak.
Thanks for your response, Vehem. I will wait to hear what he says as I am thinking now that it isn't possible to play slower speed games with raging barbs. I'm waiting for other players to weigh on this.
Some good news! I am up to about Turn 300 in my 6th game and no CTDs! The barbs are still pretty lethargic, though, and the AI is expanding out of their mind. I looked at one civ (Absaroke) and they had six cities (to my 3) and ALL SIX were building Settlers!
Well, I have The Stooges and Loki and I will go out and slow these folks down a bit!:)
Ambassador Sep 23, 2008, 01:13 PM What are CTDs???
Chip56 Sep 23, 2008, 02:07 PM Crash to desktop
MaxAstro Sep 23, 2008, 06:07 PM The only thing I can think of that may be an issue with Raging barbs is the change that allowed animals to spawn for the whole duration of the game. This possibly means that barbarians are spawning earlier too (and so when they reach the turn in which they're allowed to use "Attack" AI rather than explore, there are so many of them that the AI civs are really struggling. Xienwolf would know better on this one though as he made that tweak.
Would you happen to know where the code that controls when the barbarians switch to Attack AI is, BTW? I have been having similar problems as the OP, although it's without raging barbs and is mainly due to Skeletons and Lizardmen, who hang around outside of borders until there are fifty billion of them and all attack at once. I think this scheme works fine for orcs (it's ideal for Orthus to no longer rush cities as soon as he spwans), but Skeles and Lizardmen are a bit too strong to be showing up in numbers of 15+ (sometimes EACH!) all at once around turn 130.
xienwolf Sep 23, 2008, 06:35 PM Thanks for your response, Vehem. I will wait to hear what he says as I am thinking now that it isn't possible to play slower speed games with raging barbs. I'm waiting for other players to weigh on this.
Some good news! I am up to about Turn 300 in my 6th game and no CTDs! The barbs are still pretty lethargic, though, and the AI is expanding out of their mind. I looked at one civ (Absaroke) and they had six cities (to my 3) and ALL THREE were building Settlers!
Well, I have The Stooges and Loki and I will go out and slow these folks down a bit!:)
I am planning to rewrite the AI to account for Raging Barbarians being set and desire more defenders. When I take a look at how Wiser orcs has improved the AI I am hoping that some of that kind of stuff is already done though :) Just not sure when I will have time to fiddle with AI things. Those adjustments take the longest as you have to decode complicated and intertwined functions, and then testing it requires quite a few test runs, or a nifty trick with adding information to the Chipotle interface.
But as for what I tweaked: Both animals and Barbarians start to show up as soon as the Handicap settings say they are allowed to. So a shorter term fix might be to make those handicap settings be adjusted by gamespeed.
Sarisin Sep 23, 2008, 08:30 PM I am planning to rewrite the AI to account for Raging Barbarians being set and desire more defenders. When I take a look at how Wiser orcs has improved the AI I am hoping that some of that kind of stuff is already done though :) Just not sure when I will have time to fiddle with AI things. Those adjustments take the longest as you have to decode complicated and intertwined functions, and then testing it requires quite a few test runs, or a nifty trick with adding information to the Chipotle interface.
But as for what I tweaked: Both animals and Barbarians start to show up as soon as the Handicap settings say they are allowed to. So a shorter term fix might be to make those handicap settings be adjusted by gamespeed.
Thanks, xienwolf!
As it is now, I think this modmod is unplayable (unless you want a quick Conquest Victory for some reason ;)) when you play a slower speed game with the raging barb option on.
It's fine as it appears my CTD problem is gone. I can play a 'regular' game here and go back to FFH when I want to play my raging barb games.
BTW, this problem was present in earlier versions of FF, but Kael and Co fixed it nicely by delaying the appearance of the main barb units. Again, no problems for the human player the way it is, but the AI is too busy building Settlers and not worrying about defenders and gets creamed early!
Vehem Sep 24, 2008, 06:55 AM Thanks, xienwolf!
As it is now, I think this modmod is unplayable (unless you want a quick Conquest Victory for some reason ;)) when you play a slower speed game with the raging barb option on.
It's fine as it appears my CTD problem is gone. I can play a 'regular' game here and go back to FFH when I want to play my raging barb games.
BTW, this problem was present in earlier versions of FF, but Kael and Co fixed it nicely by delaying the appearance of the main barb units. Again, no problems for the human player the way it is, but the AI is too busy building Settlers and not worrying about defenders and gets creamed early!
The odd part is that there is no difference in the XML between FF and FfH - both seem to start the barbarians on the same turns and have the same number of unowned tiles required to spawn (starting on Turn 10 and 13 unowned tiles per unit on Deity - ouch).
The simplest short term fix would be to give the AI's a more significant BarbarianBonus (currently barbarians get -25% at all difficulties vs AI).
===
It's interesting that the Barbs should be spawning relatively slower on Marathon than on Normal speed - the training rate is 200% of normal, Growth is 300% of normal and the Barb spawn time is 400% of normal (according to the gamespeed file). Basically means you're able to train twice as many units before the barbs arrive.
The line that should be tweaked to reduce the spawn rate is probably
if (iNeededBarbs > 0)
{
iNeededBarbs = ((iNeededBarbs / 4) + 1);
That should probably be
iNeededBarbs / (4 * (GC.getGameSpeedInfo(getGameSpeedType()).getBarbPe rcent() /100 ))
So that the Barbs only spawn 1/16th of the units needed to take them to their maximum amount per turn. Normally they spawn increase by 25% of the needed amount (minimum of 1).
The downside there is that it would slow non-raging barbs on slow game speeds too. It might be better to do the above and also decrease the BarbPercent for Marathon to 300 (starts spawning on turn 30 on Deity, spawns 1/12th of needed units per turn).
Currently the time before Barbarians spawn is related to the Gamespeed, but the actual rate of spawn isn't. As far as I know however, that this is no different to the base FfH mod
===
Remember that the code doesn't mean that after 4 turns, all the barbs are spawned, it's a percentage of the amount needed.
100 Max Barbs - None Spawned
25% of 100 needed +1 => 26 spawned
100 Max Barbs - 26 Spawned
25% of 74 needed +1 => 20 spawned (19.5)
100 Max Barbs - 46 Spawned
25% if 54 needed +1 => 16 spawned (15.5)
etc
Sarisin Sep 24, 2008, 08:01 PM Vehem, the time when the barbs appear (talking Warriors, Goblins) is related to the total number of cities (not counting Barbarian cities) on the map and not game speed.
I've played about a dozen FFH games with the raging barb, epic speed, etc. variables and the main barb force comes around turn 200, give or take.
I've played 3 FF games with the same variables selected and the barbs come between turns 40 and 50. I could see a few turns difference between the two, but this a pretty big difference, so I think something is up and there is a difference somewhere between FFH and FF that is causing it.
Again, the too early appearance of the barbs is significant for two reasons IMO:
1. It provides the same uninteresting Conquest Victory (despite the number of ai civs selected) every time.
2. It eliminates one of the best parts of the game - the early exploration phase. After turn 40-50, you can just forget about sending Scouts out to explore the map as they are quickly killed by the many barbs already introduced to the game. No animal capturing, no lair/dungeon exploration, no goody hut/graveyard popping, etc.
Until this gets fixed, though, I am happy to play without the raging barb setting. ;)
MaxAstro Sep 24, 2008, 08:04 PM If you go into HandicapInfos.xml, there is a setting for the earliest turn that barbs are allowed to spawn, and the earliest turn barb cities are allowed to spawn, on each difficulty. Increasing these numbers by about 300% seems to balance out the barbarians a LOT, although Skeletons and Lizardmen still become a problem around turn 130; skeles and lizardmen should really be allowed to take Attack AI early, like they used to be before Kael's major AI changes.
Sarisin Sep 24, 2008, 08:40 PM If you go into HandicapInfos.xml, there is a setting for the earliest turn that barbs are allowed to spawn, and the earliest turn barb cities are allowed to spawn, on each difficulty. Increasing these numbers by about 300% seems to balance out the barbarians a LOT, although Skeletons and Lizardmen still become a problem around turn 130; skeles and lizardmen should really be allowed to take Attack AI early, like they used to be before Kael's major AI changes.
MaxAstro, I think that would help depending on the difficulty level of your game.
However, I think it needs to be tied more to the GAME SPEED you are using. For example, spawning the barb force in turns 40-50 might be fine for a Quick or Normal game, but it is just too early IMO for an Epic or Marathon (haven't tried that speed, though).
The other issue in this modmod mentioned in this thread is the way the barbs behave if you DON"T select the raging barb option. I haven't played many FFH games with this option not selected so I forget how it was there. However, in my 3 games here without raging barb selected it just seems like the barbs just float around the edges of your borders rarely entering them. They will attack if you happen to pull up your unit next to one, but their behavior in going after cities and improvements seems a little strange to me.
I seem to recall you saying you play your games at Epic Speed. Do you use raging barbs or not?
MaxAstro Sep 24, 2008, 09:00 PM The "floating around borders" thing is actually the problem. All barbarian units are forced to use the Explore AI until turn 130 (normal, prince, which is what I normally play on). As soon as turn 130 hits, every barbarian unit in the world goes to Attack AI simultaneously, resulting in a MASSIVE flood of barbarian units of all kinds that is hard to survive as a human, and absolutely devastating to the AI. Raging barbs just means there are that many more barbs to all hit at once. The best fix I can find is to delay their spawning; not sure how to do that based on speed. What I would really like to do is delay their spawning AND for Lizardmen and Skeletons to always use Attack AI, regardless of the turn. That would, I think, fix 90% of the barbarian flood problems.
That said, I think the "explore until turn 130, then attack" strategy works ~beautifully~ for Orthus; instead of suiciding against the first civ he can find, he actually builds up some decent power before attacking and is a real threat.
xanaqui42 Sep 24, 2008, 09:32 PM I am planning to rewrite the AI to account for Raging Barbarians being set and desire more defenders. When I take a look at how Wiser orcs has improved the AI I am hoping that some of that kind of stuff is already done though :)
Yep, it's implemented in Wiser Orcs.
The C++ code can be found grepping on "stronger response to barbarian offensive"
There are also two XML fields:
BARBARIAN_LOSS_MEMORY_TURNS
BARBARIAN_LOSS_THRESHOLD_UNITS
War footing (WARPLAN_TOTAL) for a player against the barbarians occurs when BARBARIAN_LOSS_THRESHOLD_UNITS owned by that player are lost within BARBARIAN_LOSS_MEMORY_TURNS, and lost when the player goes under that. Note that a player that is not at war with the barbarians ignores this check.
Feel free to contact me if you want/need assistance putting this logic in your mod mod.
Sarisin Sep 24, 2008, 10:20 PM The "floating around borders" thing is actually the problem. All barbarian units are forced to use the Explore AI until turn 130 (normal, prince, which is what I normally play on). As soon as turn 130 hits, every barbarian unit in the world goes to Attack AI simultaneously, resulting in a MASSIVE flood of barbarian units of all kinds that is hard to survive as a human, and absolutely devastating to the AI. Raging barbs just means there are that many more barbs to all hit at once. The best fix I can find is to delay their spawning; not sure how to do that based on speed. What I would really like to do is delay their spawning AND for Lizardmen and Skeletons to always use Attack AI, regardless of the turn. That would, I think, fix 90% of the barbarian flood problems.
That said, I think the "explore until turn 130, then attack" strategy works ~beautifully~ for Orthus; instead of suiciding against the first civ he can find, he actually builds up some decent power before attacking and is a real threat.
Hmmm, that's funny because I just didn't see this massive flood of barbarian units playing my game without raging barbs selected. I am around turn 300 now and have to say the barbs are a non-factor in the game and only about 50% of the Huge map is full - there are plenty of Bears, though!;)
Also, this is the game where Orthus stood guard on a goody hut for about 50 turns and left when a Clan Warrior came along and popped the hut. However, instead of attacking (I'm sure it was past turn 130) he headed right for the city where Acheron was holed up. I sent a couple of Freaks and Warriors to soften him up, then killed him and took his axe with Curley.
I think the main raging barb issue here is WHAT makes the barb main force spawn? As I said, in FFH it is tied to the number of cities settled on the map, but here it appears to be something else because at turn 40, when they are coming, there is usually only one city per civ at Epic Speed.
xienwolf Sep 25, 2008, 12:20 AM Yep, it's implemented in Wiser Orcs.
The C++ code can be found grepping on "stronger response to barbarian offensive"
There are also two XML fields:
BARBARIAN_LOSS_MEMORY_TURNS
BARBARIAN_LOSS_THRESHOLD_UNITS
War footing (WARPLAN_TOTAL) for a player against the barbarians occurs when BARBARIAN_LOSS_THRESHOLD_UNITS owned by that player are lost within BARBARIAN_LOSS_MEMORY_TURNS, and lost when the player goes under that. Note that a player that is not at war with the barbarians ignores this check.
Feel free to contact me if you want/need assistance putting this logic in your mod mod.
Cool, I kinda figured that you had something like that in the changelogs a while ago, but haven't read your work TOO closely. Mostly it is just personal time and a knowledge that you are still working on the mod which have kept me out of your codebase so far. Soon as I get some time though I'll be making a hefty bunch of feedback in your thread, either asking why you did something, or pointing out how I changed it during import and why I wanted to do so.
One thing I am not sure if you have mentioned looking at yet which would be nice is changing the "Combat Risk" logic to do a "Power Protect" type of framework. That meaning:
1) AI checks the stack for the highest level unit and evaluates his combat odds. If they are phenomenal (>95%?) then that unit attacks.
2) Cycle all non-Temporary units in the stack and check for decent combat odds (>90%?) and attack if found.
3) Cycle all Temporary units and attack with the best possible odds from this group, if any temporary units present.
4) Run the normally coded Risk evaluation and attacker selection, but includes a "Cowardice" factor where the more XP a unit has, the less willing it is to take personal risks. (Probably should also reduce the acceptable risk factor if the unit has an Equipment Promotion and no other defenders in the stack)
Also make it refuse any combat against a unit with a duration that has even moderate risk (<90%), especially if there is a valid non-temporary target available. And never be willing to attack a unit with a duration of 1, since that unit will die before it can ever move again. Unless it is phenomenal odds (>95%) and decent XP (Levels/Strength close enough you'll get more than 1 XP for the fight, or have a promotion/Trait which allows bonus XP per victory).
Been on my planned code for a long time, but that was back before I was comfortable fiddling with AI routines, and it has gotten quite burried by other projects since.
Vehem Sep 25, 2008, 03:07 AM Also make it refuse any combat against a unit with a duration that has even moderate risk (<90%), especially if there is a valid non-temporary target available. And never be willing to attack a unit with a duration of 1, since that unit will die before it can ever move again. Unless it is phenomenal odds (>95%) and decent XP (Levels/Strength close enough you'll get more than 1 XP for the fight, or have a promotion/Trait which allows bonus XP per victory).
That one could be dangerous if you literally mean "never" - all you have to do to prevent attacks at all is keep a 1 turn summon with you with a strength sufficient to be the first defender (Earth Ellies should do it, or even things like Spectres at lower levels).
It needs to take into account the units that can be attacked *after* the short duration summon is dead. I fully agree that a single summon on it's own should be ignored, but it's more troublesome as a stack member.
[to_xp]Gekko Sep 25, 2008, 03:51 AM hey Sarisin, it's good to know that you no longer have CTD issues with FF :goodjob: I'm looking forward to the changes that are gonna be made about raging barbs, I wanna try it out cuz it's gonna make the game more interesting I guess. and it's awesome to see that xienwolf is gonna implement the wiser orcs changes in FF :D
@xienwolf: shouldn't points 2) and 3) in your last post be switched around? I think the AI should be more willing to attack with non-durable summons, otherwise they'd end up being useless, no? I'm curious to hear the logic about that ;)
Valkrionn Sep 25, 2008, 04:37 AM Gekko;7279044']
@xienwolf: shouldn't points 2) and 3) in your last post be switched around? I think the AI should be more willing to attack with non-durable summons, otherwise they'd end up being useless, no? I'm curious to hear the logic about that ;)
I think what he meant with 1 and 2 was for any permanent units with high odds to attack first, thereby earning xp, followed by summons, and then follow it up with step 4, which is currently the only step.
[to_xp]Gekko Sep 25, 2008, 04:51 AM ah, you're right I guess. that way the XP doesn't go to waste. thanx for pointing that out. :)
not sure about point 1 though. personally, if I got 90%+ odds with more than 1 unit, I tend to attack with lower-lvl ones to get them to raise in level, instead of only getting a single uber-unit.
xienwolf Sep 25, 2008, 08:50 AM Yeah, Skeletons and other non-temporary summons are tricky for the AI to use as anything other than units with base FfH. A field would have to be added to CvUnit which identifies a unit as having been summoned to let the AI understand that a permanent unit is expendable, but there could be rare cases where a permanent summon is NOT an expendable unit (though none I can think of yet).
As for point 1, the hope is that there will be other targets for the lower level units to smack. The AI right now needs help in nurturing high level units (and a massive re-write in selecting proper promotions). Once we get them to create Uber-Units, then we can start to tweak it to create decently leveled Stacks of Death as well.
Sarisin Sep 25, 2008, 07:14 PM Gekko;7279044']hey Sarisin, it's good to know that you no longer have CTD issues with FF :goodjob: I'm looking forward to the changes that are gonna be made about raging barbs, I wanna try it out cuz it's gonna make the game more interesting I guess. and it's awesome to see that xienwolf is gonna implement the wiser orcs changes in FF :D
@xienwolf: shouldn't points 2) and 3) in your last post be switched around? I think the AI should be more willing to attack with non-durable summons, otherwise they'd end up being useless, no? I'm curious to hear the logic about that ;)
Yeah, I have to admit I am having a blast now that the CTDs are not a problem. :goodjob:
I am only at Turn 450, but there is so much interesting new stuff it is really a learning experience for me now. Having the animals spawn the whole game is a streak of genius. I already was lucky enough to build the Grand Menagerie early, but it is amazing to see a Gorilla strolling around on Turn 450!
Some of the rituals have me baffled as to what they actually do and I'm not sure I want to invest all the hammers and time in building them.
I'm only second in points, and the Clan has close to 50 cities!
When I finish this game (I'm stockpiling Great Bards for a Cultural Victory), I want to try a Normal speed game with raging barbs to see how that is.
Vehem Sep 25, 2008, 07:22 PM Yeah, I have to admit I am having a blast now that the CTDs are not a problem. :goodjob:
Just don't turn the grids on until after the next patch (if Hyborem is in-game) :D
Just out of curiosity - did you use them when you were playing before?
When I finish this game (I'm stockpiling Great Bards for a Cultural Victory), I want to try a Normal speed game with raging barbs to see how that is.
Still tough on Normal - but the AI's seem to survive it better.
Sarisin Sep 25, 2008, 08:05 PM Just don't turn the grids on until after the next patch (if Hyborem is in-game) :D
Just out of curiosity - did you use them when you were playing before?
Still tough on Normal - but the AI's seem to survive it better.
Uh-oh, I ALWAYS use those grid lines and Hyborem is in the game. He's been around for about 50 turns, though, and no CTDs.
It's been many moons since I played at a quicker speed than Epic, but I am curious as to what turn the main barb force appears. That will have to wait, though, as I am truly enjoying my current game...despite losing, at PRINCE for chrissakes!:cry:
zup Sep 26, 2008, 03:18 AM Well I was playing on noble, huge map and I was Sheaim. No ragers for that game. When I had established my 3rd city, I looked at the wb to find Acheron. Malakim had wiped out Calabim and had at least 10 cities by then. Is it a wonder I quit after that?
Vehem Sep 26, 2008, 05:08 AM Uh-oh, I ALWAYS use those grid lines and Hyborem is in the game. He's been around for about 50 turns, though, and no CTDs.
It's been many moons since I played at a quicker speed than Epic, but I am curious as to what turn the main barb force appears. That will have to wait, though, as I am truly enjoying my current game...despite losing, at PRINCE for chrissakes!:cry:
If his territory reaches Ocean that you can see, it will cause a crash if grid lines are turned on. Best option for the moment is to just turn the grids off, or if you're feeling "moddy"...
Download the attached file Extract the DDS from the zip Put the DDS in Assets\Art\Terrain\Textures
...which should solve the problem ahead of the next patch.
xanaqui42 Sep 26, 2008, 10:23 AM One thing I am not sure if you have mentioned looking at yet which would be nice is changing the "Combat Risk" logic to do a "Power Protect" type of framework. That meaning:
Good ideas; I'll put a note in for future ideas. I'd have to look at the code to see how feasible this is; I haven't done a lot with unit AI yet.
Sarisin Sep 26, 2008, 10:38 AM If his territory reaches Ocean that you can see, it will cause a crash if grid lines are turned on. Best option for the moment is to just turn the grids off, or if you're feeling "moddy"...
Download the attached file Extract the DDS from the zip Put the DDS in Assets\Art\Terrain\Textures
...which should solve the problem ahead of the next patch.
Fortunately, I play on a huge Fantasy Realm map which is mostly land, and he was wedged in between my civ and Einion Logos - as is often the case with the terrible placement he gets. Even though I was Balseraph Evil OO, he threatened me the first turn after contact and declared war after only a few turns - and left Einion Logos, Good alone.
No problem and a stupid move for the Infernal to declare war immediately as he was very easy to wipe out.
I never had to turn off the grid lines, but thanks for that warning which I will keep in mind for my next game. :)
hbar Sep 27, 2008, 10:56 AM ...but there could be rare cases where a permanent summon is NOT an expendable unit (though none I can think of yet).
As the Sheaim, I like to keep a skeleton with my adepts as they hunt for XP in the early game. This is pretty specific, but could the AI be taught to summon permanents after they move?
BTW, cardith bit the big one on turn ~70 last night with raging barbs on, but everyone else seems to be okay.
Sarisin Sep 27, 2008, 08:29 PM OK, I tried a raging barb game with the same variables EXCEPT at Normal speed, and you know what? More of the same. ;)
This time I was Luchiurp (randomly assigned) and played with 11 AI civs on a huge fantasy realm map. Still down at Prince, but might go up a level or two next to see what happens.
Anyway, the main barb force appeared on Turn 35. This was only a few turns earlier than in Epic speed in which they came between turns 40 and 50.
The build time for a Warrior at Epic is 37 turns and 25 at Normal. Yes, this can go down as the city grows, resources come on line, you push production, etc. but the point is generally more turns in Epic to build a unit/defender.
Anyway, I used a strategy to get my second city you should try if you haven't already. If you play with Barbarian Lands turned on, you will normally have at least one barb city settled close to your civ. If the orcs are in the game, you can bet they will use their World Spell For the Horde immediately. This leaves barb cities without a defender for a few turns until they can build one. Beeline for the closest barb city and you can take it without a fight. Or, if you don't want it, raze it and get the gold. As an added bonus you can prevent Acheron from setting up shop near your civ by taking out the barb cities close to you.
I had a Scout nearby and took the city with no barb defenders. A quick way to get a city - no need to build a Settler (very helpful in the slower speed games, which this was not). Of course, now you have to defend two cities.
As soon as I saw Warriors and Goblins move about I knew the main barb force had arrived and it was time to recall all my units back to the two cities and to build more units.
Just as in Epic speed, the AI civs went down one by one in short order. Before turn 100 eight had been wiped out (especially surprised in the case of Cassiel who popped two Adventurers). One lizard civ last until about turn 140 and that left 2 civs beside mine:
Charadon and Jonas Endain.
Two civs with the Barbarian trait who the barbs would not attack. This meant ALL the barbs on the map were headed my way. It was OK though as I had built the Pact of Nilhorn and had the Stooges to defend. I killed Orthus (he committed suicide really going up against my city) and had his axe. I had 7-8 defenders in each city, about 12 with 100XP. Even though the barbs came in waves, they were not denting my defenses - bolstered by Palisades and Walls. There was no way I could build and defend any improvements.
So, there I was just hitting Enter and Defending - not very interesting.
I thought about letting Jonas and Charadon pass me in points so the barbs would declare war on them. I reduced my Research to 10%, but still founded two religions and other techs as I stayed ahead of them on points.
Charadon declared war on me and sprung his World Spell that brought bunches of wolves, but he could not dent my defenses with his barb cronies.
I'll probably just give up on this game to start another. I see there is a 'break save' patch out anyway.
Conclusions:
1. The mod just doesn't work with raging barbs. I suppose I could try Quick speed, but expect more of the same. The AI is just unable to cope with the raging barbs and is wiped out too fast.
2. The barbs come just too early in raging barbs. This needs to be scaled back based on game speed. I would recommend turn 200 for Epic and, I guess turn 100-125 for Normal. This would, hopefully, give the AI a chance to build some defenders so they can survive longer. However, I'm guessing they will still expand like crazy and keep one defender per city giving them the same result of being wiped out early.
3. The early game of exploration is completely missing in raging barb games. I was able to pop 3 goody huts, 1 lair (2 more were available, but already had Skeleton guards), and 1 graveyard before I had to head back to my cities. No chance to even get Animal Husbandry and capture animals. I really miss that fun in my raging barb games in FF.
4. I'm wondering if upping the difficulty would make a difference? Would the AI be smarter in building more defenders? Would the bonus against barbs help them? Or would they still expand, expand, expand and have their one-defender cities overrun one by one by the raging barbs. Maybe I will try that next.
For now, I have to still say the modmod is unplayable with the raging barb option selected unless you just want a quick, unsatisfying Conquest Victory. I'm anxious to hear if anyone thinks differently, maybe by using different game variables than I have chosen.
xienwolf Sep 28, 2008, 12:47 AM I actually dug into the code this weekend and found that it already IS scaled by gamespeed. BarbPercent is multiplied by BarbarianUnitAppearTurn (or nearly those variable names). In each case except Marathon that is the same as the standard scaling, for Marathon though it is 400 instead of the normal 300. So they should show up VERY late in Marathon games.
Sarisin Sep 28, 2008, 04:22 AM I actually dug into the code this weekend and found that it already IS scaled by gamespeed. BarbPercent is multiplied by BarbarianUnitAppearTurn (or nearly those variable names). In each case except Marathon that is the same as the standard scaling, for Marathon though it is 400 instead of the normal 300. So they should show up VERY late in Marathon games.
What did you find for Epic speed?
Again, I played three Epic speed games with raging barbs selected and all three ended up as Conquest victories before Turn 160.
Also, in those three games the bulk of the barb force (not the odd Warrior, Goblin, Skeleton, or Lizardman) showed up between turns 40 and 50.
For the only Normal speed game they came on turn 35.
I guess I will try Marathon next, but I hate to play at that setting as the game really bogs down from mid-game on.
Vehem Sep 28, 2008, 05:00 AM I actually dug into the code this weekend and found that it already IS scaled by gamespeed. BarbPercent is multiplied by BarbarianUnitAppearTurn (or nearly those variable names). In each case except Marathon that is the same as the standard scaling, for Marathon though it is 400 instead of the normal 300. So they should show up VERY late in Marathon games.
If you check my post earlier in the thread - I tied that value into the per turn spawns as well. It is currently just the "arrival turn" that is slowed by game speed.
Currently they just delay when the barbs arrive, but when they do, they arrive with the same frequency as they do on Normal speed, which is effectively at least twice as fast on Marathon (as units there take twice as long to create). Basically means that any defending losses against barbarians are twice as hard to recover from.
xienwolf Sep 28, 2008, 10:01 AM Breakdown of how Barbarians spawn now ("maintenance code" removed so we can discuss what actually does something):
void CvGame::createBarbarianUnits()
{
if (isOption(GAMEOPTION_NO_BARBARIANS))
{
return;
}
lResult = 0;
gDLL->getPythonIFace()->callFunction(PYGameModule, "createBarbarianUnits", NULL, &lResult);
if (lResult == 1)
{
return;
}
Ok, if you have Barbarians turned off, none of this happens. And the python call isn't used at all in FfH, looking up the function it is just "return false"
createAnimals();
if (getElapsedGameTurns() > ((GC.getHandicapInfo(getHandicapType()).getBarbari anCreationTurnsElapsed() * GC.getGameSpeedInfo(getGameSpeedType()).getBarbPer cent()) / 100))
This is the important bit where the Barbarians are told to wait for a while to spawn. Well, first line calls a function to spawn animals before checking if it is allowed to spawn Orcs. In the Animal spawn function things run PRETTY MUCH the same way, except it is hardcoded that animals won't spawn for the first 5 turns (I just now made this weighted by gamespeed's BarbPercent as well), or if there are fewer cities settled than there are living players in the game (ie - everyone had a chance to settle their first city. Except on Deity where the AI starts with a spare settler, you better not wait too long to settle your own city or there WILL be animals)
Turns Elapsed is set by your difficulty selection: Settler: 50 Chieftan: 45 Warlord: 40 Noble: 35 Prince: 30 Monarch: 25 Emperor: 20 Immortal: 15 Deity: 10
Barb Percent is set by your gamespeed: Marathon: 400 Epic: 150 Normal: 100 Quick: 67
So an Epic game on Noble Difficulty will get Barbarians spawning at about turn 48, Animals spawning at turn 8. Marathon game on Prince will see Animals spawning at turn 20, and Barbarians spawning at turn 120 (about 20 turns after Orthus has spawned if I remember that chunk of python right)
The numbers in the gamespeed look like they could go for a bit of a balancing now that it is the ONLY limitation on when the Barbarians come calling. They are overall a tad bit low.
{
for(pLoopArea = GC.getMapINLINE().firstArea(&iLoop); pLoopArea != NULL; pLoopArea = GC.getMapINLINE().nextArea(&iLoop))
{
if (pLoopArea->isWater())
{
eBarbUnitAI = UNITAI_ATTACK_SEA;
iDivisor = GC.getHandicapInfo(getHandicapType()).getUnownedWa terTilesPerBarbarianUnit();
}
else
{
eBarbUnitAI = UNITAI_ATTACK;
iDivisor = GC.getHandicapInfo(getHandicapType()).getUnownedTi lesPerBarbarianUnit();
}
if (isOption(GAMEOPTION_RAGING_BARBARIANS))
{
iDivisor = std::max(1, (iDivisor / 2));
}
The map is split up by the game into disctinct "areas" based on various reasoning. One of those reasonings is that water and land are always seperate, so an area is either one or the other, never both. This just makes sure we don't beach the Sailor's Dirge or drown Orthus.
The Divisor is fairly self explanatory: How many unowned tiles need to exist for me to be allowed to spawn a Barbarian? And if Raging Barbs is set, let's get double the number of Barbarians!
if (iDivisor > 0)
{
iNeededBarbs = ((pLoopArea->getNumUnownedTiles() / iDivisor) - (pLoopArea->getUnitsPerPlayer(BARBARIAN_PLAYER) - pLoopArea->getAnimalsPerPlayer(BARBARIAN_PLAYER)));
Modified by Kael so that the number of animals the Barbarians have in play won't count against the number of normal units they are allowed to spawn. This just counts how many tiles are unowned to find out how many Barbarians are allowed in the area, then it checks how many units the barbarians have in the area to determine how many will need to be spawned.
Note: Since these checks are done on a per area basis, there isn't any limit World-Wide on how many Barbarians are allowed to exist. If the Barbarians are all wandering out of one area, but are not being killed in another area, then their numbers can build forever.
if (iNeededBarbs > 0)
{
iNeededBarbs = ((iNeededBarbs / (4 * GC.getGameSpeedInfo(getGameSpeedType()).getBarbPer cent()) / 100)) + 1);
Just modified this bit to use what Vehem mentioned earlier in the thread. Now on Marathon the Barbarians will trickle into existence, while on Quick they will flood in.
for (iI = 0; iI < iNeededBarbs; iI++)
{
pPlot = GC.getMapINLINE().syncRandPlot((RANDPLOT_NOT_VISIB LE_TO_CIV | RANDPLOT_ADJACENT_LAND | RANDPLOT_PASSIBLE), pLoopArea->getID(), GC.getDefineINT("MIN_BARBARIAN_STARTING_DISTANCE"));
if (pPlot != NULL)
{
eBestUnit = NO_UNIT;
iBestValue = 0;
for (iJ = 0; iJ < GC.getNumUnitClassInfos(); iJ++)
{
bool bValid = false;
eLoopUnit = ((UnitTypes)(GC.getCivilizationInfo(GET_PLAYER(BAR BARIAN_PLAYER).getCivilizationType()).getCivilizat ionUnits(iJ)));
if (eLoopUnit != NO_UNIT)
{
CvUnitInfo& kUnit = GC.getUnitInfo(eLoopUnit);
bValid = (kUnit.getCombat() > 0 && !kUnit.isOnlyDefensive());
//FfH: Added by Kael 08/14/2007
if (GC.getUnitClassInfo((UnitClassTypes)iJ).getMaxGlo balInstances() == 1)
{
bValid = false;
}
//FfH: End Add
if (bValid)
{
if (pLoopArea->isWater() && kUnit.getDomainType() != DOMAIN_SEA)
{
bValid = false;
}
else if (!pLoopArea->isWater() && kUnit.getDomainType() != DOMAIN_LAND)
{
bValid = false;
}
}
if (bValid)
{
if (!GET_PLAYER(BARBARIAN_PLAYER).canTrain(eLoopUnit) )
{
bValid = false;
}
}
if (bValid)
{
if (NO_BONUS != kUnit.getPrereqAndBonus())
{
if (!GET_TEAM(BARBARIAN_TEAM).isHasTech((TechTypes)GC .getBonusInfo((BonusTypes)kUnit.getPrereqAndBonus( )).getTechCityTrade()))
{
bValid = false;
}
}
}
if (bValid)
{
bool bFound = false;
bool bRequires = false;
for (int i = 0; i < GC.getNUM_UNIT_PREREQ_OR_BONUSES(); ++i)
{
if (NO_BONUS != kUnit.getPrereqOrBonuses(i))
{
TechTypes eTech = (TechTypes)GC.getBonusInfo((BonusTypes)kUnit.getPr ereqOrBonuses(i)).getTechCityTrade();
if (NO_TECH != eTech)
{
bRequires = true;
if (GET_TEAM(BARBARIAN_TEAM).isHasTech(eTech))
{
bFound = true;
break;
}
}
}
}
if (bRequires && !bFound)
{
bValid = false;
}
}
if (bValid)
{
iValue = (1 + getSorenRandNum(1000, "Barb Unit Selection"));
if (kUnit.getUnitAIType(eBarbUnitAI))
{
iValue += 200;
}
if (iValue > iBestValue)
{
eBestUnit = eLoopUnit;
iBestValue = iValue;
}
}
}
}
if (eBestUnit != NO_UNIT)
{
GET_PLAYER(BARBARIAN_PLAYER).initUnit(eBestUnit, pPlot->getX_INLINE(), pPlot->getY_INLINE(), eBarbUnitAI);
}
}
}
}
}
}
}
}
All this stuff just finds a valid plot (minimum distance from any city based on difficulty level, and a tile which is not visible to anyone and stuff), then finds the best unit which the Barbarians are allowed to have and pops out as many as it is allowed to.
Sarisin Sep 28, 2008, 10:26 AM Thanks for your work on this xienwolf.
I want to emphasize that the human player should be OK with the raging barb situation that is in effect now. However, it is the AI that just cannot cope with the amount of barbs, but more importantly how soon they come. There probably has to be some fundamental change in FF (and FFH2) to somehow make them focus on defending vs. expanding. I think there was something done to ensure a city had two defenders, but that is hardly enough when you get an early stack of Skeletons, Lizardmen, Warriors and Goblins.
The result is as stated - AI civs mowed down one by one with the human player who turtles up assured a Conquest Victory - or a 'dead' game like I just had because there were two AI civs with the Barbarian trait.
The other thing to consider that I have mentioned several times and I'm not sure if your adjustments will fix or not is that selecting the raging barbarian variable ensures you will not have much of an early game exploration phase. In each of my games the time was very limited to go for goody huts, graveyards, and lairs/dungeons. There was ZERO time to think about capturing animals.
IMO FFH2 has it right when it gives you about 200 turns (Epic) to enjoy the exploration of your map and do the things listed above. In FF what should be a very fun part of the game is just eliminated if you want raging barbs.
Again, thanks for working on this, but for now, I think I will skip the raging barb games. If there is something you would like me to test for you, it would be my pleasure. :)
Vehem Sep 28, 2008, 11:43 AM We're having a play around with things - will see if we can tweak it to work a little better.
xienwolf Sep 28, 2008, 12:06 PM Revised the code some more.
Now Barbarians will spawn when the above discussed timer is done AND you satisfy one of the following:
Game Option: Barbarian World is set
OR
Game Option: No Settlers is set
OR
There are 1.5 Cities per player in the world.
So you should not see Barbarians spawning earlier than you do in base FfH now, unless you select Barbarian World.
[to_xp]Gekko Sep 28, 2008, 01:11 PM awesome, I'm eager to try out these new tweaks to the barbarians. well done guys ;)
Sarisin Oct 07, 2008, 07:35 AM xienwolf, I'm not sure if you applied your tweaks to patch 'o.' If you did, unfortunately, they are not working.
I started a game with exactly the same variables listed in original post (only playing Tasunke selected by the random generator).
The main barb force came on Turn 44 of the Epic speed game. I opened the world builder and each of the 12 civs, including mine, had one city - what you might expect on Turn 44.
I am now at Turn 200 and 9 of the 11 AI civs have been wiped out. Two others, Khazad and Calabim, are left with me and strangely the barbs are pretty much leaving them alone and pounding my only city. I am unable to get out and settle a second city and the XP on my guys is out of sight!
I was hoping to get my Stooges out with a couple of units to take out the remaining 2 civs, but, so far am unable to.
The point is, it looks the same as the games I mentioned early in this thread and will likely end in a very early Conquest Victory...mainly due to the barbs appearing too early IMO.
For now, FF is still unplayable on a huge map at Epic (and likely Marathon) speed with raging barbs selected.
If anyone else has seen otherwise, I'd love to hear from you. ;)
xienwolf Oct 07, 2008, 09:14 AM Yes, those tweaks should be in with Patch O. Raging Barbarians ought to mean no standard Barbarian spawn until there are 1.5 cities per player. But having Barbarian World or No Settlers will remove that limit.
I'll take another look at the code and set up some debug messages to see precisely how it is reacting. On the upside, while looking for what might be causing this to happen, I found that the AI already desires an extra 2 "floating defenders" when Raging Barbarians is set. So I can easily tweak that number up to see if it helps out.
Amusingly, a lot of the AI strategy is based on the current Era, which is meaningless in FfH, so I'll have to search that one and pluck it out of all corners of the code. One horrific location where it considers the current Era is in the number of defenders desired. So it turns out some religions are naturally more defensive than others in the AI's hands. How silly ;)
Sarisin Oct 08, 2008, 08:06 AM OK, thanks. I was finally able to free some of my guys from the barb onslaught and had them take out the remaining 2 AI civs. This was before Turn 400. I am still a little mystified as to why the barbs kept coming at me (more than 200 turns) and ignoring those 2 civs as they continued to expand with their one-defender cities. Usually, you get pounded for awhile, then they go after someone else. But, in this game I continuously got it.
xienwolf Oct 08, 2008, 08:52 AM As a note, even without Raging Barbarians activated I had much the same experience recently in base FfH when I was playtesting some features. Had the Barbarians flooding in on me quite non-stop. Not sure if they bothered with anyone else at all as everybody else managed to tech up quite nicely (short while later I had Hyborem smacking me from the other side)
Valkrionn Oct 08, 2008, 12:37 PM I'd been reading this for a while, wondering what the hell you guys were talking about, and then started a game on the Erebus map..... Jesus, was not prepared for that rush lol. Never had it happen on the Perfect World map I usually play on... Could it possibly something with the map itself? What maps do you have this problem on?
Edit: Could possibly be the mountain chains funneling them into people... Every map I've started, I'm surrounded by mountains with only one path into the main continent.
Sarisin Oct 09, 2008, 08:24 AM I'd been reading this for a while, wondering what the hell you guys were talking about, and then started a game on the Erebus map..... Jesus, was not prepared for that rush lol. Never had it happen on the Perfect World map I usually play on... Could it possibly something with the map itself? What maps do you have this problem on?
Edit: Could possibly be the mountain chains funneling them into people... Every map I've started, I'm surrounded by mountains with only one path into the main continent.
Yeah, Valkrionn, you hit on a point I mentioned in my first post in this thread. I always mention the size and type of map I use - Huge/Fantasy Realm (mostly land). It could have something to do with the map type and size, but I am still of the opinion that it has more to do with WHEN the main barb force appears, and, to a lesser extent, your game speed. I think Turn 40-50 in an Epic Speed game is just too soon. The AI is totally unprepared and is wiped out in short order. Also, it really ruins the fun early exploration game as you are forced into a defensive turtling very early.
Are you saying you use your world map with the raging barb option on and don't see them appear early and take out AI civs? Maybe they are just spawning on one continent on your map and wreaking havoc there as opposed to having one land mass to operate in?
I don't often use maps with a lot of water on them, but maybe I should try one to see what happens.
|
|