Warzone2100 / old-trac-import

Archived Import of (old) Warzone 2100 Trac
0 stars 0 forks source link

AI not building power plant #1626

Closed wzdev-ci closed 14 years ago

wzdev-ci commented 14 years ago

resolution_fixed type_bug | by PkK


To reproduce: Play skirmish on map Sk-cockate-T1 as Player 1, allied to player 3 (AI). Choose no bases for start.

AI player 3 will not build a power plant. It will build all other buildings normally.

The only way to have player 3 build power plants is by having it die and then ressurect it by giving it some units and energy.

Philipp

P.S.: I have seen the problem in other situations, such as network games.


Issue migrated from trac:1626 at 2022-04-15 21:08:58 -0700

wzdev-ci commented 14 years ago

Per commented


It took me a while to realize what the problem was here. The AI keeps trying to build a power generator on top of the hill to the east of the base start position, but there are no ramps up to this hill. It is not an easy bug to fix, either, since the script functions used do not pass enough information to check that such positions are accessible by the droid that intends to build on them. Changing the function parameters will break AI mods, and possibly savegames.

I plan to fix this later by adding a new function to find a location to build on that passes the construction droid as an additional parameter.

wzdev-ci commented 14 years ago

Per uploaded file fixpickstruct.diff (7.3 KiB)

Fix for trunk. Breaks skirmish savegames (again)

wzdev-ci commented 14 years ago

Per changed status from new to closed

wzdev-ci commented 14 years ago

Per set resolution to fixed

wzdev-ci commented 14 years ago

Per commented


(In [10322]) Add new AI script function that gives position to build a structure while checking that a given droid can build it. This is used to fix #1626 where a power generator could not be built because the build position function used gave inaccessible coordinates.

wzdev-ci commented 14 years ago

Per commented


(In [10323]) 2.3: Add new AI script function that gives position to build a structure while checking that a given droid can build it. This is used to fix #1626 where a power generator could not be built because the build position function used gave inaccessible coordinates.

wzdev-ci commented 14 years ago

Git SVN Gateway gateway@... commented


(In https://github.com/Warzone2100/warzone2100/commit/4e41e8fe5856ae787a979842efb780ccf2dd0343) Add new AI script function that gives position to build a structure while checking that a given droid can build it. This is used to fix #1626 where a power generator could not be built because the build position function used gave inaccessible coordinates.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10322 4a71c877-e1ca-e34f-864e-861f7616d084

wzdev-ci commented 13 years ago

Git SVN Gateway gateway@... commented


In https://github.com/Warzone2100/warzone2100/commit/4e41e8fe5856ae787a979842efb780ccf2dd0343:

#CommitTicketReference repository="" revision="4e41e8fe5856ae787a979842efb780ccf2dd0343"
Add new AI script function that gives position to build a structure while checking that
a given droid can build it. This is used to fix #1626 where a power generator
could not be built because the build position function used gave inaccessible coordinates.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10322 4a71c877-e1ca-e34f-864e-861f7616d084