Jump to content

Photo

Lweapons.zh- (Because Why Not?)

library

  • Please log in to reply
27 replies to this topic

#16 ywkls

ywkls

    Master

  • Members

Posted 10 June 2017 - 06:11 PM

So... it's been a while since I updated this; right? Well that's mostly because I haven't been working on it/have been resisting the urge to use ffcs. However, ffc's are easier for some things. (Like ice rods.)

 

The addition of an ffc script for the ice rod (which is still only partially functioning) is one of the things that I've done recently.

The others are a way to set and unset lweapon level 1 flags at will, adding in default graphics and sound settings and fixing some bugs with Lweapon removal.

 

The latter was done with a suggestion based on a conversation with Russ and basically eliminated situations where you want an lweapon to disappear and it was doing something else, like making beam shards. I haven't tested the solution in all situations yet, though.

 

I also feel that the power bracelet, hookshots, swords, candles, hammers and reflected lweapons will require ffc scripts. 

I just haven't written them yet. (Reflected lweapons are as especial brand of weird, from my observations.)

 

The script file and readme are now updated to reflect these changes.



#17 ywkls

ywkls

    Master

  • Members

Posted 13 August 2017 - 09:33 PM

So, I just completed a major update to the header. Here's what's been added.

 

Bombos, Ether and Quake Medallions- Currently, Bombos uses the Super Bomb flag to set off secrets, although this might be changed later. Ether doesn't draw the lightning as well as I'd like. And Quake only effects enemies hit by the spreading Quake effect that emanates from the point of impact.

 

Scripted Hookshot- Don't look at the script and figure out how it was done! You'll be severely disappointed in me, because the only way I could figure out how to get Link to cross water was by making him invisible and drawing his tile every frame while you were crossing the screen; then teleporting him to the right spot. (I told you it was messy.)

 

Spear- Prompted by this topic.LWeapon drawing code also now supports odd-sized Lweapons better.

 

Scripted Hammer- Literally all it does is pound posts in the ground. I might add more later.

 

New LWeapon flag- used to make LWeapons that don't change their appearance depending on the direction Link is facing.

 

Test quest updated to include demos of all of these, along with more enemies and more times to use items. Enjoy!


Edited by ywkls, 13 August 2017 - 09:34 PM.

  • judasrising likes this

#18 ywkls

ywkls

    Master

  • Members

Posted 14 August 2017 - 11:27 AM

Thanks to assistance from grayswandir, Moosh and others... the Scripted Hookshot is now even better than before!

 

No more stupid drawing Link to fake things any more! The hookshot head appears in the proper way too!

Plus, I fixed the rare bug which could get you stuck in a wall!

 

Also added: Scripted Switchhook. 

I should note that this version has some slight differences from the normal hookshot.

 

First, all combos that can be switched must have flag 98 attached to them somehow.

This is so you don't have to edit every combo that can be grabbed by a hookshot so that it won't be switched.

 

Second, at this time the script doesn't support switching places with enemies. I will probably add that in later.

 

The scripted switchhook isn't included in the demo, but is in the script file.



#19 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 15 August 2017 - 11:49 PM

Regarding the hammer and scripted effects: If the script looking for collision is running from an ffc, you can run a do-while loop or a for loop, or a fruit loops, calling Waitframe() until the hammer fully falls. The hammer animation is a fixed number of frames, so you can precisely calculate this event. ) After Collision(), returns true wait frames, before triggering your event.


Edited by ZoriaRPG, 15 August 2017 - 11:50 PM.


#20 ywkls

ywkls

    Master

  • Members

Posted 16 August 2017 - 09:43 AM

Regarding the hammer and scripted effects: If the script looking for collision is running from an ffc, you can run a do-while loop or a for loop, or a fruit loops, calling Waitframe() until the hammer fully falls. The hammer animation is a fixed number of frames, so you can precisely calculate this event. ) After Collision(), returns true wait frames, before triggering your event.

All very good ideas... even if they are completely irrelevant to this topic since no actual hammers are involved in the header (only scripted equivalents).

 

I assume that you're referring to the problem referenced in this thread regarding the Linked Secrets script. Calculating special conditions for tracking the movement of certain Lweapons was never within its scope, nor do I believe it is something I'm likely to add at some point.

 

Thanks for the suggestion, though.



#21 ywkls

ywkls

    Master

  • Members

Posted 16 September 2017 - 10:54 PM

I'm getting this library ready to be featured at this year's fall Expo and I'd like some feedback on things which should be added or improved upon.

 

Here's the latest additions which have been included:

 

Done

 

Fixed bug where Lweapons didn't react to screen borders correctly.
Added Lweapons that shake the screen when they die.
Added Lweapons that are destroyed by solid combos, unless they're of a specific type.
Made reflected Lweapons generated by these scripts not hurt Link.

 

I have about 6 flags I can add, not including reflected lweapons (which is something I feel will ultimately need an ffc for).

 

This is what the flags I have do.

 

Flag List

 

Any suggestions would be appreciated.



#22 Avaro

Avaro

    o_o

  • Members
  • Real Name:Robin
  • Location:Germany

Posted 17 September 2017 - 10:58 AM

My only suggestion right now is to also explain really well what exactly scripters can do with the library. :)


  • ywkls likes this

#23 ywkls

ywkls

    Master

  • Members

Posted 17 September 2017 - 02:46 PM

My only suggestion right now is to also explain really well what exactly scripters can do with the library. :)

 

I'm planning to emulate the style used in Lejes' ghost.zh tutorial; with a step by step guide to creating and setting up your custom items and lweapons; along with explanations of what each movement type, death effect, lifespan type, flag and so forth do.

 

I may do one each for every type that is available; though I doubt that I'll feel inclined to add screenshots for each.

 

Added:

 

LWeapons that make Link float above the ground (or in midair if in sideview) while they exist.

LWeapons that disable knockback on Link while they exist.


  • judasrising and Avaro like this

#24 ywkls

ywkls

    Master

  • Members

Posted 25 February 2018 - 06:10 PM

For anyone interested in contributing to this, I've set up a Github repository with all the most current code.
I won't promise that I know how to use it; but it's there.
 
LWeapons.zh Github

 

I've added a few new fixes and features since the expo. Here's an explanatory list!

 

Added to Demo

 

Reworked animation of the lightning bolt in the Ether Medallion where it stretches from on top of Link to the edge of the screen.

Added flags that make an lweapon slash bushes. (See the Spear)

Changed code that launches ffc's used by LWeapons.

 

Not Yet in Demo, but Code Included

 

Added working Shovel.

Added working Bombchu.

Added flags that make a lweapon pound hammer pegs.

Fixed bug where thrown weapons wouldn't work properly in sideview. (Thanks to Evan20K for pointing this out.)

 

Wanted

 

Working Cane of Somaria

Routines for reflecting EWeapons with LWeapons

Working Magic Cape

Working Magnetic Gloves

 

I've got a few items I've made which I haven't released via the header yet, too; but they're just variations on other existing scripts. (Powder Keg, Deku Leaf, Bolas) Anything I haven't thought of including yet, please feel free to suggest either here or on Discord.



#25 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 25 February 2018 - 08:17 PM

For anyone interested in contributing to this, I've set up a Github repository with all the most current code.
I won't promise that I know how to use it; but it's there.
 LWeapons.zh Github
 
I've added a few new fixes and features since the expo. Here's an explanatory list!
 
Added to Demo
 
Reworked animation of the lightning bolt in the Ether Medallion where it stretches from on top of Link to the edge of the screen.
Added flags that make an lweapon slash bushes. (See the Spear)
Changed code that launches ffc's used by LWeapons.
 
Not Yet in Demo, but Code Included
 
Added working Shovel.
Added working Bombchu.
Added flags that make a lweapon pound hammer pegs.
Fixed bug where thrown weapons wouldn't work properly in sideview. (Thanks to Evan20K for pointing this out.)
 
Wanted
 
Working Cane of Somaria
Routines for reflecting EWeapons with LWeapons
Working Magic Cape
Working Magnetic Gloves
 
I've got a few items I've made which I haven't released via the header yet, too; but they're just variations on other existing scripts. (Powder Keg, Deku Leaf, Bolas) Anything I haven't thought of including yet, please feel free to suggest either here or on Discord.


Magic Cape, and Reflecting EWeapons with an LWeapon, I have as complete code. Somaria is in Z3.zh, but it's unfinished.

I'm not sure why the cape would be in a weapons header.
  • ywkls likes this

#26 ywkls

ywkls

    Master

  • Members

Posted 25 February 2018 - 11:57 PM

Magic Cape, and Reflecting EWeapons with an LWeapon, I have as complete code. Somaria is in Z3.zh, but it's unfinished.

I'm not sure why the cape would be in a weapons header.

 

Well, it's just an item I haven't done.

Some of the code that the engine runs affects Link's collision detection. 

Another section can do the magic drain.

So I thought it'd make a certain amount of sense.

 

Does the code for Reflecting EWeapons also handle making any LWeapon interact with magic mirrors?

That's another thing which has eluded me.



#27 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 26 February 2018 - 04:32 AM

Well, it's just an item I haven't done.
Some of the code that the engine runs affects Link's collision detection. 
Another section can do the magic drain.
So I thought it'd make a certain amount of sense.
 
Does the code for Reflecting EWeapons also handle making any LWeapon interact with magic mirrors?
That's another thing which has eluded me.


Any LWeapon? Some may have issues in general, and of course, LinkClass stuff isn't part of what I did. I posted that code in a topic here with 'magic mirror' in the topic title. I remember that, as I wouldn't have called the prism combos 'magic mirror' combos.

I'd suggest moving LW.zh to my model for Invisibility and Link->CollDetection. It's much safter, and easy to write for my API.

Here is the reflected weapons topic.

#28 ywkls

ywkls

    Master

  • Members

Posted 14 July 2018 - 09:24 PM

Wow. It's been a while since I updated this, huh?

(Looks at backlog...)

 

Okay, lets see if we can sum up what's been added as is now live in the demo.

 

New

 

Added working Cane of Somaria (No moving platforms. Some special combo setup required)

Added LWeapons that reflect enemy weapons

Added flags to set which can be reflected by such 

Added LWeapons that force you to strafe while using them.

Added LWeapons that slash bushes, grass and such; plus leave items when they do so.

 

As always, I'm open to any comments or suggestions on stuff to put into this and ways to make what I already have better.


Edited by ywkls, 14 July 2018 - 09:25 PM.




Also tagged with one or more of these keywords: library

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users