Jump to content

Photo

Automatic Global Script Combiner


  • Please log in to reply
40 replies to this topic

#31 Avaro

Avaro

    o_o

  • Members
  • Real Name:Robin
  • Location:Germany

Posted 25 October 2017 - 05:51 PM

It'd be nice if label would also be the name of the combined global script. Right now if you combine MooshPits with LinkHurtSounds the combined global is called MooshPits, which causes confusion. xD



#32 OmegaX

OmegaX

    Leader of Omega GamingHunters101

  • Members
  • Real Name:Matthew
  • Location:Rochester, NY

Posted 29 November 2017 - 03:22 PM

This is a nice program. good for people who are new to scripting. Though i have one question, how many global scripts can you combine?, 2 or 3 or an infinite amount of them if the person choose to do so.



#33 Anthus

Anthus

    Lord of Liquids

  • Members
  • Location:Ohio

Posted 29 November 2017 - 09:11 PM

This is a nice program. good for people who are new to scripting. Though i have one question, how many global scripts can you combine?, 2 or 3 or an infinite amount of them if the person choose to do so.

 

I don't know the answer to the question exactly, but I would suggest not using an insane amount. Some scripts can cause slowdown in ZC, even on beefy computers.



#34 OmegaX

OmegaX

    Leader of Omega GamingHunters101

  • Members
  • Real Name:Matthew
  • Location:Rochester, NY

Posted 29 November 2017 - 09:33 PM

 

I don't know the answer to the question exactly

if you had to guess how much?

 

 

but I would suggest not using an insane amount. Some scripts can cause slowdown in ZC, even on beefy computers.

I only plan on using at least 18 global scripts for my quest at least. Don't worry though my computer is tough enough for it, i can assure you that.



#35 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 30 November 2017 - 06:07 AM

At that point, automated combination is not wise. Many of those scripts may have lweapons loops, npc loops, collision loops, and similar, that are running in multiple instances; rather than a single loop instance that checks everything.

The performance concern is not for your machine, but for the target machines of anyone playing your quest.

You can try it, and see if people encounter problems. In theory, using this, you can merge two scripts at a time, and continue adding onto them, in a repetitive process indefinitely. Whether it works or not, depends on if the scripts have syntax that this utility recognises; and the actual function and performance can vary dramatically based on instruction ordering.

The combination utility has no AI to determine what events should occur in any specific order. :P
  • Anthus likes this

#36 Anthus

Anthus

    Lord of Liquids

  • Members
  • Location:Ohio

Posted 02 January 2018 - 05:45 PM

Is there a way to use this with headers? At least I think that's the question I'm trying to ask. Is there a way to combine your regular global scripts with the ghost.zh header (and all associated scripts) for example? If I understand correctly, no, it won't work directly cause ghost.zh is a header, and not an actual script. I'm thinking I'd have to import the header, and all of the .z files in the ghost_zh folder, but I want to be sure.

 

I got it to work already with two other scripts (Evan's subscreen script, and a script that makes Ex3 jump) but I'm wondering if I'd run into any problems, or major complications if I wanted to use autoghost. I want to see here, before I go setting up ghost.zh. In a perfect world, I'd like these three scripts along with your Newbie Boss script. I know the boss script is an Enemy/ FFC script, but it requires ghost.zh. Thanks for your time. 



#37 Russ

Russ

    Caelan, the Encouraging

  • Administrators
  • Location:Washington

Posted 02 January 2018 - 06:02 PM

Don't worry about importing all the .z files in the ghost.zh folder. Go take a look at ghost.zh in a text editor. It has some values for you to set, then imports all those other files itself. Headers importing headers. :P In general, a header is just a collection of functions used by other scripts. A list of shortcuts, so to speak. So you'd just import them at the top, the same way you'd import, say, std.zh, and don't worry about combining it.

However, setting up autoghost is pretty easy. Ghost comes with some functions to just stick in the main while look of the global script, which can be done just about as easily as sticking in Evan's subscreen function was. If I recall right, you call InitializeGhostZHData() before the while loop in the global, then call UpdateGhostZHData(), Waitdraw(), and AutoGhost(); in that order. So your global would look something like this:

global script slot_2{
	void run(){
		InitializeGhostZHData();
		while(true){
			//Whatever function is used for Ex3 Jumping
			HaveANotShittySubscreen();
			UpdateGhostZHData();
			Waitdraw();
			AutoGhost();
			Waitframe();
		}
	}
}

  • Anthus likes this

#38 Anthus

Anthus

    Lord of Liquids

  • Members
  • Location:Ohio

Posted 02 January 2018 - 06:30 PM

Thanks for the fast reply. :)

 

I got it to compile, which feels pretty satisfying, cause I thought it was going to give me trouble. When I look at the scripts in ZQuest though, it shows two different global actives to put in the slot. Ghost is separate from the other two scripts which are in "Global".

 

Mgh6sRu.png

 

Here is my script, it's not 5000 lines, I promise.

 

Oops, looks like I'm actually using Lejes' subscreen script. I must have not been paying attention when I copied it, since someone linked to it on Evan's submission. That's why you shouldn't have 21 tabs open when you are trying to do script stuff. :P

 

 

edit: I forgot to put "InitializeGhostZHData();" in before the while(true) at first, but it doesn't seem to make a difference. But hey, at least it compiles, which is more than I was hoping for this evening.



#39 Russ

Russ

    Caelan, the Encouraging

  • Administrators
  • Location:Washington

Posted 02 January 2018 - 07:52 PM

I got it to compile, which feels pretty satisfying, cause I thought it was going to give me trouble. When I look at the scripts in ZQuest though, it shows two different global actives to put in the slot. Ghost is separate from the other two scripts which are in "Global".

The reason for this is that ghost has its own active script that you CAN import if you don't use any other globals. Saffith figured a lot of people wouldn't know how to combine globals so made a pre-made global script to use for ghost. You can just ignore it, since you've already put the relevant stuff in your globals.

The script you linked looks set up perfectly.

edit: I forgot to put "InitializeGhostZHData();" in before the while(true) at first, but it doesn't seem to make a difference. But hey, at least it compiles, which is more than I was hoping for this evening.

It doesn't surprise me that it'd compile, but ghosted enemies probably just won't work without that function in there. :P
  • Anthus likes this

#40 Anthus

Anthus

    Lord of Liquids

  • Members
  • Location:Ohio

Posted 02 January 2018 - 08:42 PM

Oh, I see, the ghost stuff is already in. Heh, you weren't kidding when you said that was easy. I was thinking, "yaah, easy for you" but it's pretty intuitive. :P

 

And that's awesome, that is all the global stuff I will need for this project. I just need to set up ghost.zh in an actual quest file with all the stuff filled in, then I'll be ready to start building this quest. All other scripts I'm using are FFCs, and there aren't a ton, so I should be good to go. 

 

One other small question: If I make changes to ghost.zh, which it obviously outside of the main global file, will those changes be updated if I recompile? I'm thinking yes, but I just want to be sure. It probably wouldn't hurt to rename ghost.zh to something else when I use it, so I don't get it mixed up with the example one I'm using.



#41 Russ

Russ

    Caelan, the Encouraging

  • Administrators
  • Location:Washington

Posted 02 January 2018 - 09:29 PM

One other small question: If I make changes to ghost.zh, which it obviously outside of the main global file, will those changes be updated if I recompile? I'm thinking yes, but I just want to be sure. It probably wouldn't hurt to rename ghost.zh to something else when I use it, so I don't get it mixed up with the example one I'm using.

Yeah, it'll update whenever you recompile. You're also good to change the name; just don't change the name of the other files in the ghost_zh folder, otherwise the compiler's gonna get confused. :P
  • Anthus likes this


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users