Jump to content

Photo

My Script Wishlist and Your Script Ideas


  • Please log in to reply
242 replies to this topic

#226 ywkls

ywkls

    Master

  • Members

Posted 23 January 2016 - 11:13 AM

Short Question, since I am far away from finishing anything and 3.0 is announced, would it be wise for me (complete newbe also regarding scripting) to just drop the whole scripting stuff for the time and just wait till the new version is out?

 

On 3.0, while it will eventually come out; there's no firm date as to when. Could be next week, could be 3 years from now. (Or longer.)

 

On whether to learn scripting now or wait, I'd say you would probably be better off learning now if you intend to learn later. While Zscript has a lot of quirks and limitations; the basic rules of programming are pretty much the same in any language. And since the new language is supposed to be similar to Zscript, learning Zscript would make learning the new one easier.

 

@C-Dawg- I was looking over your DrawTileYAxis code and trying to figure out how exactly it is different than using another screen to create a layer? Also, not everyone uses tile zero as a blank tile. As far as I can tell, what Naru was trying to accomplish was to make a layer that shifted which layer it was on when Link and the enemies moved above or below it. I don't think your code would do that.


  • Naru likes this

#227 grayswandir

grayswandir

    semi-genius

  • Members

Posted 23 January 2016 - 11:17 AM

If it's more convenient for you to wait, I'd do that, but I don't think there's any need to actually put off scripting if you actually find yourself needing one. In the first place, AngelScript is being picked because it's so similar to ZScript. I'd imagine 90% of any work you do, especially considering it's probably on the simpler end, will be transferable. Very complex stuff will probably need a rewrite, but I don't think you'll be getting to that level that quickly.


  • Naru likes this

#228 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 25 January 2016 - 04:28 AM

I doubt waiting will have any benefit. It'll likely be a couple of years, and then who knows how long in Beta, and Gamma phases.
 
I'm certainly not going to abandon my projects simply because a new version was announced. Beyond that, ZScript will likely retain support from outside sources  (in ZC forks). Plus, if the assembly-level stuff is maintained, your codebase will still work, if you play the quest that included it in a newer version of ZC.
 
I'm going to say at least one, or two years, before '2.60' even reaches a beta, and then more time for '3.0' to be real. We might actually have several 2.5x things in the interim, depending on how things turn out.
 
 

On 3.0, while it will eventually come out; there's no firm date as to when. Could be next week, could be 3 years from now. (Or longer.)
 
On whether to learn scripting now or wait, I'd say you would probably be better off learning now if you intend to learn later. While Zscript has a lot of quirks and limitations; the basic rules of programming are pretty much the same in any language. And since the new language is supposed to be similar to Zscript, learning Zscript would make learning the new one easier.
 
@C-Dawg- I was looking over your DrawTileYAxis code and trying to figure out how exactly it is different than using another screen to create a layer? Also, not everyone uses tile zero as a blank tile. As far as I can tell, what Naru was trying to accomplish was to make a layer that shifted which layer it was on when Link and the enemies moved above or below it. I don't think your code would do that.

 
Combo zero should always be blank with no properties. If tile zero is not blank, that is a design flaw too. Far too many things depend on that, and anyone making a tileset that doesn't, should get a poor rating as a result. I'm actually in favour of making combo 0, and tile 0 forced-blank, and uneditable. I know of one or two tilesets where this is not the case, and every time I use one, I need to edit it to change this problem.
 
 

I know already that it is possible to put projectiles above overlayers through scripting, might it be an alternate solution to script instead player, item and enemysprites to be below (layer 4) depending on their screenposition?
 
Also, it is possible to create block-flags to only block projectiles coming from the back? This would perfect the "behind the tree" expirience. I also am back to the block-idea a bit. Is it possible to change the block in a way that wand-magic/candle-flame create a Flame on beeing blocked.


Sure. You can kill a weapon on collision, based on its direction.
 
 
//Returns collision between an lweapon and a combo, only if its direction is DIR_DOWN.
//Set checkcoldetection true if you wish weapons without collision to automatically return false.
bool CollisionDown(int cmb, lweapon l, bool checkcoldetection) {
    int c[8];
    c[0] = ComboX(cmb);
    c[1] = ComboY(cmb);
    c[2] = ComboX(cmb)+16;
    c[3] = ComboY(cmb)+16;
    c[4] = (l->X)+l->HitXOffset+l->DrawXOffset;
    c[5] = (l->Y)+l->HitYOffset+l->DrawYOffset;
    c[6] = c[4]+l->HitWidth;
    c[7] = c[5]+l->HitHeight;
    if ( checkcoldetection && !l->CollDetection ) return false;
    if ( l->Dir != DIR_DOWN ) return false;
    return RectCollision( c[0], c[1], c[2], c[3], c[4], c[5], c[6], c[7] );
}
 
//Returns collision between an lweapon and a combo, only if its direction is 'dir'.
//Set checkcoldetection true if you wish weapons without collision to automatically return false.
bool CollisionDir(int cmb, lweapon l, int dir, bool checkcoldetection) {
    int c[8];
    c[0] = ComboX(cmb);
    c[1] = ComboY(cmb);
    c[2] = ComboX(cmb)+16;
    c[3] = ComboY(cmb)+16;
    c[4] = (l->X)+l->HitXOffset+l->DrawXOffset;
    c[5] = (l->Y)+l->HitYOffset+l->DrawYOffset;
    c[6] = c[4]+l->HitWidth;
    c[7] = c[5]+l->HitHeight;
    if ( checkcoldetection && !l->CollDetection ) return false;
    if ( l->Dir != dir ) return false;
    return RectCollision( c[0], c[1], c[2], c[3], c[4], c[5], c[6], c[7] );
}
 

Also if you walk near an edge of a solid combo, Link's position is slightly corrected, is it possible to make this correction for complete quarter-solid combos like diagonal walls? I know this is totally unneeded but it is annoying me. Also of course I want this not to work as global script.

 
I have no idea why you'd want this not to be global. That's the most efficient, and logistically feasible way to handle it, especially if you want to avoid glitches. Other than that, I'll wait to see what other people churn out for this, and I might adapt it, or expand on it.
 

A script that makes only certain pits crossable with the ladder and disables the ladder to work otherwise? The Ladder-item can be soo annoying sometimes. Also I have certain problems with solid combos above water, since Link will just ignore them.


Sure.
 
Try this:
 

 
I renamed ProximityX/Y to CheckProximityX/Y here, as I have those in the std.zh update pack, but until that's in use, I don't want to post functions from it (so that I can avoid compiler / naming duplication errors).
 
I presume that you want it to ignore water, too?
 

I searched for the secret-script ywkls spoke about and could not find anything that woul include my needs. Is there something that works like triggering a secret on activating step 1 and reseting this on activating step 2 to be triggerable again by step 1 and so on? And this should work completly independent from other secrets. Maybe through putting a FFC on a Layer so only this Layer is affected by the trigger?

 
I'm going to need to page up through the thread for this. Do you want custom step triggers?
 
I have an assortment of secret trigger scripts in my files... Send me a PM if you wish.
 

Again this is mostly to have the background-info what is possible and what not. To really use scripts is actually no something I am able with my actual knowledge...


Hmm.. Implementing them is silly easy, but you can always pester one of us if you want shyte added to a quest. :D

Edited by ZoriaRPG, 25 January 2016 - 05:04 AM.

  • Naru likes this

#229 Naru

Naru

    Magus

  • Members

Posted 25 January 2016 - 02:07 PM

I doubt waiting will have any benefit. It'll likely be a couple of years, and then who knows how long in Beta, and Gamma phases.

 

I'm certainly not going to abandon my projects simply because a new version was announced

 

I did read the angel-thread (at least part of it) and if I got it right mixing ZScript and Angelscript won't work. There is a lot of global (most likely more complicated stuff like my annoying overhead-wish) where I could have good use of ZScript by know to create at least a playable dungeon and such, but also A LOT OF minor stuff that seems to be kind of beatable with Angelscript (it sounds at least as it is more easy to use) where I can test around while I don't have to annoy anyone with anything.

 

Since I have rather big problems with informatics and languages in general even though I am interested in them, I really have no big hopes to master scripting myself (especially the complicated stuff)... Of course I know there are members like you who are OK with helping to an reasonable agree, but imagine my quest is finished more or less with zscript while Angelscript is already full in motion, no Zscript-Pro like you is around for a long tome and I still understand little more than how to add a script to my quest - I would be unable to finish it myself and eventually had to bug a lot of people for a lot of help (like worst case replacing all my ZScripts with Angelsripts) and that is something I really want to avoid.

 

Maybe I am just thinking to much, I tend to be utterly pessimistic and to obsess about the smallest things...

 

 

I presume that you want it to ignore water, too?

 

Yes, though the point about the water rather meant the problem with partial solid water where I want to not be able to cross over while swimming (If this helps, I do not need solid water to be swimmable, I never really got the reason why the water in ZC is naturally solid)

 

 

I have no idea why you'd want this not to be global. That's the most efficient, and logistically feasible way to handle it, especially if you want to avoid glitches. Other than that, I'll wait to see what other people churn out for this, and I might adapt it, or expand on it.

 

If I have a diagonal wall and similiar stuff, it would be logical to work this way, but there are also a lot of Situations where you have quartertiles that also show quadrats, I thing it would look really odd, if such a tile would create such smooth movement. But this has a really, really low priority for me anyway.

 

 

 

Again this is mostly to have the background-info what is possible and what not. To really use scripts is actually no something I am able with my actual knowledge...

 

Hmm.. Implementing them is silly easy, but you can always pester one of us if you want shyte added to a quest.

 

I actually think at least that much I am able to learn. The point is that I want to do thinks slowly and hope to avoid situations like putting in scripts and such I do not understand and creating a mess that has to be fixed by doing so...

 

Or to be more precise I am already working on (two) quest(s) and learn often new tricks within ZC itself to solve problems without scripting. Things I cannot solve stay unfixed for the moment. Out of that reason I want to know what is possible through scripting and avoid things that most likely cannot fixed, but exactly out of that reason I will use the actual scripts first far later and don't want you to bother to script something for me if I am not even using them atm.

 

[edit] Would something like placing FFCs, that play a certain sfx/sound if "activated" be possible? most likely by secrets, since there are tons of situations where I don't want the secret chime to play and also a lot of situations some other sound does fit far better? Also something like Trigger -> self, same (meaning if a bomb-trigger is triggered, all bomb-triggers with this flag on the screen trigger independent from the secret state? Maybe with a FFC, that saves the state and also defines which trigger-type is triggered? Though I highly doubt there do not exist already scripts that do the same more or less.


Edited by Naru, 26 January 2016 - 07:14 PM.


#230 C-Dawg

C-Dawg

    Magus

  • Members

Posted 27 January 2016 - 01:57 PM

[edit] Would something like placing FFCs, that play a certain sfx/sound if "activated" be possible? most likely by secrets, since there are tons of situations where I don't want the secret chime to play and also a lot of situations some other sound does fit far better? Also something like Trigger -> self, same (meaning if a bomb-trigger is triggered, all bomb-triggers with this flag on the screen trigger independent from the secret state? Maybe with a FFC, that saves the state and also defines which trigger-type is triggered? Though I highly doubt there do not exist already scripts that do the same more or less.

 

Well, sure.  Zodiac does this a lot.  You set up your combos or flags how you want, then have a global script check for those combos on the screen and, if it finds them under certain conditions, do a thing.  Or, it it's an item script or something, put the check there instead.  Then you just plop the flags or combos down in Zquest.

 

To illustrate, say you want to have a block that can be blown up with bombs but is independent of the Screen secrets flag.  Well, script up a bomb item that not only places the bomb when you use the item, but also persists at the bomb until it blows up, and then checks in the blast radius for the block to blow up.  You can script it to check for blocks by Combo or by Flag, whatever you like.   Then, if the script finds one, it changes the combos on the screen, plays music, or does whatever else you want. 

 

If you want the effect of this little interaction to persist when you leave and return to the screen, like normal secrets do (but independent of them) then just put whatever information your global script needs to know about in the Screen->Misc variable fields.


Edited by C-Dawg, 27 January 2016 - 01:57 PM.

  • Naru likes this

#231 ywkls

ywkls

    Master

  • Members

Posted 27 February 2016 - 10:28 PM

It has been a month since anyone posted anything here and I guess that means that this thread has finally run its course. Not to say I won't still have scripting questions and/or contribute my scripts so that people can use my work as they see fit but for the most part I don't really need it any more.

 

Here's some stuff I've learned how to do recently which people might find useful-

 

1. Custom Collision- a way to make Link's hitbox bigger than 16 x 16.

2. Eweapons Don't Obey Gravity- A global function that makes all eweapons that aren't script-type ignore sideview gravity.

3. Jumping on Sideview Slopes- Because it needed to happen.

 

While the methods used for these probably won't work for others without some tweaking, I think adapting them wouldn't be that hard.

 

The last project is my own header. It only has about 9 functions so far, but they're shortcuts that let me do things I frequently have to do, more easily than typing out a long series of commands every time.

 

I'll keep posting here and elsewhere as I develop things, but for now I'm probably going to just continue working on my own and communicating with those in the Skype scripting group to learn how to improve my skills.



#232 Naru

Naru

    Magus

  • Members

Posted 05 March 2016 - 04:04 AM

Would it be possible to change combo-properties through an inherent flag depending on links position? This about layers again btw.

I will again use the squares of the help-grid from ZC. Lets say the inherent overhead flag (additional layer between layer 4 and 5 it seems) affects only Link (means for everything else it is always overhead). Now add two new inherent flags (these have to work on any layer): #1 makes the combo overhead for Link if Link touches a "square" in the row above the combo, #2 makes the combo overhead for Link if Link touches a square of the row in the combo. Maybe add a scripted FFC to help this work (one invisible only for the script). If this would be possible it would be a great help.

[Edit] is it possible (through FFC) to change Links Position in the Minimap?

Edited by Naru, 07 March 2016 - 05:08 PM.


#233 Naru

Naru

    Magus

  • Members

Posted 12 April 2016 - 04:00 PM

Uhhm, Hey again, I would like to have something like permanent step triggers. The reason for this is that I want to trigger certain things independent from secrets. Like I have a room with a step triggering a chest and a candle triggering a door. Work arounds like a step that sets the boss treasure opened state with a floor-tile set as boss chest that has the intended combo next to it are fine, whatever is possible.

Also a short apologize that I still did not test your script at C-Dawg, my troubles with scripts is far bigger than thought.

#234 Naru

Naru

    Magus

  • Members

Posted 07 June 2017 - 10:05 AM

(I really like gravedigging more than starting a new topic for any dumb question I have :P )

Would it be possible to make "fakewater" to achieve things that cannot be scripted easily with existing water? The well-known problem with quarter tiles for example? Like combos that change Link's sprite in the needed way and alter the functions of items/buttons while Link stands on them? No idea how difficult this would be, but there should be several interesting things you could do with such combos. And the existing water could be used for pits or so.

Also, wouldn't it be fun if fast running (pegasus boots scripts or so) could be used to run over warer.

(These are questions or ideas, not requests)

#235 cavthena

cavthena

    Apprentice

  • Members
  • Real Name:Clayton
  • Location:I wish I knew

Posted 07 June 2017 - 11:13 AM

Pegasus boots would be easy to make. You can use many different methods to force Link or fake Link moving over water.

Custom water on the other hand. That could be problematic. While it's possible to create your own water, you would need to include checks for just about everything from Link to Zoras. It would pretty much be a pit script on steroids. It might not be worth doing and instead see if current bugs with water can't be fixed in a later version of ZC.
  • Naru likes this

#236 SkyLizardGirl

SkyLizardGirl

    Unbeknownst to danger we call upon your help

  • Banned
  • Real Name:Arianna Crystal Ritter
  • Location:Earthia

Posted 11 June 2017 - 07:05 PM

Locked Doors  (Auto-Corrected)

 

(Because its an -  'Emerge!* // for my quest.')  

 

I Need a script that corrects Link walking through Locked doors from another side.

 

-If Link walks through a Locked door accidentally it 'auto corrects' and - makes the locked door stay open and act' -just like a shutter but change back into a locked door by closing and pushing you out from behind just like the shutter does 

-Until you have a key to press it unlocked.  

 

The reason for this is just 'how stupid' Link looks walking through a locked door from another side,

 

If it is an auto script this saves time and hassle of going through all the doors making sure this mistake does not happen, but would be a life-saver if it is fixed so 'all locked doors in your game' that you walk through does this.


Edited by SkyLizardGirl, 12 June 2017 - 01:35 AM.


#237 Naru

Naru

    Magus

  • Members

Posted 12 June 2017 - 12:35 AM

There is the option to view and save the current map in zquest. It is an easy way to check such things.

#238 SkyLizardGirl

SkyLizardGirl

    Unbeknownst to danger we call upon your help

  • Banned
  • Real Name:Arianna Crystal Ritter
  • Location:Earthia

Posted 12 June 2017 - 01:42 AM

There is the option to view and save the current map in zquest. It is an easy way to check such things.

 

It's not that simple, My dungeon designs are not 2D in design like basic Zelda dungeons. You have choices what you choose to do to solve them.

 

I have checked many many times but the errors are still there, and they don't go away even if i double check locked to locked doors on both sides, it still messes up and link walks through Locked doors.

 

Most of my dungeons you have two or more ways in a loop you can go or choose which side of the loop to loop around and unlock the doors in the 1 path you have chosen.

 

Its not that simple, i have tried to correct them many many times. Even a locked door on a shutter from the other side. 

 

I need Key hole doorways to act as shutters and 'detect and trigger' the script just before link walks through them.

 

This isn't just my wish, This is a 'necessity for all quest makers here' - to make much more dynamic dungeons than what is given and expected.   It saves tons and tons of hours of time to correcting errors to all and every quest maker and must this script idea be in the Script library.


Edited by SkyLizardGirl, 12 June 2017 - 01:45 AM.


#239 Naru

Naru

    Magus

  • Members

Posted 13 June 2017 - 06:43 AM

I need Key hole doorways to act as shutters and 'detect and trigger' the script just before link walks through them.

 

Maybe a better solution for this would be to change the general behavior of key-doorways? I think the 'detect and trigger'-solution is more complicated as it needs to check and has to keep the normal door-behavior while it is altered if the check is positive. Making key-doors into one-way-shutters that turn to shutters that open when a key was used with a global script might be more reasonable.

 

I really want to know how scripting works, I think I would enjoy solving such problems, but to say it out loud I am just too dumb to see the system/how it works...


  • Avaro and SkyLizardGirl like this

#240 Naru

Naru

    Magus

  • Members

Posted 16 June 2017 - 04:33 AM

From what I have seen so far from my tests the first saved secret on a screen is always instantly changed while further secrets change with a delay. Like if the first secret is an orange flame the orange flame tile can be seen the moment you scroll in and the torch gets visible. But if further secrets are saved like a blue flame on scrolling in you still see the orange flame and only after fully scrolling in it changes to the further secret state and gets blue. I don't like it like this, might it be possible to have the blue flame instantly appear? Or make the first (orange flame) also appear delayed for consistency?


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users