Sunday, December 30, 2012

December Update

At the beginning of the year I'd hoped to be able to release in December, but the new main plot I added, and the loss and having to go back to very old versions of a few key areas, have left me behind schedule by a month of two I think (I'm bad at estimating these things).

December has been almost all testing. I've gone from testing in my test module to testing in the actual game. My test module is set up to test various systems like usable lights, the main quest, and long sidequest chains (the short sidequests like fetch quests are generally quick to test in the real module). In November I finished a run through of the main quest in the test module and moved on to testing in the real module.

This month I was able to run through the main quest in the actual module, get a long since broken sidequest chain fixed, and make my first pass through things being nitpicky and seeing where I want to adjust things like adding usable lights in more areas for "feel".

In the real module I make check things like camera angles, walkmesh, making sure usable items are actually usable in addition to continuing to test quests. There's always tons of little adjustments I make to the game world when I'm at this stage, adjusting conversation wording, making small adjustments to the look of areas.

I'm still working on getting sound levels right (all environmental sound is custom). Putting in commoners and merchants using my commoner ai will be the last thing.

First two screenshots are ingame via the freecam from the debug console. Performance is fine on my pc, I'll be asking for feedback on performance from testers.

The third probably makes builders cringe as to what required that mess of waypoints. Those are actually for my commoner ai, and are placed via prefab groupings of waypoints. They're not there because individual scripts need them, the commoner ai deals with them automatically.


Saturday, November 17, 2012

Fixing another SLS bug: for usable placeables initially in on state.

In the SLS link there is a bug with usable placeables such as campfires that are designed to be turned on and off, when they are on to start with (startstate = on) in the variables of the placeable.

If they are on to start with, the first time you use an on placeable, it remains on. Subsequent times the placeable turns off/on correctly, but any vfx remains whether they are on or off (it actually gets recreated, effectively remaining "on").

In the function SLS2Initialize in ginc_sls2, the last section of the function looks like the following.

} else {
            if (sStartState=="off") {
                SLS2SetLightState(oFitting,SLS2_LIGHTSTATE_PERMAOFF);
                SetLocalInt(oFitting,"sls2_state",SLS2_LIGHTSTATE_PERMAOFF);
            } else {
                SetLocalInt(oFitting,"sls2_state",SLS2_LIGHTSTATE_PERMAON);
            }
        }
        SetLocalInt(oFitting,"sls2_init",1);
        // set light to relavant starting state
        SLS2SetLightState(oFitting,SLS2CalcLightState(oFitting));
    }
}

---------------------------------------------------------------------------------------
the line: SetLocalInt(oFitting,"sls2_state",SLS2_LIGHTSTATE_PERMAON);
should be SetLocalInt(oFitting,"sls2_state",SLS2_LIGHTSTATE_ON);

and the placeable will behave correctly, with initial use of the placeable correctly turning it off, and any associated vfx correctly appearing/disappearing based on state.

This is in addition to the nwn2 light tag bug (saving and reloading the game causes lights to lose their tags, breaking SLS.), which can be resolved for SLS via the following: (link)

in ginc_sls2, line 352 is:
string sLightTag = GetLocalString(oFitting,"lightTag");

comment that out and replace it with
            //work around tag bug. kamal
            object oLight = GetNearestObject(OBJECT_TYPE_LIGHT, oFitting, 1);
            string sLightTag = GetLocalString(oFitting,"lightTag");
            SetTag(oLight, sLightTag);
--------------------------------------------------------------------------------------------
One last quirk: the vfxBlueprint variable on placeables that controls the vfx to be used, refers to the resref, not the tag. It wasn't obvious to me (going from my memory). SLS2 vfx do not have the same string for a tag and resref, while stock vfx do.

Friday, October 19, 2012

Jumping implemented in NWN2.

Nexus link
Vault link



Rewrite of the Markshire Climbing system (http://nwvault.ign.com/View.php?view=nwn2scripts.detail&id=103) into a jumping system. There's not a whole lot of Markshire code left.

Included demo area includes jumping to a waypoint destination, and jumping dynamically around at area based on player facing. Dynamic jumping is blocked by sufficient obstruction, or lack of a line of sight to the destination. Falling damage is calculated how far you fall on the z axis (in other words, it reads from the actual map and determines the distance of the fall. Jumping/falling is handled per d20 srd rules for jumping and falling.

The dynamic jumping would be suitable for implementation as a feat, presumably with some sort of cooldown. You'd probably want to make the player select a destination, and could use some of the DC code from the waypoint jump function to determine the DC.

Technically, the pc doesn't actually jump and inhabit the space of the path. The code for dynamic jumping looks for obstructions in the determined path of the jump, and won't jump if there's too many invalid locations in between, or if the jumper's line of sight is blocked (there are included messages for each).


youtube video showing directional jumping:
http://www.youtube.com/watch?v=NAoknKO2CLU&feature=youtu.be

early video, shows targetted jump and illustrated the bug mentioned above
http://www.youtube.com/watch?v=6aRFou6HCyA&list=UUTB3It7cV5bt9luZ4hFSlCw&index=2&feature=plcp

Sunday, October 14, 2012

Good reason for an update :-)

Update:
As of today, the new main plot is tested through to completion in the test area. That makes a nice milestone towards completion. There's still a bunch of lines of conversation in the new plot that say "placeholder...", but the conditionals and scripts are in and apparently working.

Remaining:
Take care of some placeholder sidequests. They work, but aren't fully developed, or the areas for them are placeholders.
Put in sound in areas that don't currently have it.
Get consistency of activities through the campaign. For instance the use of my generic foraging/scavenging system is currently concentrated in a few areas. There are many other areas where I could realistically add potentially scavengable items.
Eliminate placeholder conversations, and get a consistent 'voice' for the Thieves Cant spoken in the campaign. There's a lot of Cant spoken in Crimmor, but since I'm learning it and writing over a period of time, I need to go over things and edit where needed so it has a consistent 'voice'
Miscellaneous scripting of npc activities to bring the city to life. My commoner ai goes a long way, but some npc's need specific scripting.
More pre-beta testing, testing, testing.

Sunday, October 7, 2012

Freesound project is released!


Nexus link

Approximately 2450 sounds from freesound.org, re-encoded and renamed by myself so they can be used in nwn2. I have also provided nwn2 sound blueprints for each sound. This is roughly 10x the number of sounds nwn2 includes via the toolset. This pack is complete with blueprints organized into categories based on default nwn2 sound organization. Sounds from freesound.org are licensed under one of four Creative Commons licenses, see the credits for specifics. The filenames had to be shortened for nwn2, so the initial number matches the number of the file on freesound.org (the numbers are unique).


Note that these sounds are generally recorded from real life, and are generally high quality (some of the "zombie groans" are groan worthy :-) )

Sounds have been grouped into 4 groups of approximately equal number of files. You probably want to download all four groups, and select the sounds that work for your module or campaign, removing the rest. The sounds should be copied to your module or campaign folder. The blueprints go in the same location, and will appear in the toolset under the freesound.org category.

Blueprint categories, all are under the Freesound.org category:
Background and Ambient: similar to the default Background category, plus sounds that make for good area wide ambient sound
Cave: sounds most likely to be found in caves, rubble and the like.
Chatter: Same as default, sound for groups of people, crowds etc
City & Town: same as default, most useful for placing in cities/towns, generally the sound of work being done
Creatures: same as default, creatures, animals, birds, vermin
Dungeon or Creepy Sound: sounds most likely to be used for dungeons or creepy effects.
Environmental: same as default, sounds of water, fire etc.
Human Vocalization: individuals speaking, coughing, etc.
Instruments and music: both melodies and single notes
Modern Day House: sounds from real life, lawnmowers, microwaves and such
Sci-Fi sounding SFX: hopefully self explanatory
Short SFX like clicks or beeps: brief sounds for use as button presses or the like.

I categorized the sounds by listening to them, so things are likely not perfectly categorized.

Credit to Tchos for working out how to batch convert sounds for use in nwn2. (http://social.bioware.com/forum/1/topic/163/index/12546943#14386608) 

"Okay, I did a few.  There are only a couple of steps, really.
  1. Get WinFF.

  2. Drag your sound files into it, and use the settings shown here (Bitrate: 96, Channels: 1).  Hit the "Convert" button.

  3. Get MP3toBMU.

  4. Navigate it to your mp3s and select them all.

  5. Make sure your screen looks like this screenshot ("rename .wav" selected), and then hit the button.

  6. Serve hot."

Saturday, September 29, 2012

Progress update: September

I spent a few days early in the month fixing Path of Evil bugs, so I'm not quite as far along in Crimmor as I could be. That's ok though.

The new main path is pretty well plotted out. The old TSR Lands of Intrigue soucebook, which covers Amn, Tethyr, and Erlkazar gave me plenty of background lore to set up a new main plot that grows out of recent Amnian history as put down in the book, with the characters and their motivations. It's a much better fit of a plot than the old main plot I think. It's not a "traditional" DnD adventure, there are no orcish hordes, drow, or dragons. It's just not the type of adventure most campaigns run.

Laying out the new main plot went fairly rapidly once I got the base idea. I've been filling in the details, I built a new area for the new plot, started expanding three previously finished existing areas for their new relevance to the plot, and took a last area from barebones to mostly done and changed it a bit for the new plot. The new plot didn't require a whole lot of new areas, I already had the city almost completely built so it was just figuring out where I wanted things to be. There are roughly 120 areas in the campaign, ranging from individual shops to city districts, about 110 of those areas are in the city itself. Probably 3/4ths of the areas are original, for the rest I found prefabs that fit, changing them somewhat where needed.

There was a tricky bit I wanted to show in a cutscene, so I built a script system to handle it. That took about a week. Like my commoner ai and other things, I will released it. It works in my test area, but the actual game is much more demanding of the script. I'm going to have to put a copy of the game area into a test module and work out the problems. Another bit of trick scripting to handle the use of a custom magic item in the plot went fairly quick.

My conversations for the new plot are still a lot of placeholders with single conversation options. I haven't worked out all the dialog and things a player might think of saying. Writing dialog for the new plot is also slow, my next post may cover exactly why, though an old post mentioned it.

My goals for October:

Add new main plot things to my test area so I can quickly test it. (edit: most new plot things now in test area)
Finish things for the main plot.
Get consistency of activities through the campaign. For instance the use of my generic foraging/scavenging system is currently concentrated in a few areas. There are many other areas where I could realistically add potentially scavengable items.

November goals:
Add filler npcs. Npc's not related to any quests, but with some conversations for color to fill in the game world. For instance, I already have a beekeeper that will tell you about apiary.
Get the custom sounds working ingame. I converted them to nwn2 format, they didn't work...
Testing, testing, testing.

December goals:
More conversation options for the pc. Once I have things working in testing, I want to add some different ways of saying the same things so players can have more of a personality choice.

Saturday, September 8, 2012

Path of Evil, Last (?) Patch

In celebration of reaching a much higher number of downloads than I ever anticipated on the Vault, I spent some time on the (hopefully) last patch, v1.20 is up on the Nexus (Link). It's FTP'ed to the Vault for posting as well. This fixes all known issues (except possibly the cleric companions domains) . Because I had to make campaign level changes, you can not patch to 1.20, you must begin a new game (technically, you could overwrite the 1.10 version and changes would apply to modules you hadn't entered yet).

Fixed:
  1. The Stronghold. Time now passes correctly etc. (repeatedly tested)
  2. Carcarin's sidequest (repeatedly tested).
  3. Neon walls in a specific area. (I had to create a new area and place each tile individually, then terra-coppa the non-tile info).
  4. Leadership feat now uses SoZ scripts, so definitely works.
  5. Food Supply quest.
  6. Improvements in the Muzad Trade Dispute quest.
  7. Various other small issues.
If you want to see exactly what was fixed, the amusing complete list of bugs back to pre-release is here.
screenshots: 1: Stronghold time advances.
2: Stronghold soldier: you have a choice of humans, gnolls, or skeletons.
3: The no longer neon walled area.


Wednesday, August 29, 2012

Progress Update: August

  • Made a couple of playthroughs and generally spent time fixing bugs I found. 
  • Added maps supporting a common request for something to see in a thief based module. A lot of trial, error, and learning more about the walkmesh. Exactly what's done I'll leave as a surprise for people if they play it, but you'll think it's a couple of neat tricks. Much of the month was spend here.
  • Reconsidered my main plot. This is the important one for this month, even though it's going to be developed over the next month or two. I haven't been happy with the plot for some time. I can and have played the main plot to one of the endings, I just don't like it. The plot as it existed was an outgrowth of the proof of concept version of Crimmor I had a few people play early last year. The proof of concept just had a generic "find the plot mcguffin" plot since I wasn't concerned with plot so much as showing a module that didn't  require combat could be workable. When I decided to go forward with Crimmor, I came up with ideas for what the plot mcguffin actually did and why people would want it and built a plot out of that. The problem was that I wrote myself into a corner as the story ramped towards it's conclusion, and the endgame was out of left field. It didn't "fit". Why were these npcs where they were and doing what they were? It was a big problem, I couldn't figure out a reason, and "they have a reason that's all you need to know" felt hollow.
Changes and editing will be needed for the main plot. I've been doing some research on lore via the old Lands of Intrigue sourcebook, and working on some other ideas I can use, so we'll see where those go. I have four pages of notes right now for my new main plot idea. The new main plot fits the world and characters I've set up much better, I don't have to wonder why they are doing what they are doing. I've worked out an outline of much of the new main plot in two days of brainstorming (yay for bursts of writing creativity!) Even as I make major changes to the main plot, many things that were formerly in the main plot will remain in as an extended sidequest that effectively runs the length of the module, or secondary main plot, depending on how you wish to look at it. The current sidequests are all in place, even if not all are finished and tested. The new main plot looks to be able to better integrate some of these sidequests into it, making the sidequests more relevant to the main plotline.

I have a three day weekend coming up, if I remain as productive on writing plot I hope to have the whole new main plotline laid out over the weekend in enough detail to start implementing in September.

Saturday, August 18, 2012

Making the walkmesh and ground be two different levels

Kivinen ( http://www.kivinen.iki.fi/nwn/ ) made a number of utilities for manipulating nwn/nwn2 files. SGK73 figured out how to use the trnpack and trnunpack utilities to have an area with a walkmesh different than the visible ground, which he used to create snowdrifts for a player to walk through. There's a screen from SGK73's area to the right. The original area that came from is here:  http://nwvault.ign.com/View.php?view=NWN2PrefabAreas.Detail&id=253

SGK73 explained how he did on that page, but it wasn't clear for me. I've put his original comments in italics, and mine in regular. I rewrote parts 8 through the end for more "I need to be told exactly", which I personally needed :-)


First you need to work in a directory for this to work, you should be anhyway because it's alot more stable saving than a mod file and alot faster.

1:make base terrain, gound level without snow.

2:plot the walkable tiles

3:place helper objects the "Sunken City {Ruins 01 (X1) TINT}" scaled to 0.2264802; 0.2264802; 0.2264802 is a good choice since the bevel on it coincides with an average humans hip and the top of a minimal halflings head. Place these, lot of them, all over the walkable area and some on paths leading out of the area. Position lock all of them.

SGK is doing this to get a good snow height, if you are doing other things you may not need to do this.

4:bake this area and duplicate it, do not delete it as you will need it later when you need to modify the walkmesh.

5:in the duplicated area use Raise, Lower and Smooth to create snowdrifts and snowlayer. A size 1 brush with a large falloff of about 8-15 or so depending on the area being raised, with about 5 to 15% pressure.
Basically, make your intended visible ground.

6:save and close the toolset, this was neccesary atleast for me since
the files was locked by the toolset it seems, atleast it crashed:).

7:***BACKUP YOUR MODULE***


8: In windows explorer, make a tmp folder in /modules or on the desktop or wherever, copy
the [area_of_walkmesh_to_use].trx to the tmp dir

9. If you haven't already download trnpack.exe and trnunpack.exe from http://www.kivinen.iki.fi/nwn/downloads.html . Save them into this tmp folder.

10: Open up a command prompt, and from the command prompt navigate to where your tmp folder is, and unpack your trx with the command: trnunpack [area_of_walkmesh_to_use].trx

11: In windows explorer, in this tmp folder there now should be a file called [number].aswm, copy this file somewhere safe as it is the walkmesh you will insert into the other area, delete the other files including the .trx you copied, make sure that you copied it and not moved it. (it didn't seem to matter if you copy or move for me)

12: In windows explorer, copy the [area_of_visible_ground_to_use].trx to the tmp dir and unpack it with trnunpack (same command), In windows explorer, delete the [number].aswm copy the other first .aswm file that you saved elsewhere, to this dir.

13: In windows explorer, make a folder in this tmp folder, call it area1. Move all the non trx files from your tmp folder into this area1 folder.

14: From the command prompt use trnpack with the -d and -o switches to pack all the files together in a new .trx. The command is: trnpack -d area1 -o [area_of_visible_ground_to_use].trx . The -d area1 tells the program what folder to look in, the -o (the letter o) part tells the program what to name the trx file it creates. The file will be created in the same folder as the trnpack program (in this example, the tmp folder).

15: Copy the resulting .trx file from the tmp folder to the original module folder, and overwrite the original trx.

16: Run the module. (you can safely load the module in the toolset and run it via the toolset).

17: Say "Thank you Kivinen and SGK73!" This step is optional, but highly encouraged :-)

Sunday, July 29, 2012

Progress Update: July



To do list from June of non quest/conversation stuff:
Finish sound and make sure it works ingame.
Get guards to react properly to a door that's open when it shouldn't be.
Set store hours and get that working.
Get conversational spell use working.
Add ambiance npc's in city exteriors and stores.
Get random results from pickpocketing working.

July:
Sounds all placed in game. Working in toolset, mostly not working  in game. Going to have to do some re-encoding.
Store hours: Ingame.
Exterior doors to stores and other building with hours close and lock at their closing time, unlock at open.
Guards reacting to doors: In, tested in test area. Demo video. Guards also are aware of store hours, so an open door when the store is open doesn't cause any notice, but an open door when the store is closed does.
Conversational spell use: Ingame.
Ambiance npc's : Commoner AI completed and released (http://neverwinter.nexusmods.com/mods/195/)
Random results from pickpocket: Sadly, looks to be hardcoded.

It looks like I was incredibly super productive. I have been quite productive, but all those things are things I've been working on for some time and I just percolated to completion this month.

Sounds I'd been working on for a couple months, researching and encoding, creating blueprints etc. Guards and doors was a week tweaking existing code I had made for guards and lights. Commoner ai work started last year, and had a demo release a few months ago. I spent a week this month ironing out bugs in buggy activities, improving performance, and integrating vfx for holdable items like books (since there are no equippable books). Conversational spell use it turned out I had working already, it simply wound up needing polishing of the code for animations.

Pictures:
First pic: I took a break from coding and put in some more verticality. A common request from people for Crimmor is roof top cat burgling. So this work will help support that, assuming I can get the walkmeshes working. The work also gives a more jumbled, people actually live here, look to the city, as opposed to a clean video game look.

Second pic: Commoner ai, these npc's were assigned to sit and read a book. The book is a vfx created by DannJ. With my commoner ai, you can animate an entire area of npcs, no matter how many, including different activities at different times of the day, and including making them go home and sleep, in thirty minutes. Yes, really.

Third pic: poor half orc, he doesn't get the concept of shoveling. The half orc model does not wield the quarterstaff shovel properly during the shoveling animation. Maybe half orcs just beat elves with the shovel until the elves do the shoveling. For those concerned about the small races and the quarterstaff shovel, I take care of that via temporarily granting the monkeygrip feat, allowing the small races to equip.

Saturday, July 14, 2012

Working around hardcoding

Obsidian unfortunately left some things hardcoded that I'd like to access. Namely, pickpocket and the set/remove trap skills. These skills can be accessed via the context menu. Looking into the context menu, the options for the buttons include the ExecuteServerScript function. Does that mean it should be possible to run our own scripts there by replacing the standard call to UIRadialNode_OnInit_UseSkill(int,int) with UIObject_Misc_ExecuteServerScript("gui_mystuff")?

The UIRadialNode_OnInit_UseSkill ultimately activates a call to the UseSkill function, which is hardcoded and unavailable.If UseSkill could be recreated, we could simply route calls to it to our own version. Unfortunately, there's no where to get this. Even nwnx doesn't seem to have it. It would not be necessary to recode the entire function, even specific functions for the individual skills we'd call would be sufficient.

Saturday, June 30, 2012

Progress Update: June

I had to solve a problem with my loadscreens, they weren't displaying ingame. Instead I was getting the default "Neverwinter eye logo" loadscreen. Errors in my 2da. I also made loadscreens for some areas I didn't have screens for, and updated a few loadscreens where I'd made changes to the area. So loadscreens are working again.

I've added a lot of static cameras throughout the module. There's a good amount of interacting with placeables via conversation, and some regular conversations where the location of the npc is known. Static cameras let me have more "cinematic" camera angles, and will hopefully make conversations more dramatic and enjoyable. I'm fully aware some people are not going to like Crimmor because they prefer nwn1 style conversations, just like I expected some people not to like Path of Evil because you played an evil PC.

Filled in some placeholder conversations, and somewhat developed a placeholder quest I'd put in to address a hole in the plot.

I've made a number of playthroughs of Crimmor. Fixing things as I find them. So things are looking more polished there, and the number of bugs is less. Still plenty of bugs. :-)

Current making my first pass through areas placing sounds. It's a large and lengthy project, since I'm doing all custom sound. Freesound project . First I had to get all that sound in a format NWN2 could use, then get things categorized at least somewhat. Then, since the filenames are not very descriptive, there's a lot of listening to things before deciding what to place.

To do list of non quest/conversation stuff:

Finish sound and make sure it works ingame. [edit: sounds now placed]
Get guards to react properly to a door that's open when it shouldn't be.
Set store hours and get that working.
Get conversational spell use working. [edit: now working]
Add ambiance npc's in city exteriors and stores.
Get random results from pickpocketing working. [edit: doing this they way I want requires editing pickpocket, which seems to be hardcoded]

Sunday, June 24, 2012

Dragon Age Bundle

Amazon is currently selling Dragon Age Ultimate Edition for $16. They are also selling Dragon Age Ultimate Edition bundled with Dragon Age 2, for $10. This means Dragon Age 2 is apparently worth -$6.

Told to defend a dead end pc turns to face the approaching enemies, enemies instead spawn behind pc, in the dead end (behavior I actually witnessed in a youtube let's play video). -$6 sounds about right.

Monday, June 11, 2012

Freesound and Endless Space


Started work on doing sound for areas (eg there isn't any sound right now) with a lot of blueprint work on my sound project. If you need a custom sound effect, perhaps best place you can go is freesound.org. They have a huge collection. And best of all for the modder, it's all creative commons licensed.

A while back I'd downloaded a lot of sound from there, and spent time converting things to a NWN2 usable format. The blueprint work could have been done quickly by someone with some actual programming skills, but no one ever stepped forward for my request. I'd reached the point where I really needed to start adding sound, so I can get a feel for how things sound ingame during playthroughs, so I just started plowing ahead and making blueprints. Lots and lots of blueprints, roughly 2200. Anyway I'll be releasing all the custom sound work to the community for others to benefit from, just like I release all my loadscreens, areas etc. Total size of everything is a bit under a gig if you used everything. I don't see why anyone would need it all, but perhaps it will form a common sound hak like the common tile haks or common monster haks. I got the file size down to under a gig thanks to converting to mp3, then nwn2 usable wav. NWN2 gameworlds are going to be able to sound a whole lot better, and you won't have to listen to the same three bird sounds over and over again (I have multiple ten minute forest birds recordings in the pack...).

You can find the bioware social thread for it here http://social.bioware.com/forum/1/topic/163/index/12546943  with links to download.

I've also been playing a lot of Endless Space, a 4X style game (think Civilization) set in space. It was released for purchase as an alpha on Steam. Even as an alpha, it's in good shape I think. I bought it after it was recommended on the NWN2 irc channel. Good fun for fans of 4X games. Anyone interested can see more at their Steam Store site http://store.steampowered.com/app/208140/ or their website http://endless-space.amplitude-studios.com/ .

Saturday, May 5, 2012

Crimmor: Hidden Pocket Armor

Hidden Pocket armor allows you to hide weaponry (or potentially other items) on yourself in case you face a search by someone. If you remember my Hidden Weapons (http://kamalpoe.blogspot.com/2011/03/crimmor-hidden-weaponry.html), Hidden Weapon class weapons are accounted for (they hide themselves, and so do not count against the hiding capacity of the armors).

Picture one: Wearing Hidden Pocket leather armor, the guard doesn't see the short sword in my inventory. You can see in the message window the hiding capacity and capacity used of the hidden pocket items I am wearing. Hidden Pocket armor by itself can hide one small, and two tiny, weapons.


In picture 2, the fact I'm wearing hidden pocket armor doesn't help, because he can plainly see the weapon since it's in my hands
Picture 3, a dagger is hidden. You can see how the dagger falls into the Tiny category, as opposed to the small category the shortsword is in. Size categories are from http://nwn2.wikia.com/wiki/Weapon_size with a few adjustments (my Hidden Weaponry has hidden by default categories for some weapons, and I made slings tiny category because they can be folded up)
Picture 4, I've added Hidden Pocket boots to my Hidden Pocket armor, increasing my hiding capacity. Hidden Pocket armor has capacity 1 small, 2 tiny. Boots, Belt, and Bracers have capacity 1 tiny. This is defined in the script, so it could be changed.
Picture 5: Examine description of Hidden Pocket item, the armor in this case.
Picture 6: I'm wearing Hidden Pocket armor, but a longsword is too large to hide.

Monday, April 30, 2012

Map markers in Crimmor

Crimmor the city is laid out in a haphazard manner, much like an actual medieval city. There's no modern grid pattern, its mostly just a jumble of streets that go every which way and are rarely straight. I still get lost, and I built the place!

To ease things I've color coded the extensive set of map points visible on the minimap.

Red: marks safehouses, the guildhall, and the players house, these are friendly locations where resting is allowed (no resting on the streets or in some random merchants store!). Red also marks active quest locations, so your minimap will highlight where you need to go for quests. The red quest markers are only active while the quest for that location is open. For locations that have multiple notes, such as a store that becomes involved in a quest, the quest note takes precedence so there are not two notes at the same point. (I'm not recoloring a single note, I use multiple notes and display/hide as appropriate.

Green: these notes indicate a location name, Wight Alley, The Drae, Firesteep Square, Carn Market, etc. These are both for flavor as well as a potential marker to guide players on quests involving locating things ("He hangs out at Carn Market in Purse Ward").

Default color: generic points of interest such as stores.

Blue (may change, the shade I picked looks close to the green) : Dead drops, which function as quest givers. These are only located in the wards of the city you work as a fixer for.

Yellow (may change, looks close to default ingame): area transitions between the sections of the city.


Monday, April 9, 2012

A new feature for my commoner ai

As I was testing various activities for my commoner ai I realized that my "sleeping" commoners would get up and pick another activity at the time period change, meaning they wouldn't be asleep for a normal amount of time. I also realized there was no way for them to go home for the night (only sleep in the same area was allowed). So I've added a new activity and some new functionality that I'm currently working out bugs in. You can now give a "go home and sleep" activity and commoners will find and move to a random door in the area, play the "use" animation, and go script hidden for 9 hours (8+1 for breakfast). At their wake up time they unhide themselves and pick a new activity based on the time. Once that is working, I will add the code to force the activity for a sleep period to all the sleep activity functions, and add a sleep until morning and a sleep until evening function.

The go home and sleep functions will allow builders to have their streets empty out at night (or day if you want vampire commoners :) ). Since these are command to essentially "leave the area", I could see them being used to empty out a tavern at closing time or give a shop hours, with the timely player being able to see these transitions.

Another use case for the commoner ai would be for something like a tavern, have the patrons sit and eat during the day, and get up and dance or play instruments at night, automatically.

edit: it looks like I've solved my problem with npc's sometimes getting stuck at their old waypoint when they pick a new activity. Pesky bug solved! And now my npc's also are "sleeping" properly in their go home and sleep activity, so I can add the sleep period code to the other sleep activities.

Friday, April 6, 2012

What do you want in the commoner ai?

There are still some bugs, mostly in making sure the npcs to play their animation once they reach their waypoints and nailing down some time randomness. But at this point the ai's reached a state where I can start thinking about adding features people think need to be in an initial release. Some ideas I had:

Integration of Apep's dynamic commoners (Apep granting permission required): this allows commoners to automatically dress, get voicesets, names etc. I wouldn't expect permission problems from Apep. I view this as the "neat"-est thing that can be added.

Duplicate waypoint user detection: [edit: added this 7 April, and it worked on the first try! It also fixed the remaining animation bugs, npcs that elected the same wp would result in one getting bumped, and it would be too far from it's wp, so the animation would not play. Added feature and bugfix all in one!]
ensures an npc doesn't try to occupy the same waypoint that another one already is. Not so important for "cheering crowd", but the sitting and bed activities would benefit. Perhaps the most useful add, even if the benefit isn't highly visible except for specific actions.

Kemo sitting/bed support: for those halfling and dwarf commoners. Benefits the sitting/bed activities. I havnt looked at all at Kemo's system, this may turn out to not be doable. I think it should be doable, maybe not in a 1.0 release.

More detection of "appropriateness": npcs already equip their hands appropriately for activities. They could also dress appropriately, for instance making woodcutters wear leather armor.

Also in "appropriate"-ness: there are animations for female and male dance and seperate activity chances for each, but commoners don't currently only adopt the appropriate one (female npcs can currently choose the male dance animation and vice versa). Would people like commoners forced to adopt the "appropriate" animation for their gender? Would they want males being forced into the male dance animation even if the builder assigned 0% to male dance animation, or would re-selection of activity be preferable (that would mean a 50% chance of female dance would result in no males and 50% of females dancing) Or just leave it as is with no gender checks (females can play male dance animation and vice versa).

Holiday detection: allow a builder to use an area heartbeat to have a "holiday" setting, giving builders the ability to use a different set of ipoints for holiday action control (maybe the commoners all dance in the town square) This would be mostly on a builder to define when they wanted one, but a local int such as nIsHolidayToday could be set on an area to support that, and an alternate set of "holiday ipoints" could be included, with a small change to default scripting to look at that for that area variable and change the control ipoints appropriately.

Other, better ideas go below, or do you want to see a beta release first to play around with to see what you want?

Sunday, April 1, 2012

More on the commoner ai project

My wintertime funk has pretty much lifted, and so I'm spending much more time in the toolset. While I'm not working on Crimmor per se, I am working on functionality that I view as critical for it, my commoner ai system. It's at the stage of fixing bugs. Here's a link to my original blog post http://kamalpoe.blogspot.com/2011/07/commoner-ai-project.html

How to build with it:
There are premade ipoint placeables for each time period of the day, there are 6 periods, that can be set via script for whatever hours you want. These ipoints are placed in the area, and contain the local variables for the actions, the percentage chance an npc will adopt a given action. The builder sets the chance.

There are premade waypoints for each action. To be placed where the builder wants an action to take place. If you place multiple of the same type, the npc will randomly choose which one to go to.

A heartbeat script: any npc using this system needs to run this heartbeat, but does not need any other customization. No local variables need to be assigned (scripts auto set local variables), no creature tags required.

That's it.

How it works:
The npc heartbeat sets it's initial activity by determining the time, and checking against the ipoint for that time period, selecting an activity based on the percent chance as stored on the ipoint. It also determines a slight offset to the time period that shifts the time period for that npc, so not all npcs will change activity at the same time. The npc then selects a random waypoint tagged for the chosen activity.

The npc moves to the waypoint, and carries out the activity it chose until the heartbeat determines a new time period has been entered. It then selects a new activity based on the ipoint for the new time period and the process starts over.

Activities have predefined scripts to determine them, so a builder does not have to. These are pulled from Uncle FB and Lugaid of the Red Stripes systems. There are approximately 70 activities defined (and more can be added by a builder), covering things like farming, sweeping, working a forge, sitting and drinking, playing the lute, etc.

Scripts automatically ensure the npc is appropriately equipped (and eventually appropriately dressed). An npc that goes from walking around to playing the lute automatically has one generated and equipped, the npc does not need to be pre-equipped. If the npc then decided to be a woodsman, the lute is unequipped and destroyed, and a handaxe is equipped.

Nifty notes:
If you use Apep's dynamic commoner (http://nwvault.ign.com/View.php?view=NWN2PrefabPlaceables.Detail&id=162), like I am, you can have your commoners also automatically randomize their appearance, soundset, name, hair etc. on spawn. Use his included npcs, set the variables you want for his system on the blueprints, and change the blueprints to use my heartbeat. Viola, a town full of customized commoners carrying out randomized actions. Apep's system works, so it's just a matter of getting my ai working. Ideally, town ambiance has never been so easy.

I've also done some preliminary work on random pickpocket results (including failure and being caught) for generic npcs, similar to how Baldur's Gate had it, as a separate script for the OnInventoryDisturbed. That's a separate but related project. Status for that is built but not working. It's on my "would be nice to have" list. When I get that working at some point in the future, I will post a blog on that.

Saturday, March 24, 2012

Icewind Dale and The Wizard's Apprentice 2

Not feeling particularly inspired on the building front recently, I turned my time over to playing the two big recent releases, the Icewind Dale remake and The Wizard's Apprentice chapter 2. They are both excellent and worthy of play, but for different reasons.

Icewind Dale remake is exactly that, a remake of the original game using the nwn2 engine and ruleset. It's not aiming for innovation, it's aiming for faithful recreation. And it succeeds. Everything you remember from the first game is in there (except the use of one substitute creature model). Yes, the frozen aquarium is in there, it's a custom metatile in all it's 3d glory. There is a lot of new custom content in terms of tiles and placeables. And the area design captures the feel of the original areas. The voiceovers, the book style cutscenes, all there. So is the difficulty of the original. Slowdive fan has already released a post 1.0 update to address bugs found post release. I played the 1.0 version and found it generally bug free.

The Wizards Apprentice 2 continues the story from the first. TWA is a wizard adventure, so I eagerly played it to look at how others are approaching single class focused adventures. TWA1 was pretty humor oriented. TWA2 changes that focus to a more traditional adventure, though there's some significant early bits of humor in TWA1's style. TWA2 benefits from the transition, at least for me. The area design is top notch, there are well done cutscenes, and the scripting work is similarly excellent, and plentiful (for example as the player can knock icicles from the ceiling at one point and they actually fall, not just a fade to black and apply the effect of the fallen icicles). Similarly there is regular use of wizard spells to do things like optionally casting stone to flesh on a petrified dwarf to gain information. There's a lot for the wizard that doesn't launch fireballs all day, using spells in the environment or to aid quests.

Saturday, March 10, 2012

Neverwinter Nexus

The Vault recently underwent a long quiet period with no content being posted. This led to concern in the community about the future of the Vault. To avoid repeating the whole story, you can read more in this Bioware Social thread.
http://social.bioware.com/forum/1/topic/172/index/9196246

The point I'd make here is the poster DarkOne is the owner of the Nexus group of websites, and has been willing to work with the community, both in that thread and via the NWN irc channel. Funnily enough, it's almost one year exactly since the gmod.com debacle, where that site simply took people's content without asking permission.

So DarkOne and the Nexus are providing the community with a Neverwinter Nexus site.
http://www.neverwinter.nexusmods.com/index.php

If you play the Elder Scrolls games, or the Fallout series, you are probably aware of the Nexus. The Nexus has been probably the primary community place for mods for those games.


You can see my content on the Nexus. I put it there. The Nexus has some good things, like no 25 meg file limit. You can post any size files you want without having to wait for approval. I'm hoping the Neverwinter Nexus draws in new players, people who like the other Nexus games and are made aware of all the content  NWN has when they see a NWN Nexus. I'm also hoping we see some cross pollination of modders, with people that mod those other games getting interested in modding, or porting their existing mods, to the NWN series. My content will still go on the Vault as well, I will just be posting it in both places.

Friday, January 27, 2012

Progress Update

I haven't posted much in a few months on what progress has been happening with Crimmor.

Wyrin's foraging placeables have been added. I didn't say the full wyrin system because I rewrote his script into a general forage script that checks skills party-wide to allow party cooperation in harvesting. (http://nwvault.ign.com/View.php?view=NWN2Scripts.Detail&id=395). Crimmor is getting a modified version of my posted version of the generic forage script. The posted script preserves Wyrin's forage system, but for Crimmor I wanted to alter things.

Wyrin's stuff requires the pc have some survival skills to have a realistic chance, since survival is a skill always checked in his system and the survival DC goes up to about 20 or so. Crimmor is an urban environment, so finding the plant among all the things in the forest (survival) isn't needed. I removed survival checking, as I figured someone skilled in alchemy (the other skill wyrin checks) would be able to recognize the alchemical plants they can work with, even if they didn't have general plant knowledge from the survival skill. So survival checks are out except for the two plants, reeds and the retch plant, where the description of the forage process in the placeable description implies it's pretty much entirely survival skill. Those two still use survival. The craft alchemy check is made much harder (mostly over DC 20) now though to compensate, and make the foraging a reward for those that pursue the craft alchemy skill. Additionally, you must also have base skill points in survival or craft alchemy, it didn't make sense that the untrained person could harvest extracts, or even know that they could.

Several small fetch quests were added to fill out the world and give a purpose to some areas that were entirely for flavor previously. Hopefully people will find these better rationalized than NPC "I need some firewood", Player thinking to themselves: "There's an axe and a woodpile right next to you, you're able bodied and there are no monsters around." I don't like it when there's no rationale for why the npc isn't taking care of the task themselves. In Crimmor these often function as exploration quests, as the npc doesn't generally know where what they are looking for can be found. For example one npc is looking to find a particular kind of wood to have a lute made, as he's a hobbyist lute player in his spare time. He hasn't found anywhere that sells that kind of wood yet.

The scripting of some of the generic commoner things has started, to cover things like people in taverns sitting and drinking, bards playing. I found some useful scripts out there I can use.

A prefab area had all it's trees replaced. Crimmor doesn't have a perpetual windstorm like the Sword Coast, Chult, and Rashemen apparently do. A community member gave me access to redone tree spt files, that eliminates the trunk/branch swaying (the leaves still sway).

A number of placeholder conversations have been filled in. Tip for other builders, putting {placeholder} into a conversation allows you to search for "placeholder" in the toolset and find all these placeholders, but since it's inside the {}, it won't show up in ingame testing. This allows you to write out your conversations quickly if you're stuck on finding the right conversation lines for your characters, so you can add in scripts etc and test things even if you're having a bit of writers block.

Monday, January 9, 2012

Density and the Open World

No, this post isn't just about Skyrim. :-) Path of Evil was an open world on the scale of Faerun, and Crimmor is an open world on the scale of the city.

Open world games have something to keep in mind that more linear games do not, the density of points of interest in the world. Think of the overland maps in SoZ, and imagine if there were only 3-4 places you could go on them. That would create two problems. First, it would be boring, and second, you'd spend lots of time just walking from between place. Now imagine the opposite, several hundred of places you could go jammed into the overland maps. That creates two problems as well. First, there's a logic problem, "You mean there's a dungeon/cave/ruin every 2 meters between here and the next place I need to go?", and second, the player may very well explore all those places on their way to the destination, with the "saving the world waits for me!" problem.

There's a happy median to be found somewhere in there. Open world games need to provide plenty of points of interest on the main land map, but not pack them together so tightly that they run into the problems from that.

In Path of Evil, the points of interest outside the cities weren't always as interesting as they could have been. Most of the quests centered around cities, or areas you could travel to from a city without needing to move to the world map. There were a few quests you could wander into on the world map, but for the most part the world map locations were just random dungeons of no particular interest to the player other than for what loot could be gotten. I think ultimately the campaign suffered some for that. I'm not sure what readers might think of the density of locations on the campaign world map, but I think the density of interesting locations was too low.

Naturally, this perceived weakness is something I'm trying to improve in Crimmor. It's making a lot of work in order to fill out the gameworld with enough to do. Currently things are going relatively slow. I've been playing some other games (sacrilege!) and not been super motivated (this is normal in the middle of winter for me). I havnt posted to the Bioware Social thread for Crimmor because there hasn't been anything worth showing, just some minor sidequests in existing areas, and some frustrating work on my commoner ai project that seemed to go nowhere. I'm considering redoing much of the work on that and getting a cleaner start based on what I know now.