streamingvorti.blogg.se

Freeciv kings unit
Freeciv kings unit





freeciv kings unit

Thus units that are hidden (spies and so forth) will not upset the AI, nor will any unit hidden in the fog of war. One more little detail: the player_in_territory function won't cheat. This is because the value love_incr is defined as a constant MAX_LOVE * 3 / 100 = 30 and does not appear to be an lvalue in any expression in the codebase. In other words, it takes a total of 67 turns to go from maximum opinion to minimum with the maximum of 6 player units that the AI will count. The AI hates all units but its own equally. It is completely irrelevant what these units are doing or what the type of unit is.

FREECIV KINGS UNIT CODE

To clarify: Being an 'enemy' as considered by this code is thus independent of being displayed as allied in-game: you can be both friend and foe at the same time by allying with two AI's who have declared to be at a state of war with eachother. The good guys over at Freeciv made sure we can open up the game file in Notepad and edit. If all else fails, well, there is a good chance to edit the game file by hand. This effect is capped at 30 if you are considered Neutral or Allied, but capped at 60 if you are considered an Enemy (at war or allied with someone at war with the AI in question). Now, as for editing the world, I think the old world editor for the previous build of Freeciv has been updated for the latest stable version.

freeciv kings unit

Each such unit inside such will each turn reduce the hidden love variable by 5. The function player_in_territory counts the number of your units in the AI's territory. Pplayer->ai_common.love += amount ĭIPLO_LOG(ait, LOG_DEBUG, pplayer, aplayer, "%d love lost due to units inside " * AI is so naive, that we have to count it even if players are allied */Īmount -= MIN(player_in_territory(pplayer, aplayer) * (MAX_AI_LOVE / 200), It ranges from -MAX_AI_LOVE = -1000 to MAX_AI_LOVE = +1000.įor the bit of game code relevant to the question: See lines n o 1077-1087 of the file /ai/default/daidiplomacy.c: /* Reduce love due to units in our territory.

freeciv kings unit

A bit of background: The AI's opinion of the player is tracked by a hidden love variable.







Freeciv kings unit