Thanks locutus, that is just what i wanted to know
Announcement
Collapse
No announcement yet.
PROJECT: Playest II
Collapse
This topic is closed.
X
X
-
How far to go to avoid ‘danger’?
Originally posted by calvitix
it isn't a terrain types problem. I added a checkfordanger method to the pathfinding, to prevent AI's armies or civilian to be easily killed by bombarding or enemie armies.
the criterion are for now :
if civilian, avoid tiles near cities and enemies armies
if not civilian, avoid tiles near cities and tiles near bigger enemy armies.
when I say avoid, it adds a 'additional' cost to cross those tiles (10000 I think). So in your case the pathfinder prefer that 7 tiles path.
it works great for AI (it save a lot of units), but can be problematic in your case. I wanted to improve it by only checking the tile that ends the movement (armies can cross near the city if they don't stay near at the end of turn), but I didn't have time for now.
What I suggest is to keep that pathfinding for AI, and to make an option to activate it or not for player.
- Calvitix·Circuit·Boi·wannabe·
"Evil reptilian kitten-eater from another planet."
Call to Power 2 Source Code Project 2005.06.28 Apolyton Edition
▼▼▼▼▼▼
Comment
-
Re: How far to go to avoid ‘danger’?
Originally posted by Flinx
That is a 100 grassland/plains tile penalty! This means my slaver will prefer a 50 turn route over passing two tiles near an enemy city or unit. Extract this value to const.txt and make it modable.
Stealth units should not make this ‘checkfordanger’.
Who is an enemy? Any other player? Only players you are at war with? Any player with whom you do not have a peace treaty?
Is a 12-stack of archers a ‘danger’ to a 4-stack of tanks?
Is a hoplite + settler a ‘danger’ to a Knight?
A city could be home to a powerful 12-stack army, or there could be only one unit holding up the fort. Your ‘checkfordanger’ appears to be adding a huge zone of control around cities and units and is adding several turns to the achievement of goals and possibly preventing them from ever being achieved as the ‘enemy’ ‘danger’ moves each turn (wall of beef opportunity?). Saving units by doing nothing with them is just as bad as loosing units one by one due to attrition caused by bad path choices.
Comment
-
Re: Re: How far to go to avoid �danger�?
Originally posted by calvitix
I defined enemy as other player with diplomacy lower than neutral regard or players at war.
Originally posted by calvitix
it checks for the moment the size of enemy's army, but it can be enhanced to check its power.
-MartinCiv2 military advisor: "No complaints, Sir!"
Comment
-
Re: Re: Re: How far to go to avoid �danger�?
Originally posted by Martin Gühmann
And what about allies.
The power must be taken into consideration, it is stupid to avoid an army of 12 archers with an army of 3 tanks.
I know it has to be improved (by coefficients, and add as well the FirePower attribute), but for now I didn't take the time to do it.
I'm working for the moment on sea transport, and have enough to do with that (the grouping method aren't appropriate for maps with sea : an army can't group if all units are not on the same continent !! - So As soon as there is a transport in the army, they didn't group them any more and go separatly in transport...
I'll probably have to rewrite all the grouping methods )
- Calvitix
Comment
-
Re: Re: Re: Re: How far to go to avoid 'danger'?
Originally posted by calvitix
Allies have a diplomacy regard greater than neutral, so they won't be considered as enemy.·Circuit·Boi·wannabe·
"Evil reptilian kitten-eater from another planet."
Call to Power 2 Source Code Project 2005.06.28 Apolyton Edition
▼▼▼▼▼▼
Comment
-
Re: Re: Re: Re: How far to go to avoid �danger�?
Originally posted by calvitix
allies have a diplomacy regard greater than neutral, so they won't be considered as enemy.
Originally posted by calvitix
I didn't actually find any attribute for 'Power'. to determine if the army has enough 'power' for a goal, I use the addition of attributes : attack + defense + ranged + value(HP). (see squad_strengh operator)
-MartinCiv2 military advisor: "No complaints, Sir!"
Comment
-
Playtest
Here are the latest playtest build:
2004.10.20.playtest.part1.rar
2004.10.20.playtest.part2.rar
Edit: Removed links, for a newer version of the Apolyton Edition look here.
You will need winrar to unpack it.
It is compiled in .NET so you will need the .NET runtime environment to run the exe.
If you dont already have it it is avalaible at windows update or here .
I will be really interested to hear what your experiences with the .NET build is.
Also of my interest is any feedback on the multiplayer updates.
As usual any feedback at all is highly valued.
Changelog since last build
Fixed: Bug fix and user interface improvement for the tactical info tab of the Unit manager
Fixed: Select and center on the transport when double-clicking on a transported unit
Fixed: Spelling error ("Devision")
Fixed: Altered instant message display code to prevent messages being displayed to the
wrong player in hotseat mode
Fixed: Corrected handling of invalid strategies
Fixed: Prevented crashes with invalid units
Changed: Removed some duplicated code and allow to test cell whether its productivity
concerning food, shields and gold would be better then with the current terrain type
Added: If a terrain has no food tile improvement the AI checks whether there is a
terraform option avalable for a terrain with better food stats
Added: Changes to favorize Respect of non-treaspassing Treaty and retreat units
Added: Checks to avoid Army blocked in grouping phasis
Changed: The Group size check
Changed: Rollback goals in double search
Added: Methods to check if there is enough room for army along path, check danger along path
Changed: Several values in goals.txt
Fixed: typo corrected
Changed: useless compiler warning disabled
Added: CanTransport and IsCivilian, and a few other consistency changes to the Army class
Fixed: Prevented a crash when a space plane gets assigned multiple orders
Changed: Updated startegy database so that when two strategies are merged values aren't
overwritten by the default values of an entry if this value has not been defined
Changed:: Updated database generator so that bit pairs can now have default values as well.
That allow to have default values in databases with entries that are merged, without merging
default values into the merged record
Fixed: The typo that caused the number of merchants to be displayed in the scientists column
of the new Specialists tab of the National Manager window
Changed: Updated the database generator so that the default values of bits can be accessed if
they have any even if no value was set
Fixed: Prevent crash when loading a saved game
Fixed: Terraform logic
Changed: Updated road path generation
Changed: Lots (and lots) of things related to AI movement in an effort to improve that
Added: Some French translations
Fixed: Improved cleanup of the data of a dead player, to not keep old strategies hanging around
Fixed: Prevented a crash when a city with walls or a forcefield gets destroyed
Fixed: Allow more than 44 playable civs
Added: 18 new civilizations
Fixed: Crossed Sword Bug
Changed: Great library enhanced
Fixed: Visual tileimp progression
Fixed: Extra checks to disable science victory in network games
Fixed: Check for clear queue actions from clients received after they lost the city to another player
Fixed: Network object bookkeeping gets cleared when exiting a game
Fixed: Propagating PW in network games
Last edited by Martin Gühmann; May 25, 2008, 17:55.
Comment
-
Originally posted by rdorau
I might be the first tester. But the new playtest crashes when I start the game.
There are 2 error messages:
1. civilisation.txt line 3138 error: Could not find ITALIAN in string database.
2. CivAppError: Unable to Init the databases.
if you unpack the files to a seperate dir then what size are they? it should amount to about 27 MB.
Comment
-
It's because the new civ_str.txt file still isn't available in any other language than English. The easiest solution until it's translated is to copy the English version to the german folder (so move [CtP2 root]\ctp2_data\english\gamedata\civ_str.txt to [CtP2 root]\ctp2_data\german\gamedata). You will have English city names (e.g. Munich instead of München) but I reckon that's not too big a deal...
Comment
-
Originally posted by Locutus
It's because the new civ_str.txt file still isn't available in any other language than English."Democracy is the worst form of government there is, except for all the others that have been tried." Sir Winston Churchill
Comment
-
Was the problem with savegame files with more than 28 civs fixed?·Circuit·Boi·wannabe·
"Evil reptilian kitten-eater from another planet."
Call to Power 2 Source Code Project 2005.06.28 Apolyton Edition
▼▼▼▼▼▼
Comment
Comment