 |
Castle Paradox
|
View previous topic :: View next topic |
Author |
Message |
Camdog
Joined: 08 Aug 2003 Posts: 606
|
Posted: Mon Feb 19, 2007 7:42 pm Post subject: Some battle problems... |
|
|
Hey all. I'm having trouble implementing some pseudo-battlescripting and thought I'd ask for help. My idea is that certain enemies can come equipped with various things that improve their battle prowess. The player can disarm this enemy by attacking the items directly, which, once destroyed, will return the enemy's prowess to normal.
I do this by creating enemies for stat-boosting each item, giving them 999 speed and a 1 mp invisible attack which will raise an ally's stat by the desired amount. I then set the bitsets so that the attack can only target the enemy in slot 0, and ensure the equipped enemy is always in slot 0. When the equipment dies, it spawns an invisible, untargetable enemy that, with a similarly restricted to slot 0 attack, returns the enemy's power to normal. The attack costs 1 HP, which is what the enemy has, so it kills itself doing so. It hits itself while alone, in case the player kills the enemy without disarming it.
All of this works fine with the enemy and one piece of equipment, but if more things are added to the mix, the stat boosting will go random places despite the slot restriction. The slot restriction mechanism seems pretty simple, so I'm not sure how I'm screwing it up. Any ideas?
Secondly, a more cosmetic problem. I posted this earlier, but have only recently gotten back into working on my game, so I'm dealing with it again. An equipped enemy will obviously have it's equipment "enemies" drawn over, but I'm having trouble controlling the z positioning. Specifically, the shield in game is always drawn under the enemy, though it appears on top of the enemy in custom! The shield's y positing is further down on the screen than the enemy's, and I've tried switching their slots (yes, I even changed the slot restriction on all the stat booting stuff). Needless to say, none of this has worked. Does anyone know what precisely controls z positioning, and how to get this to work?
Thanks.
-Cameron |
|
Back to top |
|
 |
Onlyoneinall Bug finder
Joined: 16 Jul 2005 Posts: 746
|
Posted: Mon Feb 19, 2007 8:11 pm Post subject: |
|
|
I think the target only slot so and so function is bugged. I have the same issues in my game, where attacks ignore when I say to only target a specific slot. _________________ http://www.castleparadox.com/gamelist-display.php?game=750 Bloodlust Demo 1.00
 |
|
Back to top |
|
 |
J.A.R.S. In umbram deo, ex nihilo...

Joined: 11 May 2005 Posts: 451 Location: Under the rainbow...
|
Posted: Mon Feb 19, 2007 10:54 pm Post subject: |
|
|
wait, are you actually putting the shield as another enemy over the enemy you're wanting equiped? (and the shield diesd without that enemy)? |
|
Back to top |
|
 |
Camdog
Joined: 08 Aug 2003 Posts: 606
|
Posted: Tue Feb 20, 2007 6:01 am Post subject: |
|
|
Yes |
|
Back to top |
|
 |
msw188
Joined: 02 Jul 2003 Posts: 1041
|
Posted: Tue Feb 20, 2007 6:43 am Post subject: |
|
|
See bug 102 about the slot restrictions:
http://gilgamesh.hamsterrepublic.com/cgi-bin/bugzilla/show_bug.cgi?id=102
I am not sure why you need to have the equipment give stat-boosting attacks. Why not just make the actual enemy have all of the 'higher' stats, and then have the dying equipment lower the enemy's stats by the desired amount?
Actually, I've also thought about a partial workaround. If you have an enemy bitset left, you could call it 'equipment' and have your stat-lowering attack fail on 'equipment' types but target all. This only works as long as there is one fighting enemy, however.
I remember discussing the 'z position' thing (the thread is around here somewhere). We worked together and figured out how it worked in custom, but I had never thought to test it separately in game. I'm not sure what to tell you there... _________________ My first completed OHR game, Tales of the New World:
http://castleparadox.com/gamelist-display.php?game=161
This website link is for my funk/rock band, Euphonic Brew:
www.euphonicbrew.com |
|
Back to top |
|
 |
Camdog
Joined: 08 Aug 2003 Posts: 606
|
Posted: Tue Feb 20, 2007 7:51 am Post subject: |
|
|
Aw, crap.
msw188 wrote: | I am not sure why you need to have the equipment give stat-boosting attacks. Why not just make the actual enemy have all of the 'higher' stats, and then have the dying equipment lower the enemy's stats by the desired amount? |
The idea is the player can encounter this creature with different combinations of equipment, or no equipment at all, so it's important the presence, as well as the removal of equipment affects the enemy's stats.
msw188 wrote: | Actually, I've also thought about a partial workaround. If you have an enemy bitset left, you could call it 'equipment' and have your stat-lowering attack fail on 'equipment' types but target all. This only works as long as there is one fighting enemy, however. |
Yeah, I think this is what I'll do.
msw188 wrote: | I remember discussing the 'z position' thing (the thread is around here somewhere). We worked together and figured out how it worked in custom, but I had never thought to test it separately in game. I'm not sure what to tell you there... |
I'm hoping a developer will step in and tell me exactly how z-position is determined, though I do think this is a bit of a bug since game and custom are inconsistent. |
|
Back to top |
|
 |
Bob the Hamster OHRRPGCE Developer

Joined: 22 Feb 2003 Posts: 2526 Location: Hamster Republic (Southern California Enclave)
|
Posted: Tue Feb 20, 2007 7:51 am Post subject: Re: Some battle problems... |
|
|
Camdog wrote: | All of this works fine with the enemy and one piece of equipment, but if more things are added to the mix, the stat boosting will go random places despite the slot restriction. The slot restriction mechanism seems pretty simple, so I'm not sure how I'm screwing it up. Any ideas? |
In addition to the bug number that msw188 mentioned, see also '' . bug_title('5') . ''
Quote: | I'm hoping a developer will step in and tell me exactly how z-position is determined, though I do think this is a bit of a bug since game and custom are inconsistent. |
Y-position. Z is never used in battle except for Jump/Land animation
Could you please file a bug about the difference in Y-position between custom and game?
I am guessing that game is probably Y-sorting by the bottom edge, and custom is probably Y-sorting using the top edge, but I would have to check the code to be sure. |
|
Back to top |
|
 |
Camdog
Joined: 08 Aug 2003 Posts: 606
|
Posted: Wed Feb 21, 2007 6:55 am Post subject: |
|
|
Ok, switching tatics to equipment using stat-boosting spells that affect every enemy, and fail for all enemies except for one works fine. However, the spell fail text pops up for every other enemy, including the equipment. Is there any way to disable this, short of creating an empty spell fail text string?
Also, I haven't tested the y-sorting that James suggested, but I plan to tonight and will file a bug report if appropriate. |
|
Back to top |
|
 |
|
|
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
|