truebrain
e37149a1de
(svn r23362) -Codechange: refactor AIScanner, splitting it in AIScannerInfo and AIScannerLibrary
13 years ago
truebrain
ff5775638c
(svn r23361) -Codechange: move multiplayer DoCommand callback code so other script users can call their own
13 years ago
truebrain
ae8540f5e0
(svn r23361) -Codechange: move multiplayer DoCommand callback code so other script users can call their own
13 years ago
truebrain
a3768b109b
(svn r23360) -Codechange: move AIInstance to ScriptInstance, making it reusable by other script API instances
13 years ago
truebrain
3da8b5097a
(svn r23360) -Codechange: move AIInstance to ScriptInstance, making it reusable by other script API instances
13 years ago
truebrain
6f874962cd
(svn r23359) -Codechange: move AI_VMSuspend to Script_Suspend (and to its own file)
13 years ago
truebrain
75c4bd280a
(svn r23359) -Codechange: move AI_VMSuspend to Script_Suspend (and to its own file)
13 years ago
truebrain
1e13fa3dee
(svn r23358) -Codechange: move AI_FatalError to Script_FatalError (and to its own file)
13 years ago
truebrain
bbd9facb44
(svn r23358) -Codechange: move AI_FatalError to Script_FatalError (and to its own file)
13 years ago
truebrain
b4112dcf8e
(svn r23357) -Codechange: move AIStorage to ScriptStorage
13 years ago
truebrain
99cb93ef6f
(svn r23357) -Codechange: move AIStorage to ScriptStorage
13 years ago
truebrain
af1b3cc070
(svn r23355) -Codechange: rename all AI* to Script* (Rubidium)
13 years ago
truebrain
98103121d4
(svn r23355) -Codechange: rename all AI* to Script* (Rubidium)
13 years ago
truebrain
eab012ec8b
(svn r23354) -Codechange: move all src/ai/api/ai_*.[hc]pp files to src/script/api/script_* (Rubidium)
13 years ago
truebrain
afdb67a353
(svn r23354) -Codechange: move all src/ai/api/ai_*.[hc]pp files to src/script/api/script_* (Rubidium)
13 years ago
truebrain
1ced96bb3c
(svn r23352) -Add: support dynamically adding an API prefix when returning a C++ class to Squirrel
13 years ago
truebrain
00877dd6d3
(svn r23352) -Add: support dynamically adding an API prefix when returning a C++ class to Squirrel
13 years ago
truebrain
d413dcabbf
(svn r23350) -Add: support different ScriptTypes in the helper functions for GetClassName (Rubidium)
13 years ago
truebrain
bff7c33aa9
(svn r23350) -Add: support different ScriptTypes in the helper functions for GetClassName (Rubidium)
13 years ago
truebrain
2e731592c4
(svn r23295) -Codechange: put ImportLibrary in AIController (and document the parameters for NoAI docs)
13 years ago
truebrain
d03bbdd4ac
(svn r23295) -Codechange: put ImportLibrary in AIController (and document the parameters for NoAI docs)
13 years ago
truebrain
396822504a
(svn r23294) -Codechange: sq_pop in native callback is just a waste of CPU cycles, as the top is reset in all cases
13 years ago
truebrain
492c96d214
(svn r23294) -Codechange: sq_pop in native callback is just a waste of CPU cycles, as the top is reset in all cases
13 years ago
truebrain
7700e274de
(svn r23293) -Codechange: make LoadScript/LoadFile non-static
13 years ago
truebrain
54ec3a2a3f
(svn r23293) -Codechange: make LoadScript/LoadFile non-static
13 years ago
truebrain
3429287e7d
(svn r23264) -Fix (r23263): save before commit
13 years ago
truebrain
32b28bb868
(svn r23264) -Fix (r23263): save before commit
13 years ago
truebrain
8d14fd4b29
(svn r23263) -Documentation: stop naming AI in comments in script/ files; it makes no sense
13 years ago
truebrain
b927ae5be9
(svn r23263) -Documentation: stop naming AI in comments in script/ files; it makes no sense
13 years ago
rubidium
9bf2cb0e86
(svn r23216) -Codechange: introduce the concept of having different tar lists
13 years ago
rubidium
160294ff22
(svn r23216) -Codechange: introduce the concept of having different tar lists
13 years ago
rubidium
4e91548f71
(svn r23210) -Codechange: generate the GetClassName function for the AI classes programmatically
13 years ago
rubidium
3f7eb71b17
(svn r23210) -Codechange: generate the GetClassName function for the AI classes programmatically
13 years ago
rubidium
33d71b45fe
(svn r23198) -Codechange: introduce a free that takes const pointers so we don't need to cast to void/non-const before being able to free
13 years ago
rubidium
7fd1e1df81
(svn r23198) -Codechange: introduce a free that takes const pointers so we don't need to cast to void/non-const before being able to free
13 years ago
rubidium
2de0383538
(svn r23118) -Feature: [NoAI] Allow AIs to query the amount of remaining operations for the current tick
13 years ago
rubidium
65d0d19b16
(svn r23118) -Feature: [NoAI] Allow AIs to query the amount of remaining operations for the current tick
13 years ago
yexo
8a5c74e1d0
(svn r23117) -Fix: [NoAI] calling require() to include a file gave you 100.000 opcodes for free
13 years ago
yexo
02913f40b0
(svn r23117) -Fix: [NoAI] calling require() to include a file gave you 100.000 opcodes for free
13 years ago
rubidium
afc782e22c
(svn r22906) -Fix (r22905): variable not properly cleared before use
13 years ago
rubidium
748bddb31a
(svn r22906) -Fix (r22905): variable not properly cleared before use
13 years ago
rubidium
b878e5c72f
(svn r22905) -Fix [FS#4753] (r22836): the name of the tar was removed from the AI filenames, so record it differently. Also removes some of the hackery to get the tar's filename
13 years ago
rubidium
62777dbd84
(svn r22905) -Fix [FS#4753] (r22836): the name of the tar was removed from the AI filenames, so record it differently. Also removes some of the hackery to get the tar's filename
13 years ago
rubidium
661e5c6655
(svn r22904) -Codechange: add tar filename to file scanning
13 years ago
rubidium
414c397000
(svn r22904) -Codechange: add tar filename to file scanning
13 years ago
michi_cc
7c325fcb78
(svn r22874) -Fix [FS#4747]: Check size of various buffers before allocation. (monoid)
13 years ago
michi_cc
65637d8941
(svn r22874) -Fix [FS#4747]: Check size of various buffers before allocation. (monoid)
13 years ago
rubidium
eb0112edb1
(svn r22836) -Codechange: simplify the scanning of (AI) scripts
13 years ago
rubidium
d839aa0475
(svn r22836) -Codechange: simplify the scanning of (AI) scripts
13 years ago
rubidium
6e9122828e
(svn r22406) -Document: some more "random-ish" tidbits
13 years ago
rubidium
5a620d1c65
(svn r22406) -Document: some more "random-ish" tidbits
13 years ago
rubidium
089d2053d5
(svn r22120) -Change: [NoAI] Prevent AIs from getting consistently over their allowed amount of operations by subtracting the amount they went over "budget" from the budget for the next "tick".
14 years ago
rubidium
e9fe58d7bf
(svn r22120) -Change: [NoAI] Prevent AIs from getting consistently over their allowed amount of operations by subtracting the amount they went over "budget" from the budget for the next "tick".
14 years ago
alberth
69762b70b2
(svn r21595) -Codechange: Some header files had their name changed, update the ifndef/define/endif lines.
14 years ago
alberth
7303f7d199
(svn r21595) -Codechange: Some header files had their name changed, update the ifndef/define/endif lines.
14 years ago
rubidium
890eec6132
(svn r21311) -Fix [FS#4260]: AIs in an infinite loop in e.g. autosave, but also getting settings and such from info.nut, would not be interrupted after a while causing OpenTTD to seem to not respond
14 years ago
rubidium
090d6fb8b7
(svn r21311) -Fix [FS#4260]: AIs in an infinite loop in e.g. autosave, but also getting settings and such from info.nut, would not be interrupted after a while causing OpenTTD to seem to not respond
14 years ago
rubidium
360d6daf34
(svn r20632) -Cleanup: remove "a few" unneeded includes, and add them to some headers
14 years ago
rubidium
30f2afac9b
(svn r20632) -Cleanup: remove "a few" unneeded includes, and add them to some headers
14 years ago
rubidium
bd5be9a942
(svn r20574) -Codechange: a little over 1 million vehicles should be enough for the forseeable future
14 years ago
rubidium
1fa98e1695
(svn r20574) -Codechange: a little over 1 million vehicles should be enough for the forseeable future
14 years ago
rubidium
a1e9becc8f
(svn r19776) -Change: don't scan for tars in the script scanner; it has already happened.
14 years ago
rubidium
8a2fecbff5
(svn r19776) -Change: don't scan for tars in the script scanner; it has already happened.
14 years ago
smatz
52050197ea
(svn r19509) -Codechange: remove superfluous semicolons after function definitions
14 years ago
smatz
23041d9720
(svn r19509) -Codechange: remove superfluous semicolons after function definitions
14 years ago
rubidium
0bf54aaedb
(svn r18862) -Fix [FS#3544]: don't pass AI strings through iconv
15 years ago
rubidium
b1bd106703
(svn r18862) -Fix [FS#3544]: don't pass AI strings through iconv
15 years ago
rubidium
9467b7c6d6
(svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, if a header require a header make it include that header
15 years ago
rubidium
82fc28f77f
(svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, if a header require a header make it include that header
15 years ago
rubidium
3de085a143
(svn r18683) -Fix: it's not an other
15 years ago
rubidium
b2e9b5d612
(svn r18683) -Fix: it's not an other
15 years ago
smatz
a5e8465a4a
(svn r18555) -Fix (r15027): fake definitions of squirrel types were wrong for eg. 64bit systems, don't use them
15 years ago
smatz
061de2b2df
(svn r18555) -Fix (r15027): fake definitions of squirrel types were wrong for eg. 64bit systems, don't use them
15 years ago
rubidium
a0a530a997
(svn r18418) -Fix [FS#3298]: under some circumstances a pointer could be left untouched and then freed. Make sure this doesn't happen by ensuring it starts out as NULL instead of 'garbage'.
15 years ago
rubidium
73df2c7a25
(svn r18418) -Fix [FS#3298]: under some circumstances a pointer could be left untouched and then freed. Make sure this doesn't happen by ensuring it starts out as NULL instead of 'garbage'.
15 years ago
rubidium
8f4ae09c03
(svn r18038) -Fix [FS#3290] (r17402): AIs failed to load their data from savegames by crashing them when they tried
15 years ago
rubidium
6cfeb1920f
(svn r18038) -Fix [FS#3290] (r17402): AIs failed to load their data from savegames by crashing them when they tried
15 years ago
rubidium
318c2fad7c
(svn r17963) -Codechange: some documentation style
15 years ago
rubidium
d79439fb3c
(svn r17963) -Codechange: some documentation style
15 years ago
rubidium
982b8ee5fc
(svn r17693) -Cleanup: remove some unneeded includes
15 years ago
rubidium
d6cded5380
(svn r17693) -Cleanup: remove some unneeded includes
15 years ago
rubidium
310465da07
(svn r17570) -Fix: a number of Doxygen warnings about missing parameters, which were sometimes missing and sometimes just typos
15 years ago
rubidium
e8ddf001c8
(svn r17570) -Fix: a number of Doxygen warnings about missing parameters, which were sometimes missing and sometimes just typos
15 years ago
rubidium
83be7b09ea
(svn r17545) -Fix [FS#3202]: [NoAI] AIs had 'infinite' time when running code from the global scope
15 years ago
rubidium
f2487381ce
(svn r17545) -Fix [FS#3202]: [NoAI] AIs had 'infinite' time when running code from the global scope
15 years ago
yexo
f922a7ca8e
(svn r17498) -Add [NoAI]: Enable the squirrel std math library
15 years ago
yexo
ca6c4ee98a
(svn r17498) -Add [NoAI]: Enable the squirrel std math library
15 years ago
Yexo
d49addb48e
(svn r17402) -Fix (r16425): During every save a few slots on the squirrel stack were leaked
15 years ago
Yexo
48e1a5a350
(svn r17402) -Fix (r16425): During every save a few slots on the squirrel stack were leaked
15 years ago
rubidium
99d46e0ad7
(svn r17248) -Fix: add GPL license notice where appropriate
15 years ago
rubidium
7fbc33dae1
(svn r17248) -Fix: add GPL license notice where appropriate
15 years ago
yexo
c22f60c812
(svn r17223) -Change [NoAI] [FS#2980]: Crash an AI when it uses a DoCommand / Sleep instead of just printing an error message in the AI Debug Window
15 years ago
yexo
a4afa140f3
(svn r17223) -Change [NoAI] [FS#2980]: Crash an AI when it uses a DoCommand / Sleep instead of just printing an error message in the AI Debug Window
15 years ago
yexo
74e5f16bc2
(svn r17221) -Change [NoAI] [FS#3101]: when the API requests a string as parameter allow every squirrel type and convert to a string
15 years ago
yexo
5a863925ee
(svn r17221) -Change [NoAI] [FS#3101]: when the API requests a string as parameter allow every squirrel type and convert to a string
15 years ago
rubidium
f9de918274
(svn r17013) -Fix [FS#3074]: concatenating strings in Squirrel when non-ASCII strings were received from OpenTTD failed. The number of bytes in an UTF-8 encoded string isn't always the same as the number of characters in the decoded (into wchars) string
15 years ago
rubidium
5186d1d4f6
(svn r17013) -Fix [FS#3074]: concatenating strings in Squirrel when non-ASCII strings were received from OpenTTD failed. The number of bytes in an UTF-8 encoded string isn't always the same as the number of characters in the decoded (into wchars) string
15 years ago
yexo
f35d7f210f
(svn r17005) -Add [NoAI]: AIAbstractList::SORT_ASCENDING / SORT_DESCENDING
15 years ago
yexo
c2ed884012
(svn r17005) -Add [NoAI]: AIAbstractList::SORT_ASCENDING / SORT_DESCENDING
15 years ago
yexo
6e467e8ae0
(svn r16834) -Fix [FS#3034]: call the AI Save() function only once so AIs can't crash OpenTTD
15 years ago
yexo
f085d7775b
(svn r16834) -Fix [FS#3034]: call the AI Save() function only once so AIs can't crash OpenTTD
15 years ago
yexo
62a698df32
(svn r16502) -Fix [FS#2935]: when an AI was suspended while in a function called (indirectly) via call/acall/pcall OpenTTD crashed. Fix this by disallowing AIs to be suspended while called via call/acall/pcall.
...
IMPORTANT FOR AI WRITERS: AIs can no longer call any DoCommand functions (change anything, build vehicles, etc.) in a function called (indirectly) via call/acall/pcall. Where possible, please rewrite your code so it doesn't use call/acall/pcall
15 years ago
yexo
4ea3e511bd
(svn r16502) -Fix [FS#2935]: when an AI was suspended while in a function called (indirectly) via call/acall/pcall OpenTTD crashed. Fix this by disallowing AIs to be suspended while called via call/acall/pcall.
...
IMPORTANT FOR AI WRITERS: AIs can no longer call any DoCommand functions (change anything, build vehicles, etc.) in a function called (indirectly) via call/acall/pcall. Where possible, please rewrite your code so it doesn't use call/acall/pcall
15 years ago
rubidium
f163217dbb
(svn r16493) -Fix: missing/wrong @file doxygen 'headers'
15 years ago
rubidium
765c65b738
(svn r16493) -Fix: missing/wrong @file doxygen 'headers'
15 years ago
smatz
d091c7d80f
(svn r16492) -Remove: support for gcc2. It hasn't been able to compile OTTD for months. All attempts to do another workaround failed.
15 years ago
smatz
c03ce4b1c7
(svn r16492) -Remove: support for gcc2. It hasn't been able to compile OTTD for months. All attempts to do another workaround failed.
15 years ago
yexo
de04ae2cda
(svn r16425) -Change [FS#2869]: Stop an AI when it takes too long to initialize or load
15 years ago
yexo
7425bf779d
(svn r16425) -Change [FS#2869]: Stop an AI when it takes too long to initialize or load
15 years ago
rubidium
99a215c8ec
(svn r16222) -Fix: unneeded pointer dereferencing
15 years ago
rubidium
21f5f602f9
(svn r16222) -Fix: unneeded pointer dereferencing
15 years ago
yexo
a127ed11e1
(svn r16113) -Feature [NoAI]: Add UseAsRandomAI as function in info.nut. When an AI returns false, it'll never be chosen as random AI.
15 years ago
yexo
3949050714
(svn r16113) -Feature [NoAI]: Add UseAsRandomAI as function in info.nut. When an AI returns false, it'll never be chosen as random AI.
15 years ago
yexo
f96429a494
(svn r16093) -Feature [FS#2808]: Add GetURL() as possible function to info.nut. If AIs implement it, that url is shown when the AI crashes and also in the AI selection window.
15 years ago
yexo
a91ff2d5e8
(svn r16093) -Feature [FS#2808]: Add GetURL() as possible function to info.nut. If AIs implement it, that url is shown when the AI crashes and also in the AI selection window.
15 years ago
yexo
cd73406b9c
(svn r15743) -Codechange: move the definitions of some fake squirrel types to their own file.
16 years ago
yexo
384599ef2c
(svn r15743) -Codechange: move the definitions of some fake squirrel types to their own file.
16 years ago
yexo
d02548b204
(svn r15736) -Codechange: Split AIScanner/AIFileInfo to the more generic classes ScriptScanner/ScriptFileInfo.
16 years ago
yexo
ce4744e1d6
(svn r15736) -Codechange: Split AIScanner/AIFileInfo to the more generic classes ScriptScanner/ScriptFileInfo.
16 years ago
yexo
28c49b694a
(svn r15668) -Fix: a few typos.
16 years ago
yexo
13fb01d07d
(svn r15668) -Fix: a few typos.
16 years ago
yexo
a53062dd80
(svn r15629) -Fix (r15027): Validate strings that are passed from squirrel to the API, not strings passed from the API to squirrel.
16 years ago
yexo
b520d73285
(svn r15629) -Fix (r15027): Validate strings that are passed from squirrel to the API, not strings passed from the API to squirrel.
16 years ago
yexo
301dcb6dc4
(svn r15558) -Cleanup: Remove some unnecessary friend declarations.
16 years ago
yexo
cabfe35e54
(svn r15558) -Cleanup: Remove some unnecessary friend declarations.
16 years ago
glx
85ea21a5d0
(svn r15535) -Fix (r15460, pre noai merge): use '.' as 'any' for squirrel calls typechecking as stated in squirrel docs
16 years ago
glx
ab3fc1d437
(svn r15535) -Fix (r15460, pre noai merge): use '.' as 'any' for squirrel calls typechecking as stated in squirrel docs
16 years ago
yexo
310446d448
(svn r15531) -Fix (r15467): AIs were stopped at every error, whether they caught it or not.
16 years ago
yexo
7dc607b2d1
(svn r15531) -Fix (r15467): AIs were stopped at every error, whether they caught it or not.
16 years ago
yexo
3e53890348
(svn r15467) -Fix [NoAI]: AIs with an error in their info.nut are no longer available in-game.
16 years ago
yexo
8e14d77d05
(svn r15467) -Fix [NoAI]: AIs with an error in their info.nut are no longer available in-game.
16 years ago
rubidium
2a66e934b8
(svn r15406) -Fix: make Valuate actually cost a few opcodes to not make it a single opcode method of doing lots of the same thing. This should resolve most of the hiccups caused by AIs.
16 years ago
rubidium
e1b1fd18b5
(svn r15406) -Fix: make Valuate actually cost a few opcodes to not make it a single opcode method of doing lots of the same thing. This should resolve most of the hiccups caused by AIs.
16 years ago
rubidium
2eebb52592
(svn r15330) -Fix [FS#2597]: leaking of Squirrel when using circular references (by enabling the GC).
16 years ago
rubidium
1c30c8c801
(svn r15330) -Fix [FS#2597]: leaking of Squirrel when using circular references (by enabling the GC).
16 years ago
glx
47a61fb10c
(svn r15316) -Fix [NoAI]: ignore unprintable chars when returning a string to squirrel
16 years ago
glx
6d6e2232ea
(svn r15316) -Fix [NoAI]: ignore unprintable chars when returning a string to squirrel
16 years ago
Yexo
da066fab5b
(svn r15222) -Fix: The squirrel stack was corrupted if an AI called any C++ function during Save().
16 years ago
Yexo
decd0c51e4
(svn r15222) -Fix: The squirrel stack was corrupted if an AI called any C++ function during Save().
16 years ago
Yexo
b2bfa21155
(svn r15204) -Fix (r15167): The check was a bit too restrictive, the top of the stack needs to be resetted if another function is called while the AI is running but not suspended.
16 years ago
Yexo
0d52f3b417
(svn r15204) -Fix (r15167): The check was a bit too restrictive, the top of the stack needs to be resetted if another function is called while the AI is running but not suspended.
16 years ago
Yexo
2abfbafaf2
(svn r15167) -Fix [FS#2558]: The top of the stack was resetted after executing the first Ai tick causing random AI crashes.
16 years ago
Yexo
eab990901b
(svn r15167) -Fix [FS#2558]: The top of the stack was resetted after executing the first Ai tick causing random AI crashes.
16 years ago
smatz
c30ce23866
(svn r15061) -Fix (r15027): three files were missing the Id header
16 years ago
smatz
7cea618fcc
(svn r15061) -Fix (r15027): three files were missing the Id header
16 years ago
truebrain
5573d9a459
(svn r15045) -Add [NoAI API CHANGE]: in info.nut you can now have (optional) a CanLoadFromVersion(version), which should return true/false, to indicate if you can load a savegame made with your AI of version 'version'
...
-Add [NoAI API CHANGE]: in main.nut the Load() function now should be Load(version, data), where 'version' is the version of your AI which made the savegame
-Codechange [NoAI]: various of function renames to make things more sane
-Add [NoAI]: push the 'version' of the AI through various of layers
-Codechange [NoAI]: various of code cleanups
-Add [NoAI]: store the version of the AI in the savegame too
16 years ago
truebrain
bcbbf2c366
(svn r15045) -Add [NoAI API CHANGE]: in info.nut you can now have (optional) a CanLoadFromVersion(version), which should return true/false, to indicate if you can load a savegame made with your AI of version 'version'
...
-Add [NoAI API CHANGE]: in main.nut the Load() function now should be Load(version, data), where 'version' is the version of your AI which made the savegame
-Codechange [NoAI]: various of function renames to make things more sane
-Add [NoAI]: push the 'version' of the AI through various of layers
-Codechange [NoAI]: various of code cleanups
-Add [NoAI]: store the version of the AI in the savegame too
16 years ago
truebrain
c2406cd42d
(svn r15027) -Merge: tomatos and bananas left to be, here is NoAI for all to see.
...
NoAI is an API (a framework) to build your own AIs in. See:
http://wiki.openttd.org/wiki/index.php/AI:Main_Page
With many thanks to:
- glx and Rubidium for their syncing, feedback and hard work
- Yexo for his feedback, patches, and AIs which tested the system very deep
- Morloth for his feedback and patches
- TJIP for hosting a challenge which kept NoAI on track
- All AI authors for testing our AI API, and all other people who helped in one way or another
-Remove: all old AIs and their cheats/hacks
16 years ago
truebrain
a3dd7506d3
(svn r15027) -Merge: tomatos and bananas left to be, here is NoAI for all to see.
...
NoAI is an API (a framework) to build your own AIs in. See:
http://wiki.openttd.org/wiki/index.php/AI:Main_Page
With many thanks to:
- glx and Rubidium for their syncing, feedback and hard work
- Yexo for his feedback, patches, and AIs which tested the system very deep
- Morloth for his feedback and patches
- TJIP for hosting a challenge which kept NoAI on track
- All AI authors for testing our AI API, and all other people who helped in one way or another
-Remove: all old AIs and their cheats/hacks
16 years ago