This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
wiki:data:pages:cfpython [2020/12/12 10:46] ryo [CastAbility] |
wiki:data:pages:cfpython [2021/10/19 14:11] ryo update 'trunk' to 'master', add information about .pyi file, fix link to scripts |
||
---|---|---|---|
Line 8: | Line 8: | ||
Note that this guide doesn't intend to teach you Python. Documentation for that is available on [[http://docs.python.org|Python's official web site]]. | Note that this guide doesn't intend to teach you Python. Documentation for that is available on [[http://docs.python.org|Python's official web site]]. | ||
- | Also, advanced functions can require some knowledge of Crossfire's inner workings. Developers seeking help should check [[http://crossfire.real-time.com/development/index.html|Crossfire's page on development]] or [[http://crossfire.real-time.com/resources/index.html|Crossfire's resource page]] (which includes links to lists, IRC, how to contact people, ...). Another option is to check existing Python scripts, available in the [[http://crossfire.svn.sourceforge.net/viewvc/crossfire/maps/trunk/python/|maps source tree]]. | + | Also, advanced functions can require some knowledge of Crossfire's inner workings. Developers seeking help should check [[http://crossfire.real-time.com/development/index.html|Crossfire's page on development]] or [[http://crossfire.real-time.com/resources/index.html|Crossfire's resource page]] (which includes links to lists, IRC, how to contact people, ...). Another option is to check existing Python scripts, available in the [[https://sourceforge.net/p/crossfire/crossfire-maps/ci/master/tree/|maps source tree]]. |
Old plugin's reference can be found on [[plugin_python]], for historical purposes. | Old plugin's reference can be found on [[plugin_python]], for historical purposes. | ||
- | **Important note:** the API, and other parts, are valid for code's ''trunk''. ''branch'' contains hopefully all the changes too, but there may be differences. Also, links to SVN are to trunk. | + | **Important note:** the API, and other parts, are valid for code's ''master''. ''branch'' contains hopefully all the changes too, but there may be differences. Also, links to SVN are to trunk. |
+ | As from September, 14th, 2021, a ''.pyi'' file is available in ''maps/python/pyi''. It lists all available functions and variables, though functions aren't documented, so no parameters or description. | ||
Line 472: | Line 473: | ||
* Identified: ''Boolean'' | * Identified: ''Boolean'' | ||
* **Alive**: ''Boolean'' | * **Alive**: ''Boolean'' | ||
- | * DungeonMaster: ''Boolean'' | + | * **DungeonMaster**: ''Boolean'', writable on ''master'' |
* WasDungeonMaster: ''Boolean'' | * WasDungeonMaster: ''Boolean'' | ||
* **Applied**: ''Boolean'' | * **Applied**: ''Boolean'' | ||
Line 593: | Line 594: | ||
Arguments: | Arguments: | ||
- | * ''Crossfire.Object'' representing the spell to case | + | * ''Crossfire.Object'' representing the spell to cast |
* ''Crossfire.Direction'', direction in which the object should cast | * ''Crossfire.Direction'', direction in which the object should cast | ||
* ''String'', optional arguments to the spell (for food creation, ...) | * ''String'', optional arguments to the spell (for food creation, ...) |