Jump to content

Photo

Skyward sword style shields

shield durability script

  • Please log in to reply
3 replies to this topic

#1 TheLink

TheLink

    An octorok under a duck?!?!

  • Members
  • Location:UK

Posted 20 May 2016 - 12:02 PM

A script that allows shields to be similar to skyward sword ones that can be damaged and eventually destroyed. Have the ability to be immune to stuff or weak to stuff and the ability to slowly regenerate the shields life. It would also be good to add a bar/counter that shows its life/durability, but it wouldn't be necessary.

D0 could be used for the shields durability/life.

D1 could be used to show the speed it recharges at, 0 being that it doesn't recharge.

D2-D7 could be used to show what enemies it is immune too.

if D2 was set at a minus number it would mean that it is immune to everything. 

if D2-D7 were blank/0 it would be vulnerable/strong to nothing

if D3-7 were set at minus number it would show what it is weak against. e.g. in -1 the minus shows it's a weakness and the 1 shows it is the enemy id 1.

 

Something like this would help a lot and be very good, but it doesn't have to be perfect or exactly like it, just something along those lines. 



#2 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 29 May 2016 - 06:27 AM

I did some work on this for you, but there are some tricky aspects to this set-up, and I need information on the following:

How do you want damage tabulated? Normally shields only block a few effects in ZC, so I presume that you'd want to read the Damage of eweapons and reduce the shield HP by that.

There is no default method to determine what enemy spawns a weapon. You claim that you want to set damage and regen rates by enemy ID. Do you actually need that, or will weapon type suffice?

The truly tricky part is that there's no reliable way to know if an eweapon is blocked by a shield. I can read if it 'dies' at Link's cordinates, and doesn't damage Link in the process, which is probably the best way to do it. Will that suffice?

Will the player be able to change shields 'at will', and what shields do you want me to reproduce?

Note that this will require several functions in a global active script, moderate setup/configuration, and will use one global array, thus requiring a new save.

Edited by ZoriaRPG, 29 May 2016 - 06:28 AM.


#3 grayswandir

grayswandir

    semi-genius

  • ZC Developers

Posted 29 May 2016 - 12:05 PM

The truly tricky part is that there's no reliable way to know if an eweapon is blocked by a shield. I can read if it 'dies' at Link's cordinates, and doesn't damage Link in the process, which is probably the best way to do it. Will that suffice?

I was thinking that maybe you could set the weapons to reflect and then detect the reflected weapons, and kill them if the shield isn't supposed to reflect them? I dunno.

 

But yeah, this is certainly rather difficult to pull off without replacing the entire collision system.



#4 TheLink

TheLink

    An octorok under a duck?!?!

  • Members
  • Location:UK

Posted 30 May 2016 - 02:56 AM

Actually now that I think about it more I was wanting it to be like the Simplified GB Shield script: http://www.purezc.ne...e=scripts&id=35 , but didn't explain it right, and if you have the shield out infront of you the shield takes the damage from the thing hitting it unless the shield has that set on its reflect flag of block flag. For the shields damage taking I was thinking of it as having hp just like link so that if an enemy/object hits it, the enemy will take off the shields hp just like it does with link. As for the other stuff I said, if its to complex/not possible I don't really mind that much, its just the damage taking I need the most, with regeneration second-most needed and the rest are there just to improve the shields as you progress through the game. So overall i only really need the damage taking and regen, with the other stuff i dont care if its to hard/not possible.





Also tagged with one or more of these keywords: shield, durability, script

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users