Jump to content

Photo

Whaaaaat....


  • Please log in to reply
12 replies to this topic

#1 Reflectionist

Reflectionist

    Apprentice

  • Members
  • Real Name:Jake
  • Location:Missouri, US

Posted 14 October 2016 - 08:45 PM

Okay, scripting looks badass.  ZScript looks badass.  
I don't have a request for any coding, I was just wondering.  I've spent days at this computer trying to figure out how to add 3 scripts from the database to my quest file, and I am completely stumped.  My wife has had it with my mood over it, and finally just suggested that I ask someone on the forums.   :-/  Pride be damned.

If I upload my quest file for a brave coder, could you import the scripts for me, save, and return the file?  I hate to ask, and I don't know if there's anything I can do for you, but I am a musician (even went to college for it) so I could help you maybe with a MIDI or two if you'd like something.  

 

Again, I really don't want to mooch, but I don't have a clue what I'm doing.  Even the script menus in ZQuest are complete greek to me. 

Anyway, what I'm trying to put in is:

Whoa... Same guy.  Congrats, you.

Anyway, if anyone could help me out, it would be greatly appreciated.  


Edited by Reflectionist, 14 October 2016 - 09:11 PM.


#2 CyberGamer1539

CyberGamer1539

    Lord of Cyberspace

  • Members
  • Real Name:Ethan
  • Location:Idaho

Posted 14 October 2016 - 08:53 PM

Moosh's GBA Caves? I believe you mean cliffs. And unfortunately, I can't help you, sorry.



#3 Reflectionist

Reflectionist

    Apprentice

  • Members
  • Real Name:Jake
  • Location:Missouri, US

Posted 14 October 2016 - 09:11 PM

I did mean cliffs, thank you!

 

Fixed.   :D  And thanks anyway!

Do you know where I can find a step-by-step?


Edited by Reflectionist, 15 October 2016 - 12:04 AM.


#4 Moosh

Moosh

    Tiny Little Questmaker

  • ZC Developers

Posted 15 October 2016 - 03:25 AM

Eyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy! Nice to see some older faces returning to the ZQuest scene. :D
 
To import ZScripts, you go to Quest->Scripts->Compile ZScript... (or just press Y as a shortcut). You'll get a window with five buttons: Edit, Import, Export, Compile, Cancel.

  • Edit: Lets you directly edit the ZQuest script buffer. This is where all the code inevitably ends up, although pasting all your scripts directly in here is not ideal, so we'll be handling most of that with import commands. All the scripts used in your quest must be directly in or imported in the buffer in order to correctly compile. If you remove one and then compile, the slot that script occupied will retain its name, but act as if the script is blank.
  • Import/Export: This imports from a text file into the buffer or exports out to a text file. These are not the same as the import command used in the buffer, they will overwrite it completely. Generally this isn't used unless you for some reason want your scripts to be kept in the buffer.
  • Compile: You hit this to load your scripts into slots once you're done editing. Scripts that share names with ones already in slots will automatically overwrite them, so you don't need to re-add those.

Some of that probably sounded like a load of gobbledygook, just remember to use edit to edit your imports and compile when you're done making changes. Now on to the actual steps:
 
Step 1: Create a script text file - First you want to create a plain text (.txt) file to put all your scripts in. You want the script file to be in the same folder as ZQuest or a folder contained within. ZScript file paths start from the ZQuest folder. Usually we rename the file extension as .z to mark it as ZScript, but the compiler doesn't care so do what works for you. Now open the file in a plain text editor such as Notepad or Notepad++. In it you want to paste all of your scripts one after another with some line breaks in between so you can see where they start and end. Some scripts will have constants (marked by const int followed by a name in all caps) that they may want you to change the number values of, so do that as instructed in each individual script. If you have multiple globals, there's some more complex work to be done, but for now we're done with the script file. So save it as the name of your quest and move on to the next step.

 

Step 2: Edit the buffer to import the script file - Now you open the buffer in ZQuest (Quest->Scripts->Compile ZScript...->Edit). You should see an import "std.zh" at the top. This is importing the std.zh script header that you can find in your ZQuest folder. We'll be using this method to import our scripts and any additional headers they might require. A header (.zh) file is like a ZScript file but typically does not contain any scripts, only functions and variables used for them. So now we import our script using its file path. Here's an example of what your buffer might look like.

import "std.zh" //Default header for all scripts
import "ffcscript.zh" //Header used for calling FFC scripts with other scripts

import "MyQuest/MyQuest.z"; //Here's the line importing the script file, looking in the folder "MyQuest"

(Everything after a // until the next line is a comment. The compiler ignores these.)
 
Step 3: Compile and pray - After closing and saving the buffer, hit compile and hopefully it won't spit out an error. If it does, the most likely cause is you're missing a header required for a script or you typed in a file path wrong. In the three you linked the only extra required header is ffcscript.zh. If you run into a compiler error you can't figure out, you can post it here and I'll try to find the cause. Anyways, assuming it compiled you'll be presented with a menu with numbered script slots on the left and script names on the right. You'll want to copy each of the scripts on the right into an empty slot on the left. And do this for all three tabs. In the global tab, the slots aren't numbered but 99% of the time you'll only be using the Active slot.

 

Step 4: Set up scripts in ZQuest - This step varies widely from script to script. Hopefully the script's setup instructions will be clear enough to get you through it.

 

For FFC scripts you usually need to place an FFC on the screen with right click->Place + Edit FFC. It uses a combo which in most case you want to be invisible and has a script drop down at the bottom of the Data tab. In the Arguments tab there are arguments D0-D7 which are used by most FFC scripts.

 

For item scripts, you set them in the item editor under the Scripts tab. These too have the D0-D7 arguments. They also have two possible script slots, one used for when the item is picked up and one for when the item is used.

 

 

So hopefully this helped somewhat. Here's some old tutorials that might help as well.
Plissken's tutorial on importing ZScript
Beefster on organizing script imports
Joe123's guide to combining global scripts

 

P.S. I'd totally be down for trading ZScripts for MIDI sometime. He who holds the music degree holds the power on this site. :P



#5 Reflectionist

Reflectionist

    Apprentice

  • Members
  • Real Name:Jake
  • Location:Missouri, US

Posted 15 October 2016 - 01:02 PM

Hey, man!  Am I glad to see you!

I got your Cliffs to work, but trying to add more screwed everything up for me.  I'm not sure what I did, but the compiling error said that it couldn't parse a header or something.  I'm not sure what I did wrong.  Since the three I wanted were all yours, they shouldn't be conflicting, right?  I think the tileset I'm using had a couple of scripts already put in, parsing more wouldn't remove those would it?  If ZQuest only reads one .z file at a time to reference for the quests, I think I messed up bad and might not have the cliffs working right anymore.  

I am completely lost.  Way back in the day, ZC was how I first played the original Legend of Zelda, and I couldn't ever get past level 6 or 7.  I don't know if what I'm wanting to do is too ambitious for me, but LttP was way easier with travelling, staying alive, and figuring out what to do, and I wanted my quest to have those things.  

So, I guess, Moosh, buddy... what I'm really asking is...

...What kind of music are you looking for?



#6 Moosh

Moosh

    Tiny Little Questmaker

  • ZC Developers

Posted 15 October 2016 - 04:38 PM

I'm guessing you're using Pure 2.5. That set has some scripts and headers already included in it, including std.zh and ffcscript.zh. It's probably because the headers are being imported twice that you got an error. So our buffer should now look like this:
 

import "PureTiles/Pure_Import.zh" //This imports all the Pure 2.5 scripts as well as all the headers we need

import "MyQuest/MyQuest.z"

As you can see the header imports at the top are gone now because Pure_Import.zh is already importing them for us. So hopefully now it should compile, but there's an additional problem where we now have two global scripts. So we'll need to combine them into one. The basic structure of a global script looks like this:

global script Example{
	void run(){
		//Initialization Functions 
		
		//End Initialization
		while(true){
			//Before Waitdraw
			
			//End Before Waitdraw
			Waitdraw();
			//After Waitdraw
			
			//End After Waitdraw
			Waitframe();
		}
	}
}

So there's three parts. The initialization part goes before the while(true). The next two go before and after the Waitdraw(). So you want to put everything from these parts of the script in the same part in your combined script. Let's look at both of our globals:

Bottle Global

Pure 2.5 Global

 

Taking those three parts and pasting them in the same spots in our example, we get:

 

COMBINE!

 

And you add this new global script to your quest's script file. Hopefully then it will compile.



#7 Reflectionist

Reflectionist

    Apprentice

  • Members
  • Real Name:Jake
  • Location:Missouri, US

Posted 15 October 2016 - 08:26 PM

Actually, I was using DoR, but seriously considering moving to Pure for those lip barriers on the mountains, to make the cliffs easier to use--they worked fine in DoR (which has its mountains in the GBZ style, but no lips still), but those GBZ / Pure Mountains really help that out a lot.  Pure just looks cleaner, and in all honesty, the first and only time I've gotten my wife to appreciate game design and Zelda in general was playing your Cliffs example quest.  In my book, that's a miracle.  My dilemma is that DoR is more complicated, and I may not get the cliffs to look quite so elegant, but Pure has way less options in 2.5 for basically everything else.  I might just end up importing the grass and mountain tiles from Pure into DoR...

 

 

I'll give this a shot again, I'm just way rusty since 1.92 b184, and thought that my using DoR might be relevant.  It looks like it comes equipped with a Sign->String script and an Item->String script. 

Is it okay if I PM you with my .z file?  I really am grateful for the tips and I'm willing to learn, it's just going way over my head.  


Edited by Reflectionist, 15 October 2016 - 08:29 PM.


#8 Moosh

Moosh

    Tiny Little Questmaker

  • ZC Developers

Posted 15 October 2016 - 08:42 PM

Pure just looks cleaner, and in all honesty, the first and only time I've gotten my wife to appreciate game design and Zelda in general was playing your Cliffs example quest.  In my book, that's a miracle.

Wow, that's probably the highest praise you can give. It means a lot. :)

 

 

Is it okay if I PM you with my .z file?  I really am grateful for the tips and I'm willing to learn, it's just going way over my head.

Sure, go ahead. I'm happy to help.



#9 Saffith

Saffith

    IPv7 user

  • Members

Posted 15 October 2016 - 08:43 PM

If you want Pure with more stuff, you might try PTUX or Pure Remembrance.

DoR doesn't come with with any scripts preloaded, so I don't know what you're seeing.

#10 Reflectionist

Reflectionist

    Apprentice

  • Members
  • Real Name:Jake
  • Location:Missouri, US

Posted 15 October 2016 - 08:55 PM

Wow, that's probably the highest praise you can give. It means a lot. :)

 

Sure, go ahead. I'm happy to help.

Hey, no problem.  Thank you.  She was thoroughly unimpressed when I was talking about how in love I was with ZC back in the day, had this great epic quest in mind, and ended up walking away out of frustration and never finishing it.  But then I showed her your Cliffs example, and she loved that you can do SO MUCH with only 8 screens.  Hell, I was baffled myself; that's some great game design right there.  Getting everything was definitely a challenge we absolutely loved.

And thank you for letting me do that, I'll try it once more and send it over to you.  I really appreciate the help and again, if you need anything, let me know. 

 

 

If you want Pure with more stuff, you might try PTUX or Pure Remembrance.

DoR doesn't come with with any scripts preloaded, so I don't know what you're seeing.

 

Good call--I was just thrown by the version history and thought compatibility might be an issue with ZC 2.5?  If it's not, even I remember PTUX and I loved that tileset. I'll download it, poke around and see what's up.  Thank you for the recommend!   :D

 

Edit: Oh, and I was seeing this:
screenshot_zpsbvfxws9z.png


Edited by Reflectionist, 15 October 2016 - 09:00 PM.


#11 Saffith

Saffith

    IPv7 user

  • Members

Posted 15 October 2016 - 09:04 PM

Ah, DoR Hybrid. Forgot about that one. Yeah, that's got a couple of things.

#12 Reflectionist

Reflectionist

    Apprentice

  • Members
  • Real Name:Jake
  • Location:Missouri, US

Posted 15 October 2016 - 09:41 PM

Okay, I looked at those tilesets you linked to, and I'm absolutely in love with the Pure Remembrance set.  It looks very easy to use, but with all the tiles I'm looking for!  Thank you so much!  It's got the LttP tiles I wanted, the Pure tiles I wanted, and the DoR stuff I wanted!  The Link Tiles are even set up pretty well to customize shields without completely jacking up the animation.  Sweet!  
 

Is it still compatible with all the ZC 2.5 stuff?  

Do I need to do anything to update it, or is it ready to use?  

I'm sorry for going off-topic!  



#13 Moosh

Moosh

    Tiny Little Questmaker

  • ZC Developers

Posted 15 October 2016 - 10:04 PM

Okay, I looked at those tilesets you linked to, and I'm absolutely in love with the Pure Remembrance set.  It looks very easy to use, but with all the tiles I'm looking for!  Thank you so much!  It's got the LttP tiles I wanted, the Pure tiles I wanted, and the DoR stuff I wanted!  The Link Tiles are even set up pretty well to customize shields without completely jacking up the animation.  Sweet!  
 

Is it still compatible with all the ZC 2.5 stuff?  

Do I need to do anything to update it, or is it ready to use?  

I'm sorry for going off-topic!  

Using an older tileset should still work fine. Some of the new enemies and items won't have tiles set right, but there's not too many of them. I believe all the new enemies are palette swaps and most of the new items are passive. In some cases the tiles are even in the tileset, just not set right because it was made to be compatible with older versions.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users