android
  #41  
Old 09-03-2010, 10:04 AM
Habhome's Avatar
Habhome Habhome is offline
Moderator
 
Join Date: Jan 2010
Location: Sweden
Posts: 1,079
Default

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
(Values are the starting values)
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.
Reply With Quote

Advertisement [Remove Advertisement]

  #42  
Old 09-03-2010, 05:06 PM
datallboy's Avatar
datallboy datallboy is offline
Member
 
Join Date: Feb 2010
Posts: 143
Default

When will it be released!?
__________________
I wUz he3R
Reply With Quote

  #43  
Old 09-04-2010, 02:48 AM
RobertsAccount's Avatar
RobertsAccount RobertsAccount is offline
X-Fi2 App Master
 
Join Date: Jan 2010
Location: UK
Posts: 310
Default

Quote:
Originally Posted by datallboy View Post
When will it be released!?
...
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.
Reply With Quote

  #44  
Old 09-04-2010, 03:43 AM
Redwolfhome's Avatar
Redwolfhome Redwolfhome is offline
Junior Member
 
Join Date: Mar 2010
Location: Germany
Posts: 91
Default

Yes thats right
We have to wait...
:-)
Reply With Quote

  #45  
Old 09-04-2010, 05:12 AM
Habhome's Avatar
Habhome Habhome is offline
Moderator
 
Join Date: Jan 2010
Location: Sweden
Posts: 1,079
Default

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. ^.^
Reply With Quote

  #46  
Old 09-04-2010, 09:24 AM
jbob182's Avatar
jbob182 jbob182 is offline
X-Fi2 Development Moderator
 
Join Date: Feb 2010
Location: The U.S.A.
Posts: 554
Default

will you have potions in the game ie: a health one, or magic one to replenish you stats
Reply With Quote

  #47  
Old 09-04-2010, 12:22 PM
Habhome's Avatar
Habhome Habhome is offline
Moderator
 
Join Date: Jan 2010
Location: Sweden
Posts: 1,079
Default

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. ^.^
Reply With Quote

  #48  
Old 09-04-2010, 02:35 PM
Habhome's Avatar
Habhome Habhome is offline
Moderator
 
Join Date: Jan 2010
Location: Sweden
Posts: 1,079
Default

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. ^.^
Reply With Quote

  #49  
Old 09-05-2010, 05:23 AM
S1M1S S1M1S is offline
Junior Member
 
Join Date: Aug 2010
Location: Thailand
Posts: 23
Default

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
Strength is the level, and expStrength is amount of XP, right? So we'd want something like:
Code:
if expStrength = Strength*100 then
Strength+ = 1
expStrength = 0
Right? That on its own won't do anything like that of course, but is that basically what you want?
Reply With Quote

  #50  
Old 09-05-2010, 09:44 AM
Habhome's Avatar
Habhome Habhome is offline
Moderator
 
Join Date: Jan 2010
Location: Sweden
Posts: 1,079
Default

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. ^.^
Reply With Quote

  #51  
Old 09-05-2010, 12:26 PM
Habhome's Avatar
Habhome Habhome is offline
Moderator
 
Join Date: Jan 2010
Location: Sweden
Posts: 1,079
Default

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...
Attached Images
File Type: png battlefield.png (84.2 KB, 14 views)
__________________
"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. ^.^
Reply With Quote

  #52  
Old 09-07-2010, 09:13 AM
S1M1S S1M1S is offline
Junior Member
 
Join Date: Aug 2010
Location: Thailand
Posts: 23
Default

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
I'm sure that that is pretty easy to understand, but as an example:

Code:
if easyCreatureDefeated == 1 then
giveExp("strength", 100)
giveExp("magic",200)
end
Or for higher levels:

Code:
if hardCreatureDefeated == 1 then
giveExp("strength", 3000)
giveExp("magic",5000)
end
Or if you're feeling sadistic and want players to feel the BURN

Code:
if died == 1 then
giveExp("other",-100)
end
Tell me if that was what you wanted

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...
Reply With Quote

  #53  
Old 09-07-2010, 11:21 AM
Habhome's Avatar
Habhome Habhome is offline
Moderator
 
Join Date: Jan 2010
Location: Sweden
Posts: 1,079
Default

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. ^.^
Reply With Quote

  #54  
Old 09-08-2010, 03:31 AM
S1M1S S1M1S is offline
Junior Member
 
Join Date: Aug 2010
Location: Thailand
Posts: 23
Default

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...
Reply With Quote

  #55  
Old 09-08-2010, 03:49 AM
S1M1S S1M1S is offline
Junior Member
 
Join Date: Aug 2010
Location: Thailand
Posts: 23
Default

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
It's kinda sad how I can no longer declare expMultiply though... or can I?

Last edited by S1M1S; 09-08-2010 at 08:04 AM.
Reply With Quote

  #56  
Old 09-08-2010, 10:29 AM
Brett_val's Avatar
Brett_val Brett_val is offline
Senior Member
 
Join Date: Jan 2010
Location: The Netherlands
Posts: 636
Default

Did you try it on a simulator
__________________
this is a link to my personal homepage which I haven't
Reply With Quote

  #57  
Old 09-08-2010, 11:05 AM
Habhome's Avatar
Habhome Habhome is offline
Moderator
 
Join Date: Jan 2010
Location: Sweden
Posts: 1,079
Default

Quote:
Originally Posted by S1M1S View Post
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...
No, no. You misunderstood. Check again. I was implying that you were MISSING an "=", not had one too many. I made it red to emphasize the change I had made to the code block.

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. ^.^
Reply With Quote

  #58  
Old 09-08-2010, 12:58 PM
Brett_val's Avatar
Brett_val Brett_val is offline
Senior Member
 
Join Date: Jan 2010
Location: The Netherlands
Posts: 636
Default

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
Reply With Quote

  #59  
Old 09-08-2010, 02:56 PM
Habhome's Avatar
Habhome Habhome is offline
Moderator
 
Join Date: Jan 2010
Location: Sweden
Posts: 1,079
Default

Quote:
Originally Posted by Brett_val View Post
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)
That looks awesome. The only reason I've been reluctant to using tables is because I'm not sure how to best save the data in a table. If you can help me with learning this I may rewrite some code to make it easier and use such a thing instead. I might also add your function since it seems pretty good, as expected by you Brett
__________________
"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. ^.^
Reply With Quote

  #60  
Old 09-08-2010, 03:18 PM
Brett_val's Avatar
Brett_val Brett_val is offline
Senior Member
 
Join Date: Jan 2010
Location: The Netherlands
Posts: 636
Default

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
Reply With Quote

Reply

Tags
creative, habhome, lua, neko apprentice, rpg, xfi2, zen

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 02:03 AM.