Jump to content

Photo

New Modules Format


  • Please log in to reply
10 replies to this topic

#1 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 14 November 2018 - 02:01 AM

I've started designing, and integrating a modular file and data format, as ZQuest/ZC Modules. I've made a branch for implementing (and testing) this shift in programme logic, here.

The premise here, is that I'm moving a lot of hardcoded behaviour, especially strings, into a modular configuration fileset, along with quest files, and other assets called by the .zmod file.

Aside from the datafiles, and default quest stuff, I will eventually be adding all enemy, and item family names, and the various strings hardcoded into ZQuest into the module package.

This will allow us to remove all of those infringing assets from ZC, and put them into a Classic Module (as DLC), and to make a set of generic assets files to distribute with the programme.


Once this is done, I can look into making modular game objects (e.g. single enemy, single item, single string), to allow moving data more-easily between quests.

Right now, the code lives in the same fileset as the FFCore class, and at some point, I may try to link the scripting, and the modules systems, and add some king of scripting system to ZQuest, for user macros and so forth, all tied together.


  • Lüt likes this

#2 kurt91

kurt91

    Follower of Destiny

  • Members
  • Real Name:Kurtis
  • Location:Eastern Washington University

Posted 14 November 2018 - 02:51 PM

So, this would allow just downloading a "Custom Enemy" or "Custom Item" file off of PureZC, and then importing it into ZQuest in one step instead of having to manually all of the scripts and everything? If so, that's a pretty awesome idea.

 

If I'm not misunderstanding this, mind explaining how the import process would go for the end-user? For instance, let's say that I download the "Classic Module" or a Custom Enemy. What would I have to do to actually implement them?



#3 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 15 November 2018 - 03:04 AM

So, this would allow just downloading a "Custom Enemy" or "Custom Item" file off of PureZC, and then importing it into ZQuest in one step instead of having to manually all of the scripts and everything? If so, that's a pretty awesome idea.

 

If I'm not misunderstanding this, mind explaining how the import process would go for the end-user? For instance, let's say that I download the "Classic Module" or a Custom Enemy. What would I have to do to actually implement them?

 

Eventually, yes. That's modular components, and part of the plan. I'm not sure how far advanced it'll be for 2.55, but at the least, it'll rip out a lot of hardcoded assets and deps, to allow swapping them out easily.

 

Right now, this system is working. The first module, Classic, at present consists of:

 

classic.zmod

classic_1st.qst

classic_2nd.qst

classic_3rd.qst

classic_4th.qst

classic_5th.qst

classic_qst.dat

classic_fonts.dat

classic_zelda.dat

classic_zquest.dat

classic_sfx.dat

 

With the exception of the new file, classic.zmod, all of these files used to be hardcoded requirements in ZC, and in ZQuest. Now, it's possible to create custom datafiles for modules, and to specify what datafiles to use in the module configuration file.

 

The config file to use is set in zc.cfg, and in zquest.cfg as:

 

[ZCMODULE]
current_module = classic.zmod

 

The next thing for me to do, is to start moving internal hardcoded const strings into the module configuration file. I'm going to start with enemy families, so, when you view them in the editor, as an example, what is shown now in the list as type 'Ganon', can be defined to display anything that you want.

 

The present roadblock for single enemies, is in packing all of their data, including graphics, into a file; then unpacking that with the tiles into ZQuest. Do I just replace specific tile IDs, or do i somehow, magically come up with a way to allow the user to store that tile set in any space they wish, and then update the enemy definitions?!

 

If it is a raw copy, then that becomes easy, but it could easily overwrite other tiles if that happens.

 

I could also export enemy, item, and weapon scripts in the process (as ZASM), and load those into slots, but there's no guarantee that they will work without other support code on which they rely. That'll need to be a flag, and likewise, the user will need to be able to choose to what slot that script imports.

 

These dialogues will need to call the same things that mass paste of tiles (import tiles), and import ASM script do now, and be user-friendly; plus they will need import options, to disable importing specific assets. This all conspires to make that stuff far later down the road in this process.

 

Let's not start to think about encryption, either. Even stupid base-ZC encryption creates a wall of sorts, as it requires an external editor to modify the module files!

 

Still, it's heaps better than having it all hardcoded in the source.



#4 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 15 November 2018 - 04:52 AM

Here are some screenshots of this, as I add features, and the current module syntax:
 
 
Edit Enemy Family Type
module_enemy_family.png
 
 
Edit Enemy Animation Type
modules-enemy-editor.png


When I get this robust-enough, I'll start working on a GUI to edit the module files (in Pascal).


  • Anthus likes this

#5 kurt91

kurt91

    Follower of Destiny

  • Members
  • Real Name:Kurtis
  • Location:Eastern Washington University

Posted 15 November 2018 - 05:06 AM

EDIT: Removed my post. I'm pretty sure I misunderstood, and wrote up the wrong thing.


Edited by kurt91, 15 November 2018 - 05:10 AM.


#6 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 16 November 2018 - 08:16 PM

Updated Build of 2.55 with Modules

 

That has all of the module data, thus far. All of it seems to work, to the extent that I have tested it.



#7 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 19 November 2018 - 04:30 PM

New Features

 

Modules now support up to ten serialised quests. Set num_quest_files to the number of quests in your module. ZC will validate the skip names, and quest filenames only for the number of quests that you establish exist.

 

You can set the default NSF used by ZC, with base_NSF_file, and set the track IDs used for various sequences.

 

You can set all itemclass names, and itemclass help strings. (Lead a string with - to force it to be blank.)

 

You can set all combo type, and combo flag names.

 

You can name all eweapon types in the system.

 

You can rename all room types.

 

You can manually name the default room guys.

 

You can rename all counter types for use by the Item Editor.



#8 kurt91

kurt91

    Follower of Destiny

  • Members
  • Real Name:Kurtis
  • Location:Eastern Washington University

Posted 19 November 2018 - 08:25 PM

What do you mean by "serialized quests"? You mean how the default built-in quests can be picked between by how you name the file? I could do something similar and release the whole thing as a module instead of a quest?



#9 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 19 November 2018 - 08:44 PM

What do you mean by "serialized quests"? You mean how the default built-in quests can be picked between by how you name the file? I could do something similar and release the whole thing as a module instead of a quest?

 

What I mean, is that you can make say, three quests, and have one run after beating the previous quest; so, yes, that stuff is in the module:

 

Spoiler

 

Compare that to the Expo module:

 

Spoiler

 

...and both of those, to the Demo Module

 

Spoiler

 

At some point, I'd like to add a mechanic that prevents ZC from deleting Link's Inventory after beating a quest, too; and having things such as life and magic counters, or other quest assets carry over from one quest, to the next, in a series.



#10 kurt91

kurt91

    Follower of Destiny

  • Members
  • Real Name:Kurtis
  • Location:Eastern Washington University

Posted 20 November 2018 - 03:18 AM

So, you finish one quest and the next one automatically starts up? I'll be completely honest, I can't immediately think of anything beyond making an extra-long game that uses up more maps and resources than one quest file can provide. (Although, I'll probably think of something after a bit.)

 

How about branching quest links? Like, it starts up a different second quest depending on what ending you get on the first one? (Probably check for a specific item in the inventory, and picking the next one depending on if it's there or not.) I can imagine trying to keep everything organized in a single quest file would be difficult, so being able to put each route in a separate quest file so there's no overlap would be useful.

 

Is that ten-quest-limit a hard thing, or could I just add in more lines of "eleventh_qst =", "twelfth_qst =", and so on?


Edited by kurt91, 20 November 2018 - 03:19 AM.


#11 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 20 November 2018 - 08:18 PM

So, you finish one quest and the next one automatically starts up? I'll be completely honest, I can't immediately think of anything beyond making an extra-long game that uses up more maps and resources than one quest file can provide. (Although, I'll probably think of something after a bit.)

 

How about branching quest links? Like, it starts up a different second quest depending on what ending you get on the first one? (Probably check for a specific item in the inventory, and picking the next one depending on if it's there or not.) I can imagine trying to keep everything organized in a single quest file would be difficult, so being able to put each route in a separate quest file so there's no overlap would be useful.

 

Is that ten-quest-limit a hard thing, or could I just add in more lines of "eleventh_qst =", "twelfth_qst =", and so on?

 

Ten is the present cap. At most, it would be 255, but I can't see anyone making more than ten quests in a series anytime soon.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users