Jump to content

Photo

What if ?


  • Please log in to reply
6 replies to this topic

#1 Sans

Sans

    Hey kid wanna buy hot dogs ?

  • Members
  • Location:Judgement Hall

Posted 17 May 2017 - 04:18 PM

Hi i do wants to ask you a question that i was wondered by few times. So there's question.

What if more scripts .zh could be adding ?

personnally more scripts .zh can give us more features for a quest.



#2 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 18 May 2017 - 08:15 AM

What?



#3 Item

Item

    Senior

  • Banned

Posted 18 May 2017 - 09:05 AM

-Question Not found-
  • Joelmacool likes this

#4 Sans

Sans

    Hey kid wanna buy hot dogs ?

  • Members
  • Location:Judgement Hall

Posted 18 May 2017 - 09:26 AM

i means exemple if more scripts .zh could be adding there''ll be more functions like Shop.zh that you can make custom shops with a script that require Shop.zh. it's just an exemple



#5 justin

justin

    Adept

  • Members

Posted 18 May 2017 - 10:11 AM

You can add as many .z and .zh files to your quest as you want since you can add as many scripts as you want. The .z and .zh file extensions are completely made up, you could import .txt or even .hamsandwich instead. They literally are renamed .txt files. The .z extension is a short form for zscript, meaning its just a script file. The .zh extension is a short form for zscript header, which is usually used as a collection of functions and constants that don't run on their own but are called by your various ffc, global and item scripts. The header functions are things often shared by multiple scripts whereas in a .z file it'll likely just include its own relevant functions.

I do believe there are multiple shop scripts available. They would likely be a .z file for reasons described above although shop.hamsandwich sounds great.

#6 PixElvis

PixElvis

    Creative?

  • Members
  • Real Name:Elvis
  • Pronouns:He / Him
  • Location:Dominican Republic

Posted 18 May 2017 - 02:57 PM

True, although I do not know how many scripts put in a single search, it sounds strange to me  :eyebrow: 

 

I need to find out how they do it.


Edited by >ELV002<, 18 May 2017 - 03:00 PM.


#7 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 21 May 2017 - 01:45 PM

You can add as many .z and .zh files to your quest as you want since you can add as many scripts as you want. The .z and .zh file extensions are completely made up, you could import .txt or even .hamsandwich instead. They literally are renamed .txt files. The .z extension is a short form for zscript, meaning its just a script file. The .zh extension is a short form for zscript header, which is usually used as a collection of functions and constants that don't run on their own but are called by your various ffc, global and item scripts. The header functions are things often shared by multiple scripts whereas in a .z file it'll likely just include its own relevant functions.

I do believe there are multiple shop scripts available. They would likely be a .z file for reasons described above although shop.hamsandwich sounds great.


I use .zs and .zlib, as .z files are also an archive format, and it was a poorly chosen extension. I will be adding .zh, .zs. and .zlib to the pattern search when listing viable scripts using the import button, at some point, to 2.54+.

The fact that the import dialogue does not show .zh files in the lister, is an oversight, and I tend to favour .zs as it is not used by _anything else_. I use .zlib for components of large headers, and my use of 'zlib' is actually a joke, as .z is the standard extension for ZLIB archives.

I have occasionally used .squid for these component files, when they are components of .zlib files; e.g. tentacles. :D

IIRC, the physical hard limitation of characters in the script buffer (including imported files) is 4,294,967,294 characters, as governed by std::string::max_size(). It may be smaller than this for one reason or another, and I recall ~40MB as a cap.

At some point, adding individual script files and compiling them individually may be possible, as Dark Dragon wants a system like that to be viable. If you need to add an FFC or an item script to a quest, and you have a precompiled script set, and lack the original script files, you can add it to the quest by compiling it, exporting the assembly (ZASM) and appending the ZASM script files to slots in the Import->Script dialogue.

For an example, see my Dynamic Tile Overlay FFC script in the database, which is a ZASM file. It has instructions for how to append it to an existing quest. ZASM files do not need to be compiled, and may simply be installed.

Obviously, this is not helpful for global active scripts, but we are working on ways to simplify merging global scripts in the future.

Edited by ZoriaRPG, 21 May 2017 - 01:49 PM.



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users