Script Modules: Difference between revisions

From Adventure Game Studio | Wiki
Jump to navigation Jump to search
(though -> through (?))
 
(9 intermediate revisions by 7 users not shown)
Line 1: Line 1:
AGS script modules are a way for AGS script code to be reused and shared. They work like [[plugins]], through a module manager, but are written in AGS script code entirely, and thus are independent of the platform on which a game is run.
'''''AGS script modules''''' are a way for AGS script code to be reused and shared. They work like [[plugins]], through a module manager, but are written in AGS script code entirely, and thus are independent of the platform on which a game is run.


== Module Manager ==
== Module Manager ==


[[Image:Scripts_with_context.png|right|thumb|323px|Rightclick on the Scripts node of the project tree to create a new script for your game or import modules from the {{forum|modules and plugins forum|board|10.0}}]]
The module manager is accessed through the Script menu on AGS, where a number of options are presented:
The module manager is accessed through the Script menu on AGS, where a number of options are presented:


; New : create a new module, from scratch
 
; Import : load a module from a .SCM file that you have downloaded
From the basic Scripts Node you access:
; Export : save your own module as a file others can use (modules are also saved in with the game they are used, so you don't HAVE to export them unless you want other to use them)
; New script : create a new module from scratch
; Remove : Deletes an existing module form the game
; Import script... : load a module from a .SCM file that you have downloaded
; Move up : The order of modules can be important, as it reflects the order in which they are compiled and run, so this option and the next let you chnage their ordering.
 
 
From the specific script file within the opened script node you access the following options:
; Rename : Give the module another name
; Delete : Removes an existing module from the game
; Move up : The order of modules can be important, as it reflects the order in which they are compiled and run, so this option and the next let you change their ordering.
; Move down : see '''Move up'''
; Move down : see '''Move up'''


Modules contain a script and a header, similar to the global script and header. They are compiled before the global script/header and can contain their own versions of global script functions such as repeatedly_execute, on_event, etc.
; Export : save your own module as a file others can use (modules are also saved in with the game they are used, so you don't HAVE to export them unless you want others to use them)


You can also enter a brief description of the module, a version number and authorship details in the module manager when you create a module. There are options, too, to protect the script and the module info from modification if you export and distribute your own module.


== See also ==


[[List of Script Modules]]
Each module contains its own script and header, similar to the global script and header. They are compiled before the global script/header and can contain their own versions of global script functions such as repeatedly_execute, on_event, etc.


[[Module writing hints]]
You can also enter a brief description of the module, a version number and authorship details in the module manager when you create a module. There are options, too, to protect the script and the module info from modification if you export and distribute your own module.


[[Module programming guidelines]]
== See also ==
*[[List of Script Modules]]
*[http://www.adventuregamestudio.co.uk/wiki/?title=Module_IndexCategory Module Index Category (A table that works as a list of modules along with basic info)]
*{{forum|modules and plugins forum|board|10.0}}
*[[Module writing hints]]
*[[Module programming guidelines]]
*[[Module Header Template (SSH)]]
*[[:Category:Modules]]


[[Module Header Template (SSH)]]
[[Category:AGS Dictionary]][[Category:Scripting]]

Latest revision as of 21:56, 14 June 2013

AGS script modules are a way for AGS script code to be reused and shared. They work like plugins, through a module manager, but are written in AGS script code entirely, and thus are independent of the platform on which a game is run.

Module Manager

Rightclick on the Scripts node of the project tree to create a new script for your game or import modules from the modules and plugins forum

The module manager is accessed through the Script menu on AGS, where a number of options are presented:


From the basic Scripts Node you access:

New script
create a new module from scratch
Import script...
load a module from a .SCM file that you have downloaded


From the specific script file within the opened script node you access the following options:

Rename
Give the module another name
Delete
Removes an existing module from the game
Move up
The order of modules can be important, as it reflects the order in which they are compiled and run, so this option and the next let you change their ordering.
Move down
see Move up
Export
save your own module as a file others can use (modules are also saved in with the game they are used, so you don't HAVE to export them unless you want others to use them)


Each module contains its own script and header, similar to the global script and header. They are compiled before the global script/header and can contain their own versions of global script functions such as repeatedly_execute, on_event, etc.

You can also enter a brief description of the module, a version number and authorship details in the module manager when you create a module. There are options, too, to protect the script and the module info from modification if you export and distribute your own module.

See also