Monday, August 8, 2011

So much for Steam offline mode and nwn2

My Internet is currently down, and will be for 10 days, thanks to the incompetence of ATT. Unfortunately Steam will not let me launch the toolset or game when Steam starts in offline mode, it thinks it needs to update (ie download more ads as I have no games with updates), so Steam does not launch and generates an error.

At least I can use the flamewind conversation editor to do some writing.

Edit: I discovered that if you launch nwn2toolsetlauncher.exe you can start the toolset without Steam trying to launch. Still can't start the game (including via the toolset), so there's no way to test your toolset work, but you can at least work on things.

Wednesday, August 3, 2011

The community's worst news in a while.

http://social.bioware.com/forum/1/topic/172/index/7590413/5#8031598

Hellfire is retiring from NWN2 projects. It was bound to happen eventually, but still.

Sunday, July 10, 2011

Commoner AI Project

Crimmor needs to feel like a big city. And that means not just buildings, but commoners, lots of commoners, behaving in natural ways. Definitely an AI challenge. What I've been doing is combining Uncle FB's npc control scripts with ones used by Lugaid of the Red Stripes in Danaan Unvanquished, and added in my own code.


The goal is to provide an advanced AI for those "unimportant nameless npc" groups that fill out game worlds, while keeping things simple for builders to implement by minimizing the need for things like local variables. This AI is not for any npc that you want to behave in a specific way. The builder places an npc with this AI in their heartbeat, and they will eventually behave depending on their creature tag using substring detection to catch "classes" such as commoner, merchant, noble, bard etc.

Day/Night schedules happen automatically depending on waypoints placed in the area by builder. The schedules have randomization built in, with the randomization controlled via script variables. Common actions such as farming, shopping etc are predefined for builders, so commoners that spawn and move towards waypoints indicating these behaviors will automatically adopt them. For example a builder can place a "farming" waypoint and any commoners who are directed to that area will automatically play farming type animations.

As this is a project for the benefit of the community, feel free to take, fix, and improve, as long as you contribute back so others can benefit.

Social Thread. 
http://dl.dropbox.com/u/3879894/ai_test.7z

Monday, July 4, 2011

Hacking trap code

I've located the default code that handles traps (in traps.zip go figure...). Now that I can access the trap code I can inject my own code into the trap process and package that up into the campaign. This allows me to do all kinds of fun things, like make non-conductive thieves tools to avoid electric damage and extra long tools so the rogue can work at a distance and avoid spike traps. This allows me to create a new category of item, thieves tools specialized for handling specific trap types. Since the tools still get used up it allows a one time "bypass" if the rogue has a set that matches the trap type. Tools that do not get used up versus traps are also now doable, so our rogues can now have a favorite set of tools instead of the disposables. This makes the thieves tool a much more significant item, both from a gameplay standpoint and from a role playing standpoint since you can now invest time in giving a set a story. ("You found the personal tool set of the Guildmaster!") Purposed tool sets are now also possible, such as a set that is +5, but only versus fire traps.

The other good thing about finding the trap code is that I can now use it in conjunction with the pickpocket system I have, so npcs will be able to trap their pockets to guard against thieves. Theoretically, the system could also be used to allow a pc to trap their own pockets for multiplayer or a PW, but I don't need that functionality for Crimmor.

I can't say I've done anything with the trap code yet. I've been working on another unrelated scripting project for Crimmor that's much more complicated but promises far greater results.

Monday, June 27, 2011

Powering up pickpocket

Ok, I'm old school. I think pickpocket instead of "sleight of hand". Anyway, sleight of hand in NWN2 is pretty much useless. The amount of times it can be used in most content is generally around zero, and it's not really any fun when you can.

I'm trying to fix that. Crimmor is getting a custom pickpocket loot system to handle pickpocketing the random commoners, nobles etc you see in the city. Instead of just giving a few npcs bits of loot marked as pp-able, I'm overwriting the default OnInventoryDisturbed code for npcs. What is happening is that it will look at the npc tag and if the subtag matches one of the categories I define (commoner,merchant etc), the player will pp something from a random loot table. As it currently stands you can pp a useless item, a random amount of gold, or a useful item from a loot table. Since things are categorized I alter the percent chance of each outcome for each group. Commoners have the greatest chance of the pp result being something useless, and the player will get the least gold off them, plus only 1 in 100 will have a useful item. Merchants have fewer useless items, more likelihood of gold (and more gold), and a 5% useful item chance. Nobles have the most gold and a 10% useful chance. Npcs are marked on successful pickpocket, so you can't just repeatedly pp the same npc. One success per npc.

I plan on implementing trapped pockets as well, to add some risk to things. There will be a random chance that the victim has somehow trapped/locked his pocket. A sensible precaution in a time when thieves ply their trades so openly! Standard trap picking chances will be applied automatically, with the trap type and strength being determined via percentages. I hope to expand things to cause the thief other problems, like auto-summoning the guard (after all, someones bag just exploded in flames). Presumably the use of trapped pockets would mean using traps designed to function away from their owner, so the owner will not be damaged by their own trap.

For useless items I just give the player a text string popup "You have stolen a copy of 'Mobile Vegetable Peddling' by Jan Jansen." these strings draw from over a hundred useless items. The player doesn't actually receive a junk item. Gold is also done randomly, with a chance for greater or lesser amounts. And useful items draw from over 400 low level useful items. You might get one of the non magical books that comes with the toolset, you might get a bit of crafting material, or a potion, minor magic item (typically less than 1000gp full value) or scroll up to level 3.

Like all my custom work, I plan on making this available to the community at release time.

Saturday, June 11, 2011

Wheel Ward

The only thing remaining in this external area is placing sounds and connecting any new areas. The monastery of Naw Bahar can be seen to the right in the first shot, with the Cowled Wizard  Enclave in the background. In the second we look from the Enclave back towards the monastery, Getting this detail level in a city takes lots of time.