Suggestion: Notepad OR independent script editor?

Started by InCreator, Wed 13/12/2006 13:02:37

Previous topic - Next topic

InCreator

Making a game needs alot of things to remember all the time, and AGS makes it quite difficult with somewhat weird sprite and view names, and numbering.

This led me to an idea: internal notepad in AGS. Simply a text window, that is always visible and accessible, even if script editor is open. I must be absolutely accessible at all time to work.

How often have you copied mouse coordinated to clipboard to use them in a script, and after copy-pasting portion of script (like nearby character.Walk command), realising that you just overwrote these coordinates in clipboard?

Again, save script, exit, find coordinates... blah blah.

Also, such thing could serve well as to-do list. Often, I have to stop making a game when I'm in the middle of scripting something complex, and it's hell to remember next day what was I doing before I left.

So, the notepad, or call it AGS Organizer, should save its contents when AGS exits. Again, without confirmation and other nuisance (otherwise, it renders it's functionality near zero).

Why not use real Windows notepad for this?

1. Focus. It steals focus, both AGS's and game programmer's.
2. Hassle to save, locate and load it

I think that such organizer could be really handy.
I hope I explained myself clearly enough for people to understand what I mean.

SSH

Why not use script comments for TODO lists? I did, in the Hypertext module. Also, you can get utilities that let you access the last 20 things you pasted, not just the last one (e.g. Microsoft Office Clipboard).
12

Khris

Quote from: InCreator on Wed 13/12/2006 13:02:37Why not use real Windows notepad for this?

1. Focus. It steals focus, both AGS's and game programmer's.
2. Hassle to save, locate and load it

1. Alt-Tab back and forth. I usually script with the helpfile in the background, plus TotalCommander and PaintShopPro, so I have to do it anyway.
An always-on-top notepad would be more of an annoyance than real help, IMO. (50% of the time it'll obscure something and I'd have to move it around.)
And you can always run both AGS and notepad in windowed mode, next to or above each other.

2. Use a batch file that opens AGS and the notepad file, create a link to it on the desktop. When you're done with AGS, Alt-F4 notepad and hit enter. Bam.

About c&p-ing coords: paste them somewhere suitable into your script and comment them out. Whenever you should need them a second time, you don't have to go back to searching through the editor.

RickJ

Why not just add an "Edit Document" function to AGS.  All you need to do is have the script editor open one of any number of text files in a "Document" folder? 

InCreator

#4
Hm. Thinking about it...

The notepad idea comes from one of most annoying - or rather unpractical limitations of AGS: The almighty script editor.

Why? Because if script editor is open, I cannot browse other assets, like inventory items, sprites or views.

In many places when scripting (haven't tried all, but mostly character/inventory/room/object-related scripts) you can't look around (in your AGS project) for inventory item numbers, view/loop numbers, etc. That produces in need to write things down, and there's really weird way how people solve this matter. I - for example, take a screenshot from inventory screen when scripting a list of inventory items to be used on particular hotspot or object. Just to look up for inventory item numbers for "player.activeinv == int what" lines.

This is... strange way to do this, and led me to an idea that it could be simpler some way. Or atleast less MSPaint-based.

But if CJ could "detach" script editor in rooms/character interactions/inventory interactions just as it is in GUI script, for example, amount of things needed to memorize would be ALOT smaller.

Khris

I usually don't use the Interaction Editor's Edit Script...-button at all, instead I open the room script with the {}-button.

And you can avoid taking a screenshot if you use player.ActiveInventory==iItem because remembering the names is way easier.

Ashen

Would it be possible to have multiple instances of the Script Editor open? There's definately been instances where that would've been useful for me (e.g. checking something in the global script while editing a room script, or side-by-side comparison of two chunks of code).
I realise this could cause problems with saving the script (changes made in one window would be lost if you re-save from another), but maybe a secondary, read-only window would work?
I know what you're thinking ... Don't think that.

InCreator

#7
QuoteI usually don't use the Interaction Editor's Edit Script...-button at all, instead I open the room script with the {}-button.

You definetly misunderstood.
I use buttons too. The problem is that if the script is open, you cannot look around in AGS, like click on "inventory" portion to see inventory names, or browse views and loops and so on.
You have to save & close script, find numbers you need, remember them, renavigate back to script, etc...

What's weird is that you can edit main script for GUIs AND browse around. It'll be great if that applied to ANY kind of script, not only gui one.

When scripting complex portions of action, such as cutscenes, It's quite a pain.

QuoteAnd you can avoid taking a screenshot if you use player.ActiveInventory==iItem because remembering the names is way easier

No, you cannot. iItem results in type mismatch. Only integers allowed.

I think that whole another suggestion grew out of all this, and I changed the thread name.
Also, I'm starting to see a vision of AGS 3 in the future, with hardcore project management improvements.
This will probably trigger more strange suggestion threads/bug tracker entries from me  :)

SSH

Quote from: InCreator on Wed 13/12/2006 19:25:06
The problem is that if the script is open, you cannot look around in AGS, like click on "inventory" portion to see inventory names, or browse views and loops and so on.

Yes you can. I do it all the time. you couldn't way back in AGS 2.6something, but I'm pretty sure you have been able to for ages... the only time you can't is if you open the script from a blocking dialog, such as the module manager or interaction editor, but I never do that. I always use the CTRL-E (room), CTRL-G, CTRL-H, CTRL-1, CTRL-SHIFT-1 etc. shortcuts.

Quote
QuoteAnd you can avoid taking a screenshot if you use player.ActiveInventory==iItem because remembering the names is way easier

No, you cannot. iItem results in type mismatch. Only integers allowed.

You have to use the capitalised OO version, not the lowercase integer one.
12

Pumaman

I am currently looking into various possible restructurings of the editor, and one thing I'd definitely like to change is the way that the script editor is accessed.

Traveler

Would it be possible to keep the scripts as plain text files in the file system? That would be very nice, since anyone could use any editor at any time... AGS would simply load and parse the files when a game is opened and when the compiler runs. The .dta file would store a list of files and would let us add/remove files or rename them. Some kind of UI would let us match up event handlers with objects that raise that event. (Or alternatively, functions could be named in such way to give that information, like Room1_OnSomething ().)

SSH

You mean like setting your own editor in this dialog:



or doing a text dump?
12

InCreator

#12
Quote from: SSH on Wed 13/12/2006 20:14:34
Quote from: InCreator on Wed 13/12/2006 19:25:06
The problem is that if the script is open, you cannot look around in AGS, like click on "inventory" portion to see inventory names, or browse views and loops and so on.

Yes you can. I do it all the time. you couldn't way back in AGS 2.6something, but I'm pretty sure you have been able to for ages... the only time you can't is if you open the script from a blocking dialog, such as the module manager or interaction editor, but I never do that. I always use the CTRL-E (room), CTRL-G, CTRL-H, CTRL-1, CTRL-SHIFT-1 etc. shortcuts.

This is for main scripts, global script, script header, etc.

But where does the most of the scripting happen?
Interactions. For hotspots, characters, objects, inventory items... talked to this, used this on that...etc.

So, in atleast 80% of time, it's still a problem.

EDIT: Customizable AGS interface
Ah, and for suggestions (I don't want to start another thread for such simple request) - it would be nice to have ability to disable some things in AGS main Game Editor menu. For example, I never use text parser, lip sync, fonts, cursors, global messages, palette... They are needed so rarely that they seem to be there just to make me search needed things longer.
I'll try to explain those items a bit:

* Fonts - how many different fonts do average AGS game have? I bet no more than three or four. Once the fonts are imported, you'll never go back there.
* Text parser - you either use it or not
* Palette - Used only to find speech colors.... unless game is 256-color. Which in 2006/07, is quite unlikely, unless you suffer from nostalgic masochism or masochistic nostalgia  ;)
* Lip sync - I even never figured out how does it work! So it's one decision thing, like text parser
* Cursors - once they're made, they stay... unclicked
* Global messages - I doubt anyone uses them much... I think that's an AGS's newbie thing, like long interactions for those who don't code. I have worked on my game almost 2 years and yet never ended up under section "global messages"
* etc. Different developers use different features of AGS, I just told how much I do. But there's so many features that I turning some off or move away isn't bad option at all.

Now that's one of management suggestions I had in mind. If I could gray out or hide the menu Items I use rarely, the whole proccess of making game (Using AGS) would be shortened. And this could even be reflected in quality (less tired when making whole thing?).

Traveler

#13
Quote from: SSH on Wed 13/12/2006 21:21:59
You mean like setting your own editor in this dialog:

or doing a text dump?

I guess neither. I meant it more like VC++ where the IDE is really just a file manager with a compiler. So all the script code would be in plain text files all the time. Since there is a tracker entry for the same with images, it'd also be consistent, if CJ implements that.

Khris

#14
Quote from: InCreator on Wed 13/12/2006 21:45:29This is for main scripts, global script, script header, etc.

But where does the most of the scripting happen?
Interactions. For hotspots, characters, objects, inventory items... talked to this, used this on that...etc.

So, in atleast 80% of time, it's still a problem.

You still don't get it.
Create all the necessary Run Script-actions in the interaction editor.
Then open the room script by clicking the {}-button at Room Editor -> Settings.
Voilà . Now you can edit every interaction, no matter if it's a region's, a hotspot's or whatever else from the room without having to close the script editor to access inventory numbers, mouse coordinates and other stuff from the editor.

So in at least 95% of the time, this is no problem at all.

Btw, inventory and character interactions are handled in the global script...

RickJ

What I suggested about opening text files in a document folder would work just fine for this.  The script editor is locked-down when it is launced to edit scripts because the script file can also be modified by other parts of AGS.   The easiest way to avoid conflicts is to allow only one or the other to edit at a time.  If you were editing a text file the script editor component doesn't need to be locked down and could be so launced without any consequences.   I suggest this beacuse you waould have a consistent text editor interface and if a document contained example script code it would have the same look and format as if it were in the global or room script. 

SMF spam blocked by CleanTalk