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

Attacks visible only if item in inventory

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
RelicMaker




Joined: 04 Aug 2013
Posts: 18
Location: Somewhere between Jacobstown and New Canaan

PostPosted: Thu Dec 19, 2013 8:14 am    Post subject: Attacks visible only if item in inventory Reply with quote

So I want to have a set of attacks to repesent thrown weapons. Kunai, shuriken, daggers, etc. These are all going to be in a spell list for a specific character, all learned at lv 0. What I want to do is have them be invisible in that spell list if the required item isnt in the inventory. So if you have a 5 kunai and a dagger but no shuriken, you'll see Kunai and Dagger in the spell list, but not Shuriken. Any way to do that?

Also, if an attack consumes items, would equipped items also be used? IE would using Dagger (which consumes one "dagger" item, which si also equippable as a weapon) consume the equipped "dagger"?
_________________
Trixie is best pony. Tavi is a close second.
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger
Bob the Hamster
OHRRPGCE Developer




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

PostPosted: Thu Dec 19, 2013 8:20 am    Post subject: Re: Attacks visible only if item in inventory Reply with quote

RelicMaker wrote:
So I want to have a set of attacks to repesent thrown weapons. Kunai, shuriken, daggers, etc. These are all going to be in a spell list for a specific character, all learned at lv 0. What I want to do is have them be invisible in that spell list if the required item isnt in the inventory. So if you have a 5 kunai and a dagger but no shuriken, you'll see Kunai and Dagger in the spell list, but not Shuriken. Any way to do that?


Unfortunately there is no way to do this yet. It is a good feature request.

RelicMaker wrote:
Also, if an attack consumes items, would equipped items also be used? IE would using Dagger (which consumes one "dagger" item, which si also equippable as a weapon) consume the equipped "dagger"?


No, an attack that consumes items will never use equipped items, only items from the inventory.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
RelicMaker




Joined: 04 Aug 2013
Posts: 18
Location: Somewhere between Jacobstown and New Canaan

PostPosted: Thu Dec 19, 2013 8:25 am    Post subject: Reply with quote

Too bad. It's just as well I suppose; the character I was planning on giving that to is a thief anyways, itd make more sense if she just had a steal attack. I'll just make those attacks bound to the items, themselves, so everyone can use them.
_________________
Trixie is best pony. Tavi is a close second.
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger
Bob the Hamster
OHRRPGCE Developer




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

PostPosted: Thu Dec 19, 2013 8:33 am    Post subject: Reply with quote

Well, the only part of your idea that won't work is making the thrown weapon attacks invisible if you cant afford them, they will just be greyed out.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
RelicMaker




Joined: 04 Aug 2013
Posts: 18
Location: Somewhere between Jacobstown and New Canaan

PostPosted: Thu Dec 19, 2013 8:41 am    Post subject: Reply with quote

Thats kind of a key thing, I didn't want players knowing ahead of time what throwing items existed until they discovered them.

On a side note, if I have the global bitset for attacks to ignore the Hits stat, can I still have specific attacks utilize it? I want weapon attacks to use the number of extra hits characters get, but not things like spells and certain special attacks and I was hoping to have a shortcut so I dont have to turn on the Ignore bitset in all but 3 or 4 attacks.[/i]
_________________
Trixie is best pony. Tavi is a close second.
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger
Bob the Hamster
OHRRPGCE Developer




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

PostPosted: Thu Dec 19, 2013 9:15 am    Post subject: Reply with quote

RelicMaker wrote:
Thats kind of a key thing, I didn't want players knowing ahead of time what throwing items existed until they discovered them.


Hmmm... now that I think about it, there is a way you could script this.

First you make the thrown weapon spell list so that the attacks are learned from item instead of learned at level 0. You will not actually be creating any items that teach these spells, you will do it with plotscripting.

Then you need an instead-of-battle script like this:

Code:

plotscript, battle wrapper, formation, formset, begin
  update thrown weapons
  fight formation(formation)
end


This needs to be set as the "instead of battle" script on every map, and for plotscripted battles you should use "battle wrapper(form)" instead of "fight formation(form)"

This wrapper make sure that the "update thrown weapons" script is run right before each battle starts.

Then you make that script check your inventory for each throwable weapon, and if so, it will be added to the spell list.

Code:

script, update thrown weapons, begin
  variable(slot)
  slot := find hero(hero:Edge)
  if(slot == -1) then(exit script) # Ninja is not in the party right now

  # Now check each throwable weapon
  if(inventory(item:knife) > 0) then(
    teach spell(slot, atk:knife)
  )
  if(inventory(item:cleaver) > 0) then(
    teach spell(slot, atk:cleaver)
  )
  if(inventory(item:sword) > 0) then(
    teach spell(slot, atk:sword)
  )

end



RelicMaker wrote:
On a side note, if I have the global bitset for attacks to ignore the Hits stat, can I still have specific attacks utilize it? I want weapon attacks to use the number of extra hits characters get, but not things like spells and certain special attacks and I was hoping to have a shortcut so I dont have to turn on the Ignore bitset in all but 3 or 4 attacks.[/i]


Unfortunately, right now the only way to get what you want is to turn off the global bitset, and then set the "Ignore Extra Attacks" bit on all of the attacks except for those few weapon attacks. Sorry :(
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: Sat Dec 21, 2013 7:11 am    Post subject: Reply with quote

Hiding attacks that are disabled seemed like an easy feature to implement, so I started adding a new attack bitset to hdie an attack from spell lists if it's not usable. But then I realised that maybe/probably it should be a per-spell setting in the hero spell list editor instead. I'll probably start over.
_________________
"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 -> 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