Modifying wear and remove

bgreen58
05 Jan 2005, 03:55
In the game I'm working on, the players 'behavior' is effected by the clothes he wears. In order to do this, I've assigned each piece of clothing a value and when the players total clothing value is within certain intervals, he 'behaves' differently.
Now comes the problem... I'm thinking the best way to do this would be to modify the 'wear' and 'unwear' commands so that these values are tallied each time the player changes clothes... but I don't know how to do that. :lol: I'm a newbie and using QDK Pro. I've been trying to look over the ASL coding, but I don't want to mess with it. Especially since I;m using maDbrits typelib library.
Any suggestions?

Anonymous
05 Jan 2005, 09:30
BGREEN58 wrote

Now comes the problem... I'm thinking the best way to do this would be to modify the 'wear' and 'unwear' commands so that these values are tallied each time the player changes clothes



Uhm... why modify the commands?

Typelib.qlb keeps track of what the player is wearing by means of maintaining a set of numeric variables anyway, so you are (probably) just duplicating the effort. Not only that the commands are pretty complicated and very interwoven into other functionality so altering them is not a job for the faint hearted - I know, I wrote 'em! :lol:

If you read the typelib documentation (pdf file) you'll find that the variables used and how they work is explained in considerable detail.

Basically all you need to do is check the five "cover" variables (or more likely only one or two of them - head, feet and hands probably don't matter in many cases) and write code according to the values returned.

e.g. if the player's topcover property is greater than 32 he is wearing either a coat or a jacket, so he could be considered 'protected' from the cold or whatever.

You can misuse the clothing types quite easily, providing a space suit or diving suit is actually quite easy if you use a bit of lateral thinking.

If you want further help with this, explain to me in detail exactly what you are trying to do (either here or in e-mail if you prefer) and I'll work with you on 'misusing' typelib to do what you require.

Al (MaDbRiT)

bgreen58
05 Jan 2005, 16:45
What I've got is a series of different kinds of clothing ranging from bland to sexy. (i.e. long skirt, short skirt, micro-mini skirt). Each one has a different sexyClothes value (1 for bland and higher for the sexier they are). As the player puts on different clothes, the sum of the sexyClothes values is tallied and the players behavior is modified depending on what range that number falls between.
I've read your typelib docs and looked over the system you use on your clothes, but am too new at this to monkey at it without some help.
Hope you can help!
:?

MaDbRiT
05 Jan 2005, 22:31
Hi Bgreen58

I've quickly looked at typelib.qlb and decided the easiest way to do what you want is simply to add a specialisation of the provided clothing types - I've christened this the 'sexy_clothing' type. :lol:

I've done it as a seperate 'add-on' extension library that modifies the basic typelib.qlb, so that you can just add it in to your game and access the new type from QDK - almost as you do with other clothing types.

However, in testing I discovered a small and previously unreported bug in typelib.qlb itself, so I've fixed that too.

I wont go into how to use the extension here, you need to e-mail me so that I can send you the extension library (it is very tiny) AND a new bug-fix release of typelib.qlb. I'll explain how to use the add on once you actually have it.

IF ANYONE ELSE WANTS THE BUGFIXED TYPELIB.QLB (version 1.010) PLEASE E-MAIL ME AND ASK FOR IT!

Note that the bug is tiny and only affects your game if you use the dress/skirt clothing types.

Al (MaDbRiT)

007bond
11 Jan 2005, 01:26
MaDbRiT, I would like a copy, but as you said, you won't post it here, so expect an email from me in at least a weeks time, asking for it. I can't do it now.