Hi all,
I've been lurking on these boards while playing with ZGameEditor as a hobbyist for a few weeks, and it's been fun messing around with the components to see what I can come up with.
I was wondering if it might be possible to read ZExpression code from an external file? I'm primarily asking this because while I was trying to come up with procedurally generated content, I used Microsoft Excel and VBS to export data in ZExpression syntax, then manually copy-pasted the generated data into a ZExpression component. I'm not sure if it would be useful for anyone else, but I thought "no harm asking".
Thanks for reading!
Read ZExpression from external file
Moderator: Moderators
Re: Read ZExpression from external file
Hi and welcome to these forums!
It is not possible to load code from external file because a ZGE-produced EXE-file does not contain the compiler so it cannot process source code (it only contains the minimal runtime, that's the reason it can be so small).
However it sounds like a cool idea to generate ZGE-source from other tools. Can you show some of your results or just tell us a little more about it?
Regards,
Ville
It is not possible to load code from external file because a ZGE-produced EXE-file does not contain the compiler so it cannot process source code (it only contains the minimal runtime, that's the reason it can be so small).
However it sounds like a cool idea to generate ZGE-source from other tools. Can you show some of your results or just tell us a little more about it?
Regards,
Ville
Re: Read ZExpression from external file
Thanks! I'm still experimenting with it, I'll post here when I get something more concrete!
What I meant was, can it compile the referenced external files into the exe? It doesn't have to read the external files anymore after compilation.
What I meant was, can it compile the referenced external files into the exe? It doesn't have to read the external files anymore after compilation.
Re: Read ZExpression from external file
Okie a quick example of what I'm trying to do: I wrote a simple VBS that will generate the loading script for Rado1's ZgeSkelet dll based on the files in a directory.
So a directory filled with Cal3D files like this:
Will generate this script in a txt file:
I will then copy it into the ZExpression component in the zgeproj.
If there were a way I could load this script externally, it would save a lot of the time I spent copy-pasting whenever I did any changes.
So a directory filled with Cal3D files like this:
Will generate this script in a txt file:
Code: Select all
BlondieCoreModel = zsk_CreateCoreModel("blondie");
// Skeleton
zsk_LoadSkeleton(BlondieCoreModel, "models\\blondie.xsf");
// Animations
// Meshes
zsk_LoadMesh(BlondieCoreModel, "models\\blondie_Body.xmf");
zsk_LoadMesh(BlondieCoreModel, "models\\blondie_Bottoms.xmf");
zsk_LoadMesh(BlondieCoreModel, "models\\blondie_default.xmf");
zsk_LoadMesh(BlondieCoreModel, "models\\blondie_Eyelashes.xmf");
zsk_LoadMesh(BlondieCoreModel, "models\\blondie_Gloves.xmf");
zsk_LoadMesh(BlondieCoreModel, "models\\blondie_Hair.xmf");
zsk_LoadMesh(BlondieCoreModel, "models\\blondie_Shoes.xmf");
zsk_LoadMesh(BlondieCoreModel, "models\\blondie_Tops.xmf");
// Materials
zsk_LoadMaterial(BlondieCoreModel, 0, "models\\blondie_0.xrf");
If there were a way I could load this script externally, it would save a lot of the time I spent copy-pasting whenever I did any changes.
Re: Read ZExpression from external file
Hi Barefists,
K
Unfortunately the only component that ( currently ) supports that is the ZExternalLibrary component. But i agree it would be convenient if you could keep certain resources external during development ( such as images, meshes, scripts etc. ), so you don't have to re-import them every time you make a change.Barefists wrote:If there were a way I could load this script externally, it would save a lot of the time I spent copy-pasting whenever I did any changes.
K
Re: Read ZExpression from external file
An alternative would be a XML or JSON parser, would that be possible?