Aug 10, 2010

While we wait: What I have learned of the nwn2 toolset

The more I try to fix all the crap in the toolset or engine issues, the more I realize you will never fix it all, even if you waste that time. The thing about most of the bugs (primarily for my troubles and this example, initiating a conversation in a fail proof way) is that they are kind of low percentage random fails. You can't figure out why they fail so build these elaborate catches and exception scripts and then 3 people test it and it fails in two more ways.

For those who insist on using this broken product, of which there are several reasons to do so now that it has mature custom content, allow my last 3 months of hell to produce a lesson for the rest of you.

The secret cure: knowing that scripts and engine functions will work the majority of the time with random failures, place absolutely everything in question in a repetitious system. The one thing the engine has going for it is that everything has heartbeats. Using this to consistently try and re-try your intended action until it works, is the best fit way to seamless force something to work, even if a small delay gives a player pause, they will happily shrug it off and resume when it works six seconds later.

My Example:
Problem: Companion talks that occur on rest at the tavern

My approach: choose the conversation, assign it to the PC as talking to them self, and let the others join as their nodes come up

Issues:
-PC failing to talk because some action bumped it
-NPCs failing to say their line for whatever reason
-future conversations not making sense because prior ones failed at some point
-Companions /roster members going scripthidden permanently because the conversation failed and the call at the end to restore them can never fire

Fixes:

1 - The PC now, rather than being paralyzed, scripthidden etc etc in a vain attempt to get them to actually follow their action que and converse, simply is given a begin conversation repetitiously with no delay until the PC actually accepts it.

pseudo code:
do {BeginConversationWithSelf(PC) }
while (PCNotInConversation);

I noticed that this can call the script like 2000 times a second, but it works, and as soon as the PC actually accepts and is in the conversation, it stops, satisfied that whatever failed attempts may have occured, it has suceeded now.

I do not advance the conversation "counter" until in the final node of the talk, knowing that the conversation will have executed full at that point and the next rest-conversation is now allowed. This I had in long ago however, due to the random companion failures to speak that can be addressed by this method. I use a set int on the final node of the conversation, so its not directly in the script at all when it comes to advancing the rest talk counter.


2 - Fixing the "stuck invisible" roster members

While resting or leaving the area restored "in-party" members, if a conversation broke and everyone was invisible, the roster members (out of party companions) were gone forever.

I tried and wasted about 2 weeks trying to solve this, setting them to un-invis right before a rest talk (in case they were invised by the previous one) but this was still obviously a bug, I also set it to uninvis all members at the end of the conversation, as well as entering the tavern. While re-entering would re show the roster, in the end it was a bunch of work for what was still, a bug.

Final solution: in the taverns heartbeat script, if the PC is not in a conversation, then neither can his roster members be, there fore, set all roster members to VISIBLE if the PC is in the area and not conversing:

Pseduo-code for the tavern heartbeat script:

if (PCIsInTavern)
{ If (IsPCConversing (FALSE) ) SetAllRosterMembersVisible() };

This second method rather than using an infinite while loop simply fires every 6 seconds on the heart beat. By the time the player even notices they are gone they are already reappearing.

So really there is two options for a fail safe, either an infinite loop for instant trys and re-tries or the heartbeat wait, which is 6 seconds. Note that certain commands could cause an overflow error if using the infinite loop so I recommend the heartbeat whenever possible. The overflow error doesnt appear to be fatal though, it just means the script will fail, but if you are retrying it anyway it should resume the next try once the overflow is resolved.

I got this idea from looking at Obsidian's own way of making a conversation mandatory, via the CreateIPSpeaker() function. It simply spawns an IP speaker and keeps trying it every heart beat.

No weeks of frustration, no blocks of code for every possible failure. Just a clean, single line, that keeps knocking the door till it opens. This is ultimately the best and most efficient way to deal with something you know will randomly fail, and there is nothing you can do about it.

Aug 1, 2010

Current Status

I had to rip through my game again discovering a crap pile of problems in 1 run. The 2nd run the storm kind of faded and it was just 2 things. One of which is a problem with the game itself and nothing I can fix.

So my game is zipped up, complete and playable at any point. Im trying to get people to actually do that for me while I get a couple more vocals into it.

That's where it's at.

Jul 21, 2010

Forum death

All forums nwn2 and nwn1 say "this forum is now closed"
and show a post by chris priestly at 12:57 or 12:58.

I can get to the main index but not the individual forums so I assume this is some kind of attack?

Wouldn't that be my nightmare wasting 2 years on my campaign and not even getting it out there.

Jul 17, 2010

Idle waiting: Not quite

It took about two weeks but I finally got a formal tester going and had to fix some oversights before it was worthy.

While it is being played I am doing the proverbial twice over, where you go back and touch up very old decisions with a more modern mind and skillset. Sure I've done some polish but I am also thinking about what looks more appropriate themeatically.

http://img97.imageshack.us/i/fantasy1t.jpg/

http://img202.imageshack.us/i/fantasy2x.jpg/

The townspeople all wear summer clothes so I thought the companions, at least in their unarmed outfits should as well. It was a drastic change for the dark haired companion, who's personality is pretty formal and "non-romantic" if that's the right word. But then I thought hey she could have a xena type of outlook, where she dresses a little more feminine but doesn't draw attention to it. What do you think?

Using the ever summer outfits I was also able to do a scene where one npc is taking a bath that is pretty heavy on cinematics. It's a PG game at worst, but I think showing some humanity gives it good depth.

Once you get some decent armor everyone is fully covered anyway but the companion portrait remains in the "xena outfit" for the tall female companion so it adds to the high fantasy theme I want.

Note* Fantasy yes, stupid no; there is no bikini chainmail or bottomless plate armor where the crotch/buttock area is completely exposed and people are supposed to believe it's worth 5 or more to Armor clas :/

Jun 23, 2010

Its done... I think.

An unusual set back. I finished the campaign as stated and have just been ssmoothing edges and trying to add voicings, and I am unable to get anyone to test it. Literally have heard no interest in it. And its a play test too, not a beta :(

Let this be a warning to those of you who are still months or years away from release.

May 14, 2010

Is It Done Yet? or I Hate Cliff-Hangers

I just finished the "epilogue" of chapter 3 aka the end of the game. I haven't given it an "EPILOGUE" banner screen like I did with the prologue because the tale isn't finished. But the Campaign is.

At long last I can go through it in a relaxed "brush up" pace, where I just make little improvements here and there and add nodes so your companions are less quiet. I need to send this off to my testing personnel, I'll send it as just chapter 3 so they can focus on what might actually cause problems and not what they've already seen.

I've noticed a lot of people post about hating cliff hangers or unconcluded campaigns where the author never came back to finish them. I may become one of those thanks to this ending. I'm really not sure however I do know one thing, the toolset I can marginally live with, but playing nwn2 has become impossible. I've watched the game go from a humble, smooth running original, to a bugs piled upon bugs pile of unplayable garbage two expansions in. There is no reason to believe that will ever change so like I said, a good chance I will become one of those cliff hanger authors that everyone hates. But the ending seems to fit so good :)

I would not mind getting some commentary on my cliffhanger situation. Note however, that even if I eliminated the cliff hanger it would not end the tale, as the whole concept of islander involves "growing" into an adventurer and then heading to the mainland to solve problems there, with the game ending with the voyage to the mainland. But the cliffhanger will certainly leave a nagging mystery for anyone who has been paying attention to the plot the way through.

May 4, 2010

Beyond the End of the Road

I've wasted about a week trying to get conversations to begin without possibility of interruption, still not entirely sure that's even possible.

The game ending is now finished... you can fight your way right into the epilogue, which will be fairly extravagant in my campaign, but nothing too time consuming.

I miss the days when blogspot allowed me to use links or pictures.


pics

Apr 23, 2010

new levels of customization

Man I should have changed the UI long ago. Would have prevented me having to fit every speech into ridiculously small 3 lines or less chunks. Which would mean a lot more fluid typing and less work in the conversation editor.

At first I tried the Overland map UI as others recommended and fooled with the width to make it bigger. But even at its default size, its too big for those of you using the old 5:4 or 4:3 monitors. I want the player to at least be able to see their avatar, plus a small amount of space, even on narrow screen monitors which most of you seem to still have.

I then realized that I didn't need all that width if I just add more height, the text can wrap. I have a lot of space now, but by changing the graphic I have a smaller footprint (only 440 wide). Obviously microsoft paint is all I had, but for now its a template. But with my plainer template, I was able to go wider and longer in all boxes without it looking bad / overlapping the frame edges. So it's smaller, but bigger :)

These screens are all in 1280x720 format, as close to the 1280x1024 format everyone seems to use, as my laptop would get. It's the width that is the concern, so its completely comparable to ensure the UI is not oversized.

Even those borderline specs where people play at 1024x768 should be able to see their avatar nicely.

Since as we've discovered in my last post that blogspot no longer accepts my imageshack pictures (or any perhaps) here are links, I guess:

OLD UI (overland default)

http://img265.imageshack.us/i/oldui.jpg/
New
http://img218.imageshack.us/i/newui2.jpg/
http://img227.imageshack.us/i/newui.jpg/

heres a bit of a view of the scene from the prior post below. Its the gold titan, the final wave before all hell breaks loose and you die. Im saving the actual visuals (such as a giant eruption of green ectoplasm) for testers and players.

http://img408.imageshack.us/i/spires2.jpg/
http://img231.imageshack.us/i/spires1.jpg/

EDIT: And apparently I can't even use links, so if someone knows why the hell they all turned to blank whitespace after I post I'm all ears. All HTML I enter doesnt display and the image upload doesnt place it inside once i click done.

In the mean time I hope you don't minde triple clicking to copy these for a peek.

Apr 18, 2010

All the Colours of the Rainbow (at the end)

So as I said, I only had the two final combats to do. I decided, as it seems I always do, to do things out of order. The final combat... well it's more of a combat marathon. It could probably be it's own chapter (not quite ) time wise.

I spent the whole weekend on it and it really only functions in crude form. It works, and the unexpected VFX creations are there, but I have to give it a little more script work and polish so it plays better.

Picture if you will:

A giant wizard spires at the center of a toxic forest full of resident gaths, and evil humans and ogres arriving regularly through said spires.

On your discovery of the spires, you set up a force, as your guardian arrives with the town guard to attempt to somehow disable the spires, and until then, hold back the waves.

Before you can even begin to examine them, they snap to life, bolts of electricity crackle and flash between them and focus on the pad in the center. A massive magical hum shakes the area and an explosive portal blasts open and out marches a dozen troops. Defeat them quickly as they will be followed by more, with wizards, Dragon Age style ogres that take a full group to tackle, in 8 waves.

Then at last, your antagonist arrives. He protects himself with a chromatic field, and molds the earth using his theurgic powers. Unfortunately for you, your own mountains are rich in rare metals, and only server to make this man unbeatable. He sends metallic creations after you, that get large and more devastating with each wave.

Finally, he creates a giant titan of gold that all but devastates you, leaving most of your party dying on the ground.

Your guardian declares this antagonist cannot be stopped. But you managed to defeat his titan and rush to him, still held back by his chromatic shield.

"That was one of my pets", he states flatly. "Already your party is dying. And I have many more", and with that he summons 2 golden titans equal to the first that was all but unstoppable.

As timing has it, the portal, which had been relatively quiet, activates again, and more troops arrive...


And this is where the actual true final battle starts... :)

This is how it will (does) work and now I just have to put in the pre-amble chatter as the party sets up for the spire activation, rathern than how it is now where u just step on a trigger to make the next wave come.

Whatever shortcomings my campaign has, hopefully the ending will overcome them. I think it's a good formula really, to put your best work (where you go above your normal tolerance for polish) at the front and end.

The strong start will get people to at least play the campaign, and the big finish will be the freshest thing in their mind as they leave the experience behind. Throw a couple neat things at chapter ends, and you've got a decent reward system, where playing the game leads to great cut scenes and revelations.