Skip to content
This repository has been archived by the owner on Apr 17, 2022. It is now read-only.

AI not building power plant #1626

Closed
wzdev-ci opened this issue Feb 21, 2010 · 8 comments
Closed

AI not building power plant #1626

wzdev-ci opened this issue Feb 21, 2010 · 8 comments

Comments

@wzdev-ci
Copy link
Contributor

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
Copy link
Contributor Author

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
Copy link
Contributor Author

Per uploaded file fixpickstruct.diff (7.3 KiB)

Fix for trunk. Breaks skirmish savegames (again)

@wzdev-ci
Copy link
Contributor Author

Per changed status from new to closed

@wzdev-ci
Copy link
Contributor Author

Per set resolution to fixed

@wzdev-ci
Copy link
Contributor Author

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
Copy link
Contributor Author

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
Copy link
Contributor Author

Git SVN Gateway <gateway@...> commented


(In Warzone2100/warzone2100@4e41e8f) 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
Copy link
Contributor Author

Git SVN Gateway <gateway@...> commented


In Warzone2100/warzone2100@4e41e8f:

#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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant