View Full Version : Can The AI Detect The Civ of Hidden Nationality Units?


Sarisin
Jul 04, 2007, 04:47 AM
I think they can.

I mentioned one strategy I like to use is to build the Council of Esus, and, later in the game build HN Shadows. I send them out to the civs that are giving me problems or ahead of me in the standings and harass them by taking out weak units like Workers, Adepts, GPs (love that as the AI tends to stockpile GPs for Golden Ages!), etc. Then, as they get more powerful, I take out defenders leaving AI cities defenseless against barbs who raze or capture the cities.

A couple of related things tells me the AI knows who the HN Shadows belong to. I'm not sure if they should. I know if a HN Mercenary comes into my territory, I don't know who built that unit. The AI never builds the Council of Esus, so that would be the only way I can think of the AI could send HN units into your territory.

Anyway, consider this:

1. I have noticed relations deteriorate when I use the strategy above. Trade, border agreements, etc. are canceled. Why is that? Does the AI know the HN Shadows are mine?

2. Even more telling is this strange matter....When I check the diplomacy with the AI civ, I see the negative: "You razed one of our cities." Well, that simply is not true. I have never been at war with that civ. I didn't raze its city. However, as described, I took out the defenders with my HN Shadows, and then, the BARBS razed the city. Why pin this on me?;)

So the diplomacy is affected by what seems to be a phantom/untrue occurrence - that I razed a city. That could affect relations and may be the reason the agreements were canceled. Or, maybe the AI knows who the sneaky HN units belong to.

What do you think?

Grey Fox
Jul 04, 2007, 09:11 AM
They also don't seem to use Pirates in your terrain when at peace with you, nor take out your Pirates in your terrain when at peace with you.

xanaqui42
Jul 04, 2007, 09:31 AM
Here's the code for determining if a unit is your enemy (essentially, it is unless they are in their owner's city, in which case the default handler is used (are you at war with their owner?))
bool PUF_isEnemy(const CvUnit* pUnit, int iData1, int iData2)
{
FAssertMsg(iData1 != -1, "Invalid data argument, should be >= 0");

//FfH: Added by Kael 09/11/2006
if (pUnit->isHiddenNationality())
{
if (iData1 != pUnit->getOwner())
{
CvPlot* pPlot = pUnit->plot();
CvCity* pCity;
bool bBypass = false;

if (pPlot->isCity())
{
pCity = pPlot->getPlotCity();
if (pCity->getOwner() == pUnit->getOwner())
{
bBypass = true;
}
}

if (bBypass == false)
{
return true;
}
}
}

return atWar(GET_PLAYER((PlayerTypes)iData1).getTeam(), pUnit->getTeam());
}
//FfH: End Add

However, what you're describing about razing (that you never razed one of their cities, yet they think you did) can occur, regardless of Hidden nationality:
void CvPlayer::raze(CvCity* pCity)
{
wchar szBuffer[1024];
PlayerTypes eHighestCulturePlayer;
int iI, iJ;

if (!canRaze(pCity))
{
return;
}

FAssert(pCity->getOwnerINLINE() == getID());

eHighestCulturePlayer = pCity->findHighestCulture();

if (eHighestCulturePlayer != NO_PLAYER)
{
if (GET_PLAYER(eHighestCulturePlayer).getTeam() != getTeam())
{
GET_PLAYER(eHighestCulturePlayer).AI_changeMemoryC ount(getID(), MEMORY_RAZED_CITY, 1);
}
}
The short version is that the player offended by your razing a city is not the owner of that city. It is the player with the highest culture in that city.

So in the example you give, the player you had been harassing might have had one of its cities taken over by another player. If you razed that city prior to the other player getting the highest culture in that city, you'd get the "credit" for razing that city with the original owner (not the present owner).

Grey Fox
Jul 04, 2007, 09:38 AM
Grey Fox
Refuses to talk!!!
-10 You razed one of our cities

Omg I razed my own city after it was taken by Doviello, it had 99% of my culture! And now I won't speak with myself!

iamjooish
Jul 04, 2007, 10:42 AM
If someone sends mercs in to my ground, it usually takes me all of five seconds narrowing down the potential candidates, usually to one.

I earthquaked one of my opponents and gutted him of his military and workers using HN during peacetime and Runes. He became less agitated with me when his neighbors started making war with him. It doesn't look like the AI does anything with HN except treat those units as animals or barbarians. I've had loyal allies enthusiastically and unknowingly try to destroy my armies at one time.

I haven't had much oceans to test privateers or whatever they're called.

Sarkyn
Jul 04, 2007, 02:16 PM
Is it possible that the Shadow is an exception to the code handling for Hidden Nation?

After all, even without Council of Esus, I can use Shadows to sabotage the enemy. And when I do - they most certainly DO have a chance to catch my shadows and the diplomatic relationship is damaged accordingly.

Maybe the "did you catch the shadow" code is over-riding the HN hiddenness :)

im_robertb
Jul 04, 2007, 10:30 PM
I hope the AI can detect the civ of HN units. I certainly can. Messages like "A Fishing Boats has been destroyed by a marauding Grigori Pirate!". Said pirate has HN. When I attack it: "Does this mean WAR against Cassiel?" Hmm...

frenzyslave
Jul 06, 2007, 01:06 AM
I earthquaked one of my opponents and gutted him of his military and workers using HN during peacetime and Runes.

Better yet than using HN units to harrass, use the spell Dominate. Have your archmage in a civ with open borders and NICK stuff. Worker? GP? Now mine. Gotta have your archer, will help protect my wizz... You can even nick their unique leader too (I rem nicking Govanon!).:D Use your HN units to make the enemy numbers more serviceable.

iamjooish
Jul 06, 2007, 04:24 AM
Better yet than using HN units to harrass, use the spell Dominate. Have your archmage in a civ with open borders and NICK stuff. Worker? GP? Now mine. Gotta have your archer, will help protect my wizz... You can even nick their unique leader too (I rem nicking Govanon!).:D Use your HN units to make the enemy numbers more serviceable.

I mastered that too after experimenting with a quicksave and reload for a moment. I usually stick with cleaning out the area that i'm about to make a kidnapping in, rather than just have one archer doing escort. Better hope there aren't any forested hills near the target, though! :mischief:

Nothing is nearly as cool as having your own war machine while playing a sprawling, peaceful civ like the kuriotates. And it's level 1 because the Doviello are good from random personalities ... they never bothered to use it! (The Hunt for Red October, anyone?) You can also do neat things like kidnap wind knights from hippus, a few extra druids to liven up the terrain, and paladins from good civs why you're still evil! It works even with patriarchs if you have the right faith!

Have your archmage in a civ with open borders

Nope; don't even need open borders ... just click and drag a path a few plots into the other civ's territory, in .21f that is. It's just about the biggest cheese-tactic I've come across. But it's still hella fun, so...

Nikis-knight hinted that HN and domination are bugs... unintended exploits.
:shrug:

frenzyslave
Jul 07, 2007, 01:13 AM
Nikis-knight hinted that HN and domination are bugs... unintended exploits. :shrug:

Only to ai... Players in online games might be slightly aggravated if you start nicking their stuff, and players know when to not assault Larry when he is next to them. ;) What makes ffh2 so cool (well, one example of many many) are the diverse spells (:goodjob: ), and the ability of HN units to soften them up for barbarian takeovers (you can then "liberate" cities).

Sarisin
Jul 07, 2007, 01:25 AM
In my current game, I was again affected by this 'you razed one of our cities' thing and HN units had nothing to do with it.

This time Charadon captured one of Varn Gosam's cities. About 200 turns later (marathon game), I razed the city.

I had good relations with Varn Gosam and an Open Borders agreement. I even helped him with his war against the Doviello. But, now, after razing the city, I found a big -8, the agreements were cancelled and he was Annoyed.

I realize the city was still even after 200 turns more Malakhim that Doviello (it really takes a long time!), but I think it should go by the owner of the city that is razed rather than anything else. I have to think the Malakhim would be happy I am kicking the Doviello's ass rather so upset that I razed a city they had 200 years ago!

frenzyslave
Jul 07, 2007, 01:43 AM
In my current game, I was again affected by this 'you razed one of our cities' thing and HN units had nothing to do with it.

I had good relations with Varn Gosam and an Open Borders agreement. I even helped him with his war against the Doviello. But, now, after razing the city, I found a big -8, the agreements were cancelled and he was Annoyed.

I realize the city was still even after 200 turns more Malakhim that Doviello (it really takes a long time!), but I think it should go by the owner of the city that is razed rather than anything else. I have to think the Malakhim would be happy I am kicking the Doviello's ass rather so upset that I razed a city they had 200 years ago!

Bugger... :confused: Well, I find that Varn is always a pain in the whatsit to deal with.

iamjooish
Jul 07, 2007, 08:52 AM
Bugger... :confused: Well, I find that Varn is always a pain in the whatsit to deal with.

I play as varn... (albeit, a heavily modded version of him.)... I don't care for his IWD2 portrait either, so I switched it with cassiel's.

Do you play as evil? Do you play as the Illians?

iamjooish
Jul 07, 2007, 09:03 AM
Only to ai... Players in online games might be slightly aggravated if you start nicking their stuff, and players know when to not assault Larry when he is next to them. ;) What makes ffh2 so cool (well, one example of many many) are the diverse spells (:goodjob: ), and the ability of HN units to soften them up for barbarian takeovers (you can then "liberate" cities).

only if every plot on the map hasn't been enveloped in enemy territory... I think I fixed that by switching to archipelago rather than inland sea, lakes. :rolleyes:

xanaqui42
Jul 07, 2007, 09:15 AM
Is it possible that the Shadow is an exception to the code handling for Hidden Nation?

After all, even without Council of Esus, I can use Shadows to sabotage the enemy. And when I do - they most certainly DO have a chance to catch my shadows and the diplomatic relationship is damaged accordingly.

Maybe the "did you catch the shadow" code is over-riding the HN hiddenness :)

Hidden nationality presently does not affect any of the spy-type missions. Anything within those missions will be handled normally, as if the owner owned the unit.

Chandrasekhar
Jul 07, 2007, 02:36 PM
In my current game, I was again affected by this 'you razed one of our cities' thing and HN units had nothing to do with it.

This time Charadon captured one of Varn Gosam's cities. About 200 turns later (marathon game), I razed the city.

I had good relations with Varn Gosam and an Open Borders agreement. I even helped him with his war against the Doviello. But, now, after razing the city, I found a big -8, the agreements were cancelled and he was Annoyed.

I realize the city was still even after 200 turns more Malakhim that Doviello (it really takes a long time!), but I think it should go by the owner of the city that is razed rather than anything else. I have to think the Malakhim would be happy I am kicking the Doviello's ass rather so upset that I razed a city they had 200 years ago!

Actually, weren't you given the option to give the city to Varn Gosam instead? He'd probably be ticked that you didn't choose that option instead...

Grey Fox
Jul 07, 2007, 05:21 PM
Actually, weren't you given the option to give the city to Varn Gosam instead? He'd probably be ticked that you didn't choose that option instead...

That option exists?

Chandrasekhar
Jul 07, 2007, 08:16 PM
That option exists?

If you take a city that someone else took from a third person, I believe the option to give it back to that third person shows up along with 'raze it' and 'keep it'.

Sarisin
Jul 08, 2007, 05:26 AM
If you take a city that someone else took from a third person, I believe the option to give it back to that third person shows up along with 'raze it' and 'keep it'.

Yes, you usually see that option (unless it is a barb city), but only shortly after the city is taken by someone else. Often the barbs will take a city, and, a few turns later, if you take it, you have three options: Raze it, Take it Yourself, or return it back to the original owner.

After 200 turns though, maybe the AI forgot who it originally belonged to. ;)

I did not receive that third option.

Sureshot
Jul 08, 2007, 01:20 PM
just keep it next time and then talk to varn and gift it if you dont want it

iamjooish
Jul 08, 2007, 06:12 PM
Say that... I don't know what to do with a border town that I just flipped using culture, and I don't want to just give it back to an enemy, or to someone I don't want to become a problem later on either.

My only option is to raze?

jwin
Jul 08, 2007, 06:55 PM
It is actually not razing it, but disbanding it. IIRC, no armageddon increase and no diplomatic penalty.

iamjooish
Jul 08, 2007, 07:31 PM
It is actually not razing it, but disbanding it. IIRC, no armageddon increase and no diplomatic penalty.

Sorry, no dice. I *do* distinctly remember having diplomatic penalty for "disbanding" one of my neighbor's cities... and I seem to remember hearing a drumroll after doing so, but I won't hang my hat on it.

Sarisin
Jul 09, 2007, 05:22 AM
When I was playing a game with Perpentach/Balserph, I had Loki disbanding at least a dozen AI cities. There was no increase in the counter, and no detriment to diplomacy.

I used him also in the numerous barb cities, and, same result with the counter not moving.

iamjooish
Jul 09, 2007, 06:44 PM
you had loki disbanding cities?

jwin
Jul 09, 2007, 06:51 PM
Thats what he does, he can cause a culture flip of cities. You can then disband them or keep them.

Lurch
Jul 09, 2007, 07:25 PM
Thats what he does, he can cause a culture flip of cities. You can then disband them or keep them.
i thought he just caused civil unrest...

Sarisin
Jul 10, 2007, 03:16 AM
It really depends on the city. A large city that has been around awhile will experience only unrest.

However, it is very easy to turn new cities, or those on your borders that are not that large. You do get the decision whether you want the city or just would like to disband it. You do not get the choice of returning it back to the AI civ.

Again, I found this a good way to take down barb cities without the counter running amok. However, Loki is Balserph-specific and if you raze the barb cities playing as other civs, the counter will increase.

Sureshot
Jul 10, 2007, 05:55 AM
tried playing Classical starts on marathon? tends to go much better, as you start with an archer and an adept.

Rex rgis of Ter
Jul 10, 2007, 10:32 PM
In one of my games, my 3 shadows got leveled up so much from killing wandering units, I was able to take all of my enemies cities, declare war, repeat to next. The funny thing was, my shadows were dwarves, and I was the only dwarf in the game....

Grey Fox
Jul 10, 2007, 11:14 PM
In one of my games, my 3 shadows got leveled up so much from killing wandering units, I was able to take all of my enemies cities, declare war, repeat to next. The funny thing was, my shadows were dwarves, and I was the only dwarf in the game....

Yeah, dwarves have some of the best assassins around. Nothing like a 'nade in your enemies pocket!

Sarisin
Jul 11, 2007, 05:42 AM
In one of my games, my 3 shadows got leveled up so much from killing wandering units, I was able to take all of my enemies cities, declare war, repeat to next. The funny thing was, my shadows were dwarves, and I was the only dwarf in the game....

I think you can take over a game when you build Shadows in your city that has the Council of Esus. With the Hidden Nationality, you can attack anyone and not be seen (AI has only ever detect one with Kithra Kyriel in the games I have played). You build up the Shadows taking out weak units in cities with the Marksman ability and also those outside of cities. My last game I had a Kuriotate Shadow with over 400 XP and the other 2 with more than 200.

You cannot capture cities this way, unless you declare war, but by eliminating the defenders, you open the door for barbs to capture/raze the cities.

As mentioned, though, it appears the AI counts this as YOU razing the cities because they appear to know who owns the HN Shadows. ;)

Rex rgis of Ter
Jul 16, 2007, 01:34 PM
What I meant is my HN shadows took the defenders from all the cities, I declare war, and take the undefended cities. I won religous victory just before I took the last rival's city. My experience proves they cannot tell, as my shadows were dwarven, while everyone else's would have been human. It was too late in the game, and everywhere on the map except for a few isles were taken. No cities were razed. I'm just saying the AI can't detect HN.

Sarisin
Jul 17, 2007, 02:40 AM
What I meant is my HN shadows took the defenders from all the cities, I declare war, and take the undefended cities. I won religous victory just before I took the last rival's city. My experience proves they cannot tell, as my shadows were dwarven, while everyone else's would have been human. It was too late in the game, and everywhere on the map except for a few isles were taken. No cities were razed. I'm just saying the AI can't detect HN.

That is a good late game strategy when there is only one other civ left.

I am talking about late-mid (!) game when the civs tend to go Defensive Pact on you.

If you can't see the Shadows, I don't think it makes any difference if they were dwarven, elven, or human. The AI, IMO, seems to penalize you for your Shadow-activity in diplomacy (you razed my city, canceling agreements), and I cannot figure out why they would do that unless they knew the Shadows belonged to you. :)

MagisterCultuum
Jul 18, 2007, 02:13 AM
Dwarven also means collateral damage instead of poison.

Grey Fox
Jul 18, 2007, 09:30 AM
No it doesn't o.O

http://forums.civfanatics.com/uploads/7968/Assassin.jpg