Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - helios123

#41
Hi all,

This is a small plugin which allows you to set custom properties for Rooms, Characters, Objects, Inventory Items and Hotspots.

Inspiration:
I had always wanted runtime manipulation of user defined (custom) properties
in AGS. This plugin started out as an attempt to try to achieve that.

The idea of modifying the AGS editor for merging script headers (link below) also came
to me while developing this plugin.


Working:
The plugin modifies the existing GetProperty/GetTextProperty methods and adds
SetProperty/SetTextProperty and ResetProperty/ResetTextProperty methods.

The corresponding values for Room, Object and Hotspot properties will be reset
whenever ResetRoom function is called.
i.e. ResetRoom(1), will remove all Room/Object/Hotspot properties related to
room number 1, in addition to AGS's default processing.

IMPORTANT: Rooms with room number above 300 do not store state. The same
is true for the properties set by SetProperty/SetTextProperty methods
for Rooms, Hotspots and Objects.

This DOES NOT APPLY to Character and InventoryItem objects.

More details in the included readme.

IMPORTANT:
There are two versions of this plugin in the archive provided for download, one for use with the normal editor,
and another for use with a modified editor, the details of which are posted here.


Download from here
#42
This is a modified version of AGS Editor. I have performed a very small modification in the RegisterScriptHeader and UnRegisterScriptHeader methods, as mentioned in the title. Here it is in more detail:

Changes in this version:
 A small change in the RegisterScriptHeader and UnRegisterScriptHeader methods in
 NativePlugin.cs. A new class named ScriptMerger has been added for this purpose and the two
 methods in NativePlugin.cs have been slightly modified.
 
 THIS CHANGE WILL AFFECT ONLY THOSE PLUGINS WHICH REGISTER THEIR SCRIPT HEADER IN THE METHOD
 DESCRIBED BELOW. Other plugins will remain unaffected.

 
IMPORTANT NOTE:
 THERE IS NO CHANGE IN THE AGS PLUGIN API. ONLY THE OPERATIONS PERFORMED BY THE EDITOR WHEN
 THE RegisterScriptHeader AND UnRegisterScriptHeader METHODS ARE CALLED FROM THE PLUGIN HAVE
 CHANGED.
 
 
A more detailed description:
 The ScriptMerger class is used to merge the struct member definitions from the header registered
 by the plugin with the built in AGS header. This allows the plugin to define new members for
 structs/enums. THIS IS APPLICABLE ONLY FOR AGS's BUILT-IN TYPES.
 
 For example, assume that some plugin registers a header as below:
 managed struct Room
 {
   import static int GetTimesVisited();
 };
 
 Then the declaration of GetTimesVisited will be added into the declaration of Room struct in AGS's
 built-in script header, i.e. it will be available as a member function of Room object in scripts.
 
 Similarly for enums.
 
 The newly added function can be used in scripts in the following way:
 int timesVisited = Room.GetTimesVisited();
 if(Room.GetTimesVisited() > 5)
 ... and so on.
 
 The plugin should register the GetTimesVisited function as:
 
 _lpEngine->RegisterScriptFunction("Room::TimesVisited^1", <address of method here>);
 
 in the plugin's AGS_EngineStartup method.
 

Why was this done?
 This change was done mainly because unlike scripts, extender functions are not available to
 plugins. This code change started out as an attempt to see whether this issue could be somehow
 handled at the editor end.
 
 So, if any plugin has to add new functionality to a built in object (e.g. the Room object above),
 then the plugin author has to create the necessary script functions through the plugin and the
 extender functions have to be implemented through a separate script module.
 
 One more advantage of this approach is that it allows the plugin author to add static functions
 to the built in objects (such as the hypothetical GetTimesVisited mentioned above). This cannot
 be done through extender functions or any scripting techniques.

 
Issues/Limitations/TODO:
 The change has not been thoroughly tested, but should work for most situations. USE AT
 YOUR OWN RISK.


 See the enclosed readme file for details.

Download here. Note the self extracting archive contains both the binaries and sources.


Edit: Updated download link
Update 29 Mar 2011: Updated with new editor build made from latest code from SVN.
#43
Hi all,

My second AGS plugin. Like the previous one, this is also open-source.
Main details are as below:

Description:

This plugin will add a method called a script GetTimerID and a define a macro
AGS_TIMERHELPER_IS_ACTIVE.

NOTE: The macro is named as <DLL name>_IS_ACTIVE. This is done in order to
guarantee uniqueness, as there can be only one AGS_TimerHelper.dll in
AGS's root directory.


The documentation of GetTimerID is as below:

int GetTimerID()

Gets an available id which can be used for subsequent calls to SetTimer.
If all timers are currently in use, then it returns -1.


Inspiration:

I got the idea for developing this plugin while writing some code involving
SetTimer. Since currently the programmer has to choose a timer id, this can
create problems if SetTimer is being used in different pieces of code which
are being written by different programmers.

e.g. Suppose there are two modules using SetTimer. If, for some reason, both
of them are to be used in one game.
Also, consider that SetTimer is required in repeatedly_execute for some room
scripts. Then unless the timer ids in all places are different, there is
going to be unexpected behaviour.

Also, module writers cannot use SetTimer since they cannot decide which timer
id to choose. Even if they go on the safer side and choose one of the last
five ids (15 to 20), the game developer has to ensure that no two modules are
unintentionally using the same timer id.

Please note that this plugin is intended to be used only when SetTimer is
being called at more than one script, as described above.
If the use of SetTimer is limited to just room scripts, then this plugin is
not required.


Usage:

01. Put the AGS_TimerHelper.dll in the folder where AGS is installed.
02. Start AGS Editor and load/create a game. In the Right hand top pane under
"Plugins" right click on the dll name and select "Use this plugin".
03. Selecting "Plugin Properties" from the pop-up menu in step 2 will show
a detailed help dialog. Please refer it for help on using this plugin. Or you
can refer to the ReadMe_long.txt file included in this distribution.

AGS Version:

Tested with AGS version 3.2. But should work fine on older versions as well, since SetTimer is not a new function.

IMPORTANT NOTE:
This plugin was developed using the Code::Blocks IDE, with MS Visual C++ as
compiler. So the project file cannot be opened in Visual Studio. Create a blank DLL project and add the source files,
if using Vicual C++ IDE.


Comments and criticisms are always welcome.

Download here
#44
Description:
 This is a template for making Reality-on-the-Norm (RON) games using AGS. It has been created using AGS 3.2.  This is a modification of the RON 3.1 template which is available on the RON website (see below).


AGS Version: Tested using AGS version 3.2. Not tested for older versions of AGS.


Differences with respect to RON 3.1 template:
 The following are some of the changes done in this template:

  • Updated Script files and GUI's to use AGS's new object based scripting commands, introduced in version 3.x.
  • Updated formatting in GlobalScript.asc.
  • Added a new shortcut key (F1) to display mouse/keyboard shortcuts.
  • Screenshot is now named after current timestamp (hhmmss-ddmmyyyy) instead of "scrnshot.bmp".


Important Notes:

  • AGS 3.2 introduced a new Audio file management system. Hence, it is possible that this template may not work at all in versions below 3.2. AGS 3.2 can be downloaded here.
  • Templates for 3.1 and older versions of AGS can be found on the RON Website.

Update: April 01, 2011: New version released. This has the following changes:

  • A new macro GAME_AUTHOR is defined in GlobalScript.ash. Update as required. This is used by the about dialog to display the game's author(s).
  • A new macro GAME_VERSION_NO is defined in GlobalScript.ash. Update as required. This is used by the about dialog to display the game's version number.
  • Added an HTML Template (Readme.html) for creating HTML Readme for the game.

Update: July 22, 2011: New version released. This has the following changes:

  • Code in unhandled_event now updated to work correctly for scrolling rooms.

Comments, suggestions and criticisms are welcome.

Download here
#45
I take this as a cue for me to start expanding my teeny weeny knowledge of C#/Visual C++.  ;D

If the editor plugin API is made more flexible, then there would be no need for people to write their own editors.

Where open sourcing the engine code is concerned, I don't think it as absolutely necessary (the idea of releasing the source code to a small group of dedicated developers makes more sense in my opinion).

I feel first an approach similar to the one suggested for the editor should be tried for the engine, i.e. first we should see if enhancing the engine API can eliminate the need for open sourcing it. (I'm saying this because the existing plugin API for the engine is already quite flexible.)

And as far as AGS file formats are concerned, I feel it would be better to move them into a separate DLL (as suggested by monkey_05_06), and also provide a separate API at the engine level for registering/replacing file formats, like the way we currently have for script funtions (e.g. RegisterScriptFunction).

And finally, a big thank you for creating this excellent editor/engine and maintaining/improving it singlehandedly for over a decade.  :)

Whatever you decide, I know it will be for the best of AGS!!!

Spoiler

Give every man thine ear, but few thy voice:
Take each man's censure, but reserve thy judgment.
    --William Shakespeare in Hamlet
[close]
#46
Here are some features which would also be useful. (I have not read all of the 22 pages of replies, so some might have been be repeated. Sorry about that):


  • More detailed scripting reference. Currently, keywords such as extends, writeprotected, managed, protected, readonly, static are not documented. This should save module writers and scripters some time.


  • Placing the events of each character in a separate script, instead of the global script, and the facility to export/import this script when the character is exported/imported.

    e.g. If cEgo is a character, then all the event handlers (LookAt, Talk, Interact, etc.) for cEgo will be generated in cEgo.asc (and cEgo.ash) and not GlobalScript.asc.

    This will save time when the same character is to be repeatedly used in a series of games (e.g. for the games in ROTN, Ben Jordan and similar series). This will also ensure that GlobalScript.asc does not become excessively large when a large number of characters are used.


  • Seek/Tell functions in the File object, similar to fseek/ftell functions in C/C++.


  • A for loop for use in scripts, so that for loops can be used where the number of iterations are known, (e.g. traversing an array, generating numbers from intA to intB in steps of intC), and while loop can be used for the more general case of unknown number of iterations. Also, using a for loop ensures that the loop variables are initialized, there will less cases where initialization, increment/decrement of the loop variable was forgotten.


  • Ability to store structs which do not contain methods as global variables, maybe using a generic container type.


#47
I have released both the compiled version and source code of a plugin I developed. Here is the link to the Technical Forum thread.

I support this, as it will be a very good way to learn about AGS plugin development.
#48
My first AGS plugin!!!

Inspiration:
I got the idea for developing this plugin while playing Adventure - The Inside Job, as the video file in that game contains a spoiler to the game's ending, and the game author has no option other than suggesting players not to view the file before playing the game.


Description:
This plugin will modify the video files used in your game so that they cannot be played back in a media player. This feature is useful when the videos contain spoilers and hints to puzzles and viewing them beforehand will spoil the gameplay experience.

AGS Version:
Tested on AGS versions 2.72 and 3.1.2 SP1. Not tested on older versions of AGS.

Supported formats: AVI, WMV, Ogg Theora video files having extension other than .OGV.

Note: AGS has built-in support for Ogg Theora video files, see the manual for more info.

Download includes the plugin, documentation and a runtime-only version, with the AGS editor related functionality removed. Source code is also available (as a Visual C++ 2008 solution).

If you encounter any bugs, please let me know. If possible, I will try to fix them.

UPDATE: 17 Sep 2010: New version with PlayFlic support added.

Download Here
#49
Description
  This is a small module for adding snow/rain functionality to the game. A small demo game is also included.
  Some features are as below:
 

     
  • Multiple sprite images can be used
  • Ability to change type of system (Snow/Rain) at runtime
  • Setting of Wind direction for particle movement
  • Change the amount of particles drawn in the foreground
  • Support for rotating the particle images

  AGS version 3.1.2 and later is recommended. Not tested on older versions.
 

Download link below includes zip file with demo game as well as .scm file. For documentation, please refer the .ash file

UPDATE: 17 Sep 2010: New version uploaded. This has:

  • Transparency, and modified logic for making particles disappear.
  • Collision detection logic takes into account the 'Solid' property of objects and characters
  • Code organized in a more object oriented way
in addition to the features mentioned above

Download here
#50
General Discussion / eBooks on Drawing
Fri 16/07/2010 18:25:20
#51
A very basic, template based character editor, like SSH's WalkCycle Generator, would be a welcome addition, as it would speed up the process of character creation, especially for newbies or those who suck at drawing, such as myself.

Native Parallax Scrolling would also be nice, as I think it would me more faster than doing the same through scripts...
#52
The Rumpus Room / Re: How did you find AGS?
Mon 01/03/2010 06:25:47
Saw it in the credits of 7 Days a Skeptic...
#53
The awesome 7 Days a Skeptic.     :)
SMF spam blocked by CleanTalk