View Full Version : Wacky powerful barbarians?


clearbeard
Jul 29, 2009, 01:06 AM
Okay, so I get they're supposed to be Antarans, and more powerful on a ship-for-ship basis than what you have, at least early in the game. But really, having them stroll around with Battleship II's and Invasion Ship III's on turn 98 when I can barely build Destroyer I's and just settled my first extra-solar colony seems a little overpowered. I'm playing on marathon game speed, Monarch (Impossible) setting, normal barbarians, so maybe I'm just in over my head.

In keeping with the flavor of the Antarans from MoO2, they were powerful ship-for-ship, and an annoyance in the early-mid game, but each incursion never damaged more than one colony, and not all that badly at that. Here, a single Battleship that wandered near enough to my empire to notice me destroyed my entire fleet of 5 destroyers and 1 defender, and destroyed both of my star systems (game over). I don't mind the quantity of "barbarians" inherent in the large fog of war, it's the _quality_ that is... disappointing....

My $0.02

Dave

TC01
Jul 29, 2009, 08:16 AM
I believe this is not something that was changed in MOO2Civ and is the way the barbarians work in normal Final Frontier. It's probably something to do with the spawn rate or the barbarians, since there are a lot more unexplored tiles you can't see then there are in normal civ.

clearbeard
Jul 29, 2009, 09:24 AM
Is there a way to limit what ships the barbarians have access to then? In regular BtS games I've never seen them spawn with more than longbowmen or similar level units. This would be like exploring the New World in the Age of Sail and encountering barbarian cities defended by Infantry, and marauding bands of Marines and Modern Armor! I haven't played enough of the FF base to know if this phenomenon is normal there.

Ideally I could even imagine 2 different sets of barbarians, pirates and Antarans, but I'm not sure how hard that would be to implement. Pirates would be numerous and spawn in the large numbers they do now, but be limited to nothing heavier than, say, an un-upgraded cruiser (like the longbowmen).

Special Antaran units or even fleets from the high end of the tech tree would spawn much less frequently, perhaps even scripted to show up at set times, in increasing force and numbers (would have to be carefully calibrated to account for game speed). That would preserve more of the flavor.

I hope my suggestions are welcome. I'd be happy to offer more, particularly as to gameplay balance as I play more. As I become more familiar with Civ4 modding I may even be able to offer suggestions as to how to FIX things, instead of just wish lists! :lol:

Cheers

TC01
Jul 29, 2009, 11:35 AM
Well, Final Frontier is just weird in general (I mean it's code).

Pirate spawning in FF is handled in the python file CvFinalFrontierEvents.py, under a function called def doPirateSpawning, where it gives a list of the units that can be spawned and which part of the game to spawn them in.

They managed to have multiple barbarian civs in Fall Further, for Fall from Heaven 2, but it was pretty hard to manage and apparently made the game pretty unstable.

clearbeard
Jul 29, 2009, 01:15 PM
I took a look at the CivilizationInfos.xml file for grins (the XML's are about all I am comfortable with so far). There's a listed civilization for "TEH_ALIENZ" which appear to be a second barbarian civ, added after the default one from Final Frontier. I think it may be having this second "barbarian" entry that is causing the higher rate, and the higher level of spawned units.

The plain barbarians have a bunch of <UnitType>NONE</UnitType> entries to prevent them from having, say, Carriers, but teh alienz can have anything. Further, having two sets may in fact double the rate of overall barbarian spawning. I'll try commenting out that section and starting up a game to see what happens.

JEELEN
Jul 29, 2009, 05:20 PM
You can do that, but "Teh Alienz" I think are what NCCSavage originally intended for an Antaran civ; they have no effect on barb spawning, because they're not implemented yet (so no Titans for barbs). What TC01 said about the python file CvFinalFrontierEvents.py (with its function called def doPirateSpawning) makes more sense. This and the fact that in FF mods there are a lot more squares with fog of war then in a regular game - and that you're playing on Impossible level - seems basically to explain the barb nuisance. You can ofcourse choose the No Barbs option if you like. For planetary defense you should get Battleoids ASAP (they usually destroy an assaulting Battleship I) plus ofcourse missiles and fighters/bombers. If you've played a couple of games, you'll know that the first barbs appear around turn 50 and by turn 100 they can become dangerous (with Battleship Is, Destroyer IIs and Invasion Ship IIs). That's basically just canon MoO II - but actually the barbs are slightly less powerful, because in MoO II the early Antaran attacks you just have to take what they throw at you (losing freshly founded colonies and what not).

TC01
Jul 29, 2009, 06:26 PM
The actual code says that Battleships shouldn't be appearing until the end of the first third of the game. Before that, it's all Destroyers, Invasion Ships, and Planetary Defense ships (with an emphasis on planetary defense ships and invasion ships), and after that, the emphasis flips to Destroyers, and for the final "third" of the game, it flips to Destroyers and Battleships.

clearbeard
Jul 30, 2009, 03:27 PM
You're right about Teh Alienz, that had no effect. In my new game (turn 120) I just lost a scout to a barbarian battleship, so they're still spawning. I'm curious about the "thirds" of the game though, and how that is counted. From the tech tree, I'd say I'm about 1/5 of the way through, and have met 3 destroyer III's and a battleship I. My colonies have successfully hidden from the battleships so far, and held off a solo destroyer raid, but the Meklar's didn't fare so well, having just been wiped out by barbarians. I'm handily in the lead over my competitors, btw, so I'm loathe to play on a lesser difficulty. Perhaps I'll disable the barbs next game, see how the AI fares.

Other thoughts:
Construction feels very slow to me, both on tile improvements and city buildings. That's compared to tech advancement anyway. It's a marathon game, so I know everything is supposed to be slow. I may try tweaking that a bit.

Is there a way to disable the inflation of building costs, within a city? It seems counter-intuitive that building a second automated factory on another planet, for instance, would take longer than the first, when you have the one working to speed things. I haven't yet found where in the game files that feature is controlled to tweak it to my liking. Any pointers would be welcome.

TC01
Jul 30, 2009, 05:15 PM
You're right about Teh Alienz, that had no effect. In my new game (turn 120) I just lost a scout to a barbarian battleship, so they're still spawning. I'm curious about the "thirds" of the game though, and how that is counted. From the tech tree, I'd say I'm about 1/5 of the way through, and have met 3 destroyer III's and a battleship I. My colonies have successfully hidden from the battleships so far, and held off a solo destroyer raid, but the Meklar's didn't fare so well, having just been wiped out by barbarians. I'm handily in the lead over my competitors, btw, so I'm loathe to play on a lesser difficulty. Perhaps I'll disable the barbs next game, see how the AI fares.

Well, the code used is this:

if (CyGame().getElapsedGameTurns() < (CyGame().getMaxTurns() / 3)):
aiUnitList = aiUnitList1
elif (CyGame().getElapsedGameTurns() < (CyGame().getMaxTurns() * 2 / 3)):
aiUnitList = aiUnitList2
else:
aiUnitList = aiUnitList3

However, Turn 120 is just before a third of the game. There are 400 turns in MOO2Civ. Turn 133 should be the third game turn...

clearbeard
Jul 30, 2009, 07:50 PM
Hmm... Well, I have the time victory condition turned off (I don't like to feel rushed), so I suppose that could mess things up with those formulae. Next time I'll try without doing that. Thanks for the reference!

JEELEN
Jul 31, 2009, 01:32 PM
Other thoughts:
Construction feels very slow to me, both on tile improvements and city buildings. That's compared to tech advancement anyway. It's a marathon game, so I know everything is supposed to be slow. I may try tweaking that a bit.

Is there a way to disable the inflation of building costs, within a city? It seems counter-intuitive that building a second automated factory on another planet, for instance, would take longer than the first, when you have the one working to speed things. I haven't yet found where in the game files that feature is controlled to tweak it to my liking. Any pointers would be welcome.

I'd agree construction is slow initially; once your systems are built up on the other hand planetary buildings and ships can be finished in anything from 1-3 turns. (There's been a complaint about that actually.)

A bare planet has a very low production initially, yes. I think it's intentional as it is conform MoO. But if you can tweak it, I'd be interested in the end result, so please post about it if yo do.

PS: You can increase production with Pacifism, Monarchy, Mechanized Workforce and Industrial Economy; with Slave State you can sacrifice pop to rush-build. (Obviously on a pop 1 planet none will have a significant effect, unless you combine Pacifism/Mech. Workforce/Ind. Economy.)

Asthix
Jan 30, 2010, 10:27 AM
Woo Necro!
Anyway, I was wondering if the turn barbs start spawning scales by game speed as its supposed to? In the single player of 5.0 beta I had on my old toxic hard drive I ran into a battleship II on about turn 75 of an epic speed game.

I'm not absolutely positive it was a battleship II since I don't have the save but that and the turn I saw it would both be outside the rules outlined by TC01 above.

Remember there was a fix in patch 3.17 for uber barbs appearing too early in FF? I wonder if it worked correctly...

EDIT: Difficulty was on hard. I remember somewhere you mentioned recommended game settings and advised raging barbs so I always play with that option on.

JEELEN
Jan 30, 2010, 05:31 PM
Yes, I wondered where this thread went... :mischief: I have been thinking about über barbs and only noticed this phenomenon myself with the Raging Barbarians option turned on. Also, although the game can be played on different speeds, I'd stick to Normal/Epic. Now, apparently you also get raging barbarians on higher than Hard levels very early on; so far I have not been able to confirm this though. It might help if people added the exact game they are/were playing for, say, Battleships II appearing after turn 100 or so.

As for the 3.17 barb fix: as there has been no meddling with barb units, the issue should also be noticeable in FF proper (or FF Plus), I think.

God-Emperor
Jan 30, 2010, 07:14 PM
I don't think this happens in FF or FF Plus...

I looked at your CvFinalFrontierEvents.py and it does not appear to be based on the current version.

The part that is specifically relevant to this is, in your version:
# Which 1/3rd of the game is it?
if (CyGame().getElapsedGameTurns() < (CyGame().getMaxTurns() / 3)):
aiUnitList = aiUnitList1
elif (CyGame().getElapsedGameTurns() < (CyGame().getMaxTurns() * 2 / 3)):
aiUnitList = aiUnitList2
else:
aiUnitList = aiUnitList3
but the current version (as of 3.19) of FF has:
# Which 1/3rd of the game is it?
if (CyGame().getElapsedGameTurns() < (CyGame().getEstimateEndTurn() / 3)):
aiUnitList = aiUnitList1
elif (CyGame().getElapsedGameTurns() < (CyGame().getEstimateEndTurn() * 2 / 3)):
aiUnitList = aiUnitList2
else:
aiUnitList = aiUnitList3

I don't know what the actual difference between getMaxTurns and getEstimateEndTurn, but it could explain why you are getting the problem.

There are a few other differences as well (even excluding differences based on the different traits and such).

TC01
Jan 30, 2010, 08:34 PM
Here's the relevant code in the SDK (in CvGame::init()) that handles these two functions:

if (getMaxTurns() == 0)
{
iEstimateEndTurn = 0;

for (iI = 0; iI < GC.getGameSpeedInfo(getGameSpeedType()).getNumTurn Increments(); iI++)
{
iEstimateEndTurn += GC.getGameSpeedInfo(getGameSpeedType()).getGameTur nInfo(iI).iNumGameTurnsPerIncrement;
}

setEstimateEndTurn(iEstimateEndTurn);

if (getEstimateEndTurn() > getGameTurn())
{
bValid = false;

for (iI = 0; iI < GC.getNumVictoryInfos(); iI++)
{
if (isVictoryValid((VictoryTypes)iI))
{
if (GC.getVictoryInfo((VictoryTypes)iI).isEndScore())
{
bValid = true;
break;
}
}
}

if (bValid)
{
setMaxTurns(getEstimateEndTurn() - getGameTurn());
}
}
}
else
{
setEstimateEndTurn(getGameTurn() + getMaxTurns());
}

So "getMaxTurns" looks like it actually returns the number of turns remaining in the game, whereas getEstimateEndTurn gets the total number of turns.

JEELEN
Jan 31, 2010, 12:57 AM
Thanks for looking into that. ;)

"getMaxTurns" looks like it actually returns the number of turns remaining in the game, whereas getEstimateEndTurn gets the total number of turns.

And having getMaxTurns return an identical value to getEstimateEndTurn should then fix the issue, I'm guessing?

God-Emperor
Jan 31, 2010, 03:08 PM
Don't change what getMaxTurns does. It does what it is supposed to do. Change the Python to match what the current version of FF does, which is to use getEstimateEndTurn.

You ought to run a difference on your current CvFinalFrontierEvents.py and the one in the current version of Final Frontier. Then you might want to change everything (or maybe just some of them) that is different to match the current version, except the stuff that is supposed to be different due to using different traits and buildings and units and such. In addition to fixing the barbarian spawning, the one thing I can remember that would change is that it would have missiles stay at the starbase that created them.

Asthix
Feb 02, 2010, 04:15 PM
In addition to fixing the barbarian spawning, the one thing I can remember that would change is that it would have missiles stay at the starbase that created them.

Woah :eek: That'd be something to see.

JEELEN
Feb 03, 2010, 04:38 PM
Dunno... starbases are generally stronger as is already (and they're upgradable). :dunno:

@God-Emperor: Thanks!

God-Emperor
Feb 03, 2010, 05:18 PM
I havn't actually played MOO2Civ yet (downlaoded, but not yet played), so the following may not be entirely applicable, but...

A starbase in the hands of the AI is quite weak unless it is very close to one of their star systems. The reason is that it never puts a single squadron on one, so you can just wipe them out with squadrons yourself without ever risking a ship or squadron. The severity of this can be reduced slightly be giving the starbase units some chance to intercept - I have tested a 20% chance and it doesn't solve the problem, of course, but it does slow the process down and will occasionally cost you a squadron or two before the starbase dies.

I should also point out that I don't think I have ever seen the AI upgrade a starbase. They are always just the regular version, never the delta or omega.

Also, the AI does seem to move at least some of the missile off of the starbases to their systems - or if they don't, it doesn't use the ones based on starbases very often.

FF based mods really need AI improvements to get the AI to put missiles on cruisers (since it never does) and squadrons on starbases and carriers (since it never does that either). The unit AIs for units that carry missiles and squadrons are sea based, and if the unit is on land they just fail to function properly for no good reason. I have no idea why it would even bother checking what terrain it is on (or what the domain of the unit is).

JEELEN
Feb 04, 2010, 04:43 PM
A starbase in the hands of the AI is quite weak unless it is very close to one of their star systems. The reason is that it never puts a single squadron on one, so you can just wipe them out with squadrons yourself without ever risking a ship or squadron. The severity of this can be reduced slightly be giving the starbase units some chance to intercept - I have tested a 20% chance and it doesn't solve the problem, of course, but it does slow the process down and will occasionally cost you a squadron or two before the starbase dies.

I should also point out that I don't think I have ever seen the AI upgrade a starbase. They are always just the regular version, never the delta or omega.

A very good point (or two), but there's an additional problem: the AI only seems to use missiles if they're nukes - and that's not FF specific.

You're also right about the AI not upgrading starbases; I'm not sure if that's simply a matter of calculating whether it's cheaper to rebuild one after destruction. To be true, I've hardly ever seen a starbase get attacked; the main targets seem just to be star systems (which is a bit obvious as that's what counts in the end). Personally I only upgrade starbases if a) I can afford it and b) stronger spaceships appear in the game (whether barbs or regular AI). As far as I can tell, the main AI reason to build a base is to get at resources and to rely on ships for attack/defense of systems.

Perhaps with reduced fighter/bomber ranges the AI will use starbases as intended?

fulano
Feb 09, 2010, 10:30 AM
A very good point (or two), but there's an additional problem: the AI only seems to use missiles if they're nukes - and that's not FF specific.
Didn't they include non-nuke missiles in BTS? Maybe I'm thinking of the Thomas War mod. I haven't played vanilla BTS in many months. I guess I can't remember seeing the AI use missiles. That's unfortunate. I wish I understood the AI more, I'd love to be able to fix it.

I've hardly ever seen a starbase get attacked; the main targets seem just to be star systems (which is a bit obvious as that's what counts in the end). Personally I only upgrade starbases if a) I can afford it and b) stronger spaceships appear in the game (whether barbs or regular AI). As far as I can tell, the main AI reason to build a base is to get at resources and to rely on ships for attack/defense of systems.

Perhaps with reduced fighter/bomber ranges the AI will use starbases as intended?
I never attack starbases unless they are close enough to a star to get in the way.

Starbases did have PD weapons that were great for taking out incoming missiles and fighters in MOO2. I could see a fighter intercept chance (like 25% - 50% or so) being a good addition to starbases.

If you do make changes to units and such I'd love an updated copy of the XML file so when I get around to editing them the changes won't have to be made again.

JEELEN
Feb 09, 2010, 01:59 PM
Didn't they include non-nuke missiles in BTS? Maybe I'm thinking of the Thomas War mod. I haven't played vanilla BTS in many months. I guess I can't remember seeing the AI use missiles. That's unfortunate. I wish I understood the AI more, I'd love to be able to fix it.


I never attack starbases unless they are close enough to a star to get in the way.

Indeed. So why should the AI act differently?

Starbases did have PD weapons that were great for taking out incoming missiles and fighters in MOO2. I could see a fighter intercept chance (like 25% - 50% or so) being a good addition to starbases.

Actually, starbases can get promotions (I'm not sure if they do not have an intercept chance already), but since they're very rarely attacked, you can just as rarely make use of those.

If you do make changes to units and such I'd love an updated copy of the XML file so when I get around to editing them the changes won't have to be made again.

Sure, no problem. (Although I don't know if the next "patch" will contain any unit changes just yet. I want to limit fighter/bomber range, but don't know if I'll get around to it for the next update.)

God-Emperor
Feb 09, 2010, 03:57 PM
Actually, starbases can get promotions (I'm not sure if they do not have an intercept chance already), but since they're very rarely attacked, you can just as rarely make use of those.

There is a slight problem with that: Unless you have changed it in the DLL, you can't use a promotion that increases the interception chance with a unit that does not already have an interception chance. If you have two units of the same unitcombat, with one having an interception chance and the other not, and a promotion that gives an increase to interception set to be available for units of that unitcombat then only the one that already has the interception chance can use that promotion. This is why SAM Infantry can take the interception increasing promotions but the regular Infantry can't even through they are both UNITCOMBAT_GUN and the promotion PROMOTION_INTERCEPTION1 is available to UNITCOMBAT_GUN.

This is the same as not being able to use a promotion that increases collateral damage on a unit that does not already do collateral damage (as of 3.19, anyway) .

Interestingly, a unit that does not have a withdrawal chance can use a promotion that gives a withdrawal chance with one exception: a unit that is flagged as defend only (bOnlyDefensive set to 1) can not use a promotion that gives a withdrawal chance even if it already has one.

These apply to promotions that do multiple things. If you have a promotion that gives an extra first strike and an interception increase, a unit that does not have any interception chance can't take it.

JEELEN
Feb 09, 2010, 04:38 PM
That makes perfect sense. I checked the available promotions for starbases and they do include a +25% strength promotion against fighters, but, as said, starbases rarely get promoted as is. (Obviously this can be changed.)