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

Changing the level gain of FF1 style spells?
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Castle Paradox Forum Index -> The Arcade
View previous topic :: View next topic  
Author Message
Spoon Weaver




Joined: 18 Nov 2008
Posts: 421
Location: @home

PostPosted: Tue Nov 18, 2008 5:59 pm    Post subject: Changing the level gain of FF1 style spells? Reply with quote

I'd love to be able to let my little rpg characters to use ff1 style spells but I don't really like the amount gained where it's gain at which level. So instead of browsing the source code for hours upon hours I figured I'd ask to see if I could get a clue as to where to find said code, or maybe if I was lucky, someone would do ( or has already done ) the work for me.

thank you for your time.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Robot
Skeleton King




Joined: 20 Oct 2008
Posts: 72

PostPosted: Wed Nov 19, 2008 8:23 am    Post subject: Reply with quote

Just an option:

You could make spells items, and then make a script to give you the correct amount if you stay in an inn.
_________________
---
8bitcity.blogspot.com
Back to top
View user's profile Send private message Visit poster's website
Calehay
...yeah.
Class B Minstrel



Joined: 07 Jul 2004
Posts: 549

PostPosted: Wed Nov 19, 2008 3:44 pm    Post subject: Reply with quote

You can actually control the amount of level MP using plotscripting, so there probably is no reason to dig into the source for what you are trying to do. The commands "get level mp" and "set level mp" will control this. I was going to write an example code, but I'm not quite sure exactly what you want to do with it yet.
_________________
Calehay
Back to top
View user's profile Send private message AIM Address
Rya.Reisender
Snippy




Joined: 18 Jan 2008
Posts: 821

PostPosted: Wed Nov 19, 2008 11:25 pm    Post subject: Reply with quote

What are the maximum values for those by the way? 9? 99? 255?
_________________
Snippy:
"curt or sharp, esp. in a condescending way" (Oxford American Dictionary)
"fault-finding, snappish, sharp" (Concise Oxford Dictionary, UK)
1. short-tempered, snappish, 2. unduly brief or curt (Merriam-Webster Dictionary)
Back to top
View user's profile Send private message MSN Messenger
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Thu Nov 20, 2008 6:05 am    Post subject: Reply with quote

There is no maximum amount settable with scripting for any stats.

The level mp amounts are recalculated (overwriting scripted changes) in two cases:
-a hero levels up and 'Don't Restore MP on Levelup' isn't set
-you go to an inn

So you'll want an after-battle script which is set on every map and checks 'hero levelled', and a script for every inn.

The particular function is resetlmp in moresubs.bas
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
Spoon Weaver




Joined: 18 Nov 2008
Posts: 421
Location: @home

PostPosted: Thu Nov 20, 2008 12:12 pm    Post subject: Reply with quote

Oh! so I only have to write a script that checks character level in INNs and sets the leveled MP. What a perfect idea. Plus since I already planned to have the reseting of MP off on level up, I don't have to write the other one.
Yay, ty.

Also, just for future refrence, are there any hidden stats thats would be too difficult to change with plotscripting, (example: exp needed for each 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 21, 2008 12:53 am    Post subject: Reply with quote

You can sort of change experience required for levelup with a clever and complicated script, by manipulating the amount of experience a hero has after they level up. This is possible because the player only sees the amount left to gain, not what they actually have.

Here's the script I wrote for Rya, for Gerania:

Code:
script, correct xp to level, hero, begin
  variable (level, earned xp, levelled)

  # REAL number of levels gained
  levelled := hero levelled (hero)

  level := get hero level (hero)

  # xp earned on top of the (first) levelup
  earned xp := 0
  if (levelled >> 0) then (
    level := level -- levelled + 1
    earned xp := total experience (hero) -- experience to level (level)
    set hero level (hero, level, true)
  )

  give experience (hero, experience to next level (hero) -- experience formula (level + 1) + earned xp)
  if (hero levelled (hero)) then (correct xp to level (hero))

  # just in case you want to use the herolevelled command, recursively set correct
  # levelled amount (undocumented stat tinkering!)
  if (levelled >> 0) then (set hero stat (hero, 12, hero levelled (hero) + 1, 1))

  return (earned xp)
end

script, experience formula, level, begin
  # this is the experience to reach a level from the last one. (so call with a minimum level of 1)

  # formula is lastlevel * 1.1 + 5

  variable (i, exp)
  exp := 30
  for (i, 2, level) do (exp += exp / 10 + 5)
  return (exp)
end

I'm not even totally sure how it works anymore. It's magic. correct xp to level should be called after adding a hero to the party, or after they level after a battle (but not after every battle!) It supports gaining multiple levels from a battle (but the battle might announce that you gained the wrong number!) Yeah, I should just get around to adding real support to the engine instead.

I can't think of any other problematic hero stats.
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
Spoon Weaver




Joined: 18 Nov 2008
Posts: 421
Location: @home

PostPosted: Sun Nov 23, 2008 9:16 am    Post subject: Reply with quote

SWEET thx




hurray magic
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Moogle1
Scourge of the Seas
Halloween 2006 Creativity Winner
Halloween 2006 Creativity Winner



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

PostPosted: Sun Nov 23, 2008 1:38 pm    Post subject: Reply with quote

The Mad Cacti wrote:
You can sort of change experience required for levelup with a clever and complicated script, by manipulating the amount of experience a hero has after they level up. This is possible because the player only sees the amount left to gain, not what they actually have.

Here's the script I wrote for Rya, for Gerania:

Code:
script, correct xp to level, hero, begin
  variable (level, earned xp, levelled)

  # REAL number of levels gained
  levelled := hero levelled (hero)

  level := get hero level (hero)

  # xp earned on top of the (first) levelup
  earned xp := 0
  if (levelled >> 0) then (
    level := level -- levelled + 1
    earned xp := total experience (hero) -- experience to level (level)
    set hero level (hero, level, true)
  )

  give experience (hero, experience to next level (hero) -- experience formula (level + 1) + earned xp)
  if (hero levelled (hero)) then (correct xp to level (hero))

  # just in case you want to use the herolevelled command, recursively set correct
  # levelled amount (undocumented stat tinkering!)
  if (levelled >> 0) then (set hero stat (hero, 12, hero levelled (hero) + 1, 1))

  return (earned xp)
end

script, experience formula, level, begin
  # this is the experience to reach a level from the last one. (so call with a minimum level of 1)

  # formula is lastlevel * 1.1 + 5

  variable (i, exp)
  exp := 30
  for (i, 2, level) do (exp += exp / 10 + 5)
  return (exp)
end

I'm not even totally sure how it works anymore. It's magic. correct xp to level should be called after adding a hero to the party, or after they level after a battle (but not after every battle!) It supports gaining multiple levels from a battle (but the battle might announce that you gained the wrong number!) Yeah, I should just get around to adding real support to the engine instead.

I can't think of any other problematic hero stats.


Please wikify this under Example Scripts if you haven't yet. I don't have any current need for these, but I might someday and I know others do.
_________________
Back to top
View user's profile Send private message Visit poster's website AIM Address
Rya.Reisender
Snippy




Joined: 18 Jan 2008
Posts: 821

PostPosted: Mon Nov 24, 2008 6:34 am    Post subject: Reply with quote

That's actually the script TMC wrote for me for Gerania, I didn't really want to make it public (mainly because I don't want the players to know how the mechanics work and if there are exploits to it).
_________________
Snippy:
"curt or sharp, esp. in a condescending way" (Oxford American Dictionary)
"fault-finding, snappish, sharp" (Concise Oxford Dictionary, UK)
1. short-tempered, snappish, 2. unduly brief or curt (Merriam-Webster Dictionary)
Back to top
View user's profile Send private message MSN Messenger
Spoon Weaver




Joined: 18 Nov 2008
Posts: 421
Location: @home

PostPosted: Mon Nov 24, 2008 7:35 am    Post subject: Reply with quote

It doesn't seem like there's any need to worry about exploits. But, I honestly think instead of posting this, maybe we should all work on implementing a way to change xp per level into O.H.R.rpg.C.E. itself.

..or not. I mean w/e Happy
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: Mon Nov 24, 2008 10:01 pm    Post subject: Reply with quote

OK, I added it: 'Scripts:Custom experience to level formula'.

Rya.Reisender wrote:
That's actually the script TMC wrote for me for Gerania, I didn't really want to make it public (mainly because I don't want the players to know how the mechanics work and if there are exploits to it).


It's just the level up formula, and not really exploitable, I think that the gain system is where there are potential exploits.
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
Rya.Reisender
Snippy




Joined: 18 Jan 2008
Posts: 821

PostPosted: Tue Nov 25, 2008 2:55 am    Post subject: Reply with quote

*whispers* Um, but there was that bug that the hero's level always doubled after every battle which we could never solve or reproduce.
_________________
Snippy:
"curt or sharp, esp. in a condescending way" (Oxford American Dictionary)
"fault-finding, snappish, sharp" (Concise Oxford Dictionary, UK)
1. short-tempered, snappish, 2. unduly brief or curt (Merriam-Webster Dictionary)
Back to top
View user's profile Send private message MSN Messenger
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Tue Nov 25, 2008 6:47 am    Post subject: Reply with quote

Rya.Reisender wrote:
*whispers* Um, but there was that bug that the hero's level always doubled after every battle which we could never solve or reproduce.


Uh... are you sure you told me about it? Can't reproduce it?
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
Spoon Weaver




Joined: 18 Nov 2008
Posts: 421
Location: @home

PostPosted: Tue Nov 25, 2008 11:58 pm    Post subject: Reply with quote

hmmm, haven't seen such a bug yet but i'll be on the look out.
till then.....

Just wanted to ask about somemore unalterable stats. namely random attack numbers. is there a way to change the amount of randomness?
....besides switching it off.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Castle Paradox Forum Index -> The Arcade All times are GMT - 8 Hours
Goto page 1, 2  Next
Page 1 of 2

 
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