Plugin development for AGS 3.0

Started by Pumaman, Sun 07/10/2007 18:11:17

Previous topic - Next topic

Pumaman

Looks good! I'll see if I can add some method of intercepting context menu creation.

Shane 'ProgZmax' Stevens

#21
Could you open up the possibility to extend existing classes (like Sprite, for example) so we could put in additional properties in the editor?  I'd like to add a Name property to Sprite that would store (by default) the filename of the sprite loaded (or in the case of already compiled sprite folders it would just rename them something like sprite1, sprite2 incrementally) and display Name instead of the Number property in the manager.  Then you could re-organize the sprites by names like bill_walk1, bill_walk2, etc.  The ability to edit existing parts of the editor would also be useful, since I could simply edit the sprite manager slightly to add some right-click functionality (rename/sort by).  None of this would touch the sprite numbers so it shouldn't break any of the engine code.  Otherwise I'd have to reproduce the sprite manager from scratch (which would be redundant).  Thanks!

subspark

This is fantastic! Bravo!

Paul.

Pumaman

Quote from: ProgZmax on Thu 06/12/2007 23:41:55
Could you open up the possibility to extend existing classes (like Sprite, for example) so we could put in additional properties in the editor?

This is actually quite awkward to implement, but I'll have a think about how it could be done.

SupSuper

Is there any way I can get some kind of AGS script reference (objects/functions/properties/enums/etc.) in some easy-to-process format? (text/xml/etc.)

I was writing my own from scratch for my Simple Script plugin but then noticed AGS.Types seems to have a lot of classes for this kind of stuff so I was wondering if I could avoid all this extra work.
Programmer looking for work

Pumaman

Well, the Script class has an AutoCompleteData property, which stores all the information that autocomplete has cached about the script. I guess it depends whether the information you need is the same as that, or not.

The only other option would be to use the built-in script header file and parse that yourself, but that would probably be duplicating a lot of work.

SupSuper

Quote from: Pumaman on Sat 08/12/2007 21:59:00
Well, the Script class has an AutoCompleteData property, which stores all the information that autocomplete has cached about the script. I guess it depends whether the information you need is the same as that, or not.
Wow, that's very handy, thanks. :)
Is there something similar for AGS' built-in stuff?
Programmer looking for work

Pumaman

There is a Script object representing the built-in stuff, but I don't think it's exposed on the plugin API at the moment. I'll look into it.

smiley

I'm working on adding the possibility for the user to refer to the audio files in the script by a name instead of a number. The plugin currently adds a new script whose header contains an enum declaration. But to make the enums effect all the user's scripts this header has to be the topmost.

So it would be nice if there's a way to make it stay at the top when the user adds a new script or changes the order.


Pumaman

Ah yeah, in fact what I'd like to do is something similar to the Native Plugin API whereby the plugin can add extra hidden script headers that the user can't see and that always get compiled before the user scripts.

subspark

That sounds cool! Is this coming in the next release?
I would find it very usefull.

Cheers,
Paul.

SMF spam blocked by CleanTalk