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:
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?
@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.
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:
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?
@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:
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.