Friday, July 11, 2008

Some progress

My computer's fixed now, so I'm getting back in the swing of things. It's coming rather slowly since I keep letting the basics of scripting trip me up, but I'm getting a decent spawn system worked out. I got things to spawn OnAreaEnter, but I still haven't begun work on trigger spawns yet. Still, I've got enough that won't need to be changed that I can begin working it into my building. One of my goals has been to have my NPCs spawn in and remain only when there are PCs in the area, which will keep them from using up cycles unnecessarily. I wanted to get that taken care of before I got too many NPCs for me to go back and change each one individually.

In other news, I've picked my building back up. I've connected two area to Manheim Court, but they don't have anything in them worth showing yet. Here's some screenshots, though, that show how my first area is beginning to fill out:



Saturday, July 5, 2008

The Scripting Continues

Building a PW is a lot of work, I'm finding. I've spent hundreds of hours scripting the systems for Shadows & Silver, and I'm beginning to feel rather worn out. The XP system and reputation system Casa and I are sharing are still in beta. I keep running into brick walls with them, and the frustration has been mounting for quite a while. One of my problems, I think, is that I refuse to incorporate anything into my world unless I know exactly what it does, how it does it, and why. This means breaking open every script and reading through it line by line. What's more, I'm making everything conform to my own scripting standards and making it easily customizable, which means rewriting pretty much every script from the ground up. This is what I did with Knat's XP system and with Vendalus's PRR. They're totally redesigned, rewritten, and expanded. That's a lot of work, but I hope the gain of being able to customize the settings and understand things enough to change them at will makes it worth it.

I while back I published the list of things I was wanting to script. Here they are again plus a bit more, reorganized by priority:

  • A custom XP system with class-based rewards
  • Persistent reputations with NPCs and factions
  • Persistent quests and journal entries
  • A custom spawn system
  • A crafting system
  • A whole new magic system (yes, you heard that right)
  • A D&D 4th Edition-style resting system
  • A D&D 4th Edition-style bleeding and death system
  • An inn room rental system
  • Persistent chests and banking
  • A cut scene system
  • And a whole lot more

The first three are in beta (though I'm about certain the quest and journal system works flawlessly, I'd like to add a feature or two before I call it final). I had an old working version of persistent chests before I lost the mod in a hard drive crash, and I've got a tweaked version of Gestalt's Cut Scene System in alpha. Both of these are rather low on my to-do list, though, since there's few places I intend to use them. I've not even begun my crafting, death, magic, resting, or inn systems yet, and I want to have all these in place before I open the server up for beta testing.

*sighs*

Well, let's at least start getting a working prototype of these systems in place. Getting things started is half the battle with me (the other half is getting them finished).

As I've said previously, the difficulty with scripting is that you've got to know what you're trying to accomplish before you ever open the script editor. If you sit down and just start scripting with no predefined direction, you're going to be lost in a sea of tangled code. So I'm going to begin with the spawn system, listing the requirements of the script:

  1. It must conform to HCR2 coding standards. This means the code should be broken up into short, manageable functions, and it should be self-documenting, requiring few, if any, comments to explain how things work. There should be no inline strings used in the code (e.g., int nNum = GetLocalInt (oPC, “somevariable”);); strings should be defined as constants elsewhere to cut down on errors. Lastly, anything the user may need to change should be placed in a separate configuration file so the user need not wade through large amounts of code.
  2. It must be able to spawn NPCs, monsters, items, and placeables. Preferably, the same code would be used to handle all of these spawns.
  3. It must be able to spawn on a timer or when a PC enters a trigger.
  4. It must be able to spawn multiple creatures or items of the same or varying types at one waypoint.
  5. It should be able to vary spawns based on time of day, the level of the character triggering the spawn, etc.
  6. It should allow a DM to quickly place spawns for on-the-fly encounter design.
  7. I should be simple for non-scripters to use. The easiest way I see to accomplish this is by making the system be based on waypoints and triggers, which can easily be added to the palette.
  8. It must require a minimum number of scripts to operate. I would find 10 or less scripts acceptable.

This is a good list, and it gives me a bit to start with. But one thing that is lacking is user configuration. One of the things that made my XP system so flexible was its massive list of customizable variables. What sorts of things would a user want to be able to modify that would need to be set in a customization script as opposed to on individual waypoints? The first thing that jumps out to me is default settings, which was what the bulk of my XP customization was. As for what things in a spawn system to have defaults set for, though, I have no idea. Anyone?

Tuesday, July 1, 2008

Again?

I've become convinced I am cursed with a demon computer. My CD drive, which I just had fixed, has decided to break and refuse to close. So now I get to send my laptop off again to be fixed. Joy.

On the other hand, I got to talk with Fester Pot, creator of the Almraiven module. If you haven't played this module, I highly recommend it. It's a city adventure that's heavy on the role-play. The most amazing thing about it is the incredibly believeable city. FP makes Almraiven come alive with excellent use of sound, placeables, and tight streets. This module has become my favorite and a great inspiration. Of course, you have to make some changes to form it into a PW, and building something this intricate is much more time consuming than designing a bunch of sparsely populated areas, which is what I've seen on many PWs. The payoff, I think, will be worth it.

There's three key components FP mentioned that I'm trying to keep in mind: small areas with lots of alleys and tight construction, liberal use of placeables to give that lived-in feel, and heavy use of placed sound. Here's a couple of screenshots of the first area I've designed using FP's advice. As you can see, I'm only just starting, and there's lots of odd, empty spaces, even in this 5x5 area. Getting a variety of placeables that still seem to flow together is difficult, and I've never been much good with building anyway. Still, it's a start.

Morgan, one of the first NPCs players will meet.


Manheim Court, with two shops so far...


My favorite screenshot. Heiden, inventor-turned-junk-seller.


Cheers!

Saturday, June 14, 2008

Assumptions

Well, I've gotten some of the scripting work for Casa done and sent, so I figured I'd take a break from the monotony to write a bit about the assumptions of my world. A year or so back, I realized my world was becoming too closely linked with D&D. Their cosmologies and histories were blurring together. So I decided to make some changes. Ironically, many of the changes I made ended up finding their way into D&D 4E. Still, there's some things that differentiate my setting and the generic 4E D&D setting. So let's compare the assumptions of the 4E game world versus those of my world.

In 4E...
  • the world is more fantastic. This is a huge step forward. Previous editions of D&D felt the need to have every one of their lands and cultures be an analogue of some real-life culture. This was especially prevalent in the Forgotten Realms, where Oriental Adventures (Asia) and Matzica (Yucatan) were straight out of real life, and as such did not fit with the rest of the setting. Some of the cultures, such as the Ffolk of the Moonshae Isles, fit with the setting but were still so close to real life that it often broke the fantastical portion. Go with what makes sense in your setting, not what happened in reality. Shadows & Silver, like 4E will often be inspired by real life, but it will also have things for which there is no historical analog.
  • the world is ancient. In Shadows & Silver, countless empires have risen and fallen, and many of them have been lost to history. Not even the immortal fae remember all of history. Those whose mythology tells them how the world or even their race was created may be correct, or the tale may have been so twisted in the countless of thousands of years of retelling that it is completely false. Because the world is so ancient, there is no end to the mysteries to be uncovered.
  • the world is mysterious. Even in the scientific awakening of modernity, man knows only so much about his world. True, his empires have been vast and his explorers have gone far and wide. But danger and disaster keep most folks at home, leaving what is beyond the border to the adventurous. Most folks know some about what lies beyond their home, but only those who have been there know anything beyond myth.
  • monsters exist all over. In this, Shadows & Silver differs from D&D. Monsters are thick in my world, though they have been driven from the lands and thoughts of men. They lurk in the mysterious reaches of the world, and in those old, haunted ruins everyone's always afraid to go into. In civilized lands, though, monsters are rare, and people who believe in them are rarer.
  • creatures need a place in the world. Everything that exists has an origin, and fantastical races and creatures are no exception. Many creatures have their origins in the original creation, or evolution, or even magical experiments. None exist without a reason.
  • adventurers are exceptional. While not everyone needs to play a great adventurer, those who do will find they stand high above the common folk. Sure, the world has its heroes, but killing an orc in battle is extraordinary. Killing a dragon is enough to make a man a legend for decades.
  • magic is not everyday, but it is natural. This I disagree with most of all. In Shadows & Silver, magic is nearly a thing of the past. Those few who do believe in it are judged to be either crazy or uneducated. Wizards do exist, but they carefully hide their activities for their own safety. In less civilized areas, mages can display their power much more openly.
  • "good" and "evil" mean more. 4E makes alignment actually mean something. People don't fight against evil because they're good, they are good because they fight against evil. Evil is more than just bad thoughts. Because of this, very few people are aligned to good or evil. Judging someone's alignment is no longer possible with spells; you've got to judge based on that person's actions. This flows excellently with Shadows & Silver. The shades of grey concept is easier if good and evil are not so cut and dried. Being good is not about being nice, and being evil is not about being mean.
  • the gods are remote. In Shadows & Silver, the Archons still grant power to clerics, but their direct involvement is a thing of ancient times. Some suspect that the Archons are dead and that the clerics are actually tapping into forbidden arcane sources. Whatever the case, man must rely on his own deeds rather than divine intervention.
  • there is one sun and one moon. Shadows & Silver does not need some fantastic astronomy or absurd setting to make it interesting. The interest comes from the stories told within it.
  • there are no forced race relations. I disagree with this somewhat. Sure, just because you're playing an orc doesn't mean you have to be enemies with elves and men. But racism runs high throughout much of Shadows & Silver, especially with those races perceived to be monsters.
  • death matters differently. This is something I've hated in all previous versions of D&D. Coming back from the dead was simply a spell and a bunch of diamonds. In Shadows & Silver, returning from the dead comes at an enormous cost (but I won't reveal what it is yet ;) ).
  • there are fantastic locations. Too often have I seen PCs adventure in places that are just not that interesting. The places you go should be as exciting as the fights. They should have effects on the battles and on the adventure in general. Shadows & Silver will have a lot of this.
  • there's less evil fighting evil. This I'm mostly indifferent about. Since the world is not good versus evil, it doesn't really matter if evil fights evil. The world isn't cut and dried. What is important, though, is that the antagonists present a suitable challenge to the protagonists.

Well, that's a fair overview of some of the assumptions of the world. We'll do a little more scripting and building before the next post. See you then!

Wednesday, June 11, 2008

Frustrations... Again

Well, I finally got my computer back from the repair shop today, and I'm glad, because I've been going through withdrawal after not having it for a month. I've been working on my fiancée's computer, but I've found it's extremely difficult to do anything productive on a computer not my own. Unfortunately, it'll be a while before I can actually use my computer. See, HP wiped my hard drive, which I expected. The problem is that they installed Windows XP Media Center Edition, rather than Windows Vista Ultimate, which is what I had. So now I get to spend several hours getting the computer back in order and everything set the way it needs to be before I can get anything productive done.

Further frustrations are in my scripting work for Casa. The XP system has some bugs that need to be worked out, but the biggest problem is a design flaw: it requires creatures to have a particular death script set on them. Now, that's fine for any custom creatures. But CEP creatures and those from the standard palette can't have their scripts changed, and that means creating a custom copy of those creatures. While I plan to pretty much use all custom creatures myself, thus negating this issue, Casa doesn't, which means he needs me to rewrite the default death script to use my scripts instead. Simple enough. But then it occurs to me that this problem could pop up all over the place. What about when I write a spawn system? The creatures will need custom spawn scripts. And what if I have a standard creature that needs one custom death script and another that needs two? I can't have the same script run two different things. So I'm basically rewriting all the default creature scripts to use my HCR2 1.6 creature events, and putting the original BioWare code into their own scripts, which he can set to be called if he wants. The problem is, it's insanely tedious, especially since I'm having to write documentation on each one (something everyone should do in their scripts but, lamentably, few do). Add to that the difficulty in working on someone else's computer and you see some of my problem. The good news is that I'm almost done. Hopefully this weekend the scripts will be fixed and I can go back to bug testing the XP system.

Speaking of the XP system, if anyone wants to help me test it (not sure how many folks there are who read this), please shoot me an email (squatting_monk at yahoo.com) or comment and I'll send you a sample module. I plan on posting it on the Vault when all the kinks are worked out, both in an HCR2 version and in a stand-alone version.