Build order tester

Here you can post about your scenario's, mods, custom maps and YouTube channels!
User avatar
No Flag zym604
Crossbow
Posts: 7
Joined: Jan 11, 2017

Re: Build order tester

Post by zym604 »

Goodspeed wrote:Added "show buildings" in 1.05 @zym604. That was indeed missing.

Thank you, Godspeed!

I also meet some error when making a Japanese FI script, could you help me take a look:

Code: Select all

japanese food
import examplefunctions
&Shipments_JPFI
continue while villagercount  < 12
autovills off
continue while food  < 680
make wonder ToshoguShrine 0
continue while food  < 100
autovills on
allocatebuildings wood
allocatevills 7 5 0
newvillsto wood
continue while wood  < 85
make building market

1. if you run this script in BuildOrders.exe, you'll find there are "two markets" in the queue:

Code: Select all

: load jpFI

: show
 ------ ----
| 3:35 | 22 |

Food    34
Wood    1
Coin    30
XP      275/345
Export  61

Vills   13
Food v  6
Wood v  6
Coin v  0
Pop     14/20
Age     1

Buildings gathering Wood

--------------
Timer   Queued
--------------
15      Market
15      Market
22      Villager

Buildings:
----------
1 TownCenter
1 Consulate

Military:
---------

And the script will not last for more than 7 seconds (15s/2=7.5s).

2. Also, it seems that the script will make a consulate and ally with Portuguese for Japan automatically? So is it is possible to test a "300W strategy" for Japan in this script?
User avatar
Netherlands Goodspeed
Retired Contributor
Posts: 13002
Joined: Feb 27, 2015

Re: Build order tester

Post by Goodspeed »

@zym604 Thanks for the report, it looks like that bug occurs because of building the Toshogu Shrine with 0 vills. The first building you build after was then queued twice, once normally and once the Toshogu Shrine is overwritten by that building. Hence the 2 markets and no more wonder in your queue.
Fixed in 1.06.

As for your second question, indeed the consulate is always built except with a TP start. So if you want to test any non-consulate builds go with that. If you want to test it without TP or with consulate but without allying Ports, let me know.
User avatar
No Flag zym604
Crossbow
Posts: 7
Joined: Jan 11, 2017

Re: Build order tester

Post by zym604 »

Goodspeed wrote:@zym604 Thanks for the report, it looks like that bug occurs because of building the Toshogu Shrine with 0 vills. The first building you build after was then queued twice, once normally and once the Toshogu Shrine is overwritten by that building. Hence the 2 markets and no more wonder in your queue.
Fixed in 1.06.

As for your second question, indeed the consulate is always built except with a TP start. So if you want to test any non-consulate builds go with that. If you want to test it without TP or with consulate but without allying Ports, let me know.

Thank you for your reply! Another question:

In Japan FI strategy, I only want Hero rather than villager to build Shrine. So I write the following code to make Shrine only when woods are enough and no more than 2 shrines are in the queue:

Code: Select all

japanese food
import examplefunctions
&Shipments_JPFI
continue while villagercount  < 12
autovills off
continue while food  < 680
make wonder ToshoguShrine 0
continue while food  < 100
autovills on
allocatebuildings wood
allocatevills 6 6 0
newvillsto wood
while shrinecount < 14
if wood > 75 and shrineinqueue < 2
make building shrine
endif
continue
endwhile


While the code throw an error that:ERROR 110: Property 'wood' is not true/false

1. Seems like the variable "wood" is not recognized in "if" statement.
2. Is "shrineinqueue" an existed variable?
*3. When using if and while statement, people would want to know what is the name of the variable he wants to use. Is it possible to make an function like print variables to show all available variables?

Thanks again! :)
User avatar
Netherlands Goodspeed
Retired Contributor
Posts: 13002
Joined: Feb 27, 2015

Re: Build order tester

Post by Goodspeed »

@zym604
1. There is no support for "and" or "or" in conditions. You're gonna have to make a nested if.
2. The number of something in queue is not an accessible property, no. I will consider adding this, as I do see the benefits. In your case the best solution would be to make a function I think. Would look like this:

Code: Select all

function BuildShrines amount
    $shrinesbuilt = 0
    $queue1 = 0
    $queue2 = 0
    while $shrinesbuilt < $amount
        continue
        $queue1 = $queue1 - 1
        $queue2 = $queue2 - 1
        if $queue1 < 1
            continue while not make building shrine
            $queue1 = 15
            $shrinesbuilt = $shrinesbuilt + 1
            endif
        if $queue2 < 1
            continue while not make building shrine
            $queue2 = 15
            $shrinesbuilt = $shrinesbuilt + 1
            endif
        endwhile

But actually it may not be necessary, come to think of it. I assume you only want to build 2 shrines at a time because you have 2 explorers and don't want the shrines to be built by villagers? But this is accounted for in the engine, as the make statement will fail if you attempt to build a shrine with both explorers busy. Or it should, anyway. Rule of thumb: If it's possible for a building to be made by an explorer, it can never be constructed by a villager. I know it can in the real game, but in the simulation it can't. I made it this way mostly because of this very issue with Japan.
User avatar
Netherlands Goodspeed
Retired Contributor
Posts: 13002
Joined: Feb 27, 2015

Re: Build order tester

  • Quote

Post by Goodspeed »

New version: 1.07

Added water support.
Dock, fishing boats, and shipments: Schooners, East Indiamen, Advanced dock, Rendering plant.
(No warships)

Also made some changes for EP 5 compatibility like Spanish Gold, bank cost revert, etc.
User avatar
No Flag Djigit
Howdah
Posts: 1605
Joined: Nov 15, 2015

Re: Build order tester

Post by Djigit »

I remember when you mentioned this when you challenged H2O on kamchatka. I thought you were just tilted lol.

Who is online

Users browsing this forum: No registered users and 5 guests

Which top 10 players do you wish to see listed?

All-time

Active last two weeks

Active last month

Supremacy

Treaty

Official

ESOC Patch

Treaty Patch

1v1 Elo

2v2 Elo

3v3 Elo

Power Rating

Which streams do you wish to see listed?

Twitch

Age of Empires III

Age of Empires IV