[Widelands-cvs] SF.net SVN: widelands:[4825] trunk
Status: Beta
Brought to you by:
sirver
From: <nas...@us...> - 2009-12-31 18:15:37
|
Revision: 4825 http://widelands.svn.sourceforge.net/widelands/?rev=4825&view=rev Author: nasenbaer_peter Date: 2009-12-31 18:15:29 +0000 (Thu, 31 Dec 2009) Log Message: ----------- Some updates to defaultAI behaviour -> Again a small step closer to logical building selection ;) Modified Paths: -------------- trunk/src/ai/defaultai.cc trunk/tribes/atlanteans/bakery/conf trunk/tribes/atlanteans/blackroot_farm/conf trunk/tribes/atlanteans/quarry/conf trunk/tribes/atlanteans/smelting_works/conf trunk/tribes/atlanteans/woodcutters_house/conf trunk/tribes/barbarians/bakery/conf trunk/tribes/barbarians/lumberjacks_hut/conf trunk/tribes/barbarians/micro-brewery/conf trunk/tribes/barbarians/quarry/conf trunk/tribes/barbarians/smelting_works/conf trunk/tribes/empire/bakery/conf trunk/tribes/empire/brewery/conf trunk/tribes/empire/lumberjacks_house/conf trunk/tribes/empire/quarry/conf trunk/tribes/empire/smelting_works/conf trunk/tribes/empire/vineyard/conf trunk/tribes/empire/winery/conf trunk/txts/developers Modified: trunk/src/ai/defaultai.cc =================================================================== --- trunk/src/ai/defaultai.cc 2009-12-31 17:42:20 UTC (rev 4824) +++ trunk/src/ai/defaultai.cc 2009-12-31 18:15:29 UTC (rev 4825) @@ -802,18 +802,20 @@ // Priority of woodcutters depend on the number of near trees prio += bf->trees_nearby * 5 / 3; prio /= 2 * (1 + bf->tree_consumers_nearby); - if (bo.total_count() < 2) + if (bo.total_count() < 2) { prio *= 6; // big bonus for the basics - if (bo.total_count() == 0) - prio *= 2; // even more for the absolute basics + if (bo.total_count() == 0) + prio *= 4; // even more for the absolute basics + } } else if (bo.need_stones) { // Priority of quarries depend on the number of near stones prio += bf->stones_nearby * 5 / 3; - prio /= 2 * (1 + bf->stone_consumers_nearby); - if (bo.total_count() < 2) + prio /= 3 * (1 + bf->stone_consumers_nearby); + if (bo.total_count() < 2) { prio *= 6; // big bonus for the basics - if (bo.total_count() == 0) - prio *= 2; // even more for the absolute basics + if (bo.total_count() == 0) + prio *= 4; // even more for the absolute basics + } } else if (bo.production_hint >= 0) { // production hint (f.e. associate forester with trunks) // add bonus near buildings outputting production_hint ware @@ -931,8 +933,12 @@ } // avoid to have too many construction sites - prio -= - 2 * bo.cnt_under_construction * (bo.cnt_under_construction + 1); + // but still enable the player to build up basic productionsites + if + (bo.type != BuildingObserver::PRODUCTIONSITE + || !bo.is_basic || bo.total_count() > 0) + prio -= + 2 * bo.cnt_under_construction * (bo.cnt_under_construction + 1); // add big penalty if water is needed, but is not near if (bo.need_water) { Modified: trunk/tribes/atlanteans/bakery/conf =================================================================== --- trunk/tribes/atlanteans/bakery/conf 2009-12-31 17:42:20 UTC (rev 4824) +++ trunk/tribes/atlanteans/bakery/conf 2009-12-31 18:15:29 UTC (rev 4825) @@ -1,6 +1,9 @@ size=medium output=bread +[aihints] +build_material=false + [buildcost] trunk=2 planks=2 Modified: trunk/tribes/atlanteans/blackroot_farm/conf =================================================================== --- trunk/tribes/atlanteans/blackroot_farm/conf 2009-12-31 17:42:20 UTC (rev 4824) +++ trunk/tribes/atlanteans/blackroot_farm/conf 2009-12-31 18:15:29 UTC (rev 4825) @@ -6,6 +6,9 @@ stone=2 trunk=4 +[aihints] +build_material=false + [working positions] blackroot_farmer=1 Modified: trunk/tribes/atlanteans/quarry/conf =================================================================== --- trunk/tribes/atlanteans/quarry/conf 2009-12-31 17:42:20 UTC (rev 4824) +++ trunk/tribes/atlanteans/quarry/conf 2009-12-31 18:15:29 UTC (rev 4825) @@ -9,6 +9,7 @@ stonecutter=1 [aihints] +is_basic=true stoneproducer=true [programs] Modified: trunk/tribes/atlanteans/smelting_works/conf =================================================================== --- trunk/tribes/atlanteans/smelting_works/conf 2009-12-31 17:42:20 UTC (rev 4824) +++ trunk/tribes/atlanteans/smelting_works/conf 2009-12-31 18:15:29 UTC (rev 4825) @@ -8,6 +8,9 @@ planks=1 spidercloth=1 +[aihints] +build_material=false + [working positions] smelter=1 Modified: trunk/tribes/atlanteans/woodcutters_house/conf =================================================================== --- trunk/tribes/atlanteans/woodcutters_house/conf 2009-12-31 17:42:20 UTC (rev 4824) +++ trunk/tribes/atlanteans/woodcutters_house/conf 2009-12-31 18:15:29 UTC (rev 4825) @@ -9,6 +9,7 @@ woodcutter=1 [aihints] +is_basic=true trunkproducer=true [programs] Modified: trunk/tribes/barbarians/bakery/conf =================================================================== --- trunk/tribes/barbarians/bakery/conf 2009-12-31 17:42:20 UTC (rev 4824) +++ trunk/tribes/barbarians/bakery/conf 2009-12-31 18:15:29 UTC (rev 4825) @@ -1,6 +1,9 @@ size=medium output=pittabread +[aihints] +build_material=false + [buildcost] trunk=2 blackwood=2 Modified: trunk/tribes/barbarians/lumberjacks_hut/conf =================================================================== --- trunk/tribes/barbarians/lumberjacks_hut/conf 2009-12-31 17:42:20 UTC (rev 4824) +++ trunk/tribes/barbarians/lumberjacks_hut/conf 2009-12-31 18:15:29 UTC (rev 4825) @@ -8,6 +8,7 @@ lumberjack=1 [aihints] +is_basic=true trunkproducer=true [programs] Modified: trunk/tribes/barbarians/micro-brewery/conf =================================================================== --- trunk/tribes/barbarians/micro-brewery/conf 2009-12-31 17:42:20 UTC (rev 4824) +++ trunk/tribes/barbarians/micro-brewery/conf 2009-12-31 18:15:29 UTC (rev 4825) @@ -2,6 +2,9 @@ output=beer enhancement=brewery +[aihints] +build_material=false + [buildcost] trunk=3 blackwood=2 Modified: trunk/tribes/barbarians/quarry/conf =================================================================== --- trunk/tribes/barbarians/quarry/conf 2009-12-31 17:42:20 UTC (rev 4824) +++ trunk/tribes/barbarians/quarry/conf 2009-12-31 18:15:29 UTC (rev 4825) @@ -8,6 +8,7 @@ stonemason=1 [aihints] +is_basic=true stoneproducer=true [programs] Modified: trunk/tribes/barbarians/smelting_works/conf =================================================================== --- trunk/tribes/barbarians/smelting_works/conf 2009-12-31 17:42:20 UTC (rev 4824) +++ trunk/tribes/barbarians/smelting_works/conf 2009-12-31 18:15:29 UTC (rev 4825) @@ -2,6 +2,9 @@ output=iron output=gold +[aihints] +build_material=false + [buildcost] trunk=3 blackwood=1 Modified: trunk/tribes/empire/bakery/conf =================================================================== --- trunk/tribes/empire/bakery/conf 2009-12-31 17:42:20 UTC (rev 4824) +++ trunk/tribes/empire/bakery/conf 2009-12-31 18:15:29 UTC (rev 4825) @@ -1,6 +1,9 @@ size=medium output=bread +[aihints] +build_material=false + [buildcost] trunk=2 wood=2 Modified: trunk/tribes/empire/brewery/conf =================================================================== --- trunk/tribes/empire/brewery/conf 2009-12-31 17:42:20 UTC (rev 4824) +++ trunk/tribes/empire/brewery/conf 2009-12-31 18:15:29 UTC (rev 4825) @@ -1,6 +1,9 @@ size=medium output=beer +[aihints] +build_material=false + [buildcost] trunk=1 wood=2 Modified: trunk/tribes/empire/lumberjacks_house/conf =================================================================== --- trunk/tribes/empire/lumberjacks_house/conf 2009-12-31 17:42:20 UTC (rev 4824) +++ trunk/tribes/empire/lumberjacks_house/conf 2009-12-31 18:15:29 UTC (rev 4825) @@ -9,6 +9,7 @@ lumberjack=1 [aihints] +is_basic=true trunkproducer=true [programs] Modified: trunk/tribes/empire/quarry/conf =================================================================== --- trunk/tribes/empire/quarry/conf 2009-12-31 17:42:20 UTC (rev 4824) +++ trunk/tribes/empire/quarry/conf 2009-12-31 18:15:29 UTC (rev 4825) @@ -10,6 +10,7 @@ stonemason=1 [aihints] +is_basic=true stoneproducer=true [programs] Modified: trunk/tribes/empire/smelting_works/conf =================================================================== --- trunk/tribes/empire/smelting_works/conf 2009-12-31 17:42:20 UTC (rev 4824) +++ trunk/tribes/empire/smelting_works/conf 2009-12-31 18:15:29 UTC (rev 4825) @@ -2,6 +2,9 @@ output=iron output=gold +[aihints] +build_material=false + [buildcost] trunk=1 stone=4 Modified: trunk/tribes/empire/vineyard/conf =================================================================== --- trunk/tribes/empire/vineyard/conf 2009-12-31 17:42:20 UTC (rev 4824) +++ trunk/tribes/empire/vineyard/conf 2009-12-31 18:15:29 UTC (rev 4825) @@ -1,6 +1,9 @@ size=medium output=grape +[aihints] +build_material=false + [buildcost] wood=2 stone=1 Modified: trunk/tribes/empire/winery/conf =================================================================== --- trunk/tribes/empire/winery/conf 2009-12-31 17:42:20 UTC (rev 4824) +++ trunk/tribes/empire/winery/conf 2009-12-31 18:15:29 UTC (rev 4825) @@ -1,6 +1,9 @@ size=medium output=wine +[aihints] +build_material=false + [buildcost] wood=1 stone=1 Modified: trunk/txts/developers =================================================================== --- trunk/txts/developers 2009-12-31 17:42:20 UTC (rev 4824) +++ trunk/txts/developers 2009-12-31 18:15:29 UTC (rev 4825) @@ -64,7 +64,7 @@ "<rt image=pics/genstats_nrwares.png image-align=left text-align=left><p font-size=12> Peter Schwanemann (Nasenbaer)<br></p></rt>" "<rt image=pics/genstats_nrwares.png image-align=left text-align=left><p font-size=12> Victor Pelt (Dwarik)<br></p></rt>" "<rt image=pics/genstats_nrwares.png image-align=left text-align=left><p font-size=12> Axel Gehlert (dunkelbrauer)<br></p></rt>" -"<rt image=pics/genstats_nrwares.png image-align=left text-align=left><p font-size=12> András Eisenberger<br></p></rt>" +"<rt image=pics/genstats_nrwares.png image-align=left text-align=left><p font-size=12> András Eisenberger (Kiscsirke)<br></p></rt>" "<rt text-align=left><p font-size=24 font-decoration=bold font-face=FreeSerif font-color=f4a131><br><br>" "" "" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |