offline NoAI API documentation?

Discuss the new AI features ("NoAI") introduced into OpenTTD 0.7, allowing you to implement custom AIs, and the new Game Scripts available in OpenTTD 1.2 and higher.

Moderator: OpenTTD Developers

Post Reply
User avatar
Lord Aro
Tycoon
Tycoon
Posts: 2369
Joined: 25 Jun 2009 16:42
Location: Location, Location
Contact:

offline NoAI API documentation?

Post by Lord Aro »

since my computer is regularly offline (cable across the house, am working on getting wireless)
i was wondering if there was a way to download the whole API documentation
e.g. download the whole of http://noai.openttd.org/docs/trunk
maybe?
AroAI - A really feeble attempt at an AI

It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4765
Joined: 09 Sep 2007 05:03
Location: home

Re: offline NoAI API documentation?

Post by Alberth »

As part of pulling the latest changes from trunk, I compile the sources, and build documentation with doxygen at my local machine.
It may not look as pretty as the site, but all info is there.
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: offline NoAI API documentation?

Post by Kogut »

Or manually saving all pages.
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
User avatar
Lord Aro
Tycoon
Tycoon
Posts: 2369
Joined: 25 Jun 2009 16:42
Location: Location, Location
Contact:

Re: offline NoAI API documentation?

Post by Lord Aro »

Alberth wrote:As part of pulling the latest changes from trunk, I compile the sources, and build documentation with doxygen at my local machine.
It may not look as pretty as the site, but all info is there.
i like that idea better than Kogut's (obvious really :wink: )
how would i do this?
AroAI - A really feeble attempt at an AI

It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4765
Joined: 09 Sep 2007 05:03
Location: home

Re: offline NoAI API documentation?

Post by Alberth »

1. install Doxygen
2. download trunk from svn, hg, or git.
3. run 'doxygen Doxyfile'

the next time, you can just update your working copy ('svn up' or 'hg fetch') instead of doing 2 again.

Edit: You should download the source code of the version that you use for making AIs. For stables, you could download its source code distribution.
tracks
Engineer
Engineer
Posts: 4
Joined: 28 Jun 2010 20:23
Location: Ithaca, NY, USA

Re: offline NoAI API documentation?

Post by tracks »

I noticed that the "docs" option on the download page includes reasonable doxygen. But is this the same as what's online for the NoAI documentation? Looks like it includes far more code (ie. the rest of the code base), but it does have the AI functions in there. But maybe this is for the underlying implementation of the API and may be different from what's present in the squirrel interface?
frosch
OpenTTD Developer
OpenTTD Developer
Posts: 991
Joined: 20 Dec 2006 13:31
Location: Aschaffenburg

Re: offline NoAI API documentation?

Post by frosch »

The docs which can be downloaded at http://www.openttd.org/download-trunk ("docs" is an option for the OS selection) contain the whole documentation of OTTD. It also contains the NoAI documentation, though not in an as nice format as the pure NoAI documentation, as it also contains lots of references to not-NoAI stuff. If you want to use that one, go via File List and select stuff from src/ai/api.

If you want to build the documentation yourself, insert a "cd src/ai/api" between step 2 and 3 of Albert. That gives you the pure NoAI documentation, else you will get what you can also download above :p
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁
User avatar
skippern
Traffic Manager
Traffic Manager
Posts: 195
Joined: 30 Oct 2013 13:57

Re: offline NoAI API documentation?

Post by skippern »

Is there anywhere available a .PDF version of the NoAI API documentation, that can be downloaded or emailed to me, or do anybody have time (and resources) to create such?

I am trying to work on some AI's but are sitting on an unstable sattelite line, and the company computer with access to internet don't have any print2pdf software.

And why is the documentation on http://www.openttd.org/en/download-trunk only available in .xz format? No .zip?
Skippern
OpenTTD Mac user
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: offline NoAI API documentation?

Post by planetmaker »

skippern wrote:And why is the documentation on http://www.openttd.org/en/download-trunk only available in .xz format? No .zip?
Bandwidth. xz is considerably smaller than zip. And any decent packing programme can handle them.
User avatar
skippern
Traffic Manager
Traffic Manager
Posts: 195
Joined: 30 Oct 2013 13:57

Re: offline NoAI API documentation?

Post by skippern »

planetmaker wrote:
skippern wrote:And why is the documentation on http://www.openttd.org/en/download-trunk only available in .xz format? No .zip?
Bandwidth. xz is considerably smaller than zip. And any decent packing programme can handle them.
Arguments good enough for my own computer, but since I have to go past the work computer (and all my bloody pen-drives decided to die on me), I need to upack and read on that. With installation restrictions I cannot ask for any descent packing programs, for the same reason that I cannot do print2pdf (on my personal computer I can do that, but again, staying offline due to network restrictions). There are roughly 1.5 month until I can try downloading anything to my personal computer. So basically without any .zip, .pdf or similar formats for the documentation I am 1.5 months away of getting offline documentation. With unstable internet connection, that means I can be really stuck from time to time, not being able to check out what I am doing wrong, what arguments are required, what the actual syntax is, etc. I find that really frustrating when I am working on a project.
Skippern
OpenTTD Mac user
R2dical
Traffic Manager
Traffic Manager
Posts: 163
Joined: 18 Mar 2013 22:22

Re: offline NoAI API documentation?

Post by R2dical »

I make my own offline docs from doxygen, here is a copy. Just open "index.html" for the main page.
Attachments
html.zip
(696.37 KiB) Downloaded 82 times
User avatar
skippern
Traffic Manager
Traffic Manager
Posts: 195
Joined: 30 Oct 2013 13:57

Re: offline NoAI API documentation?

Post by skippern »

R2dical wrote:I make my own offline docs from doxygen, here is a copy. Just open "index.html" for the main page.
Great, thanks R2dical!
Skippern
OpenTTD Mac user
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 17 guests