Wednesday, April 14, 2010

Release the Kraken

Been a while, well a long while, since I last posted in my blog. So much has changed and evolved in my life that the passion I felt for building had slipped away and real life took it's rightful place. NWN2 and the subsequent let down of Dragon Age occupied me for a moment, for that moment I was truly excited, then I realised that the magic I felt building in NWN was not there.

I have turned my back on these pale shadows of multiplayer worlds and returned to my joy of NWN. Yes the graphics are dated now and the players are slowly fading away but there is something true and pure about building in it.

I have been working part time on my PW Aeon and adding content and enriching the world as I go. At times I respond to user needs and spend many thankless hours working on content for them, mostly content that is not used. Now I am more focussed on my needs and find that building stuff in NWN that makes me happy is the way to go and seems to also get implemented so much faster in Aeon.

My Current Joy in NWN is adding Shayans Subrace Engine (SSE) so that I can have all the various races present in Aeon and then I can build legacies on top of them with all the plusses and negatives of a race/legacy. The joy does fade a bit when I realise that choices made in building Aeon aroudn the scripting side have created a some form of a slumbering beast in the code. This Kraken is in the include statements and having too many of them called at once. Adding in SSE was like Hades in "Clash of the Titans" releasing the Kraken, a monster from deep and one hard to quell.
Still this is a joy and I dream about vanquishing the mutiple include error mesages through trial and error and perhaps I shall succeed

Below the thunders of the upper deep,
Far far beneath in the abysmal sea,
His ancient, dreamless, uninvaded sleep
The Kraken sleepeth: faintest sunlights flee
About his shadowy sides: above him swell
Huge sponges of millennial growth and height;
And far away into the sickly light,
From many a wondrous grot and secret cell
Unnumbered and enormous polypi
Winnow with giant fins the slumbering green.
There hath he lain for ages and will lie
Battering upon huge seaworms in his sleep,
Until the latter fire shall heat the deep;
Then once by men and angels to be seen,
In roaring he shall rise and on the surface die.
by Lord Alfred Tennyson

Monday, November 3, 2008

NWN1 - Visual effects on placeables

It has been a while since I last posted, mainly due to life catching up and becoming a priority for me. You only get one chance at living and interacting with those you love around you, so when they need you stop what you are doing and be with them.

So with that short spiel said, I should step off my soap box and start writing about what the subject of this post is, Visual Effects on Placeables.

A long time ago I read a thread on Bioware forums about applying visual effects to placeables. I can't recall the author, however they laid out the basics for applying effects and thoughts on how to apply them. I must admit after having a look at what you could do with effects I was rather excited.

Applying a visual effect to a placeable, means you are no longer bound by the texture that is set to that placeable. Instead you can choose a Duration type effect from the visualeffects.2da and reskin your object ingame.

I took the basics from the bioware thread and then customised them to be set on enter to an area, using variables to determine if effects were on, and which objects to apply them to. Nothing really exciting in that department, but the results have blown me away.

I was able to make objects of ice, or crystal, blue gems or more importantly reskin objects with Stoneskin and Greater Stoneskin. This means all the bolders, stones and rocks on the tolset, could finally look the same. Some images below of a Henge that I decided to make, based on some comments in the Mystara Dev forums.

This is an image of the basic placebale, viewable in the toolset, hence the red grid and nothing exciting. Due to effects being applied in game, you need to work with the visualeffects.2da and identify an effects that you want to apply. I like to use the glow effects on stones, as they become crystal, or stone on objects that really need to be stone. The stone in the center has the Ghostly Pulse effect, meaning it fades in an out of view. The stones around the center stone, have been reskinned to a basic stone skin. The capped stones, have a Grey Glow applied to them, so that they shine in the dark and are semi transparent.


Following images capture what these reskinned objects look like in game, one the effects apply.




If people are interested, I can put up the code for apply the effects, but if not, well there is no point. I find the application of the effects rather fun and easy to do.

Sunday, October 12, 2008

Reference - row_inc_functions - Rowell's PW Functions

Reference to functions called in Rowell's PW Toolkit.

row_inc_functions

GLOBAL FUNCTIONS

GetCDKeyID(object oPC)
Returns the Database Record ID of the CDKey for the Playerint

GetPlayerID(object oPC)
Returns the Database Record ID of the Playerint

GetCharacterID(object oPC)
Returns the Database Record ID of the Characterint

GetItemID(object oItem)
Returns the Database Record ID of the Itemint

GetItemOwner(object oItem)
Passes the Database Character ID of the Owner of the Itemint

GetIsPlayerDM(object oPC)
Returns from the Database whether or not this Player Account belongs to a Server DMint

FormatID(int iID)
Returns a (gIDsize) character string based on the integer passed, with leading zeros// Example: 159 is converted to "00000159"

GetRace(object oPC)
Returns the String Value of the Race of the Objectstring

GetRaceSub(object oPC)
Returns the String Value of the Sub Race of the Objectstring

Get PCGender(object oPC)
Returns the String Value of the Gender of the Objectstring

GetAlignment(object oPC)
Returns the String Value of the Alignment of the Objectstring

GetClass(int iPos, object oPC)
Returns the String Value of the Class of the Object, given the position (1-3)

GetLevel(object oPC)
Returns the true level of the object, combining the levels of up to all 3 classes

GetGameDate()
Returns the Current Game Date in the string form of "YYYYMMDD"

GetGameDate()
Returns the Current Game Date and Time in the string form of "YYYYMMDDHHMM"

StringZero(int iNum, int iSize)
Given a number (iNum), converts it to a String and adds leading zeros to make the string iSize long
Example: StringZero(10,5) would return "00010"

GetItemTag(object oItem)
Given an Item Object, returns the Tag of the Item. If the Database Item Tracking Setting is turned on, the function will return the True Tag (not the modified DB Tag).

GetTrackedItemPossessedBy(object oPC, string sTag);
This function returns the object in the Character's (oPC) inventory, given a particular Tag (sTag). This function should be used when Item Tracking is Enabled (gEnableItemTracking = TRUE) in the place of the GetItemPossessedBy() function. Otherwise, this Function acts exactly like the built-in GetItemPossessedBy(object oPC, string sTag)

Row_ModuleStart()
Use in the Module's OnModuleStart Event

Row_ModuleEnter(object oPC=OBJECT_INVALID)
Use in the Modules's OnClientEnter Event

Function Comments

  • GATHER THE EVENT TRIGGERING OBJECT IF IT IS NOT PASSED
  • ABORT IF THE OBJECT IS NOT A PLAYER OR DM
  • DEBUG CODE
  • ABORT IF THERE IS NO DATABASE ACCESS
  • STORE THE PLAYER'S DATABASE VALUES ONTO THE PLAYER OBJECT
  • iPID = GetPlayerID(oPC);
  • iCID = GetCharacterID(oPC);
  • iIsDM = GetIsPlayerDM(oPC);
  • UPDATE THE PLAYER'S TIME STATISTICS
  • UPDATE THE CHARACTER'S TIME STATISTICS
  • UPDATE THE IP ADDRESS TABLE
  • INITALIZE THE PLAYER'S CHARACTER ONLINE STATUS
  • SISPLAY LOGIN TO DM'S AND TO LOG FILECHECK IF THE USER IS BANNED
  • CHECK IF THE USER IS SIGNED ON AS A DM, BUT THEIR PLAYER ACCOUNT IS NOT DMACTIVE (EXTRA SECURITY AGAINST FAKE DM'S / HACKERS)
  • SET THE PLAYER FLAG THAT THEY ARE ONLINE TO TRUE

Row_ModulePlayerLoaded(object oPC=OBJECT_INVALID)
Use in the Module's OnPlayerLoaded Event

Function Comments

  • DEBUG CODE
  • GATHER THE EVENT TRIGGERING OBJECT IF IT IS NOT PASSED
  • ABORT IF THE OBJECT IS NOT A PLAYER OR DM
  • ABORT IF THE PLAYER IS NOT READY TO BE TELEPORTED YET
  • STORE THE PLAYER'S DATABASE VALUES ONTO THE PLAYER OBJECT
  • ABORT IF THE PLAYER IS LOGGING BACK ON (BEFORE THE SERVER WAS RESET)
  • CHECK / SET THE CHARACTER'S HIT POINTS
  • IF THE CHARACTER IS DEAD IN THE DATABASE, MAKE THE CHARACTER DEAD
  • SET FEATS / SPELLS TO NO USES LEFT
  • JUMP THE CHARACTER TO THE LAST SAVED LOCATION


Row_ModuleExit(object oPC=OBJECT_INVALID)
Use in the Module's OnClientExit Event Function Comments

Function Comments

  • GATHER THE EVENT TRIGGERING OBJECT IF IT IS NOT PASSED
  • ABORT IF THE OBJECT IS NOT A PLAYER OR DM
  • DEBUG CODE
  • SET THE PLAYER FLAG THAT THEY ARE ONLINE TO TRUE
  • SET THE CHARACTER'S CURRENT HIT POINTS
  • SET THE CHARACTER'S DEATH STATUS
  • UPDATE TIME SPENT ONLINE
  • UPDATE THE CHARACTER TIME STATISTICS
  • SET THE PLAYER/CHARACTER AS OFFLINE

Row_AreaEnter(object oPC=OBJECT_INVALID)
Use in all Areas' OnEnter Event

Row_AreaExit(object oPC=OBJECT_INVALID)
Use in all Areas' OnExit Event

Row_PlayerUpdate(object oPC=OBJECT_INVALID)
Use to store the Character information from the object (oPC) into the Database

Row_PlayerRest(object oPC=OBJECT_INVALID)
Use in the Module's OnPlayerRest

Row_PlayerDead(object oPC=OBJECT_INVALID, object oNPC=OBJECT_INVALID)
Use in the Module's OnPlayerDeath Script

Row_PlayerRaise(int bPortToBind, object oPC=OBJECT_INVALID)
Use in the Module's OnPlayerRespawn Script with bPortToBind set to TRUE
Use in Raise Dead and Ressurrect Spells Scripts, with bPortToBind set to FALSE

Row_AddToLootTable(object oItem)
Use to add an item to the Database, to catalog the items drop, and how many times each item has dropped in the game.

Row_ItemCreate(string strResRef, sting strTag="", object oOwner=OBJECT_INVALID)
Used internally and should not be used.

Row_ItemGain(object oItem=OBJECT_INVALID)
Use in the Module's OnAcquire

Row_ItemLose(object oItem=OBJECT_INVALID)
Use in the Module's OnUnacquire Script

GetNPCID(object oNPC);
Returns the NPC ID for the given NPC (oNPC)

IncreaseNPCkills(object oNPC);
Increases the Total Number of Kills that an NPC type has inflicted upon Player

IncreaseNPCdeaths(object oNPC);
Increases the Total Number of Deaths that the NPC type has suffered.

Row_ResetCharacter(object oPC);
Used to set the character's (oPC) Feats and Spells to all used. This stops people from logging off and back on to get all their spells back.

Row_DiscoverLocation(object oPC, object oPlace=OBJECT_SELF);
Used to reward the character (oPC) when they step into a trigger (oPlace) and discover a new location.

RemoveEffects(object oPC)
Use to remove all negative affects from a character. This function is a direct copy from the NWN script in nw_i0_plot

Saturday, October 11, 2008

Prefabia Restarted - #8

The night is late but I feel a sense of renewed excitement when working within the NWN toolset. The loss of my previous work, left ashes in my mouth and a sense of futility at ever producing a module in NWN2. With time I have found the loss has turned into a win, much like the regrowth of plants through the ashes of a proceeding fire.

My module slate is clean and so this time I have focussed on getting the core systems and haks installed and working. MYSQL and NWNX4 1.08 is installed and persistance is working as it should, and after some poking around under the hood I actually understand it a lot better than before.

I took them time to install BTH's Module Testing Toolkit, an excellent piece of work if you want to debug a module using nothing more than a slick UI. I seriously recommend this to anyone who is building or is considering building. Highly configuraable and easy to use, just ensure you read the documentation.

DMFI has crept into the module as well and seems to compile without issue. I am still working out the DMFI component as I am unsure if it comes with languages like NWN1 DMFI or not. Still to be discovered I suppose, ahh the joy of building.


Some excellent content I added as well seeing as I really like it and have been discussing these packs with BTH for a while now. It is fantastic to see him release some awesome content and if you are curious you can always have a look at his blog to get a feel for what he is working on.

So that wraps up my little update and looking at the clock, I reckon it is time I hit the sack. Before I shoot off I noted Relexx, one of the orginal Aeon NWN1 PW leadership team, has started to host a NWN1 PW called Cocoon. You can find it under Multiplayer - Role Play. As soon as I get a chance, I will have to head on over and have a run around, though it is currently alpha and prone to changes on a daily basis.

Monday, September 22, 2008

NWN2 - 1.13 1409 Plugins Rebuilt

A small update but one I hope is useful to the community, on the assumption that anyone visits here. I spent about 5 minutes tonight updating the plugins for REPLUG to 1409 in Visual Studio C# 2008.

Updated to 1.13 1409

  • TreeCutter
  • M4C Land & Tree Generator
  • WeatherChanger
  • Resizer / Resizer_NP
  • ConversationEditor (only plugin)
  • TempCleaner
  • HotKeyPlugin
  • Align&Distribute
  • AreaCameraASDW
  • ToolsetUIEnhancer

You can grab the updated dlls here, though bear in mind I only updated them, I don't support or debug.

Tani no longer supports though she was good enough to ensure the source code was available. You can visit this vault page if you are after the source or to review her comments and instructions.

The Tree Randomiser plugin by Aokis (No Longer supported), can be found here. This plugin allows the builder to randomise trees, via different seeds and alter the X,Y & Z scales.

Sunday, September 21, 2008

Prefabia Restarted - #7

Ashes in my mouth

I have learnt, much to my dismay that just because you are performing backups, it does not mean you are storing what you think. I learnt this the hard way yesterday when I rebuilt my notebook, where my Prefabia work is stored. I thought that I had backed up my modules directory and on restoration realised I had made a copy of my NWN1 modules directory.
After cross checking and seeing what other copies I had, the penny dropped and I knew that Prefabia or at least the work to date was gone.

Looks like now I am about to recreate all of my work, though this time it should take under 5 hours, as I now know what I am doing and need not spend days researching how to do something.

Pyrrhic Victory

Before I manage to wipe my project, BTH cast an eye over it and proclaimed it rather nice but....
"The Trees need variation". I must agree that once I looked at my trees, they were all of the same seed and scale (XYZ). After some research I located a plugin by Aokis, the Tree Randomiser Plugin that allows you to randomise, seed, location and scale of trees. Unforntunately it was at 1.04 and no longer supported. After firing an email off to Aokis, he informed me that VCD had patched the Tree Randomizer Plugin and more importantly released the source. VCD on inspection was no longer supporting the plugin but at least I had the source to recompile.

Long story short, I managed to workout Tanis instructions on updating a plugin and after recompiling the code I now have a 1.13 working copy of the Tree Randomiser plugin. A victory of sorts, something to lesser the bitter taste in my mouth from wiping my own project.

Back to the Drawing board.

Tuesday, September 9, 2008

Prefabia Restarted - #6

I have been going a bit crazy trying to get walkmeshes and boats working, using Heed's Boardable Ships hak. So to give my mind a break and stop working in circles I thought for a laugh I would set up the persistence portion of Prefabia by adding a database behind the scenes.

I have settled on using MYSQL 5.0 and NWNX4 1.08, which after reading the basic instructions, were damn easy to set up and get running.

Excellent video how to on installing MYSQL on Vista http://www.sebastiansulinski.co.uk/web_design_tutorials/web_server/install_apache/install_apache.php?id=mysql


That was the easy part, the next problem was how do I get all the scripts and such working? NWNX4 forums are full of help if you need to set up the core database engine and plugins but be buggered if I could find anything to aid me in logging the cdkey, ip, coordinates on exit and so on, (stuff I consider core to running a PW).

My inital experiences in this space were the use of an excellent set of scripts and routines developed by Rowell called Rowell's Persistent World Toolkit. This set of scripts was awesome and allowed people with little to no experience on databases using NWNX4 to read write from their database, as soon as the rowell erf was loaded into the module. Sadly, he stopped supporting it, due to issues with NWN2 and Atari and so on. (it all got too hard and I can't blame him).

For a bit I thought WTF, I might as well pull his stuff to pieces and try to get it working on the NWNX4 1.08 version and NWN1.13 until....

I visited Rowell's PW site, Englington and noted he had it up and running and it was patched to the latest levels and the PW datbase was working. I hunted round on his site, looking for his email so I could send a question to him regarding his toolkit, until I stumbled over this thread..

http://www.hideyhole.org/engliton/index.php?name=PNphpBB2&file=viewtopic&t=2830&start=250

The thread listed the efforts of a person called Xildjian, how had decided to do what I was about to do and rework the scripts. Not only had they already reworked his scripts, they also went as far as to release their efforts to date. So far, I have tested this and it works a treat. Suddenly I have some pesistence in my Prefabia PW and effort has been minimal. Kudos to Rowell and Xildjian

Hi All, Below is a link to my attempt at getting Rowell's updates
working. Here is a list of the modifications I made:

1. Made use of NWN2 ability to send variables to a script from a
conversation.

2. Made the bank player specific instead of character
specific

Only active quests get added back into the journal when
a character logs on

Fixed some bugs I haven't tested everything
so there might still be errors, and I was using NWNX4 1.08 and NWN2 MoTB
(standalone server) to do my testing and
development.


Below is the URL to get the update.
I kept my files different from Rowell's so the files of interest are Xildjian_updates.erf and Xildjian_Test.mod.


I haven't changed any documentation from Rowell's so if you have a
question check the test mod.

http://myweb.cableone.net/sanaya/RowellsPWKit.rar

Enjoy!