Sunday, February 03, 2008

Rough Night

Rough night. I have definately earned myself a beer. Very early on in the developement, I worked out an answer to a question that I had about how to get companion non-player characters to join the player. I was unsure of how to do this, because I knew that this newer engine did not use the same system as the previous one. I figured out how I was gonna do it for a single-classed character, but put off working out a system for a multi-classed character.

I decided that while I was writing the script for the latest non-player companion and had some time to fully play-test this, I was gonna work out a multi-class system. More or less, I just wanted to see if it was possible. If it was not possible, I had a “work-around” in mind that should have taken care of it from a game play stand point.

So if the player is 2nd level and a non-player joins the group, the non-player will automatically level up to level 2. That wasn't a problem with a single-classed character. The problem, however, lied in the multi-classed. I set up a non-player to be a rogue/cleric, both 1st level. When the non-player joined the 2ndnd class rogue. The secondary class was completely ignored. level player, they leveled to a 2


That would pose a problem when the player joins up with a monk/blackguard/warlock later on in the game. This non-player is part of the storyline, so having all three classes is of major importance.


After playing around with a number of different options, I found the final solution to be really simple. The reason the non-player was switching to a single was because of their “Starting Package”. This is basically a blueprint of how future leveling will occur. If I simply remove the starting package, the code that planned future leveling does not fire and the initial level in classes remains untouched. The non-player is then leveled in the standard fashion.


The most amazing part about this is that the engine does not crash when it fails to find a script that it expects. That was worrying me and was the main reason I did not think of trying this earlier.