Jonathan G Rennison
45386efcd0
Script: Allow changing ops limit and memory limit settings in game
4 years ago
Charles Pigott
64b1c70fdd
Codechange: Add WARN_FORMAT to vseprintf and fix the cascade of warnings that followed
4 years ago
S. D. Cloudt
13cc8a0cee
Cleanup: Removed SVN headers
5 years ago
Niels Martin Hansen
140a96b3a0
Change: Limit memory allocations for each Squirrel instance
...
This can avoid out-of-memory situations due to single scripts using up the entire address space.
Instead, scripts that go above the maximum are killed.
The maximum is default 1 GB per script, but can be configured by a setting.
5 years ago
Henry Wilson
7c8e7c6b6e
Codechange: Use null pointer literal instead of the NULL macro
6 years ago
rubidium
7c4e9dd71d
(svn r26771) -Cleanup: remove OTTD2SQ and SQ2OTTD
10 years ago
rubidium
a6b4e59963
(svn r26617) -Fix [FS#5973]: [Script] Loading/parsing of info .nuts was done in the same VM, causing e.g. constants to break the loading of info of other scripts
10 years ago
truebrain
12aa5b6a58
(svn r23604) -Add: initial support for GameScripts
13 years ago
truebrain
3e6d026129
(svn r23366) -Codechange: move most of the Dummy code to script/, unifying it
13 years ago
truebrain
e37149a1de
(svn r23362) -Codechange: refactor AIScanner, splitting it in AIScannerInfo and AIScannerLibrary
13 years ago
truebrain
3da8b5097a
(svn r23360) -Codechange: move AIInstance to ScriptInstance, making it reusable by other script API instances
13 years ago
truebrain
98103121d4
(svn r23355) -Codechange: rename all AI* to Script* (Rubidium)
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
bff7c33aa9
(svn r23350) -Add: support different ScriptTypes in the helper functions for GetClassName (Rubidium)
13 years ago
truebrain
d03bbdd4ac
(svn r23295) -Codechange: put ImportLibrary in AIController (and document the parameters for NoAI docs)
13 years ago
truebrain
54ec3a2a3f
(svn r23293) -Codechange: make LoadScript/LoadFile non-static
13 years ago
truebrain
32b28bb868
(svn r23264) -Fix (r23263): save before commit
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
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
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
30f2afac9b
(svn r20632) -Cleanup: remove "a few" unneeded includes, and add them to some headers
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
b1bd106703
(svn r18862) -Fix [FS#3544]: don't pass AI strings through iconv
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
yexo
ca6c4ee98a
(svn r17498) -Add [NoAI]: Enable the squirrel std math library
15 years ago
rubidium
7fbc33dae1
(svn r17248) -Fix: add GPL license notice where appropriate
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
c2ed884012
(svn r17005) -Add [NoAI]: AIAbstractList::SORT_ASCENDING / SORT_DESCENDING
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
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
16 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.
16 years ago
yexo
cabfe35e54
(svn r15558) -Cleanup: Remove some unnecessary friend declarations.
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
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
1c30c8c801
(svn r15330) -Fix [FS#2597]: leaking of Squirrel when using circular references (by enabling the GC).
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
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