Jump to content

Photo

8-way Charge Bow


  • Please log in to reply
26 replies to this topic

#1 Jared

Jared

    Deified

  • Members
  • Real Name:Jared
  • Pronouns:He / Him
  • Location:New Hampshire

Posted 14 March 2016 - 01:14 PM

Hey all! I'm looking for a script for my quest. Here is an example screen of where it would work: 

 

VGcCI39.png

 

In those square tiles Link would stand, charge his bow, and aim at an angle to use the fire and light the torches.

 

So here is a list of things the script can do. Let me know if it's detailed enough!

 

1. Charge sprites for each of the 8 ways he can stand.

2. Affect multiple other combos (Like the flame to the unlit torches), and trigger a secret.

3. Optional longer charging for faster and/or stronger launch.

4. Work with multiple Link suits, such as different colors AND different tiles altogether. This is because in my quest, I want Link to optionally wear his pajamas, as well as his multiple tunics.

5. Link acts normally and moves as normal (like he never had the bow out) if he gets hit by something. (Does that makes sense)

 

 

I think that's it for now. If you have any questions, tell me! Thank you so much. :)


Edited by Jared, 14 March 2016 - 01:29 PM.

  • Shane, Sheik, Lightwulf and 1 other like this

#2 EJSnowden

EJSnowden

    Initiate

  • Members
  • Location:U.S.A.

Posted 15 March 2016 - 11:01 PM

I'd be interested in the 8-way functionality, for a Seed-Shooter like item.


  • Shane and Jared like this

#3 Jared

Jared

    Deified

  • Members
  • Real Name:Jared
  • Pronouns:He / Him
  • Location:New Hampshire

Posted 28 March 2016 - 04:27 PM

Still looking for this, as I'm going to use it for my first temple's item. Much appreciated if it can be made, but if not I can manage.

 

If the 8-way bow is too much to create, then 4-way would be just fine. Maybe even strafing while holding/charging the bow? :)


  • Shane and Lightwulf like this

#4 grayswandir

grayswandir

    semi-genius

  • Members

Posted 29 March 2016 - 06:20 AM

I've started work on this. Not sure when I'm going to get it done. (It sounds like it'll be really fun to actually play with.)
 
Right now I'm planning on having the arrow turn into a fire-type weapon (like from a candle) if it goes over a flame (script flag 1, currently). It'd still move like an arrow, though. Would that be fine with you?
 
How comfortable are you with editing the script? Would you be comfortable changing this, for instance?
 
// This is the amount of damage the arrow does.
int ChargeBow_Damage(int charge_level, bool on_fire) {
  int damage = 0;
  if (Link->Item[I_ARROW3]) {damage = 16;} // Gold Arrows
  else if (Link->Item[I_ARROW2]) {damage = 8;} // Silver Arrows
  else if (Link->Item[I_ARROW1]) {damage = 4;} // Normal Arrows
  // each charge level adds 50%.
  damage *= (2 + charge_level) / 2;
  // If it's on fire it gets another 4.
  if (on_fire) {damage += 4;}
  return damage;
}

  • Jared and Naru like this

#5 Jared

Jared

    Deified

  • Members
  • Real Name:Jared
  • Pronouns:He / Him
  • Location:New Hampshire

Posted 29 March 2016 - 09:42 AM

I've started work on this. Not sure when I'm going to get it done. (It sounds like it'll be really fun to actually play with.)
 
Right now I'm planning on having the arrow turn into a fire-type weapon (like from a candle) if it goes over a flame (script flag 1, currently). It'd still move like an arrow, though. Would that be fine with you?
 
How comfortable are you with editing the script? Would you be comfortable changing this, for instance?
 

// This is the amount of damage the arrow does.
int ChargeBow_Damage(int charge_level, bool on_fire) {
  int damage = 0;
  if (Link->Item[I_ARROW3]) {damage = 16;} // Gold Arrows
  else if (Link->Item[I_ARROW2]) {damage = 8;} // Silver Arrows
  else if (Link->Item[I_ARROW1]) {damage = 4;} // Normal Arrows
  // each charge level adds 50%.
  damage *= (2 + charge_level) / 2;
  // If it's on fire it gets another 4.
  if (on_fire) {damage += 4;}
  return damage;
}

 

Thank you for starting to work on it, grayswandir! But what do you mean, edit it? I can only change constants, really. I don't know how to script. :sorry:

 

Edit- Also, here are the bow holding sprites I made. I will probably make sprites that will put the arrowhead in the Link sprite, so that way it's there when charging. (And gone afterwards)

 

78eCF6d.png


Edited by Jared, 29 March 2016 - 09:48 AM.

  • Lightwulf and Naru like this

#6 grayswandir

grayswandir

    semi-genius

  • Members

Posted 29 March 2016 - 06:01 PM

Ah, I was hoping you'd be able to mess with the math and other simple things on your own if I set it up right. I'll ask all the questions. then. :P

Will it replace the normal bow? Can you have separate bow and arrow levels like for the normal bow? What's the damage and arrow speed for a given combination of arrow level, bow level, charge level, and being on fire or not? Do they have a range, or do they travel until the end of the screen? Do you want a cooldown after firing, or do you want it to just be limited to one arrow on screen at once? Do you want to be unable to move and without a shield for a few frames after firing? Do you want a shield while charging? Does charging use magic? (I could totally make the max charge level be a triple-arrow spread shot, if you want.) Do you want charge levels to be attached to scrolls like for the sword?

#7 Jared

Jared

    Deified

  • Members
  • Real Name:Jared
  • Pronouns:He / Him
  • Location:New Hampshire

Posted 29 March 2016 - 06:57 PM

Ah, I was hoping you'd be able to mess with the math and other simple things on your own if I set it up right. I'll ask all the questions. then. :P

1. Will it replace the normal bow?

2. Can you have separate bow and arrow levels like for the normal bow?

3. What's the damage and arrow speed for a given combination of arrow level, bow level, charge level, and being on fire or not?

4. Do they have a range, or do they travel until the end of the screen?

5. Do you want a cooldown after firing, or do you want it to just be limited to one arrow on screen at once?

6. Do you want to be unable to move and without a shield for a few frames after firing?

7. Do you want a shield while charging?

8. Does charging use magic? (I could totally make the max charge level be a triple-arrow spread shot, if you want.)

9. Do you want charge levels to be attached to scrolls like for the sword?

 

1. Yes!

2. Yes. I assume as you mean Level 1 or 2, in a different/separate bow (Like the range bow or something)

3. This I haven't really though about. Could the arrow damage and speed be constants in the bow item, and use the normal Damage section? I think this would make it more accessible to other people that want to use it. Maybe the fire damage could be D 0 or D1 in the Script tab? If you need specific numbers, I think 1 damage would work for the first level, and double it for being on fire. Also, would it be possible that certain enemies could only be damaged with the fire from the bow? :)

4. Travel until the end of the screen.

5. Just one arrow on the screen at any time. Just like the normal bow. :)

6. No, normal movement is fine after shooting.

7. No shield while charging. 

8. Yes, I didn't even think about this! Great idea! Would it be possible for the player to choose if the arrows spread into 2 or 3? Also could the charging also make the arrow go double speed, or something along those lines? I'm not sure how to explain what I mean. Like, as a bow upgrade or something.

9. Yes, awesome idea as well! That would fit very well with my quest. :)

 

Thank you so much. You have no idea how much I appreciate this.


  • Naru likes this

#8 Avaro

Avaro

    o_o

  • Members
  • Real Name:Robin
  • Location:Germany

Posted 30 March 2016 - 11:21 AM

 

Also, would it be possible that certain enemies could only be damaged with the fire from the bow? :)

 

Grayswandir said he wants to change the arrow into a fire LWeapon which would treat enemy defenses as if it was the fire from a candle. So yes, you can do that by making an enemy vulnerable to fire.


  • Jared likes this

#9 Jared

Jared

    Deified

  • Members
  • Real Name:Jared
  • Pronouns:He / Him
  • Location:New Hampshire

Posted 30 March 2016 - 12:53 PM

Oh, true. Thank you, Avataro. :)

 

Also, a few more things I forgot to mention...

 

1. Can you add a sound effect for when the player holds down the button? Just like the bow pull from the official games.

2. Also can you add the default bow sound effect for when he lets go of the button when shooting an arrow?

3. When Link uses the bow with no arrows, can you make his "non arrow" sprites appear, and still move with the bow as normal, but when the button is let go of, a different sound effect plays and nothing happens?

4. Can you also put a sound effect for when Link hits fire or something else with the arrow? Like when he hits fire, the arrow becomes fiery and a flame sound effect plays, and when he hits lightning a zap sound effect plays, or something? 

 

Thank you so much. :)



#10 grayswandir

grayswandir

    semi-genius

  • Members

Posted 30 March 2016 - 06:10 PM

So, this setup should be manageable for you?
//// Charge Level 0
// This is the sound played when you first use the bow. Set to 0 for no sound.
const int CHARGEBOW_START_SOUND = 0;
// This is the sound played when you release a level 0 shot. Set to 0 for no sound.
const int CHARGEBOW_L0_SHOT_SOUND = 0;

//// Charge Level 1
// This is the item id that unlocks this charge level. Set to 0 for no item
// needed.
const int CHARGEBOW_L1_ITEM_ID = 0;
// This is the cumulative frames you need to charge for this charge level.
const int CHARGEBOW_L1_CHARGE_TIME = 45;
// This is the sound played when you reach charge level 1. Set to 0 for no
// sound.
const int CHARGEBOW_L1_CHARGE_SOUND = 0;
// This is the sound played when you release a level 1 shot. Set to 0 for no
// sound.
const int CHARGEBOW_L1_SHOT_SOUND = 0;

//// Charge Level 2
// This is the item id that unlocks this charge level. Set to 0 for no item
// needed.
const int CHARGEBOW_L2_ITEM_ID = 0;
// This is the cumulative frames you need to charge for this charge level.
const int CHARGEBOW_L2_CHARGE_TIME = 90;
// This is the sound played when you reach charge level 2. Set to 0 for no
// sound.
const int CHARGEBOW_L2_CHARGE_SOUND = 0;
// This is the sound played when you release a level 2 shot. Set to 0 for no
// sound.
const int CHARGEBOW_L2_SHOT_SOUND = 0;

Looking into it more, I can pull arrow damage from the damage of the item you're using, and arrow speed from the "power" of the highest level bow you have. Standard bow is speed 1 by default, and the longbow is 3. Right now I've coded it up so that each charge level adds 1 to this speed - so a fully charged (2) longbow shot would be speed 5.

For fire/lightning/whatever, it'd be nice if you could give me a list of all the different effects the arrow can get, and how they affect the actual arrow. Or do you just want a sound effect for the lightning?

For #3, that sounds doable. If I may suggest something different, however? I always thought it'd be really funny if, when you ran out of arrows, Link would start using the bow like a L1 sword instead and just whack things with it. :) Not sure if I'd be able to pull that off simply, but I'd like to give a shot at it.
  • Jared and Lightwulf like this

#11 Jared

Jared

    Deified

  • Members
  • Real Name:Jared
  • Pronouns:He / Him
  • Location:New Hampshire

Posted 30 March 2016 - 07:00 PM

So, this setup should be manageable for you?

//// Charge Level 0
// This is the sound played when you first use the bow. Set to 0 for no sound.
const int CHARGEBOW_START_SOUND = 0;
// This is the sound played when you release a level 0 shot. Set to 0 for no sound.
const int CHARGEBOW_L0_SHOT_SOUND = 0;

//// Charge Level 1
// This is the item id that unlocks this charge level. Set to 0 for no item
// needed.
const int CHARGEBOW_L1_ITEM_ID = 0;
// This is the cumulative frames you need to charge for this charge level.
const int CHARGEBOW_L1_CHARGE_TIME = 45;
// This is the sound played when you reach charge level 1. Set to 0 for no
// sound.
const int CHARGEBOW_L1_CHARGE_SOUND = 0;
// This is the sound played when you release a level 1 shot. Set to 0 for no
// sound.
const int CHARGEBOW_L1_SHOT_SOUND = 0;

//// Charge Level 2
// This is the item id that unlocks this charge level. Set to 0 for no item
// needed.
const int CHARGEBOW_L2_ITEM_ID = 0;
// This is the cumulative frames you need to charge for this charge level.
const int CHARGEBOW_L2_CHARGE_TIME = 90;
// This is the sound played when you reach charge level 2. Set to 0 for no
// sound.
const int CHARGEBOW_L2_CHARGE_SOUND = 0;
// This is the sound played when you release a level 2 shot. Set to 0 for no
// sound.
const int CHARGEBOW_L2_SHOT_SOUND = 0;
Looking into it more, I can pull arrow damage from the damage of the item you're using, and arrow speed from the "power" of the highest level bow you have. Standard bow is speed 1 by default, and the longbow is 3. Right now I've coded it up so that each charge level adds 1 to this speed - so a fully charged (2) longbow shot would be speed 5.

For fire/lightning/whatever, it'd be nice if you could give me a list of all the different effects the arrow can get, and how they affect the actual arrow. Or do you just want a sound effect for the lightning?

For #3, that sounds doable. If I may suggest something different, however? I always thought it'd be really funny if, when you ran out of arrows, Link would start using the bow like a L1 sword instead and just whack things with it. :) Not sure if I'd be able to pull that off simply, but I'd like to give a shot at it.

 

 

Yes, that setup is absolutely perfect! :)

 

1. Sounds good to me!

2. I'm not too sure, that's my problem. Fire will definitely be a thing, and I'm like 90% electricity will be too. Do you have any suggestions? :) Is it possible for the electricity to also hurt specific enemies?

How about ice too? I bet that can just hurt specific enemies, and trigger certain combos. Perhaps it'd look like that ice arrow from OoT when it hits the "ice"?

 

I know the arrow for the fire will have a fire head flaming. For the lightning, maybe the whole arrow could be covered in it?

 

3. That sounds....very odd. xD Sounds like it could work fine, but then what's the point of the sword? :P Maybe you could add it as an extra part to the script?



#12 grayswandir

grayswandir

    semi-genius

  • Members

Posted 31 March 2016 - 01:36 AM

2. I'm not too sure, that's my problem. Fire will definitely be a thing, and I'm like 90% electricity will be too. Do you have any suggestions? :) Is it possible for the electricity to also hurt specific enemies?
How about ice too? I bet that can just hurt specific enemies, and trigger certain combos. Perhaps it'd look like that ice arrow from OoT when it hits the "ice"?

Well, it depends on how you want to set it up. You can mimic about half of the different weapon types - the arrow can secretly be wand magic, or fire, or a bomb, for instance. You're out of luck if you want sword or hammer though.
There's also one slot on enemy defences for "script", which essentially means you have one unused "element" that can be whatever you want for enemy weakness purposes.
You can also do different effects, like piercing, or maybe the arrow explodes or whatever. Since I'm already tracking the arrow (so you can't fire while it's still alive), as long as the effect isn't too weird it isn't that much harder to add in, on my end.
 

3. That sounds....very odd. xD Sounds like it could work fine, but then what's the point of the sword? :P Maybe you could add it as an extra part to the script?

Well, if you don't want it, that's fine. :P


Here's the current version. I've got the basic 8-way charge & shoot mechanics done, but it's not using ammo or doing fire or anything yet. Could you glance over it and see if any of the setup instructions don't make sense?


  • Jared likes this

#13 Jared

Jared

    Deified

  • Members
  • Real Name:Jared
  • Pronouns:He / Him
  • Location:New Hampshire

Posted 31 March 2016 - 10:13 AM

So I definitely go the script to work! However, some things are acting funky.

 

1. Link works fine, but his held arrowhead sprites aren't showing up when charging, only the arrowless. 

2. Even though I set the sound, there's no sound for when the arrow fires.

3. The arrows appear sort off off and far away from him when flying away. Also, they're so slow to the point where I can walk by them. :P

 

Otherwise...ahhh! This is amazing! I think it's all easy to set up right now.



#14 grayswandir

grayswandir

    semi-genius

  • Members

Posted 31 March 2016 - 11:16 AM

Alright, I think I got everything running. Here's the script and a test quest (with horrible, horrible graphics).

 

If you want to make the arrows faster, you can go in and edit the speed of the bow. I'm not sure why the starting bow has a speed of 1, maybe it's adding it to the basic arrow speed of 1? I can change it to work like that, if you want.

 

Since the candle naturally pierces enemies, the burning arrow does as well. Is that fine?

 

Right now the arrows are starting a full tile away from Link. Is that too far?


Edited by grayswandir, 31 March 2016 - 11:18 AM.


#15 Jared

Jared

    Deified

  • Members
  • Real Name:Jared
  • Pronouns:He / Him
  • Location:New Hampshire

Posted 31 March 2016 - 03:32 PM

Ahhh, it works perfectly!! And I think that's fine. I think it would be more accessible to everyone if you can change it just in the editor anyways. :)

 

Yeah, the piercing arrow is a great idea!!

 

And um, maybe a tiny bit. I think maybe half a tile would be fine?

 

I appreciate this so much, buddy. It works flawlessly and awesomely. Very great job!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users