The SnippetsPlugin lets you paste snippets of C# code (or VB code) into a window and execute it in the NWN2 toolset. It also allows you to load/save snippets to a library, so you can build up a small library of toolset functions. You can also test little bits of code without having to restart the toolset.
When you press "Execute", the SnippetsPlugin will create a tiny wrapper around your snippet, complies it, and executes it. The executed code includes ALL Snippets in the "include" library plus the text in the snippet window. (the include library would be all files in the Snippets directory that begin with "include__")
It comes with one example snippet:
Renumber Area Tags - it assigns unique, sequential tags to all areas in the module.
(this makes it possible to easily enumerate through your areas in NWscript & makes locations stored as text in a database unique.)
I just reread this, potentially extremely useful especially for plugin development -- do I have access to all the same libraries, etc, as I would in a normal nwn2-plugin project?
I'll check it out and vote after... _________________________ The Grinning Fool The World of Khalidine, a unique RP PW.
Adding VB support was pretty easy. But may have messed something up or left something out (never coded in vb before). "Hello World" works, but that is all I really knew how to test. I didn't test any NWN2 functions or start a VB library.
For both languages, I "used" a few common NWN2 namespaces (Data, TypedCollections, & Blueprints) If there are a few more that people want in the default wrapper, let me know and I can add them to the next version.
C# is a .net language. It does however look like there is a "VBCodeProvider" in c#, so I should be able to evaluate vb snippets as well. I will have to experiment a little. (and then filter by filename extension)
My other plan is to add the ability to download snippets directly from somethingn like the nww2forge site.
I Love this ideal. Sadly I code in vb and .net not c# so it would be no use to me for that point without taking the time to learn to code in c# (im doing it but slowly).. Would it be possible to set this to run .net or even remake it to .net?
You must be Logged In to post comments in this section.
10 - A Masterpiece, Genuinely Groundbreaking 9 - Outstanding, a Must Have 8 - Excellent, Recommended to Anyone 7 - Very Good, Deserves a Look 6 - Good, Qualified Recommendation 5 - Fair, Solid yet Unremarkable 4 - Some Merit, Requires Improvements 3 - Poor Execution, Potential Unrealized 2 - Very Little Appeal 1 - Not Recommended to Anyone