|
|||||||
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#41
|
||||
|
||||
|
Yes exactly, call it with the "magic" parameter, and then it adds it to the magic skill. It will do the same with Strength. I still need a third skill though.
The global variables you have access to and need are: Code:
Strength = 1 expStrength = 0 Magic = 1 expMagic = 0 There will be similar post for the third skill, with the level as the skill name itself and the exp with the prefix "exp". But what should the third skill be? I am slowly getting adjusted to Uni life and right now I seem to have a pretty free weekend, so I might be able to do some coding on this.
__________________
"If you are good enough at English to apologize, then there is no need to." - A good friend of mine Discovered something about the X-Fi2 you think others may not know? Post it here so others can learn about it! Have a question about X-Fi2 apps? Consult the FAQ before creating a thread about it. Like my work? Tell your friends. Don't like it? Tell me so I can improve. ^.^ Last edited by Habhome; 09-03-2010 at 10:22 AM. |
|
|
|||
|
|
|
#42
|
||||
|
||||
|
When will it be released!?
__________________
I wUz he3R
|
|
#43
|
||||
|
||||
|
...
Welcome to homebrew gaming my friend, where we know nothing of release dates. I know the anticipation must be killing you, but please try and hold back from asking this question as developers such as Habhome do this stuff in their free time. It will be released when it's ready. No sooner, no later. |
|
#44
|
||||
|
||||
|
Yes thats right
We have to wait... :-) |
|
#45
|
||||
|
||||
|
Indeed, and with my summer vacation gone into the past and my new University life starting my development time shrank drastically down to only late evenings or weekends. I will keep you guys updated with screens and videos until I have some kind of playable elements in the game.
Maybe, and I say that with stress on "maybe", I will be able to get some form of training and maybe fighting(without the final graphics) done this weekend. But that is only if I spend most of my time on this and don't go out of my room the entire weekend. Another thing! The player will have an inventory with about 4-8 specific items you can pick up and use, so far there is a rock and a key, I need suggestions for other things which can be used for some kind of mystery or for opening special things. Let your fantasy run free and come with ideas, preferably with an explanation of its usage.
__________________
"If you are good enough at English to apologize, then there is no need to." - A good friend of mine Discovered something about the X-Fi2 you think others may not know? Post it here so others can learn about it! Have a question about X-Fi2 apps? Consult the FAQ before creating a thread about it. Like my work? Tell your friends. Don't like it? Tell me so I can improve. ^.^ |
|
#46
|
||||
|
||||
|
will you have potions in the game ie: a health one, or magic one to replenish you stats
|
|
#47
|
||||
|
||||
|
Yes, I was planning to add both of those potions. Never thought about adding it to that inventory though, since I more thought about that for things you use in the "explore" interface, and potions are used in the fighting interface.
__________________
"If you are good enough at English to apologize, then there is no need to." - A good friend of mine Discovered something about the X-Fi2 you think others may not know? Post it here so others can learn about it! Have a question about X-Fi2 apps? Consult the FAQ before creating a thread about it. Like my work? Tell your friends. Don't like it? Tell me so I can improve. ^.^ |
|
#48
|
||||
|
||||
|
Earlier today I said I might be able to get some fighting finished this weekend. As it is I really doubt that since I was out quite a bit today and tomorrow I have a field target competition. I am designing the fighting interface though. Something I will need help with are three pictures:
A bag Magic icon (wands or something fitting) Melee icon (Claws or something fitting) The images should be 70x70 pixels and have a transparent background (No need to fill all the canvas with something). They have to be made from scratch by you personally, I only use original art in this game.
__________________
"If you are good enough at English to apologize, then there is no need to." - A good friend of mine Discovered something about the X-Fi2 you think others may not know? Post it here so others can learn about it! Have a question about X-Fi2 apps? Consult the FAQ before creating a thread about it. Like my work? Tell your friends. Don't like it? Tell me so I can improve. ^.^ |
|
#49
|
|||
|
|||
|
Alright, let me just clear up a few more things for my formula. Do you want me to make it so that:
> As you go up levels, it takes more XP to go up? (I'll let you alter the variables) > There is an unlimited amount of levels? Also, when you say Code:
Strength = 1 expStrength = 0 Code:
if expStrength = Strength*100 then Strength+ = 1 expStrength = 0 |
|
#50
|
||||
|
||||
|
Yes, kind of like that, but without resetting the exp. And yes it should get increasingly harder to achieve the next level. And as for unlimited, well, that wouldn't hurt really I think. Since it'll get harder faster and faster towards the end so there will be kind of a limit to what you can manage =P
__________________
"If you are good enough at English to apologize, then there is no need to." - A good friend of mine Discovered something about the X-Fi2 you think others may not know? Post it here so others can learn about it! Have a question about X-Fi2 apps? Consult the FAQ before creating a thread about it. Like my work? Tell your friends. Don't like it? Tell me so I can improve. ^.^ |
|
#51
|
||||
|
||||
|
I was trying to make a "battlefield" background, but I fail at making larger images in a matching style to the game. So I need an image with the same proportions as the image attached, and which looks kinda like it, but with a style more fitting to the game itself, more pixel art that is.
It is my attempt, and as you see it doesn't match very well with the style...
__________________
"If you are good enough at English to apologize, then there is no need to." - A good friend of mine Discovered something about the X-Fi2 you think others may not know? Post it here so others can learn about it! Have a question about X-Fi2 apps? Consult the FAQ before creating a thread about it. Like my work? Tell your friends. Don't like it? Tell me so I can improve. ^.^ |
|
#52
|
|||
|
|||
|
Right, so is this what you were looking for?
Code:
expMultiply = 100 ;; You can change this to what you want function giveExp(skill, expUp) if skill == "magic" then expMagic+ = expUp if expMagic = Magic*expMultiply then Magic+ = 1 end elseif skill == "strength" then expStrength+ = expUp if expStrength = Strength*expMultiply then Strength+ = 1 end else skill == "other" then expOther+ = expUp if expOther = Other*expMultiply then Other+ = 1 end end end Code:
if easyCreatureDefeated == 1 then
giveExp("strength", 100)
giveExp("magic",200)
end
Code:
if hardCreatureDefeated == 1 then
giveExp("strength", 3000)
giveExp("magic",5000)
end
Code:
if died == 1 then
giveExp("other",-100)
end
![]() Ooh, and as a side note, my brother mentioned 'agility' as another skill, so if you are really good at it, you dodge attacks and stuff - kinda like defense but more... cat-like... |
|
#53
|
||||
|
||||
|
Yeah, pretty much what I wanted, looks great. And yeah I was thinking defense, but agility could be, as you say, more cat-like. I think I'll go for that actually.
A simple syntax error in your code though. Code:
if expOther == Other*expMultiply then same in two other places. And this way it'll always be 100 to the next level (or whatever the expMultiply is) I was more after a good formula to get a greater increase in necessary exp as the levels get harder. 1,3x^2 or whatever, something well balanced.
__________________
"If you are good enough at English to apologize, then there is no need to." - A good friend of mine Discovered something about the X-Fi2 you think others may not know? Post it here so others can learn about it! Have a question about X-Fi2 apps? Consult the FAQ before creating a thread about it. Like my work? Tell your friends. Don't like it? Tell me so I can improve. ^.^ |
|
#54
|
|||
|
|||
|
Hmm... but I was sure that was what you were supposed to doin Lua? like if you only had one = then it would give an angry face and say WTF DUDE?
I'll work on improving my code... like now... |
|
#55
|
|||
|
|||
|
Code:
function giveExp(skill, expUp) if skill = "magic" then expMagic+ = expUp if expMagic = ((Magic/2)^2)*100 then Magic+ = 1 end elseif skill = "strength" then expStrength+ = expUp if expStrength = ((Strength/2)^2)*100 then Strength+ = 1 end else expOther+ = expUp if expOther = ((Other/2)^2)*100 then Other+ = 1 end end end Last edited by S1M1S; 09-08-2010 at 08:04 AM. |
|
#56
|
||||
|
||||
|
Did you try it on a simulator
__________________
this is a link to my personal homepage which I haven't |
|
#57
|
||||
|
||||
|
Quote:
And as for the multiply, you can't use it as a multiply anymore, but you can use a variable to easily change the behavior of it. TBH, what I am searching for the most is a balanced formula for increase in the exp needed. The code around it I could easily make once that formula is decided on.
__________________
"If you are good enough at English to apologize, then there is no need to." - A good friend of mine Discovered something about the X-Fi2 you think others may not know? Post it here so others can learn about it! Have a question about X-Fi2 apps? Consult the FAQ before creating a thread about it. Like my work? Tell your friends. Don't like it? Tell me so I can improve. ^.^ |
|
#58
|
||||
|
||||
|
Why don't put the exp in a table? Would make the function a lot shorter. Also, if you want it to get increasingly harder to progress to the next level, I think you should work with a parabola. [edit: I realize s1m1s already did this.. well sorry I was just bored and felt like messing around with some formulas] This is just an example and should be fine-tuned to suit your needs;
Code:
exp={0,0,0}
magic=1
strength=2
agility=3
level={0,0,0}
function giveexp(skill,up)
exp[skill] = exp[skill] + up
if exp[skill] >= 10 * level[skill]^1.8 then
level[skill] = level[skill] + 1
end
end
giveexp(magic,10)
__________________
this is a link to my personal homepage which I haven't Last edited by Brett_val; 09-08-2010 at 02:48 PM. Reason: little simplification |
|
#59
|
||||
|
||||
|
Quote:
__________________
"If you are good enough at English to apologize, then there is no need to." - A good friend of mine Discovered something about the X-Fi2 you think others may not know? Post it here so others can learn about it! Have a question about X-Fi2 apps? Consult the FAQ before creating a thread about it. Like my work? Tell your friends. Don't like it? Tell me so I can improve. ^.^ |
|
#60
|
||||
|
||||
|
Hey thanks man
![]() I've been playing around with tables lately, I was trying to make a tower defence game and that's really a table-challenge . I found that tables are really handy to handle a lot of data with the least amount of coding lines.I'm not sure what kind of data you're talking about, maybe if you describe some problems I can play around with it.
__________________
this is a link to my personal homepage which I haven't |
![]() |
| Tags |
| creative, habhome, lua, neko apprentice, rpg, xfi2, zen |
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
All times are GMT -5. The time now is 03:49 PM.











I wUz he3R


. I found that tables are really handy to handle a lot of data with the least amount of coding lines.
Linear Mode
