AGS tidbits & snippets: Difference between revisions

Jump to navigation Jump to search
m (Removed link to my homepage that forwards here anyway.)
 
(9 intermediate revisions by 6 users not shown)
Line 13: Line 13:
'''CJ''': There's no hard limit, but a '''sprite cannot be taller than the screen''' resolution.
'''CJ''': There's no hard limit, but a '''sprite cannot be taller than the screen''' resolution.
----
----
'''CJ''': If you put a room file called "_blank.crm" in your game folder, it will be used as the '''template for new rooms'''. [http://www.bigbluecup.com/yabb/index.php?topic=18963.msg231484#msg231484]
'''CJ''': If you put a room file called "_blank.crm" in your game folder, it will be used as the '''template for new rooms'''. [http://www.adventuregamestudio.co.uk/forums/index.php?topic=18963.msg231484#msg231484]
----
----
'''CJ''': Adding a '''blank dialog option will make it unclickable'''. [http://www.bigbluecup.com/yabb/index.php?topic=18958.msg231475#msg231475]
'''CJ''': Adding a '''blank dialog option will make it unclickable'''. [http://www.adventuregamestudio.co.uk/forums/index.php?topic=18958.msg231475#msg231475]
:''So you can use that as default dialog option that gets run when all others have been turned off.''
:''So you can use that as default dialog option that gets run when all others have been turned off.''
----
----
'''CJ''': Most of the '''data (i.e. rooms and sprites) is only loaded when needed'''. [http://www.bigbluecup.com/yabb/index.php?topic=18541.msg225790#msg225790]
'''CJ''': Most of the '''data (i.e. rooms and sprites) is only loaded when needed'''. [http://www.adventuregamestudio.co.uk/forums/index.php?topic=18541.msg225790#msg225790]
----
----
'''bonordberg''': AGS only allows 35 or so '''characters and objects on the screen at the same time'''. [http://www.bigbluecup.com/yabb/index.php?topic=15513.msg190266#msg190266]
'''bonordberg''': AGS only allows 35 or so '''characters and objects on the screen at the same time'''. [http://www.adventuregamestudio.co.uk/forums/index.php?topic=15513.msg190266#msg190266]
:''AGS v2.62 '''increased the limit to 50'''.''
:''AGS v2.62 '''increased the limit to 50'''.''
----
----
'''CJ''': You could '''double-click the "Edit this .AGSGame" file''' to open the game in the editor.<br>
'''CJ''': You could '''double-click the "Edit this .AGSGame" file''' to open the game in the editor.<br>
You can create this association manually if you like, just set up .AGSGame files so that their association is: [http://www.bigbluecup.com/yabb/index.php?topic=12051.msg166879#msg166879]
You can create this association manually if you like, just set up .AGSGame files so that their association is: [http://www.adventuregamestudio.co.uk/forums/index.php?topic=12051.msg166879#msg166879]


  c:\path\to\ags\agsedit.exe -shelllaunch "%1"
  c:\path\to\ags\agsedit.exe -shelllaunch "%1"
Line 31: Line 31:
:''So start playing your low-res game in hi-res if you intend to switch to bigger-sized windowed mode later.''
:''So start playing your low-res game in hi-res if you intend to switch to bigger-sized windowed mode later.''
----
----
'''CJ''': The AGS editor can '''only automatically use 16-colour icons'''. ([http://www.bigbluecup.com/tracker.php?action=detail&id=153 Tracker])
<strike>'''CJ''': The AGS editor can '''only automatically use 16-colour icons'''. ([http://www.bigbluecup.com/tracker.php?action=detail&id=153 Tracker])</strike>
:''As of AGS v2.72 hi-color icons can be used when running Windows 2000/XP.''
----
----
'''CJ''': '''Labels and text boxes have a maximum length of 200 characters,''' just like the max string length. [http://www.bigbluecup.com/yabb/index.php?topic=13914.msg168605#msg168605]
'''CJ''': '''Labels and text boxes have a maximum length of 200 characters,''' just like the max string length. [http://www.adventuregamestudio.co.uk/forums/index.php?topic=13914.msg168605#msg168605]
----
----
'''CJ''': '''Tiled sprite import''' now goes from left to right in rows.
'''CJ''': '''Tiled sprite import''' now goes from left to right in rows.
Line 39: Line 40:
'''Scorpiorus''': You can have about '''150 lines of text in a listbox.'''
'''Scorpiorus''': You can have about '''150 lines of text in a listbox.'''
----
----
'''CJ''': '''You can have up to 1000 rooms''', but any numbered >300 will not have their state saved when the player leaves the room. This basically means that room script variables, object positions, etc will all be reset to their default values when you leave the room. [http://www.bigbluecup.com/yabb/index.php?topic=13914.msg168605#msg168605]
'''CJ''': '''You can have up to 1000 rooms''', but any numbered >300 will not have their state saved when the player leaves the room. This basically means that room script variables, object positions, etc will all be reset to their default values when you leave the room. [http://www.adventuregamestudio.co.uk/forums/index.php?topic=13914.msg168605#msg168605]
----
----
'''CJ''': '''Beta versions of the engine are larger''', because they don't have all the debug code stripped out, and aren't compressed. [http://www.bigbluecup.com/yabb/index.php?topic=12051.msg150828#msg150828]
'''CJ''': '''Beta versions of the engine are larger''', because they don't have all the debug code stripped out, and aren't compressed. [http://www.adventuregamestudio.co.uk/forums/index.php?topic=12051.msg150828#msg150828]
----
----
'''CJ''': '''#define is replaced with its definition''' at compile-time. [http://www.bigbluecup.com/yabb/index.php?topic=13234.msg158627#msg158627]
'''CJ''': '''#define is replaced with its definition''' at compile-time. [http://www.adventuregamestudio.co.uk/forums/index.php?topic=13234.msg158627#msg158627]
----
----
'''CJ''': '''AGS v2.3 and later request 85 Hz''' from DirectX.
'''CJ''': '''AGS v2.3 and later request 85 Hz''' from DirectX.
Line 49: Line 50:
'''Erica McLane''': '''Games compiled for DOS have 60 Hz'''.
'''Erica McLane''': '''Games compiled for DOS have 60 Hz'''.
----
----
'''CJ''': When '''creating a translation source''', AGS only scans backwards 10 characters to check for the 'GetxxxProperty'. [http://www.bigbluecup.com/yabb/index.php?topic=13043.msg156462#msg156462]
'''CJ''': When '''creating a translation source''', AGS only scans backwards 10 characters to check for the 'GetxxxProperty'. [http://www.adventuregamestudio.co.uk/forums/index.php?topic=13043.msg156462#msg156462]
----
----
'''CJ''': '''Fatal exceptions''' eip +5997 mean the MP3 player and eip +379 mean a problem drawing the GUI. [http://www.bigbluecup.com/yabb/index.php?topic=12798.msg153456#msg153456]
'''CJ''': '''Fatal exceptions''' eip +5997 mean the MP3 player and eip +379 mean a problem drawing the GUI. [http://www.adventuregamestudio.co.uk/forums/index.php?topic=12798.msg153456#msg153456]
----
----
'''Esseb''': 320*200 is what the game engine reverts to '''if no config file is present'''. [http://www.bigbluecup.com/yabb/index.php?topic=12787.msg153098#msg153098]
'''Esseb''': 320*200 is what the game engine reverts to '''if no config file is present'''. [http://www.adventuregamestudio.co.uk/forums/index.php?topic=12787.msg153098#msg153098]
----
----
'''CJ''': To ensure [the pathfinder] always works, your '''walkable areas should always be at least 3 pixels wide'''.
'''CJ''': To ensure [the pathfinder] always works, your '''walkable areas should always be at least 3 pixels wide'''.
Line 62: Line 63:
----
----
<del>
<del>
'''CJ''': '''The inventory window currently keeps track of the order that items are added to it''', until the player character is changed, at which point the items switch back to the default order. [http://www.bigbluecup.com/yabb/index.php?topic=12870.msg153895#msg153895]
'''CJ''': '''The inventory window currently keeps track of the order that items are added to it''', until the player character is changed, at which point the items switch back to the default order. [http://www.adventuregamestudio.co.uk/forums/index.php?topic=12870.msg153895#msg153895]
</del>
</del>
:''As of AGS v2.7, the inventory item order for each character is remembered.''
:''As of AGS v2.7, the inventory item order for each character is remembered.''
Line 97: Line 98:
:''So you don't necessarily have to put the exports at the '''end''' of scripts.''
:''So you don't necessarily have to put the exports at the '''end''' of scripts.''
----
----
'''CJ''': Yes, the script engine has a '''limit of 9 parameters in a function call'''.
'''CJ''': You should be able to have '''up to 15 parameters to a function'''. [http://www.bigbluecup.com/yabb/index.php?topic=27727.msg352543#msg352543]
----
----
'''CJ''': Note that '''optional parameters only work with int and enum''' parameters, you can't do it with strings or floats.
'''CJ''': Note that '''optional parameters only work with int and enum''' parameters, you can't do it with strings or floats.
Line 194: Line 195:
:''I think this is in the manual. However, I find it worth repeating.''
:''I think this is in the manual. However, I find it worth repeating.''
----
----
'''CJ''': The ''''Play music on room load'''' only accepts music numbers from 1-120.
'''CJ''': The ''''Play music on room load'''' textbox only accepts music numbers from 1-120.
To play a higher numbered music, you need to use PlayMusic.
To play a higher numbered music, you need to use PlayMusic.
----
----
64

edits

Navigation menu