Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.3.21625 AI Factory/Town building in version TripleA v2.3+ #7819

Closed
TheDog-GH opened this issue Oct 2, 2020 · 11 comments · Fixed by #7834
Closed

2.3.21625 AI Factory/Town building in version TripleA v2.3+ #7819

TheDog-GH opened this issue Oct 2, 2020 · 11 comments · Fixed by #7834
Assignees

Comments

@TheDog-GH
Copy link
Contributor

I have a map I have been working on, it is War of the Lance with fixed links and my xml, a Fantasy map.

It is easy for me to use this map to test Factory/Town building, as I know it well.

By turn 5 the Imperial faction should of built another Town/Factory because they have spare PUs to do so.

Attached are two outputs from the Hard AI logs;
One from version TripleA 1.9.0.0.13066 and one from version 2.3.21625

v1.9 line 508 Best factory unit: Town
v2.3 line 615 should say Best factory unit: Town, but it is missing

Both versions have the line above
507 and 614 Try to purchase factory for territory: Heartlund

Im guessing, it would appear it is a logic problem or the routine is missing?

.
Finally in my testing I have noticed that ver 2.3 AI is significantly faster than 1.9, thanks Devs!!!

1.9-WotL-Imp-T05.txt
2.3-WotL-Imp-T05.txt

@TheDog-GH TheDog-GH changed the title Factory/Town building in version TripleA v2.3+ AI Factory/Town building in version TripleA v2.3+ Oct 2, 2020
@TheDog-GH TheDog-GH changed the title AI Factory/Town building in version TripleA v2.3+ 2.3.21625 AI Factory/Town building in version TripleA v2.3+ Oct 2, 2020
@trevan
Copy link
Contributor

trevan commented Oct 3, 2020

@TheDog-GH , do you have a save right before that point? I can debug the save and see why it is not building the factory. A save from both 1.9 and 2.3 would be really helpful in comparing the code paths.

@TheDog-GH
Copy link
Contributor Author

@trevan @DanVanAtta
Im unsure of how to produce a save just before the point as its the AI, but hopefully this is good enough?

The Faction turn sequence is;
Imperial, Dwarf both AI (Good Alliance)
Dragon - Human - allows me to save logs and step through turns.
AlAnfa, Orcs both AI (Evil Alliance)
The other 4 factions were turned off.

Dont use the previous files above, use these as they are a set.

Attached are four outputs from the Hard AI logs;
1.9.0.0.13066 Imperial Turn 04 Turn before
1.9.0.0.13066 Imperial Turn 05 Town is built
2.3.21865 Imperial Turn 04
2.3.21865 Imperial Turn 05

and 4 saved games

v1.9 line 508 Best factory unit: Town
v2.3 line 540 should say Best factory unit: Town, but it is missing

Both versions have the line above
507 and 539 Try to purchase factory for territory: Heartlund

If you produce the code I can test it, hopefully within a day or two, Im in the UK.

2.3-Imp-T05.txt
1.9-Imp-T04.txt
1.9-Imp-T05.txt
2.3-Imp-T04.txt

4SavedGame.zip

@trevan
Copy link
Contributor

trevan commented Oct 3, 2020

@TheDog-GH I need the map files to be able to load those saves. Can you post it here?

@TheDog-GH
Copy link
Contributor Author

Its an old map, with new xml and other stuff.
Load the Fixed version as it has fixed starting locations, the other has random locations.

You might get the Imperial AI on its own to build a Town at the end of turn 5 on its own.

settlers_war_of_the_lance.zip

Thanks for looking at this.

@trevan
Copy link
Contributor

trevan commented Oct 3, 2020

@TheDog-GH , thanks. I was able to load the saves and I can see it attempting to create the factory and not doing anything. I'll see what I can find.

@TheDog-GH
Copy link
Contributor Author

Fingers Crossed

@trevan
Copy link
Contributor

trevan commented Oct 3, 2020

@TheDog-GH , I think I found the issue. I've created #7834 with the code changes. With this change, it is now buying the town. Go ahead and test it.

@TheDog-GH
Copy link
Contributor Author

Newbie question, do I have to wait for a pre-release to be output, or is there a quicker method to test it?

@trevan
Copy link
Contributor

trevan commented Oct 3, 2020

Are you comfortable with cloning the repository and building it locally? If so, you'd be able to test it from my branch.

Some docs on how to do that can be found at https://github.com/triplea-game/triplea/tree/master/docs/development#getting-started and https://github.com/triplea-game/triplea/blob/master/docs/development/dev-process/local-build-and-testing.md. You don't need the fully lobby setup so you can just run the game-headed instance. That's either "HeadedGameRunner" in the IDE launcher or ./gradlew game-headed:run from the command line.

@TheDog-GH
Copy link
Contributor Author

Thanks, but short answer no I cant currently clone the repository, I would be starting from scratch. I will wait for the pre-release.

@DanVanAtta
Copy link
Member

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

Successfully merging a pull request may close this issue.

3 participants