Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: GMD1984 on Mon 03/02/2014 11:32:10

Title: Using Sublime text editor in AGS
Post by: GMD1984 on Mon 03/02/2014 11:32:10
Hello, AGSers!
I have been on and off get my hands wet for AGS for a while now. And recently been focusing on game project using AGS. I'm happy with the editor now. But, just one thing I want to know.

Does AGS support an external text editor for game's script editing?
I am quite a SublimeText's bitch who love its beauty dark-chocolate color theme. And I think it would be super if I can plugged AGS with Sublime.

Additional info about sublimeText Editor. -----> http://www.sublimetext.com/ (http://www.sublimetext.com/)http://www.sublimetext.com/

Title: Re: Using Sublime text editor in AGS
Post by: Crimson Wizard on Mon 03/02/2014 11:38:23
You cannot integrate other editors in AGS, but you can edit the scripts with anything you like, even MS notepad, just you have to launch your editor yourself.

Scripts are files in you project folder named *.ash (header) and *.asc (main source).
Title: Re: Using Sublime text editor in AGS
Post by: GMD1984 on Mon 03/02/2014 12:06:37
Thank you very much Crimson!

It's really was that simple. And works beautifully.

Actually I have another question. Do you have any idea of how can I import AGS's auto-complete, functions/commands guessing into other text editor?

Thanks in advanced.
Title: Re: Using Sublime text editor in AGS
Post by: Wyz on Mon 03/02/2014 12:44:53
AGS extracts this from the native and plugin script headers which are baked into the editor and plugin DLL's. If you're used to scripting you can do it but it would be a ridiculous amount of work I think ;-D. However if you want to here is a bit of useful information:

You can find the native script header here (source code) (https://github.com/adventuregamestudio/ags/blob/6786f11e0b0bc7e36fab2a20bb4035d3672bad8c/Editor/AGS.Editor/Resources/agsdefns.sh).

The bits you're looking for will start with import, #define, (managed) struct and enum.

A autocompleter directive starts with three slashes and precedes the import clause. There are two magic words for the import clauses that will have an effect on the autocompleter:
Code (ags) Select
import ...; // $AUTOCOMPLETEIGNORE$
This will hide the function from the big list with suggestions in AGS. If you use the function it will still autocomplete though.
Code (ags) Select
import ...; // $AUTOCOMPLETESTATICONLY$
This will only show in AGS when you are referencing the class instead of the instance. This is used when classes are used as namespaces.
Title: Re: Using Sublime text editor in AGS
Post by: GMD1984 on Mon 03/02/2014 13:16:10
Wow, Thanks for the tip Wyz. It's obviously beyond me for my scripting skill right now. But, Thanks anyway. At least I know better how's Editor works.
Luckily, that my editor have a built-in Guessing/Auto-Complete from context of the codes within a script file. So, It's works for those script files I already started written with significant amount of code.
Title: Re: Using Sublime text editor in AGS
Post by: monkey0506 on Tue 04/02/2014 11:15:00
Quote from: Wyz on Mon 03/02/2014 12:44:53There are two magic words for the import clauses that will have an effect on the autocompleter:

What, no love for $AUTOCOMPLETENOINHERIT$? :P

(Which, by the way, is currently only used AFAIK by the GUIControl class to prevent such confusingly useless members as Button.AsLabel and Slider.AsInvWindow.)
Title: Re: Using Sublime text editor in AGS
Post by: Wyz on Tue 04/02/2014 12:16:02
Nope. We've been in a hate relationship for years and I refuse to acknowledge its existence. :D
No really thanks for pointing that one out! I completely forgot about it. :D
Title: Re: Using Sublime text editor in AGS
Post by: Snake on Wed 05/02/2014 22:07:40
Quote from: monkey_05_06 on Tue 04/02/2014 11:15:00
Quote from: Wyz on Mon 03/02/2014 12:44:53There are two magic words for the import clauses that will have an effect on the autocompleter:

What, no love for $AUTOCOMPLETENOINHERIT$? :P

(Which, by the way, is currently only used AFAIK by the GUIControl class to prevent such confusingly useless members as Button.AsLabel and Slider.AsInvWindow.)
Oh.
Your name is Monkey, but you're really such a turkey :-D