Scoring ....

derekb
26 Jan 2012, 07:36
Hello Quest'ers:

I have worked through the tutorials and reviewed a prior posted forum "Adding RPG stat elements" and even tried out pixie's post on scoring.

Some things though are unclear to me (at this stage):

1) I believe I understand the basis of providing a interger to something like health, and when running my game it shows health = 100 .... all good there, but how do I make it show health 100/100 so that during the game, health will show the actual health score and then the maximum score.

1b) Would likely have 7 running scores such as health, strength, dexterity, defense, wisdom, luck, and food rations. (or something like that).

2) Tried to understand today, librarys and the one which pixie posted on scoring. What I couldn't find is how pixie made the score to appear score = 0/5 (I think I clicked on everything to trace it, and just didn't see it) ..... not sure if that is built in the library? but since I am bringing to the discussion scoring, and there happens to be a library item created for this, then maybe understanding how library items can benefit ones game??

3) Randomization with scoring .... Often the best games are ones that have a chance for random results .. which is factored by ones score. A simple example, is opening a box which could explode ... how do I set a random number generator where if the number generated is larger then the players luck number would explode but if less then would not. So if luck is 74 / 100 and the random number is 72 then the box will open safely.

For fun, In my ancient Basic (which really worked well for text adventures), it might look like this:
randomize
luck = 74
a = int (rnd(0)*100)+1
if a > luck then life=life-10

Thank you for your time and replies,
derekb

Pertex
26 Jan 2012, 08:12
Did you see my rpg-library? viewtopic.php?f=10&t=2660
There all your questions should be answered. You can find the functions cmb_addStatus and cmb_refreshStatus to handle statusvariables like health, or cmb_dice, which returns a random number
Have a look at it and try to understand the code

derekb
27 Jan 2012, 08:33
Hi Pertex,

Thanks for the link to your prior post on your rpg-library.
First had to figure out how to uncompress a .rar file (lol) but found a great program to do so.

I have reviewed it step by step and it may or may not come as a surprise, I understand some parts of it but don't on other (which is the majority). Presently, its like a new language (and in some ways it is) for me. I think two things most stand in my way, how one step affects the next (even which step Quest processes first) and the whole concept of a library (I take it that a library adds the rules for Quest to work) and if one has to run a library to make a RPG game, such as your example and to make stats be a powerful tool as the basis of the text adventure.

I know that I could literally copy what you did and likely get something to work for the text adventure I hope to create, but since I am a newbie to it all, I also need to learn the what and why of the items I am entering to make the game work.

If you are still familiar with the Basic program language (I never figured I would ever chat about this language ever again .. LOL) ... when learning it (back in the Commodore days), there was something called REM which had no purpose to the actual game program, other then it 'rem'inded the programmer of any information ... and when I learn Basic, I would learn from example programs which included REM statements which gave insight on what a given line was doing (ie. REM This line initializes the randomizer and sets the random numbers highest number as 16).

I am sure, I will get it eventually ... I always do, but I see that it will take a lot more time to make sense of what I see before me.

Thanks again for your help.
Always appreciated.
derekb

Pertex
27 Jan 2012, 10:57
Of course I know Basic. I startet with a C64 and I loved VB6. And you are right, I don't use much comments in my libraries. :D

A library is just a container. It can contain all the elements of quest, which you can find in the mainfile of your Questfile, too. If you include a library to your gamefile, you can use all the objects, functions, types... from within the library (so you dont need to copy code to your file).

I am sure, I will get it eventually ... I always do, but I see that it will take a lot more time to make sense of what I see before me.


Yes thats right, but its worth. If you understand how to work with Quest, you can work with nearly every computer language.