need help on my RPG

CloudStrife
12-07-2001, 03:42 PM
i need to know how i would make characters level up if i made an RPG

ChiefRedBull
12-07-2001, 03:44 PM
We're gonna need a *whole* lot more info than that......

CloudStrife
12-07-2001, 03:46 PM
i need to know how to when a character hits a certian point it will change the properties of that peticular character

Squirm
12-07-2001, 03:50 PM
Right, the fact that you say IF you made an RPG suggests you havent tried this for yourself. I propose you try coding something first and then come back with problems. The difficulty of it really depends on how complex your level-up procedure is going to be. For example, you could just check when the character reaches a certain point and then add 1 to the Intelligence attribute or whatever. Or your level-up might be based on combat success. As I say, do some work and then come asking questions.

images/icons/smile.gif

Flyguy
12-07-2001, 03:50 PM
This all depends on the design of your RPG game, there is no generic LEVELUP code ...

Defiance
12-07-2001, 04:01 PM
I tried making a text-based RPG game (yeah I know, not really an RPG per se). The way I did the level up code is something similiar to this:

<pre>Private Type MainChar
HitPoints as Long
Level as Integer
Experience as Long
ExperienceNeeded as Long
Name as String
Level as Integer
End Type

Private Hero as MainChar
Private Counter as Integer

Private Sub Something_Click()
If Hero.Experience =&gt; Hero.ExperienceNeeded Then
Hero.Level = Hero.Level + 1
Hero.ExperienceNeeded = Hero.ExperienceNeeded + 3500 * Counter
End If
End Sub</pre>

I don't know if I made any mistakes as I just typed this up real fast on my new WinXP so I'm kinda anxious to explore. A Quick note: the variable counter in the line:

<pre>Hero.ExperienceNeeded = Hero.ExperienceNeeded + 3500 * Counter</pre>

Is just a variable to multiply the needed 3500 experience by, there are many other complex way to calculate the total needed experience but this way I just did for quickness purposes. You might also want to try to multiple 3500 * Hero.Level to = the Hero.ExperienceNeeded.

--Defiance

CloudStrife
12-07-2001, 04:06 PM
ahh thats how it would go that works out perfectly
thanks a bunch

Defiance
12-07-2001, 04:07 PM
No problem, glad I could help.

--Defiance

Programmer101
12-07-2001, 04:19 PM
well, in my opinion..i may be a newcomer according to here but i know enough to get me buy, start off simple, like get the character up, and have it with text boxes with certain numbers in for attributes, then put something like:

If Text1.Text="Number" then Text2.Text=2

the text1 box may be your characters str, and the text2.box may be your characters level, and just use that code to change abilities and stuff..get it?

joffee
12-17-2001, 11:23 AM
Personally, I believe variables are the way to go... Seriously, the textbox's are in fact simple and that would be the way to go if it was like your first time ever... But I strongly recommend variables.. I too am new to this website, yet not to the programming field.
Variables are hidden within the program they'd definitley be easy to program and work with while saving and getting settings... I haven't seen any of this code posted on this website which is odd to me, but hey, most people may not like it... i would do this Defiance's code if I had to choose one that was posted because it's hidden inside the program and you don't need textbox's drawn out onto the form of any of that nonsense. Whehther you use textbox's or not, you can do a save/load feature around both ways... By Doing this...

if you use a variable then do it this way:
SaveSetting("MyGame", "CharacterLevel", "CharLevel", ChrLev)

then later you can do this to load it:
ChrLev = GetSetting("MyGame","CharacterLevel","CharLevel",0)

or do it the same way with textbox's...

SaveSetting("MyGame", "CharacterLevel", "CharLev", ChrLev.text)

then to load the information from within the program:

ChrLev.text = GetSetting("MyGame", "CharacterLevel", "CharLev",0)

this will load the variable information into the textbox...
this type of programming code saves the information into the program and you can retrieve it later.... Bu that's just something I would do... In my opinion...

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum