Castle Paradox Forum Index Castle Paradox

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Gamelist   Review List   Song List   All Journals   Site Stats   Search Gamelist   IRC Chat Room

Need info on custom-build of the OHR experience system.

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> The Arcade
View previous topic :: View next topic  
Author Message
HarlockHero
Lord of Romanticism




Joined: 03 Feb 2003
Posts: 58
Location: Florida

PostPosted: Wed Nov 16, 2005 8:54 am    Post subject: Need info on custom-build of the OHR experience system. Reply with quote

Hi everyone.

With the OHRRPGCE recently going open-source, we've seen a lot of people doing their own custom-builds of the system to tweak various things specific to the games they want to make. As most of you might know, Shizuma (aka Konami) and I have been working on our game for some time now. As we're hitting the final stretch of development, though, I've been growing dissatisfied with the OHR's default experience setup. As such, I'd like to put a call out for anyone knowledgable enough to assist us in customizing that area of the OHR architecture.

Basically, all we need is for someone to change for us the values for when characters level up. For example, right now, characters go from level 1 to level 2 when they get 41 experience. Presume we wanted to change that to something like 60, and so on for each level up to 50. The actual numbers will be different, but the principle is the same. If you'd like to help out, please contact me by commenting to this post, reaching me on AIM (harlockdhero) or emailing me at harlockhero@verizon.net, and we'll discuss it in further details (such as what you'll get in return for your efforts, or details on what our game is about).

Many thanks to anyone who volunteers.
_________________
Back to top
View user's profile Send private message Visit poster's website AIM Address
Mike Caron
Technomancer




Joined: 26 Jul 2003
Posts: 889
Location: Why do you keep asking?

PostPosted: Wed Nov 16, 2005 10:21 am    Post subject: Reply with quote

Do you have a particular formula in mind?

The current formula is e(l) = 1.2e(l-1) + 5, or e(l) = 30, if n = 0. The easiest thing to change change is the coeficient of e(l-1), the +5, or the seed (e(l)).

The other thing to keep in mind is that currently, experience is capped at 1,000,000 per level-up. I'm not sure why that is, since the total experience at level 100 is only around 51,000,000, and it should be able to handle around 2,000,000,000 experience total.

So, in summary, there's three things you can change (in order of most radical to least):

* The coefficient of e(l-1)
* The seed
* The +5
* The cap
_________________
I stand corrected. No rivers ran blood today. At least, none that were caused by us.

Final Fantasy Q
OHR Developer BLOG
Official OHRRPGCE Wiki and FAQ
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
HarlockHero
Lord of Romanticism




Joined: 03 Feb 2003
Posts: 58
Location: Florida

PostPosted: Wed Nov 16, 2005 11:31 am    Post subject: Reply with quote

Hmm... your explanation brings a thought to mind. Is it possible to simply establish a level cap (say, of 50) without taking the obvious route of an after-battle script for every map? The latter isn't an option due to several bugs in the OHR's code, so is "maximum level" an easily alterable variable? If so, I might tweak the changes I have in mind. Thanks for your help so far!
_________________
Back to top
View user's profile Send private message Visit poster's website AIM Address
HarlockHero
Lord of Romanticism




Joined: 03 Feb 2003
Posts: 58
Location: Florida

PostPosted: Wed Nov 16, 2005 12:59 pm    Post subject: Reply with quote

Also, since you seem to have an intimate knowledge of the inner workings of the engine, what is the formula for how many points a stat goes up in any given level? I know it's dependant upon what you set as the lv1 and lv99 values, but I can't figure out how the curve is calculated. If you could give me assistance on this, I think I'll be able to properly balance the system without altering the OHR's code in any way. Thanks in advance!
_________________
Back to top
View user's profile Send private message Visit poster's website AIM Address
HarlockHero
Lord of Romanticism




Joined: 03 Feb 2003
Posts: 58
Location: Florida

PostPosted: Wed Nov 16, 2005 3:15 pm    Post subject: Reply with quote

For what it's worth, I isolated the part of the code that I'm pretty sure deals with the above question. Anyone want to help me decipher it?

SUB updatestatslevelup (i, exstat(), stat(), learnmask())

' i = who
' exstat = external stats
' stat = in-battle stats
' learnmask = which spells learned

'THIS PART UPDATES STATS FOR A LEVEL UP
IF exstat(i, 1, 12) > 0 THEN

'load hero's data
setpicstuf buffer(), 636, -1
loadset game$ + ".dt0" + CHR$(0), hero(i) - 1, 0

'update stats
FOR o = 0 TO 11
exstat(i, 1, o) = exstat(i, 1, o) + (atlevel(exstat(i, 0, 12), buffer(23 + o * 2), buffer(24 + o * 2)) - atlevel(exstat(i, 0, 12) - exstat(i, 1, 12), buffer(23 + o * 2), buffer(24 + o * 2)))
'simulate levelup bug
IF readbit(gen(), 101, 9) = 1 THEN
setpicstuf buffer(), 200, -1
FOR j = 0 TO 4
IF eqstuf(i, j) > 0 THEN
loadset game$ + ".itm" + CHR$(0), eqstuf(i, j) - 1, 0
exstat(i, 1, o) = exstat(i, 1, o) + buffer(54 + o)
END IF
NEXT j
setpicstuf buffer(), 636, -1
loadset game$ + ".dt0" + CHR$(0), hero(i) - 1, 0
END IF
NEXT o

'stat restoration
IF readbit(gen(), 101, 2) = 0 THEN
'--HP restoration ON
exstat(i, 0, 0) = exstat(i, 1, 0) 'set external cur to external max
FOR o = 0 TO 1
stat(i, o, 0) = exstat(i, 1, 0) 'set in-battle min and max to external max
NEXT o
END IF
IF readbit(gen(), 101, 3) = 0 THEN
'--MP restoration ON
exstat(i, 0, 1) = exstat(i, 1, 1) 'set external cur to external max
FOR o = 0 TO 1
stat(i, o, 1) = exstat(i, 1, 1) 'set in-battle min and max to external max
NEXT o
resetlmp i, exstat(i, 0, 12)
END IF

'make current stats match max stats
FOR o = 2 TO 11
exstat(i, 0, o) = exstat(i, 1, o)
NEXT o

'learn spells
FOR j = 0 TO 3
FOR o = 0 TO 23
'--if slot is empty and slot accepts this spell and learn-by-level condition is true
IF spell(i, j, o) = 0 AND buffer(47 + (j * 48) + (o * 2)) > 0 AND buffer(48 + (j * 48) + (o * 2)) - 1 <= exstat(i, 0, 12) AND buffer(48 + (j * 48) + (o * 2)) > 0 THEN
spell(i, j, o) = buffer(47 + (j * 48) + (o * 2))
setbit learnmask(), 0, i * 96 + j * 24 + o, 1
END IF
NEXT o
NEXT j

END IF

END SUB
_________________
Back to top
View user's profile Send private message Visit poster's website AIM Address
Moogle1
Scourge of the Seas
Halloween 2006 Creativity Winner
Halloween 2006 Creativity Winner



Joined: 15 Jul 2004
Posts: 3377
Location: Seattle, WA

PostPosted: Wed Nov 16, 2005 4:12 pm    Post subject: Reply with quote

See my comment in your LJ post; also, level capping is easy enough to do.
_________________
Back to top
View user's profile Send private message Visit poster's website AIM Address
Bob the Hamster
OHRRPGCE Developer




Joined: 22 Feb 2003
Posts: 2526
Location: Hamster Republic (Southern California Enclave)

PostPosted: Thu Nov 17, 2005 10:47 am    Post subject: Integration into the trunk Reply with quote

If you implement an alternate experience setup as a selectable option from the "General Game Data" menu, this could go into the official trunk.

By the way, the code cleanup neccisary to do that is pretty much the same code cleanup neccisary before implementing plotscripting commands for correctly setting hero level.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Fri Nov 18, 2005 2:25 am    Post subject: Reply with quote

I'll add that onto the todo list, which I'll tackle after exams (only half a week to go).
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Castle Paradox Forum Index -> The Arcade All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group