Wednesday 29 November 2017

Demonstrations & video guides

I got roped into a group chat about NPC Engineer on Discord the other night. It was a pleasant surprise - there are quite a few people using it, it seems, and they were interested in seeing some of the intricacies demonstrated. Five minutes turned into half an hour, and it confirmed that a reference manual is not the only way to teach people about software. So as well as making me feel a little bit important (honesty, eh?) the chat turned me on to the idea of doing video guides for various elements of NPC Engineer.

This won't be a simple undertaking, as I've never done anything of this ilk. So more software to learn, some planning to be done, and some prepping to make sure I don't scare users away - shave, moisturise, learn how to smile without looking like a secure hospital patient, practise not picking my nose/breaking wind/scratching when the camera is on. It's going to be brutal, isn't it? :)

I'll set some time aside during the Xmas holidays to do some video guides, then. Setting up a project, preparing traits & weapons, importing from pdf/web sites, building an NPC from scratch, descriptions, parsing. Anything else? What should come first? Leave me some feedback in the comments below.

Maasq



Sunday 26 November 2017

Still learning

The further I get with this project, the more I learn. I know that's hardly deep educational insight, but I surprise myself with how motivated I have remained throughout this project. It has required some resilience at times, but it has all been worth it. This latest raft of new features and improvements really feels like some polish is being added to the program.

There are only two major features to be added to NPC Engineer now - templates and a more graphical output pane. I'd love to have something that resembles a 5E statblock; watch this space to see if I can make it work. AHK is not an eye-candy language, so it'll take some graft to get anywhere with this!

I think my hack for getting around multi-paragraph traits and actions will need further work too. It is going to get caught out, and there needs to be a way to fix this. More thinking to be done here.

I have been asked for a couple of additions to the GUI and I'm not sure about either of them. Again, more thought is needed. One of them might need me to move about 100 GUI elements, which is reason enough to refuse!

Last, but not least, I need to find a way to incorporate spell lists in the description now that the Rich Text box is there.

So although the finish line truly is in sight, there's enough to keep me going until Christmas and beyond. And then? And then Spells Engineer, I think. Small steps.

Maasq



Thursday 23 November 2017

My first donation!

Wayhay!

Someone gave me a donation via this page, and it feels great! What a lovely gesture, and it's a nice wee boost to my productivity too :)

Thank you!

Maasq



Sunday 19 November 2017

Hwnd, my friend now.

I just spent a whole day trying to do two things, and failing at one. Both seem spectacularly simple at first, but they aren't. Oh, they are not.

Firstly, I tried to program an 'auto complete' function for drop-down boxes, as those provided by AHK don't do it for some reason. Simple enough to work around, I thought - just store the list of entries, compare what you type with those entries, inject back into the control and everybody will be happy. But that isn't the way things work. Selecting something in any way obliterates what you have typed, so there's no option to type two or three letters. Grrrr...

I found some clever code that did pretty much as I wanted, but there was a catch - no obvious way to get the text out of the control (which made it bloody pointless, but I digress). So I could program a hotkey to grab the text when I selected it and then... HOLD ON! I just made this so much more complicated. It wasn't worth the effort.

About 4 hours after I started, I found out that typing a letter or two then hitting the down arrow auto-selected the first match in the list. I'd like to say "I could have wept", but by this time the whole shebang had eaten my soul and I was an empty, lifeless husk wishing it was acceptable to get hammered drunk on a Sunday afternoon and go and shout at random people in the street.

I had a spot of lunch instead. How grown up of me :)

Later in the day I was trying to get a ctrl-J hotkey working as I wanted - to select, manipulate and replace text in whichever control was active. I wasted a lot of time building this to operate on the control under the mouse pointer before realising that I was an idiot. Elegant solution, but the wrong solution. Eventually I got to grips with finding a control's Hwnd and using it, and the whole thing fell into place.

The moral to this story? I wish I'd taken up knitting or something.
Ach well, there's always tomorrow. I'll write more stuff than I did today...

Maasq



A difficult decision

Several areas in NPC Engineer could benefit from a dropdown menu of choices, in the same style as selecting weapon attacks. Unfortunately, in all of these places the creature's name/gender/uniqueness becomes an issue:

"Nimble escape: The goblin can take the Disengage or Hide action as a bonus action on each of its turns."

"The drow is a 10th-level spellcaster. Her spellcasting ability is....." 

Now that's ok in a programming sense - I have routines in place to deal with this in the spellcasting sections. However, for users to set up generic reusable actions/reactions/traits, they would have to input codes to replace names and pronouns:

"Nimble escape: <NAME> can take the Disengage or Hide action as a bonus action on each of <GU3> turns."

The name part will probably work ok, but the generic pronouns won't because there are 4 different ones depending on the situation (he/she/it, him/her/it, his/her/its, himself/herself/itself). Forcing someone to learn this is (a) open to all sorts of 'hilarious' screw-ups that will be blamed on the program and (b) enough to put people off. It negates the ease of use it is trying to inject.

A 3rd option is a far less attractive option, both for user and programmer. Whatever is typed is dumped into the action box as is, and the user then edits it. Again, this will look like a programming fault, when in fact I am trying to be helpful.

So what do we think, folks?


  • Option 1: Don't allow dropdown selections
  • Option 2: Allow dropdown selection, but generic text is added that will need to be edited
  • Option 3: Fully cusomisable, but users need to learn the difference between pronouns 1, 2, 3, & 4, and understand the codes used to achieve them?


Let me know in the comments, please.

Maasq

Friday 17 November 2017

Go on, subscribe!

Hit the 'subscribe' button at the side. I'm not going to spam you - I don't know how. You'll only get an email when I update something here, which is either a new release or a self-indulgent blog post.

Go on. :)

Maasq

Releasing code.

The joys of releasing your work to the public. The baby that you have hand-crafted, pouring over a hundred hours of your life and countless swear words into, exposed like an infant with a cut in a tiger pit. And like tigers, the public pounce mercilessly and tear their prey to shreds!

Actually, no they don’t. I might just be lucky in my target audience, but every comment that has come back to me has been respectful, encouraging and helpful. Everything so far has made me want to continue and to improve. It’s a weird feeling getting feedback - it is exhilarating finding ways to improve the program, but there’s a mix of teeth-grinding frustration and embarrassment when people point out bugs or easier ways to do something.


So this week I have been adding options, fixing bugs, improving user input areas and having a couple of further ideas for improvements based on all the feedback, and generally having a great old time doing so. As ever, there’s the horror of nothing working before you realise that you've just misspelled a variable name, but that just makes it feel even better when it runs perfectly. I offer up heartfelt thanks to everyone who has given suggestions for improvements over the past week (particularly Colin, who went above and beyond the call of duty).

I really don't like coding GUIs though. They're the worst. Apart from RTF, which I am sure is an anagram for 'complete and utter bastard' - it reared its head again with seemingly random language codes inserted to trip up some people (but not all). I wish I was good enough to code my own RTF control from scratch, but that's not happening in this lifetime.

Well, another release tonight. I wonder how many new bugs I've introduced :) As a programmer acquaintance said the other night when I proclaimed NPC Engineer complete....

"Finished. LOL!"

I was so naive back then, so fresh faced and innocent.

Maasq

Sunday 12 November 2017

You want PAID?!?!

In short; no.


However, a couple of people on the forums have said that they'd like to donate something for my hard work, and it seems rude to refuse such kind offers, doesn't it?

There is no charge of any kind for NPC Engineer, nor will there ever be. I wanted to give something back to the community at Fantasy Grounds, and if the truth be told the whole project was really an excuse to start programming again. It has been a great journey, one that has got my kids interested in both D&D and programming as well as given me a deeply fulfilling hobby. It is rewarding enough to get some positive feedback, and to know people are finding my work useful.

Mind you, Jack Daniels doesn't buy itself, so if you want to donate I'll not refuse. Pragmatic, that's me!

Maasq


NPC Engineer Documentation

The latest documentation for the NPC Engineer suite contains full information on how to use all aspects of the software, along with extensive screenshots. You can download it in pdf format below. Please refer to the manual in the first instance if you have any difficulty operating NPC Engineer.





Tuesday 7 November 2017

The blog begins...

Six months into a project that started as a quick script to help me parse some NPCs, it isn't so much the program that has development creep as my brain. So far in this journey I have had to learn a programming language, learn about objects, learn how little I understood of all of this at first, learn XML, learn Fantasy Grounds' language, and most recently struggle with RTF. RTF can GTF frankly... I have no idea how anyone came up with this as a good idea, or how their workmates at Microsoft never slapped them. No doubt I'll rant about RTF more as the project progresses.

Anyway, 6 months in I decide a website would be a great idea. Thankfully I manage to avoid the "it can't be that hard; let's try doing it myself" route and instead went for the Blogger platform I had already used and enjoyed. It'll be easy, I said to myself. You can use the design you have already for another blog, I said to myself. Yeah, right - that never works.

So now I have taken a break from programming to design a website to host my programming. I'm empire building. This would all feel like less of a timesink if I was going to make my first million out of it, but I keep pretending to myself that I'm learning valuable skills I may be able to leverage in the future. Then I go back to the programming Discord and see what guys half my age are doing whilst watching Anime and I realise that I'm not going to be a rich software engineer!

Still, people are using NPC Engineer and enjoying it. My main goal - something usable for myself - was met long ago, and in the process I found a hobby (or set of hobbies) that I absolutely love. I might even be inspiring my own children to attempt some coding - that's more valuable than financial riches (I keep telling myself).

RTF is still a pain in the arse, though.

Maasq


Wednesday 1 November 2017


Welcome to the NPC Engineer website, and thank you for your interest. This site will contain all the updates to the full (planned) suite of programs along with all documentation. There is also a development blog - more a space for swearing as I discover a comma that should have been a period has been wrecking my code for the best part of 6 hours (yes.... it did happen).
Please look around, download what you want to try, and leave me a comment if the urge takes you. A little bit of encouragement goes a long way!
NPC Engineer main screen
NPC Engineer Project Management

Links


Fantasy Grounds

Fantasy Grounds is a virtual tabletop application that contains a set of tools to assist players of tabletop role-playing games playing either in person or remotely. This website is not affiliated with Fantasy Grounds in any way, nor should anything on this website be taken as speaking for the Fantasy Grounds team.




AutoHotKey

AutoHotkey is a free, open-source scripting language for Windows. This is the language I created NPC Engineer in - it is easy to pick up and powerful. It goes way beyond the hotkey and automation scripts people associate with it.



Picture
FG College

Fantasy Grounds College (FGC) is a group of experienced and highly-motivated individuals who volunteer their time to teach others how to use Fantasy Grounds and how to play various rulesets. We strive to give our students the tools they need to become a better FG-user, player and DM/GM.