Page 1 of 2

Build order tester

Posted: 27 Jun 2017, 13:14
by Goodspeed
Hi all,

In the past year and a half or so I've been working on and off on this project, an hour here and there. It started off as a way for me to test the strength of virginia company while taking my own poor execution out of the equation, but from there it has grown a lot. Today I'm finally done implementing all of the civs, the scripting language, and most of the relevant techs and shipments. I have left out imperial age as well as many shipments and techs that are irrelevant to a build order.

Sadly it's still largely untested. Testing every little thing would take me too much time so these past few months I have just been adding features fingers crossed. If you use it, especially the civs I haven't tested which is probably over half of them, issues will likely come up. Please tell me if they do and I will fix them as soon as I have time.

What is it?
It's a text-based application which lets you script build orders and test them. The underlying engine simulates an AoE3 game as closely as is possible without the randomness in a real game. It doesn't take into account villager walking time when switching from one resource to another, which means timings will generally be faster in this simulation than in real games (although it also doesn't take treasures into account). But its use is mostly to compare build orders, so this is not necessarily an issue.

The app allows you to quickly assess the difference between a build order where you go for an early TP and one where you don't, or the difference in age up time between a 5 bank cav semi-FF and a 5 bank naked FF. Or the difference between a VC semi-FF and a 3v semi-FF. The applications are endless.
You can undo actions easily, save your game state for later, generate a log of every action your colony took throughout your script, and more.

How to install?
Simply extract the package attached to this post somewhere and run BuildOrders.exe. Your virus protection software might complain.

How to use?
There is a google doc specifying the capabilities of the scripting language. The gist of it is you make a new colony and then you get access to the build order commands in chapter 2 like for example "make tech huntingdogs". An example of a build order script can be found in the attachment in folder "/scripts/". This is a British 3v VC 10 pike 5 longbow semi-FF. You can load it by entering "load brit". Its log can be found in "/logs/".
For advanced users there is support for variables and functions.


I personally have used the app many times when testing new ideas and testing balance changes for ESOC patch. I hope some of you will find it helpful as well. If you are a developer and want to use the existing code, good luck but feel free. If you want to help develop this app, contact me via PM. I've been adding features without the big picture in mind for a year now and I'm self-taught so the source code is a convoluted mess, but the project is on GitHub: https://github.com/mart90/BuildOrders

Questions/bug reports/feature requests/feedback? You're welcome to post in this thread or PM me.

Re: Build order tester

Posted: 27 Jun 2017, 13:15
by Gendarme
"Ex-Contributor" my ass.

Re: Build order tester

Posted: 27 Jun 2017, 15:12
by blackwidow
Goodbye test games vs AI, hello AI vs nothing, this is gonna save some time :D

Re: Build order tester

Posted: 27 Jun 2017, 16:49
by _RDX_
This is great! GS contributes a lot even though he is an Ex-Contributer...

Re: Build order tester

Posted: 27 Jun 2017, 17:47
by deleted_user
There really has been an insane amount of user created content for aoe. Think Aiz's UI, fan patches, maps, this build tester, and more!

Great to see the product of all your hard work I'll be trying this out tonight.

Re: Build order tester

Posted: 28 Jun 2017, 21:32
by Goodspeed
For anyone testing Indians you're gonna want to download the updated version. In 1.0, arrival of distributivism breaks the engine.

Re: Build order tester

Posted: 28 Jun 2017, 21:50
by rsy
Goodspeed wrote:For anyone testing Indians you're gonna want to download the updated version. In 1.0, arrival of distributivism breaks the engine.

And I was wondering if I was doing something wrong...smh

Re: Build order tester

Posted: 16 Jul 2017, 20:43
by zym604
Get the following error:

Code: Select all

: new
Input civilization and randomcrate
: British wood tpstart

: continue while villagercount < 16
ERROR 102: Invalid comparison between 'villagercount' and '16'. Make sure one is a number and the other a property name
 ------ ----
| 0:56 | 19 |

 ---------------
| 220 | 30 | 30 |

--------------
Timer   Queued
--------------


Is villagercount a typo or sth?

Also, maybe you can upload your code to github so that other could join and develop.

Thank you very much for such a wonderful contribution.

Re: Build order tester

Posted: 18 Jul 2017, 03:56
by Goodspeed
"villagercount" is correct. Before release I made a change that made all of the colony properties case insensitive. For vill count specifically, that meant changing a capital V to a small v somewhere, which I forgot to do.
Cant fix right now, on vacation until July 31. So im afraid you cant use "villagercount" for now.

I use Microsofts built in version control instead of git. Ill see about putting the project on github when I get home.

Re: Build order tester

Posted: 18 Jul 2017, 05:09
by Ashvin
Gendarme wrote:"Ex-Contributor" my ass.

what did your ass contribute? :P

Re: Build order tester

Posted: 18 Jul 2017, 06:04
by zym604
Thanks for so quick response. I'm also curious about what happened in the first few minutes after a new civilization is created.

For example, why there are 30 coins left in 56s? Is this the random 30 coin treasure that usually appears near the TC?

Code: Select all

: new
Input civilization and randomcrate
: Spanish

: show eco
 ------ ----
| 0:56 | 18 |

Food    330
Wood    0
Coin    30
XP      153/225

Vills   8
Food v  0
Wood v  0
Coin v  0
Pop     8/20
Age     1


Also, for a wood start, where is the missing 100 wood? Why there isn't 30 coin in this case?

Code: Select all

: new
Input civilization and randomcrate
: Spanish wood

: show
 ------ ----
| 1:22 | 18 |

Food    210
Wood    0
Coin    0
XP      20/259

Vills   9
Food v  0
Wood v  0
Coin v  0
Pop     9/20
Age     1

Re: Build order tester

Posted: 18 Jul 2017, 06:21
by Goodspeed
Indeed that is the on average random 30c treasure which you will find on almost every map. With wood starts where you don't go TP, early market is assumed. The 30c went into hunting dogs, which should be researched. Verify with 'print foodgatherratebonus'

Re: Build order tester

Posted: 18 Jul 2017, 21:44
by fei123456
Dawn of an new era

Re: Build order tester

Posted: 21 Jul 2017, 04:58
by Goodspeed
@zym604 I found some time and relatively stable wifi. Fixed the "count" bug, it was bigger than expected. Thanks for the report :flowers:

Re: Build order tester

Posted: 23 Jul 2017, 04:10
by Lord Mick
Very cool! Thanks for putting this together. Also, I just looked through the source code and I'm impressed if you taught yourself to program. Great use of OOP principles IMO, the only thing that could really have made it better using Java instead of C#. :)

Re: Build order tester

Posted: 23 Jul 2017, 16:02
by Goodspeed
Lord Mick wrote:Very cool! Thanks for putting this together. Also, I just looked through the source code and I'm impressed if you taught yourself to program. Great use of OOP principles IMO, the only thing that could really have made it better using Java instead of C#. :)
Thanks :smile: That's interesting, why do you think it would be better in Java? I have always preferred C#, I suppose mostly because Visual Studio is such an amazing IDE. I don't see any benefits Java would have over C# as a language; I don't know of any Java features that I would've used that are not in C#. I'm also a fan of C# because it often works as I expect it to, and because Microsoft's documentation is top notch.
Then again I haven't used Java much so I wouldn't know.

@zym604 I added the project on github: https://github.com/mart90/BuildOrders

Re: Build order tester

Posted: 23 Jul 2017, 16:12
by Gichtenlord
Goodspeed wrote:
Lord Mick wrote:Very cool! Thanks for putting this together. Also, I just looked through the source code and I'm impressed if you taught yourself to program. Great use of OOP principles IMO, the only thing that could really have made it better using Java instead of C#. :)
Thanks :smile: That's interesting, why do you think it would be better in Java? I have always preferred C#, I suppose mostly because Visual Studio is such an amazing IDE. I don't see any benefits Java would have over C# as a language; I don't know of any Java features that I would've used that are not in C#. I'm also a fan of C# because it often works as I expect it to, and because Microsoft's documentation is top notch.
Then again I haven't used Java much so I wouldn't know.

@zym604 I added the project on github: https://github.com/mart90/BuildOrders

Yeah, I have a similar opinion towards c#. I've been coding with c# for almost a year now at work and it feels just way more OOP orientated than java and visual studios is so wonderful to work with :)

Re: Build order tester

Posted: 23 Jul 2017, 16:33
by Ashvin
Gichtenlord wrote:
Goodspeed wrote:
Lord Mick wrote:Very cool! Thanks for putting this together. Also, I just looked through the source code and I'm impressed if you taught yourself to program. Great use of OOP principles IMO, the only thing that could really have made it better using Java instead of C#. :)
Thanks :smile: That's interesting, why do you think it would be better in Java? I have always preferred C#, I suppose mostly because Visual Studio is such an amazing IDE. I don't see any benefits Java would have over C# as a language; I don't know of any Java features that I would've used that are not in C#. I'm also a fan of C# because it often works as I expect it to, and because Microsoft's documentation is top notch.
Then again I haven't used Java much so I wouldn't know.

@zym604 I added the project on github: https://github.com/mart90/BuildOrders

Yeah, I have a similar opinion towards c#. I've been coding with c# for almost a year now at work and it feels just way more OOP orientated than java and visual studios is so wonderful to work with :)


I'm sure you haven't tried IntelliJ IDEA then.

Don't know about Windows PC software development, but I have used Java in android and C# for its webservices and I was more comfortable in doing work in Java than C#.

Re: Build order tester

Posted: 24 Jul 2017, 03:53
by Goodspeed
Ashvin wrote:
Gichtenlord wrote:
Goodspeed wrote:Thanks :smile: That's interesting, why do you think it would be better in Java? I have always preferred C#, I suppose mostly because Visual Studio is such an amazing IDE. I don't see any benefits Java would have over C# as a language; I don't know of any Java features that I would've used that are not in C#. I'm also a fan of C# because it often works as I expect it to, and because Microsoft's documentation is top notch.
Then again I haven't used Java much so I wouldn't know.

@zym604 I added the project on github: https://github.com/mart90/BuildOrders

Yeah, I have a similar opinion towards c#. I've been coding with c# for almost a year now at work and it feels just way more OOP orientated than java and visual studios is so wonderful to work with :)
I'm sure you haven't tried IntelliJ IDEA then.

Don't know about Windows PC software development, but I have used Java in android and C# for its webservices and I was more comfortable in doing work in Java than C#.
Sounds like you were using the languages for very different purposes though. Plus you used Java a lot more it sounds like. Doesnt seem like an unbiased comparison.
When I started this project I looked into the comparison between the languages and found no benefits to using Java. Python was actually my second choice, admittedly only because I use it at work. Especially C#'s Linq which I used for list filtering seemed to have no equivalent in Java, or at least not an elegant one.
For Android apps, Java may be best still. I can imagine it has some benefits there since Android is written in Java.

Re: Build order tester

Posted: 24 Jul 2017, 19:07
by Lord Mick
Thanks :smile: That's interesting, why do you think it would be better in Java? I have always preferred C#, I suppose mostly because Visual Studio is such an amazing IDE. I don't see any benefits Java would have over C# as a language; I don't know of any Java features that I would've used that are not in C#. I'm also a fan of C# because it often works as I expect it to, and because Microsoft's documentation is top notch.
Then again I haven't used Java much so I wouldn't know.


I only say it would be better in Java because I use it daily... so for selfish reasons. :) That being said, I did have a course using C# in college and do remember the documentation being very straightforward.

Re: Build order tester

Posted: 24 Jul 2017, 19:09
by Lord Mick
I'm sure you haven't tried IntelliJ IDEA then.


I live by IntelliJ! I'm not sure if it makes me more efficient of a developer or just lazy either way I love it.

Re: Build order tester

Posted: 24 Jul 2017, 19:18
by Ashvin
haha yeah but it's amazing right

Re: Build order tester

Posted: 25 Jul 2017, 15:06
by Goodspeed
Update notes are now here: https://docs.google.com/document/d/1SjV ... sp=sharing

@Ashvin queued shipments should now show up in the queue (in 1.04)

Re: Build order tester

Posted: 27 Jul 2017, 20:07
by zym604
Goodspeed wrote:Update notes are now here: https://docs.google.com/document/d/1SjV ... sp=sharing

@Ashvin queued shipments should now show up in the queue (in 1.04)


Great! Queued shipments is also a function I want to be shown up. Thank you for implementing it!

Could you also make a command like show building? So that people know what exactly they have and will make a second market.

Re: Build order tester

Posted: 30 Jul 2017, 14:47
by Goodspeed
Added "show buildings" in 1.05 @zym604. That was indeed missing.