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

De-leveling instead of game over

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
Ronin Catholic
Deadliest of Fairies




Joined: 23 Jul 2007
Posts: 530
Location: My Girlfriend

PostPosted: Thu Mar 31, 2011 9:27 am    Post subject: De-leveling instead of game over Reply with quote

Instead of a normal death, I want to have the hero lose an experience level and get sent through Door 0.

Can this be done?
_________________
"I didn't start the flame war;
I don't know what you thought here
'Twas that way when I got here"

"I didn't start the flame war;
I can't understand a word you're saying
nor the game you're playing~"
Back to top
View user's profile Send private message
Bob the Hamster
OHRRPGCE Developer




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

PostPosted: Thu Mar 31, 2011 9:36 am    Post subject: Re: De-leveling instead of game over Reply with quote

Ronin Catholic wrote:
Instead of a normal death, I want to have the hero lose an experience level and get sent through Door 0.

Can this be done?


Yes, you want to write a script that will be used as the "Game Over" script. (look in "Edit General Game Data" in "Special Plotscripts")

The command you want to use for de-leveling the hero is set hero level
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Ronin Catholic
Deadliest of Fairies




Joined: 23 Jul 2007
Posts: 530
Location: My Girlfriend

PostPosted: Sun Apr 03, 2011 5:41 pm    Post subject: Reply with quote

I've tried it out, and most of the script seems to work. It compiles correctly and everything, but the hero's level doesn't actually seem to drop.

Code:
plotscript, die, begin
 set hero level (me, -1, false)
 set hero stat (me, 0, 8, current stat)
 use door (0)
end

Is there anything wrong with this?
_________________
"I didn't start the flame war;
I don't know what you thought here
'Twas that way when I got here"

"I didn't start the flame war;
I can't understand a word you're saying
nor the game you're playing~"
Back to top
View user's profile Send private message
Moogle1
Scourge of the Seas
Halloween 2006 Creativity Winner
Halloween 2006 Creativity Winner



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

PostPosted: Sun Apr 03, 2011 10:26 pm    Post subject: Reply with quote

Yes, you are attempting to set the hero's level to -1.
_________________
Back to top
View user's profile Send private message Visit poster's website AIM Address
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Mon Apr 04, 2011 1:37 am    Post subject: Reply with quote

Sorry for not throwing an error if the level is invalid.

It's odd to see you write "0" instead of "Stat:HP". How did you know that HP is stat number 0 without looking in your .hsi file anyway?
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
Ronin Catholic
Deadliest of Fairies




Joined: 23 Jul 2007
Posts: 530
Location: My Girlfriend

PostPosted: Mon Apr 04, 2011 8:36 am    Post subject: Reply with quote

The Mad Cacti wrote:
Sorry for not throwing an error if the level is invalid.

It's odd to see you write "0" instead of "Stat:HP". How did you know that HP is stat number 0 without looking in your .hsi file anyway?

My HP stat is named (Heart icon); I figured that HP would be stat 0 because it's the first line of the custom text string menu, and looked in the .hsi file to double-check (stat:Strength was 2, so I logically extrapolated that MP would be 1 and HP would be 0).

Quote:
Yes, you are attempting to set the hero's level to -1.

How do I make it check what his current level is, subtract one, and make it set his level to that then?
_________________
"I didn't start the flame war;
I don't know what you thought here
'Twas that way when I got here"

"I didn't start the flame war;
I can't understand a word you're saying
nor the game you're playing~"
Back to top
View user's profile Send private message
Moogle1
Scourge of the Seas
Halloween 2006 Creativity Winner
Halloween 2006 Creativity Winner



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

PostPosted: Mon Apr 04, 2011 11:05 am    Post subject: Reply with quote

http://rpg.hamsterrepublic.com/ohrrpgce/Plot:Get_hero_level
_________________
Back to top
View user's profile Send private message Visit poster's website AIM Address
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Mon Apr 04, 2011 11:01 pm    Post subject: Reply with quote

Ronin Catholic wrote:
My HP stat is named (Heart icon); I figured that HP would be stat 0 because it's the first line of the custom text string menu, and looked in the .hsi file to double-check (stat:Strength was 2, so I logically extrapolated that MP would be 1 and HP would be 0).


Oooh. OK, carry on.

...

So basically, set the level to "get hero stat (me) -- 1".
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
Moogle1
Scourge of the Seas
Halloween 2006 Creativity Winner
Halloween 2006 Creativity Winner



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

PostPosted: Tue Apr 05, 2011 8:18 am    Post subject: Reply with quote

The Mad Cacti wrote:
So basically, set the level to "get hero stat (me) -- 1".

No, no, that would be a bad idea.
_________________
Back to top
View user's profile Send private message Visit poster's website AIM Address
Ronin Catholic
Deadliest of Fairies




Joined: 23 Jul 2007
Posts: 530
Location: My Girlfriend

PostPosted: Tue Apr 05, 2011 10:15 am    Post subject: Reply with quote

Moogle1 wrote:
http://rpg.hamsterrepublic.com/ohrrpgce/Plot:Get_hero_level

Now I've got
Code:
plotscript, die, begin
 get hero level (me) # Finds the hero's level
 #I'd assume the "subtract" command does somthing here
  set hero level (me, ???, false) # I don't know what I'm supposed to do with this
 set hero stat (me, 0, 8, current stat)
 use door (0)
end

_________________
"I didn't start the flame war;
I don't know what you thought here
'Twas that way when I got here"

"I didn't start the flame war;
I can't understand a word you're saying
nor the game you're playing~"
Back to top
View user's profile Send private message
Bob the Hamster
OHRRPGCE Developer




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

PostPosted: Tue Apr 05, 2011 12:58 pm    Post subject: Reply with quote

by just putting "get hero level (me)" by itself on a line, you don't do anything with the value. it just gets thrown away. You should store it in a variable.

Code:

plotscript, die, begin
 variable(lev)
 lev := get hero level (me) # Finds the hero's level
 lev := lev -- 1
 if (lev >= 0) then(
  set hero level (me, lev, false)
  set hero stat (me, 0, 8, current stat) # why?
 )
 use door (0)
end


Also, I have another concern. You are using "me" which means "0". it is really intended for the caterpillar leader which is NOT ALWAYS the same as the battle party leader.

This script will work fine if your leader is always in battle slot 0, and cannot be moved, however if the leader is in some other slot, this script will totally fail.

Here is a version which works for all heroes in the party no matter how many of them there are or what order they are in:

Code:

plotscript, die, begin
 variable(slot, lev)
 for(slot, 0, 3) do(
   if(hero by slot(slot) >= 0) then(
     lev := get hero level (slot)
     lev := lev -- 1
     if (lev >= 0) then(
       set hero level (slot, lev, false)
     )
   )
 )
 use door (0)
end


Oh! I just noticed another potential problem. "use door(0)" would require you to set up door 0 on every single map. It could be a lot easier if you use the "teleport to map" command.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Ronin Catholic
Deadliest of Fairies




Joined: 23 Jul 2007
Posts: 530
Location: My Girlfriend

PostPosted: Thu Apr 07, 2011 12:36 pm    Post subject: Reply with quote

The point is to warp to the exit of the previous map; this game's setup is going to be very linear (there's also going to be a puzzle that requires dying to advance). The team/order menu is outright disabled in this game, and there's only one way to get any additional party members (who are all alike). Still, the one for de-leveling all the optional guys as well looks like a good idea.

Thanks for the help, everyone!
_________________
"I didn't start the flame war;
I don't know what you thought here
'Twas that way when I got here"

"I didn't start the flame war;
I can't understand a word you're saying
nor the game you're playing~"
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP! All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can 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