Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Rpg game problems

Author
Message
Jerok
19
Years of Service
User Offline
Joined: 7th May 2005
Location: Mars. Wait a sec I\'m on MARS. OMG
Posted: 10th May 2005 10:00
i am nakeing an rpg game and i am having lots of problems any help would be useful
My main problem right now is when you level up your stats dont modify they just stay the same
Killonyas Slayer
19
Years of Service
User Offline
Joined: 13th Apr 2005
Location: Mozerok,Eartreg
Posted: 10th May 2005 12:20 Edited at: 23rd May 2005 04:36
nothing shows up in your code snippet.

and your source didn't post.

Timesplitter.
Killonyas Slayer
19
Years of Service
User Offline
Joined: 13th Apr 2005
Location: Mozerok,Eartreg
Posted: 11th May 2005 15:28
to make accuracy,
Jerok
19
Years of Service
User Offline
Joined: 7th May 2005
Location: Mars. Wait a sec I\'m on MARS. OMG
Posted: 12th May 2005 10:42
Thx for the help i fixed the level up system.
Jerok
19
Years of Service
User Offline
Joined: 7th May 2005
Location: Mars. Wait a sec I\'m on MARS. OMG
Posted: 12th May 2005 10:46
thx for the accuracy tip but theres a problem i think if your acuracy isnt greater then v then you will always miss or will v change after every loop???




wont v always be 50
Jerok
19
Years of Service
User Offline
Joined: 7th May 2005
Location: Mars. Wait a sec I\'m on MARS. OMG
Posted: 12th May 2005 10:50
wait a sec where is V in all of this i see variable I and variable accuracy i thought I was V for some odd reason
Jerok
19
Years of Service
User Offline
Joined: 7th May 2005
Location: Mars. Wait a sec I\'m on MARS. OMG
Posted: 12th May 2005 11:08
??the accuracy doesnt work i tried it and nothing happened
Killonyas Slayer
19
Years of Service
User Offline
Joined: 13th Apr 2005
Location: Mozerok,Eartreg
Posted: 12th May 2005 12:14
"i" is the specific number that you are on, "v" is the value of that number, it will not always equal 50.

where did you put this in your code?

i can't tell what the problem is withou knowing.
RiiDii
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 18th May 2005 06:20
A simple way of doing accuracy is to use damage and armor as accuracy and defence as well.

Basically set your Character and Enemy damage and armor, like so;

C_Dmg=C_Strength+C_Level
C_Def=C_Armor+C_Level

E_Dmg=E_Strength+E_Level
E_Def=E_Armor+E_Level

-You can change the formula's or read in the data any way you want for your specific game, this is just for demonstration.

Next, randomize the values, like so.

C_Hit=Rnd(C_Dmg)+1
C_Miss=Rnd(C_Def)+1

E_Hit=Rnd(E_Dmg)+1
E_Miss=Rnd(E_Def)+1

Now we compare attacks to defenses.

E_Hurt=C_Hit-E_Miss
C_Hurt=E_hit-C_Miss

And last, if the Hurt value is greater than 0, then a hit ocurred for Hurt damage, like so.

If E_Hurt>0
Print "You hit the enemy for ";E_Hurt
E_Health=E_Health-E_Hurt
Else
Print "You missed."
Endif

If C_Hurt>0
Print "You were hit by the enemy for ";C_Hurt
C_Health=C_Health-C_Hurt
Else
Print "Enemy missed you."
Endif

There are many ways to do a combat hit/miss/damage/armor system. It's best to have a decent system decided on before you even begin programming (you can always adjust it later). This system based loosely on a game system called "Ars Magica" or "The Art of Magic". In all my years of playing RPG's, this was one of the most simple, yet effective systems.

"Droids don't rip your arms off when they lose." -H. Solo
REALITY II
Jerok
19
Years of Service
User Offline
Joined: 7th May 2005
Location: Mars. Wait a sec I\'m on MARS. OMG
Posted: 18th May 2005 10:28
thanks for the help ive been busy for a while i am going to work on my combat system today.i have a lot of work to do ill continue to post if i have more questions
Jerok
19
Years of Service
User Offline
Joined: 7th May 2005
Location: Mars. Wait a sec I\'m on MARS. OMG
Posted: 18th May 2005 11:11
i think my combat system is bugged it does nothing at all its just a blank screen i am planning to add more to my combat system but first i have to make this work here is my code so far
James Morgan
19
Years of Service
User Offline
Joined: 17th Apr 2005
Location: Behind you
Posted: 19th May 2005 10:17 Edited at: 19th May 2005 10:29
Jerok,

Firstly try to indent and space out your code, this makes it easier to read when your looking back at it

The problem you have in that code is the second Do Loop is never called.

The program will calculate the variables, but once in the first Do Loop you do not tell the computer to run the second do loop. You can do this in many different ways, either through a function or the Goto command, personally for what your doing, keeping it all in one loop will more than likely be ok. Also I dont like using goto commands, it makes your code look like speggeti junction and creates a bigger .exe once its been compiled.

Below is a quick revise of your code, hope I havnt ruined any battle calculations!!



Although this is by far complete, the XP# doesnt seem to work, I have left this for you to work out (I find it helps me more when I don't just copy code)

Also notice I have used Text commands not Print, the reason for this is you can then easily position the text where ever you want, I also belive it runs quicker...

If you need anymore help or don't understand the code, just ask!!

James Morgan

[Edit]
If you find it easier, use the Goto commands in your main Do Loop to go between battle, story etc. As this is a small 2D program, the Goto wont really affect the .Exe size.

Also, why not think about trying to add commands to this, such as when its your turn in battle, A to attack, M for magic (then pick what type of magic) and I for Item (then you pick what type of item).
Although for starters, try just A or M for either Attack of Magic, once this is sorted, then add different types of magic etc...

You can even add colour, look into the INK command, turn your stats a different colour to the enemys + different colours for Health, Attack strength, etc...

My first sexual experiance was in my girlfriends house, then she came down stairs and ruined it...

Login to post a reply

Server time is: 2024-09-23 19:34:05
Your offset time is: 2024-09-23 19:34:05