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

Help with items
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
Kizul Emeraldfire
Type: Cyber Dragoon




Joined: 26 Mar 2004
Posts: 229

PostPosted: Fri Feb 17, 2006 4:26 pm    Post subject: Help with items Reply with quote

  I made some healing items a while back, but for some reason they don't work quite right. I'm trying to get it to where Heals heal ¼ of the target hero's Maximum HP, ½ Heals heal — well, ½ of the target hero's Maximum HP. The only heals that work are the Max Heals, and I believe you correctly guess what they do. ;)

  Anyway, here's what happens every time I try to use them (using ½ Heals as an example):

In Battle:
    I go to the Items menu, hit the Use key on the item (in this case, ½ Heal), select the hero to use it on, and if that hero has 9999 as a Maximum HP, and is down to, say somewhere between 1000 and 5000 HP when he decides to heal, he should regenerate 4999 HP.


What happens:
    The target hero's HP gets regenerated to 4999 HP. If the target hero's current HP is > 4999, it goes DOWN to 4999. The Heals are like this as well, only for them it's 2499.


I've made an example RPG file for this:
http://www.geocities.com/kizulslair/HEALS.zip

If anyone can help me out, the Red NPC tells you where to send any e-mails and stuff. Thank you for taking the time to read this. :3
Back to top
View user's profile Send private message Yahoo Messenger
Moogle1
Scourge of the Seas
Halloween 2006 Creativity Winner
Halloween 2006 Creativity Winner



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

PostPosted: Fri Feb 17, 2006 5:12 pm    Post subject: Reply with quote

Unfortunately, there's no way to do what you want right now. You're not doing anything wrong, but the feature you want is unsupported.
_________________
Back to top
View user's profile Send private message Visit poster's website AIM Address
Kizul Emeraldfire
Type: Cyber Dragoon




Joined: 26 Mar 2004
Posts: 229

PostPosted: Fri Feb 17, 2006 6:06 pm    Post subject: Reply with quote

Hmm, I see. Okay then. :3 Thanks for the info.
Back to top
View user's profile Send private message Yahoo Messenger
Battleblaze
Warrior Thread Monk




Joined: 19 Dec 2003
Posts: 782
Location: IndY OHR

PostPosted: Sat Feb 18, 2006 9:46 am    Post subject: Reply with quote

Why in th owrld would you be using super huge numbers like that?Those make tsse seem almost normal.

O and since this is the first post I've seen you do.Welcome to CP.

Neutral
_________________
Indy OHR! and National OHR Month Contest going on now!

"Aeth calls PHC an anti-semite; PHC blames anti-semitism"
-squall
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: Sat Feb 18, 2006 9:53 am    Post subject: Reply with quote

Battleblaze wrote:
Why in th owrld would you be using super huge numbers like that?Those make tsse seem almost normal.


I bet that was just an example.
_________________
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
Moogle1
Scourge of the Seas
Halloween 2006 Creativity Winner
Halloween 2006 Creativity Winner



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

PostPosted: Sat Feb 18, 2006 11:45 am    Post subject: Reply with quote

...for that matter, is it possible to put the heroes' HP above 9999 (i.e. via plotscripting or equips)? It'd be pretty cool to do tens of thousands of damage per attack and call it normal.

That said, maybe HP should be a long int.
_________________
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: Sat Feb 18, 2006 12:21 pm    Post subject: Reply with quote

Eh... I'm not entirely sure. But, we can't change it to a 32-bit int, since it's stored as a 16-bit int in the data files, in the save files, etc.
_________________
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
Fenrir-Lunaris
WUT




Joined: 03 Feb 2003
Posts: 1747

PostPosted: Sat Feb 18, 2006 12:34 pm    Post subject: Reply with quote

Moogle1 wrote:
...for that matter, is it possible to put the heroes' HP above 9999 (i.e. via plotscripting or equips)? It'd be pretty cool to do tens of thousands of damage per attack and call it normal.

That said, maybe HP should be a long int.


Hero HP can in fact go as high as 32767 or whatever the number is (with equips or items that increace max HP), although at those sorts of levels it's not convenient for balancing a game's playability. 9999 is more than most OHR games will ever see their heroes have, though there's nothing stopping you from making a game with REALLY absurdly high HP levels.

On that note, it might be fun to design a game without healing of any type, set the hero's HP at 32000 or something, and design a kind of 'survival game' off that.
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: Sat Feb 18, 2006 1:34 pm    Post subject: Reply with quote

Drat. Well, you could make it unsigned if you wanted to rework some of the damage calculations. I wouldn't complain about only being able to go to 65535 HP.
_________________
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: Sat Feb 18, 2006 1:40 pm    Post subject: Reply with quote

Hmm... But, then you would become nigh invincible. 'Cuz, the code doesn't check beforehand what your HP is. It just subtracts, and checks if you're less than or equal to 0.

But, if it's unsigned, then negatives would wrap around back to 65535! The only attack that could actually kill you would be one the brings you down to exactly 0.

However. 32000 HP is a lot of health anyway. I can't forsee any real need for more than that.
_________________
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
Kizul Emeraldfire
Type: Cyber Dragoon




Joined: 26 Mar 2004
Posts: 229

PostPosted: Sat Feb 18, 2006 2:25 pm    Post subject: Reply with quote

Mike Caron wrote:
Battleblaze wrote:
Why in th owrld would you be using super huge numbers like that?Those make tsse seem almost normal.


I bet that was just an example.

Yes, it was just an example. Oh, and I made a mistake, in the little example RPG I linked to, the Heals give 3000 (1/3 of Max. HP).

But basically, the way I have the settings done up, instead of setting the target hero's HP at one third/one half of it's Maximum HP, it should ADD one third/one half the amount of the target hero's Maximum HP to the Current HP. And it doesn't. O.o

Also, it's kinda irritating that the type of heals that I'm trying to make hurt you when used out of battle! XD

Battleblaze wrote:
O and since this is the first post I've seen you do.Welcome to CP.

Neutral


Thank you. Happy
Back to top
View user's profile Send private message Yahoo Messenger
Mike Caron
Technomancer




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

PostPosted: Sat Feb 18, 2006 2:47 pm    Post subject: Reply with quote

Well, I'll find a way to support that. Maybe a bitset that says something like "Percentage based attacks damage instead of set", which would cause it to do what you want.

EXAMPLE:

Say you have an attack that you want to do 50% of the target's HP as damage. So, a target with 1000 health would take 500 damage, and then 500 damage the next time, killing it. You would say "50% of Maximum", and then set the bitset, so instead of setting the health to that, it will do that much damage.

Edit: And, actually, I did just that.
_________________
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
Moogle1
Scourge of the Seas
Halloween 2006 Creativity Winner
Halloween 2006 Creativity Winner



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

PostPosted: Sat Feb 18, 2006 5:07 pm    Post subject: Reply with quote

Actually, it's simple to do, it just requires a rework. Obviously, you can't go negative, so all you have to know beforehand is whether the attack is a healing spell or a damage spell. If it's a damage spell and the resultant HP is higher than the initial HP, the target is dead. Opposite for a healing spell.

This assumes it won't kick you out for overflow, of course.
_________________
Back to top
View user's profile Send private message Visit poster's website AIM Address
NeoTA
Idiomatic Nomenclature




Joined: 15 Mar 2004
Posts: 165

PostPosted: Sun Feb 19, 2006 5:25 am    Post subject: Reply with quote

Mike: It can be made to use a larger data type later,
when the save format is updated (it really really needs to be. FB will help making backwards-compatibility easier then). Some other things about save format:
*remove wasted space
*gold should be a long int, not a super insane number-represented-textually-as-16bit-string
*"Item numbers are currently indexed with a single byte, so it is not possible to have more than 255 distinct items. I'd like to change this, to allow up to 32767 items, but if/when I would also have to update the savegame format accordingly." from the wiki
* don't do a complete dump of gen(), just dump the few runtime-important fields.

Strangely, the SAV lump docs aren't on the wiki. Probably because it would make it too easy to cheat. I have them here anyway.
Back to top
View user's profile Send private message
PlayerOne




Joined: 07 Sep 2005
Posts: 143
Location: UK

PostPosted: Sun Feb 19, 2006 6:15 am    Post subject: Reply with quote

Mike Caron wrote:
Well, I'll find a way to support that. Maybe a bitset that says something like "Percentage based attacks damage instead of set", which would cause it to do what you want.


I thought it already worked like that. In fact I'm fairly sure I even looked over the calculation and still thought it worked like that.

I didn't actually try it, though, obviously. Happy
Back to top
View user's profile Send private message
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