Jump to content

Photo

New to scripting, need advice.


  • Please log in to reply
16 replies to this topic

#1 masterlink3000

masterlink3000

    Illustrious

  • Members
  • Real Name:Nick
  • Location:Mount Pleasant

Posted 26 November 2019 - 06:12 PM

Like the title of the topic states, I need some user input on Scripting. last time I used Zelda Classic and Zquest was 1.92, from what I can tell, alot has changed since then... Well over 10 years...

On topic though, I'm currently building a ALTTP style game and I'm wondering what's possible after I finish the Light and Dark World overworld maps... I familiar with the older stuff, tile cycling, layering, and the old method of cutscenes, and other tricks.

But, scripting has me wondering if I even need to use the older methods on everything...

What's possible in Zquest using scripts to make a "A Link To The Past" style game.

#2 Moosh

Moosh

    Tiny Little Questmaker

  • ZC Developers

Posted 26 November 2019 - 08:21 PM

Pretty much any feature you want can be made with scripting in some capacity or another, but a few of the big restrictions are:

  • No scrolling: This is a common request people have, and while it can be done but is all around unreasonable. By the time you're implementing this, you're almost writing a whole new game engine.
  • No palette editing: In 2.53 you can't change palettes without warping between DMaps. 2.55 allows writing to DMap palettes and screen tinting, but still no writing directly to temp palettes or sprite palettes. This makes Day/Night systems obnoxious to do in a presentable manner in 2.53 and even in 2.55 a little less smooth than is desirable.
  • 32 FFCs per screen: While this rarely comes up, there's a limited amount of individual scripts that can be placed on a screen. Cases where a lot of things need to be happening could require consolidating multiple things into one script. 2.55 alleviates this with weapon and NPC scripts.
  • Messing with Link's GFX is funky: There's a few different ways to approach the Link tile issue in 2.53 but they all have their own benefits and drawbacks. Link->ScriptTile should solve this problem entirely in 2.55.
  • Layers are funky: In 2.53 changes to combos on layers are always permanent until you quit and reload the quest, unlike changes to layer 0. In 2.55 the devs have added access to temp layers via mapdata.
  • Places where scripts can't run: There are certain times like some warp transitions where scripts don't run at all. A big one is the opening wipe when the quest is loaded from the file menu.
  • A lot of engine stuff still can't and won't be accessed: ZScript only gives you access to what the devs have chosen to give access to, so when you run into problems like the above, usually some wheel gets reinvented or some janky solution gets devised. Pretty much the same way ZC has always been since the start. New tools, same approach. :P

 

It might sound from the above stuff like you should jump right into 2.55, but a lot of scripts can be written just fine in 2.53. 2.55 is more complicated and still in alpha, while 2.53 is more stable but can do less. If you have some programming experience and are ready to test a million different builds when you run into problems I'd say maybe try 2.55. If you're just learning the basics 2.53 is probably the better choice.

 

For getting started with ZScript, I'd recommend making a short Classic quest to test the waters. Aim low, and then after that aim a little higher than where you're currently at. That's how I and a lot of others started out.


  • ShadowTiger, Anthus and Jared like this

#3 Emily

Emily

    Scripter / Dev

  • ZC Developers

Posted 26 November 2019 - 10:12 PM

  • This makes Day/Night systems obnoxious to do in a presentable manner in 2.53 and even in 2.55 a little less smooth than is desirable.

Oh? Really now?

Video

You wound me, Moosh!

(Script header for this: https://www.purezc.n...=scripts&id=340 )


  • ShadowTiger likes this

#4 Moosh

Moosh

    Tiny Little Questmaker

  • ZC Developers

Posted 27 November 2019 - 05:25 AM

Oh? Really now?

Video

You wound me, Moosh!
(Script header for this: https://www.purezc.n...=scripts&id=340 )

But that showcases exactly the kind of limitations I was talking about. The UI and sprites change with the time of day as well. Tint is quick and easy but looks unprofessional when used for non meta purposes. For a proper day and night system I'd need a finer degree of control. Though one could probably hack it convincingly enough with something like 16+ level palettes, where players wouldn't be able to notice an abrupt change. Like I said, obnoxious. :P

#5 masterlink3000

masterlink3000

    Illustrious

  • Members
  • Real Name:Nick
  • Location:Mount Pleasant

Posted 27 November 2019 - 07:43 AM

I'm just using the beginning raining part from ALTTP, after that... the palette stays the same across the whole light world... the player starts at night and plays during the day for the rest of the game.

#6 Emily

Emily

    Scripter / Dev

  • ZC Developers

Posted 27 November 2019 - 08:05 AM

I'm just using the beginning raining part from ALTTP, after that... the palette stays the same across the whole light world... the player starts at night and plays during the day for the rest of the game.

Then, dmap palettes are all you want. 2.53 can do this, using multiple dmaps for the same map; though I think the rain might be difficult. 2.55 can handle both of these things via script easily.



#7 masterlink3000

masterlink3000

    Illustrious

  • Members
  • Real Name:Nick
  • Location:Mount Pleasant

Posted 27 November 2019 - 10:15 AM

I'm using 2.55... I just use the night dmap palette and a rain layer for the night time...

Scripting wise, is it possible to create regular enemies that use more the one tile... say 16x32...

Edited by masterlink3000, 27 November 2019 - 11:26 AM.


#8 Emily

Emily

    Scripter / Dev

  • ZC Developers

Posted 27 November 2019 - 12:34 PM

I'm using 2.55... I just use the night dmap palette and a rain layer for the night time...

Scripting wise, is it possible to create regular enemies that use more the one tile... say 16x32...

It's possible to create enemies that are more than 1x1 WITHOUT scripts in 2.55.

(Enemy Editor)



#9 masterlink3000

masterlink3000

    Illustrious

  • Members
  • Real Name:Nick
  • Location:Mount Pleasant

Posted 27 November 2019 - 01:16 PM

Awesome... I was gone for way too long.

#10 NoeL

NoeL

    Legend

  • Members
  • Real Name:Jerram

Posted 27 November 2019 - 04:05 PM

Then, dmap palettes are all you want. 2.53 can do this, using multiple dmaps for the same map; though I think the rain might be difficult. 2.55 can handle both of these things via script easily.

Couldn't you always have multiple dmaps for the same map?

If it was just a small part of the map like lttp though you may as well just use a copy.

#11 Emily

Emily

    Scripter / Dev

  • ZC Developers

Posted 27 November 2019 - 04:19 PM

Couldn't you always have multiple dmaps for the same map?

If it was just a small part of the map like lttp though you may as well just use a copy.

Aye, you can. I wasn't saying that was new to 2.53, I was using the lowest version anyone should be using as the default. (2.50.2 is unsupported)

Basically saying 'prior to 2.55, you could...', comparing it to the following statement saying '...but in 2.55, you can do it differently'

A copy would be what you'd want to do, pre-2.55. For 2.55, you wouldn't even need multiple dmaps; just edit `dmapdata->Palette` to change the palette. And, the rain could either be a layer that you change via script (though you'd need to re-change it every load, or use SRam to save the change and load); or what I'd personally do, just script draw the rain with a `Screen->DrawScreen()` command to draw an entire layer screen via script (and then just DON'T do that once you exit the opening).



#12 masterlink3000

masterlink3000

    Illustrious

  • Members
  • Real Name:Nick
  • Location:Mount Pleasant

Posted 27 November 2019 - 08:34 PM

Alttp was fairly large, just open. Based on the tiles, its bigger than 8x16 screens...

I'm still stuck in the old method of screen jumping without scripting, timed screens and places link is under a combo so the player can't see link and press down for next scene... night time will be just the playable screens with a layer of rain and another layer of flashing white tile for lightening... at this point the player has no items nor will he in the rain.

#13 Emily

Emily

    Scripter / Dev

  • ZC Developers

Posted 27 November 2019 - 08:52 PM

If you learn how to do scripting, you can do so much fancier stuff. I mean, check this out for example:

Or the videos in this playlist: https://www.youtube....N1fiFC6XNfnQFYS

#14 masterlink3000

masterlink3000

    Illustrious

  • Members
  • Real Name:Nick
  • Location:Mount Pleasant

Posted 27 November 2019 - 10:14 PM

Ok... now you've got me nerding out over here...

I want to make meter and magic containers

Can you give me an example of script into txt format?

Plus, where do I start when learning scripting for zelda classic...

Edited by masterlink3000, 27 November 2019 - 10:34 PM.


#15 NoeL

NoeL

    Legend

  • Members
  • Real Name:Jerram

Posted 28 November 2019 - 02:00 AM

Ok... now you've got me nerding out over here...

I want to make meter and magic containers

Can you give me an example of script into txt format?

Plus, where do I start when learning scripting for zelda classic...

Magic is already in ZC. No scripting necessary.


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users