Adventure Game Studio | Forums

AGS Support => Modules, Plugins & Tools => Topic started by: Gurok on Sun 26/10/2014 02:36:52

Title: EDITOR PLUGIN: Notes 1.1
Post by: Gurok on Sun 26/10/2014 02:36:52

Notes for AGS

Ever wanted to attach arbitrary text files to your AGS project? Do you find yourself putting comments in odd places, like a to do list in your global script header? Notes is a plugin for the AGS editor that allows you to tie text documents closely to your project while maintaining the semantic separation between text file and source code that you crave.

Here are some screenshots of it in action:

(http://i.imgur.com/Vz8xxOt.png) (http://i.imgur.com/cy2l4qR.png) (http://i.imgur.com/JeW9KCE.png)

(http://i.imgur.com/S0dz4Bf.png)

Known Issues

Planned Features

Download

Notes for AGS 1.1 (21 KB) (http://goo.gl/SafY74)
Title: Re: EDITOR PLUGIN: Notes 1.0
Post by: monkey0506 on Sun 26/10/2014 07:53:47
Quote from: Gurok on Sun 26/10/2014 02:36:52AGS will automatically close one of your text files when you close the editor. Not sure why this happens. I believe it's an editor issue and I'm looking into it

I've actually experienced this ever since the docking tabs were introduced. Whenever I close the editor the right-most tab disappears (while the others stay) prior to the prompt to save and then the editor actually closing.

Other than that, this looks like a pretty cool thing to have. Might be worth implementing in the main code base if it's a popular feature.
Title: Re: EDITOR PLUGIN: Notes 1.0
Post by: Dualnames on Sun 26/10/2014 22:43:15
+1 this is so useful, I can't even.
Title: Re: EDITOR PLUGIN: Notes 1.0
Post by: selmiak on Mon 27/10/2014 19:26:38
sounds really useful. Would it be possible to have a general notepad (for to do lists and notes) and also specific notes, like you attach a note to a room, when you open the room in the editor the note pops up or is attached next to the room. Or for a character (draw down walkframes). or for everything else. And in case you forget where there are still specific to do notes you look them all up in a general place via one of the dropdown menus or the notes node.
Title: Re: EDITOR PLUGIN: Notes 1.0
Post by: Gurok on Tue 28/10/2014 13:24:51
Thanks for the words of encouragement, guys!

Yes, monkey_05_06, that's the exact bug! I don't know what causes it, but it's so irritating.

Selmiak, I was actually thinking I could try linking a text file to a specific room, but I don't think the plugin API lets me capture the event of a room being opened. We could possibly go the other way though, i.e. click on a button in the note file to go to the attached room. I'll look into it.
Title: Re: EDITOR PLUGIN: Notes 1.0
Post by: Monsieur OUXX on Tue 28/10/2014 18:40:51
Quote from: selmiak on Mon 27/10/2014 19:26:38
specific notes, like you attach a note to a room

+1
Title: Re: EDITOR PLUGIN: Notes 1.0
Post by: Adeel on Wed 29/10/2014 14:40:24
Useful plugin, especially for planning the puzzles. I won't have to open notepad and keep track of a my to-do list myself now. Please make it an integral part of AGS Editor, if possible.

What happened to your cat, btw? I hope it's okay.
Title: Re: EDITOR PLUGIN: Notes 1.0
Post by: cat on Wed 29/04/2015 20:00:16
I just tried this with AGS 3.4.0.4 Alpha (just copied the dll in the folder of the exe - this is the way it works, I guess?) and got an error when trying to create a new note:
Spoiler

Error: Object reference not set to an instance of an object.
Version: AGS 3.4.0.4

System.NullReferenceException: Object reference not set to an instance of an object.
   at AGS.Plugin.Notes.NotesComponent.AGS.Types.IEditorComponent.CommandClick(String control)
   at AGS.Editor.GUIController._mainForm_OnMenuClick(String menuItemID)
   at AGS.Editor.ProjectTree.ContextMenuEventHandler(Object sender, EventArgs e)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
[close]

After closing the box I got another error message:
Spoiler

---------------------------
Adventure Game Studio
---------------------------
A serious error occurred and the AGS Editor may now be in an unstable state. You are STRONGLY ADVISED to shut down the editor and restart it. Before saving your work, make a backup copy of your game folder in case any data has been corrupted.



Error: System.NullReferenceException: Object reference not set to an instance of an object.

   at AGS.Plugin.Notes.NotesComponent.AGS.Types.IEditorComponent.CommandClick(String control)

   at AGS.Editor.GUIController._mainForm_OnMenuClick(String menuItemID)

   at AGS.Editor.ProjectTree.ContextMenuEventHandler(Object sender, EventArgs e)

   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)

   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)

   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)

   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)

   at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)

   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)

   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)

   at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)

   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)

   at System.Windows.Forms.Control.WndProc(Message& m)

   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)

   at System.Windows.Forms.ToolStrip.WndProc(Message& m)

   at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)

   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)

   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)

   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
---------------------------
OK   
---------------------------
[close]
Title: Re: EDITOR PLUGIN: Notes 1.0
Post by: horusr on Mon 18/01/2016 12:39:52
Quote from: cat on Wed 29/04/2015 20:00:16
I just tried this with AGS 3.4.0.4 Alpha (just copied the dll in the folder of the exe - this is the way it works, I guess?) and got an error when trying to create a new note:

I think it works for new games. I had same errors too for old games or demos but I deleted old and started new game and it workes fine on that.
Title: Re: EDITOR PLUGIN: Notes 1.1
Post by: Gurok on Sat 11/06/2016 15:03:47
Good news, Cat! I was able to replicate and fix the bug you reported. The Notes will now work on existing projects that were created before the plugin was added to the AGS directory.

It's been er... almost two years, wow. I've been meaning to take another look at the plugin for a while, but it just wasn't very high on my list of priorities. Anyway, finally fixed a few things. There are no new features, just bug fixes.

Changes:

The new version can be downloaded here:
Notes for AGS 1.1 (21 KB) (http://goo.gl/SafY74)

Next version should be out by the end of the decade. Can't make any promises though.

I will look at adding new features next -- room notes and stuff like that.
Title: Re: EDITOR PLUGIN: Notes 1.1
Post by: eri0o on Tue 24/09/2019 02:36:57
I am so sorry this thread is really old but I am really curious.

Gurok, does the source for this plug-in exists somewhere? I would be really interested in looking into it to learn how it works.  :-D
Title: Re: EDITOR PLUGIN: Notes 1.1
Post by: Gurok on Tue 24/09/2019 03:09:30
Hi eri0, I've uploaded it here: https://github.com/gurok/AGSNotes
Title: Re: EDITOR PLUGIN: Notes 1.1
Post by: eri0o on Tue 24/09/2019 10:14:59
Thank you  ;-D
Title: EDITOR PLUGIN: Notes 1.1: Crash in AGS 3.5.2-P2
Post by: fernewelten on Tue 14/04/2020 00:27:35
Sorry for waking up this thread.

I've been using this plug-in without trouble for a long time. However, I recently upgraded to AGS Editor 3.5.0.24 (AGS 3.5.0-P2). I was still able to create a note in the "Explore Project" tree of the Editor. However, when I double-clicked the new note, the editor crashed on me, cf. the death message below.

The plug-in seems to miss "AGS.Controls, Version=3.4.0.6, Culture=neutral, PublicKeyToken=null" or a dependency.
System.IO.FileNotFoundException
AGS.Plugin.Notes.NotesPane.GetEditor()

The death message, quoted:
Spoiler

PublicKeyToken=null" oder eine Abhängigkeit davon wurde nicht gefunden. Das System kann die angegebene Datei nicht finden.
Version: AGS 3.5.0.24

System.IO.FileNotFoundException: Die Datei oder Assembly "AGS.Controls, Version=3.4.0.6, Culture=neutral, PublicKeyToken=null" oder eine Abhängigkeit davon wurde nicht gefunden. Das System kann die angegebene Datei nicht finden.
Dateiname: "AGS.Controls, Version=3.4.0.6, Culture=neutral, PublicKeyToken=null" ---> System.IO.FileNotFoundException: Die Datei oder Assembly "file:///C:\Users\Peter G Bouillon\Documents\AGS\vertigo\AGS.Controls.dll" oder eine Abhängigkeit davon wurde nicht gefunden. Das System kann die angegebene Datei nicht finden.
Dateiname: "file:///C:\Users\Peter G Bouillon\Documents\AGS\vertigo\AGS.Controls.dll"
   bei System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   bei System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   bei System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   bei System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
   bei System.Reflection.Assembly.UnsafeLoadFrom(String assemblyFile)
   bei AGS.Editor.Program.CurrentDomain_AssemblyResolve(Object sender, ResolveEventArgs args)
   bei System.AppDomain.OnAssemblyResolveEvent(RuntimeAssembly assembly, String assemblyFullName)

WRN: Protokollierung der Assemblybindung ist AUS.
Sie können die Protokollierung der Assemblybindungsfehler aktivieren, indem Sie den Registrierungswert [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) auf 1 festlegen.
Hinweis: Die Protokollierung der Assemblybindungsfehler führt zu einer gewissen Leistungseinbuße.
Sie können dieses Feature deaktivieren, indem Sie den Registrierungswert [HKLM\Software\Microsoft\Fusion!EnableLog] entfernen.

   bei AGS.Plugin.Notes.NotesPane.GetEditor()
   bei AGS.Plugin.Notes.NotesComponent.OpenItem(Int32 index)
   bei AGS.Plugin.Notes.NotesComponent.AGS.Types.IEditorComponent.CommandClick(String control)
   bei AGS.Editor.ProjectTree.ProcessClickOnNode(String nodeID, MouseButtons button)
   bei AGS.Editor.ProjectTree.projectTree_NodeMouseDoubleClick(Object sender, TreeNodeMouseClickEventArgs e)
   bei System.Windows.Forms.TreeView.OnNodeMouseDoubleClick(TreeNodeMouseClickEventArgs e)
   bei System.Windows.Forms.TreeView.WndProc(Message& m)
   bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
[close]
Title: Re: EDITOR PLUGIN: Notes 1.1
Post by: fernewelten on Sat 05/06/2021 03:04:50
So, more than fourteen months after my last post in this thread, above, I still don't know squat about C#.

But I have somehow been able to turn up the sources of that plugin somewhere, and by mindlessly copying hints from the Internet in pure dumb-Stackoverflow-zombie fashion, I managed to turn some wheels that I didn't understand and get the darn thing to recompile.

I haven't modified the sources at all, but my Visual Studio 2017 insisted on updating something before it was willing to even open the solution. After that, I don't really know just what configuration changes were causal to make it compilable again.

I tested it in version 3.5.1, and it seems to work okay.

So, if there is anyone else that is interested in that nifty plugin, it's currently here: https://www.loquimur-online.de/ags/Modules/Notes/AGS.Plugin.Notes.dll (https://www.loquimur-online.de/ags/Modules/Notes/AGS.Plugin.Notes.dll).
Put it into the folder where AGS is installed, and a "Notes" entry should appear in the project tree. Right-click on that entry to create notes.

Cheers!
Title: Re: EDITOR PLUGIN: Notes 1.1
Post by: .M.M. on Sat 21/08/2021 12:53:00
Thanks fernewelten for the update! Unfortunately, it doesn't work for me.  :(
Here is the error message I get:
Quote
---------------------------
Adventure Game Studio
---------------------------
There was an error loading plugin 'ags.plugin.notes.dll'.



System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.

   at System.Reflection.RuntimeAssembly.nLoadFile(String path, Evidence evidence)

   at System.Reflection.Assembly.LoadFile(String path)

   at AGS.Editor.EditorPlugin..ctor(String fileName, AGSEditorController pluginEditorController)

   at AGS.Editor.Components.PluginsComponent.LoadEditorPluginIntoMemory(String fileName)
---------------------------
OK   
---------------------------

It happens right as I start AGS Editor. I'm using build 3.5.1.8.
Title: Re: EDITOR PLUGIN: Notes 1.1
Post by: arj0n on Sat 21/08/2021 16:13:27
Same thing when using build build 3.5.1.9.
Title: Re: EDITOR PLUGIN: Notes 1.1
Post by: Crimson Wizard on Sat 21/08/2021 16:37:34
The system thinks that file may be dangerous because it's downloaded directly from a not certified location or something.

You have to unblock the file by opening its properties (for example, in the windows explorer) and clicking on "unblock" button.
Title: Re: EDITOR PLUGIN: Notes 1.1
Post by: .M.M. on Sun 22/08/2021 13:20:45
Thank you, CW! This is the first time I've heard of unblocking dll file.  :)

Now AGS starts with the plugin, but when I try to create a new note, I get this error:

---------------------------
Adventure Game Studio
---------------------------
A serious error occurred and the AGS Editor may now be in an unstable state. You are STRONGLY ADVISED to shut down the editor and restart it. Before saving your work, make a backup copy of your game folder in case any data has been corrupted.



Error: System.InvalidCastException: [A]Scintilla.ScintillaControl cannot be cast to [B]Scintilla.ScintillaControl. Type A originates from 'AGS.Controls, Version=3.5.1.8, Culture=neutral, PublicKeyToken=574775a8f405a67a' in the context 'Default' at location 'C:\Program Files (x86)\Adventure Game Studio 3.5.1\AGS.Controls.dll'. Type B originates from 'AGS.Controls, Version=3.5.1.8, Culture=neutral, PublicKeyToken=574775a8f405a67a' in the context 'LoadFrom' at location 'C:\Users\mirek\Dropbox\Main\tvorba\IsoWestern\WildWestIso\AGS.Controls.dll'.

   at AGS.Plugin.Notes.NotesPane.GetScintillaControl()

   at AGS.Plugin.Notes.NotesPane.GetEditor()

   at AGS.Plugin.Notes.NotesComponent.OpenItem(Int32 index)

   at AGS.Plugin.Notes.NotesComponent.AGS.Types.IEditorComponent.CommandClick(String control)

   at AGS.Editor.ProjectTree.ProcessClickOnNode(String nodeID, MouseButtons button)

   at AGS.Editor.ProjectTree.projectTree_NodeMouseDoubleClick(Object sender, TreeNodeMouseClickEventArgs e)

   at System.Windows.Forms.TreeView.OnNodeMouseDoubleClick(TreeNodeMouseClickEventArgs e)

   at System.Windows.Forms.TreeView.WndProc(Message& m)

   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)

   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)

   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
---------------------------
OK   
---------------------------



(I guess using code type instead of reply is better for inserting errors into the message, because it doesn't mistake any part of it for text formating symbols such as [ B ].)