Scripts / [SOLVED] How to interpret .byc file?

Author
Message
Courtney
User Offline
Joined: 14th Jun 2023
Location:
Posted: 16th Jun 2023 19:03
I am an ultra beginner with lua, and I am trying to tweak some of the behaviors to work more in my favor. I can understand the actual lua script fairly well. What puzzles me about it, and what makes it harder for me to understand is the .byc file that comes with it. I do not know how to use the code snippet tool here, so I will name the specific file that I am trying to alter.

The file in question is - run_away_if_hurt.byc

Thanks in advance for any help!

The author of this post has marked a post as an answer.

Go to answer
PM
Tater
User Offline
Joined: 30th Mar 2023
Location:
Posted: 17th Jun 2023 16:08
This post has been marked by the post author as the answer.
A .byc file in GameGuru is a compiled binary file containing scripts that have been transformed from their original human-readable format (such as .lua) into an optimized binary format for improved performance within the GameGuru engine.
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 17th Jun 2023 21:10
Quote: "A .byc file in GameGuru is a compiled binary file containing scripts that have been transformed from their original human-readable format (such as .lua) into an optimized binary format for improved performance within the GameGuru engine."


No it isn't.

It is a file containing values that are read by a Lua script to define state engine changes and such like which can then edited by the daft visual behaviour editor doodah.

The Lua script is called masterinterpreter.lua and can be found in the files/scriptbank folder.

All Lua scripts are in plain text format until you make standalone, at which point they are pre-compiled into the byte-code format for security purposes (i.e. so they can't be edited by buyers of the game). Byte-code format does load a tad quicker so gives a small performance improvement over loading the text versions but that is a secondary consideration.

btw, I was to one who added the pre-compiling to the engine way back in the Classic days!
Been there, done that, got all the T-Shirts!
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 17th Jun 2023 21:14
Btw, if you look at the masterinterpeter.lua script and scroll down to the bottom you will find the function masterinterpreter_load.

If you examine this function you will be able to see what the .byc file contains.
Been there, done that, got all the T-Shirts!
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 17th Jun 2023 22:51
you don't edit the byc file yourself, it gets changed / updated by the behaviour editor (in test game -> it's the way you can edit scripts logic without coding)
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11

Login to post a reply

Server time is: 2024-02-22 04:58:38
Your offset time is: 2024-02-22 04:58:38