Friday, 29 December 2017

Issue Tracking

Reporting Bugs in NPC Engineer

I use Github for version tracking and issue tracking now, so please head over to NPC Engineer's repository there and hit the big green 'New Issue' button on the right. This will open up the issue reporting tab as shown below:

Use this same form for feature requests and enhancements.

Thank you

Maasq



Sunday, 24 December 2017

Almost there with a 1.0 release

I have been progressing slowly with the final couple of issues, and took the opportunity to add a couple of features. I thought I'd make a note of what they are just now as a means of motivating myself (and keeping track - it may be a couple of days before I get a chance to sit in front of a computer again).

Cancelling an import now returns you to the previous state as you would expect it to, rather than erasing information or overwriting it. It seems so simple, but this has been plaguing me since I put a GUI on my script. I finally knuckled down and sorted it. Cigars and medals all round!

A new feature is the ability to add terrain types and mythologies to your NPCs, allowing other ways for them to be indexed in Fantasy Grounds. For example, you could tag your NPC as being from the Norse mythology and be found in urban settings. Although this may not be universally useful, it was a requested feature and I liked the cut of its jib.

Another new feature is still being worked on - NPC Engineer will check the latest release at a set frequency (once a fortnight perhaps) and alert you if a newer version exists.

Anyway, if you are reading this on the day it is written - have a wonderful Christmas whether you celebrate it or not. I wish you the true gifts of the season: peace, joy and hope.

Maasq

Sunday, 17 December 2017

Writer's block.

I'm staring at the screen with no motivation to do anything. Why is this happening? I've had a week away from coding because life is busy, and I have 3 distinct things to work on to 'finish' NPC Engineer, but I can't get the motivation to start on any of them.

This sort of thing used to happen to me mid-project way back when I used to program. Basically I had the ideas, did all the easy stuff and maybe figured out some of the big meaty bits of the project, but there would be a yawning chasm before I got to the finishing stage. The yawning chasm was too bif, and so many projects got to a half-arsed state and then abandoned.

NPC Engineer has been different... I have kept focused on it through doing it in chunks. I am a finisher-completer (I have been told in work); this part should be the easy part for me. I've done all the difficult stuff. AAaaarrrgh!

Is it just the unrelenting nature of preparing for Xmas as a single parent? Is it the fact I had to pay £120 for a new car battery last night 9 days before Xmas? Stress can be a fun-killer. Or am I just a lazy git? :)

Whatever it is, I need to get my act together and finish this program. Send me some motivation, in the comments or on Discord!

Cheers
Maasq




Wednesday, 13 December 2017

Cleaning up

My last post said I was going to clean up some of the little issues that made NPC Engineer lack polish. I've started, but I also realise why these issues exist. I am a lazy b They can be tricky to fix, and they are no fun whatsoever to code.

The stray text issue requires the full backup state, and that's a big task with all the myriad variables that I use. I'm really suffering from not knowing enough to go object programming from the start. The size of the task sucked all the colour from my world and the joy from my heart and sent me scuttling towards the Xbox instead. I'll get on to it soon (TM).

I fixed the issue(s) with file select boxes, though - if you cancel out of one, NPCE will no longer continue to do whatever it likes. It will do exactly as you asked - it will cancel the operation.

Grand. And in the process of this update I wrote a regexreplace command without looking at any sort of documentation; when it worked first time I nearly fell off the seat. It's only now that I feel I can call myself a programmer! It is strange the milestones we set ourselves unconsciously...

Maasq



Sunday, 10 December 2017

Polishing

Well, with the program approaching official release status, I'd best get to work on dealing with all the niggly wee issues that plague any project like this. For NPC Engineer, the issues are all around what happens when you don't do what you are meant to.

If you open the import box and add some text, then cancel, you can still find that text floating about in some variables. It is easy enough to work around - just hit 'new NPC' before doing any work - but it is time to sort that. This requires making a full backup state, and this is where I weep at not building the whole program on an object model. Another reason for a version 2.0 one day....

If you cancel out of any file box, it still tries to import or save. This is either a minor annoyance or a royal pain in the arse depending on how often you do it, or how much rogue unnamed files on your hard drive annoy you.

I still need to add spells to the 'description' properly. They were there on the old description box, but that code is incompatible with the new Rich Text box, so I need to do something with it.

So there's my hit list for the run-up to Xmas. Ho ho ho.

I really want to start something else now. I'm getting itchy fingers :)

Maasq



Thursday, 7 December 2017

NPC Text format

I have been asked a few times for 'my' format for an NPC. My answer is always that my format is not mine at all - it is the format employed by the Monster Manual and other official documents. It is also the format that Par5e followed. I took the liberty of creating an NPC just to show the format required; note that nothing about this is meant to be game ready, sensible, or even part of 5E. I just typed some whimsical stuff for spell names, for instance.

I have highlighted required wording in red in the first version. Although I use the phrase 'required wording', be aware that some sections can be missed out entirely - this is just the required wording if you include it.

The second version has the sections that are optional highlighted in green.

Please note all punctuation carefully - an errant colon or stray comma can wreck a parse! Don't miss anything out, and don't add anything.

There are a lot of little twists beyond this. I will update this document regularly.

Maasq


Npcname
Medium undead (human), lawful neutral
Armor Class 12 (Natural armor)
Hit Points 26 (4d10 + 4)
Speed 30 ft., fly 35 ft. (hover)
STR DEX CON INT WIS CHA 14 (+2) 17 (+3) 9 (-1) 10 (+0) 10 (+0) 2 (-4)
Saving Throws Str +2, Dex +3
Skills Deception +4, Medicine +1
Damage Vulnerabilities fire; slashing
Damage Resistances cold, poison; piercing from nonmagical weapons
Damage Immunities thunder; bludgeoning from nonmagical weapons that aren't adamantine
Condition Immunities blinded, exhaustion, petrified
Senses darkvision 25 ft., passive Perception 10
Languages The languages it knew in life
Challenge 18 (20,000 XP)
False Appearance. While the npcname remains motionless, it is indistinguishable from a mundane, inanimate object.
Magic Resistance. The npcname has advantage on saving throws against spells and other magical effects.
Innate Spellcasting. The npcname's innate spellcasting ability is Dexterity (spell save DC 5, +2 to hit with spell attacks). It can innately cast the following spells, requiring no material components:
At will: Blast, Haste
4/day each: Grow Beard, Improved Fireball
Spellcasting. The npcname is a 4th-level spellcaster. Its spellcasting ability is Constitution (spell save DC 7, +3 to hit with spell attacks). The npcname has the following Paladin spells prepared:
Cantrips (At will): Hide, Seek, Find
1st level (3 slots): Sparks, Will, Fly
ACTIONS
Multiattack. The NPCname makes 2 attacks with its Cuinnsear.
Cuinnsear. Melee Weapon Attack: +0 to hit, reach 5 ft., one target. Hit: 2 (1d4 + 0) piercing damage. Or Ranged Weapon Attack: +0 to hit, range 20/60 ft., one target. Hit: 2 (1d4 + 0) piercing damage.


Npcname
Medium undead (human), lawful neutral
Armor Class 12 (Natural armor)
Hit Points 26 (4d10 + 4)
Speed 30 ft., fly 35 ft. (hover)
STR DEX CON INT WIS CHA 14 (+2) 17 (+3) 9 (-1) 10 (+0) 10 (+0) 2 (-4)
Saving Throws Str +2, Dex +3
Skills Deception +4, Medicine +1
Damage Vulnerabilities fire; slashing
Damage Resistances cold, poison; piercing from nonmagical weapons
Damage Immunities thunder; bludgeoning from nonmagical weapons that aren't adamantine
Condition Immunities blinded, exhaustion, petrified
Senses darkvision 25 ft., passive Perception 10
Languages The languages it knew in life
Challenge 18 (20,000 XP)
False Appearance. While the npcname remains motionless, it is indistinguishable from a mundane, inanimate object.
Magic Resistance. The npcname has advantage on saving throws against spells and other magical effects.
Innate Spellcasting. The npcname's innate spellcasting ability is Dexterity (spell save DC 5, +2 to hit with spell attacks). It can innately cast the following spells, requiring no material components:
At will: Blast, Haste
4/day each: Grow Beard, Improved Fireball
Spellcasting. The npcname is a 4th-level spellcaster. Its spellcasting ability is Constitution (spell save DC 7, +3 to hit with spell attacks). The npcname has the following Paladin spells prepared:
Cantrips (At will): Hide, Seek, Find
1st level (3 slots): Sparks, Will, Fly
ACTIONS
Multiattack. The NPCname makes 2 attacks with its Cuinnsear.
Cuinnsear. Melee Weapon Attack: +0 to hit, reach 5 ft., one target. Hit: 2 (1d4 + 0) piercing damage. Or Ranged Weapon Attack: +0 to hit, range 20/60 ft., one target. Hit: 2 (1d4 + 0) piercing damage.


Wednesday, 6 December 2017

Satisfaction!

Ahhh the joy of getting to the point where you want to be with a project!

Version 0.9.9 is out and it is my favourite update yet. The graphical output pane makes the program so much more visual, and a joy to use. Practically it is better too - you can see errors more clearly this way.

This was always my vision for the program, and it feels good getting to this point. I'm off for a cigar (metaphorically speaking) and a rest (physically).

This is not the end though - there are other additions I plan on. Outputting this new graphical wondrousness to Word or Google Docs, templates, terrain type listings for NPCs... yes, there is more to come for sure.

Enjoy it for now, and please let me know if there are bugs.

Maasq



Monday, 4 December 2017

Getting close to finishing it. For now.

I've been putting off the 'last piece of the jigsaw' for ages.

Right from the start of this project, I have dreamt of the right hand pane being a proper statblock that updates with live information as you import, load or edit it. There have been lots of roadblocks - my ability, AutoHotKey limitations, the arcane nature of any workarounds to these limitations (and, again, my ability or lack thereof).

Slowly, though, ideas for how to complete this have taken root. I started it last night and have I already mentioned anywhere on this blog about how much I detest RTF? The inventors deserve a right good slap, let me tell you. Anyway, eventually I figured out the code for building tables. Here's a sample just for a giggle:

"\trowd\trgaph100\clcbpat3\clbrdrt\brdrw1\brdrcf3\clbrdrb\brdrw1\brdrcf3\clbrdrl\brdrw1\brdrcf6\clbrdrr\brdrw1\brdrcf6\cellx6200\f1\cf2\fs42\b " NPCName " \b0 \line"


And that's just for ONE FRIGGING CELL! All that just to display the NPC's name. (And this doesn't include the colour table and the font table.... I kid you not, this stuff is mental).

It is taking shape, though. Here's a screenshot of where I am at right now:


It may be that it is all worth it after all. For me it is a game-changer; now my program is attractive enough that I want to use it, and hopefully it will have the same effect on other people.

What do you think? Let me know in the comments below.

Maasq



Saturday, 2 December 2017

Discord

I've set up a Discord server for NPC Engineer - and it wasn't hard! I'm really pleased with it though; it makes things look 'official', and more importantly, I think it is my preferred way of dealing with support issues. It allows for instant typed or verbal conversations, for screen-sharing to see exactly what causes an issue, and I can have channels dedicated to pasted NPCs or bugs.

If any of you are using NPC Engineer and Discord, I'd urge you to come along and join me on the NPC Engineer channel: https://discord.gg/uH8NJ4x .

Now if I can just find a way of embedding the Discord invite box somewhere on the site...

Maasq



Friday, 1 December 2017

Running out of version numbers :)

I do update a lot, don't I?

This is because I am a committed developer, devoted to users of my software. And not at all because I am a slapdash, work-shy bastard that releases dodgy code that's untested. We have this cleared up? Good....

So I think I will keep major version numbers (0, 1, 2.....) for generations, just like most developers. Rewrites, and so on. I am approaching version 1.0, I guess. I'll use decimals for structural changes or major updates (0.8, 0.9......). Revision numbers will be reserved for the addition of features or functionality (1.1.3, 1.1.4......) and minor edits or bug fixes will have a letter, as I am doing now.

All these updates happen for a reason though - there are now a number of people using the program and finding out its flaws, inconsistencies and so on.

If there are issues of any type, please keep letting me know. Email, on this website, on the FG forum, or on Discord. Just let me know what the issue is, and copy-paste the text that caused it.

Thanks for all the help in testing!

Maasq