Wednesday 12 December 2007

You can't think of it all

Argh! This night I woke up screaming (no not really screaming, but it sounds more dramatic). I totally forgot about the weight parameter of the game. It's a very important part of the puzzle difficulty that you can't carry around every little item at the same time. I believe that the DnD rules for weight won't work because the PCs' strength affects how much they can carry. In Zork an axe is 10% of what you can carry and the big rock is 95%. I must think about this. Does it affect the gameplay to rely on standard rules or can it be ignored?

One way around it would be that I make a special "adventurers bag" or backpack that will have a counter for weight and i build a weight table of all the items in the game (that's a huge pile of work) . It could also be nice if I make a visible bag model that the PC can carry as a cloak or in the hand as a shield. But it seem to be a risky project, what if the counter get messed up or it slows down the game? I'll think about it for a couple of days. Maybe you can come up with an idea? Drop me a line!

Today is a day off from work so I look into why my music don't play anymore. Lady Bitterleaf gave me a hint about checking the filename lenght. She believed that the can be 16 chars. maximun. It's possible that I've renamed the files when I upgraded to 1.10 and MotB.

A little screen shot from the Sunday update:
So many shiny things...

4 comments:

Anonymous said...

Note: I know very little about scripting. I got this by searching NWN2Wiki.

How about the EffectAbilityDecrease/Increase function to set player STR to the desired value when the PC enters the mod? Maybe use a series of if-then statements to catch all possible starting STR values.

From there you could just worry about the relative weight of the items. I imagine that you would have to strip inventory upon entry, maybe give everyone the same weightless tunic to hide their shame.

Nalencer said...

You definitely don't want to set the PCs STR score. That would break their whole character build. It's the nature of the game that some characters must be stronger than others.

What I'd suggest, if you're up to it, is as you said, create a weight table with a percentage measurement for every item in the game. A lot of work, as you said, but maybe necessary.

At that point, use the OnAcquireItem script to compare the weight of the item the player is attempting to pick up with the percentage of space he has free. If it's less, he keeps the item. If not, it gets left on the ground.

Nalencer said...

Another note that should make the weight table much easier. Instead of creating a percentage for each item, create one for each _type_ of item. One longsword isn't really going to weight much more or less than another. So instead of checking individual items, check the item type. Of course, for unique items, you can specify it for just the item. Like this:

if(it's a longsword)
else if(it's a shortsword)
// and all the rest of the item types
else if(it's custom item #1)
else if(custom item #2)
// ... etc.

Yes, I'm aware that that's nowhere close to actual NWScript. Just to give an idea of what I mean.

Amraphael said...

@nalencer:
I don't think it's a big thing to break a character in this mo.
The STR-fix would be the easy way, the weight table would be prettier.
I'll think it through some more and may change my opinion after that :)