In this tutorial, we use the project created in the Creating a project and registering Waveform file to a Cue tutorial, and write a Script to create game data( ACF File and ACB File ).
This tutorial will use the project created by Creating a project and registering Waveform file to a Cue tutorial.
Before starting this tutorial, if this project is not open, please open the project or execute the Script created in the Creating a project and registering Waveform file to a Cue tutorial.
Select "Script list..." in the Script menu to display the Script list window.
Click the New button in the Script list window to create a Script file with the name below:
Save location of Script | Script file name |
---|---|
tutorials [CRI] | tutorial04-1_build_acb.py |
Double-click the created Script to open by Run the Script from the Script Editor .
In order to get an overview of the Script in the Script list window, write the Script description as follows:
Once you have written the Script description, import the following modules to work with CRI Atom Craft in your Script.
In addition to the Project Module that manipulates the project data of CRI Atom Craft, import Build Module that creates the game data.
In CRI Atom Craft, we call this game data as "build".
The following object is required to build the Cue Sheet and create the ACB file.
Below will describe the information required to build the Script.
As with the Editing and previewing parameters tutorial, get the Work Unit and then get the Cue Sheet in this Work Unit.
The target config is an object that manages the build settings of the platform, and is managed by Global settings.
Use the following function to get the target config folder from Global settings.
Function name | Description |
---|---|
get_global_folder | Gets each object folder directly under the Global Settings folder |
Write a Script to get Target config as follows:
To get each object managed in the Global Settings , use the get_global_folder function to get the object folder from Global settings.
Specify the "folder type of the object" in the get_global_folder function.
Once you have an object folder, use the get_child_object function to get the target Target Config.
You need to specify the Language settings for the data build for localization. However, it is not used in this tutorial.
Language settings and target config are both managed by Global settings.
To get the language settings, follow the same method as the target config - use the get_global_folder function to get the Language settings folder. Then in this obtained folder, use the get_child_object function to get the target Language settings.
The obtained "Cue Sheet" and "Target config" information are required for building.
In the Build Module function, use the following function to build a Cue Sheet.
Function name | Description |
---|---|
build_cuesheet | Build the specified Cue Sheet |
Write a Script to build the Cue Sheet as follows:
Use the build_cuesheet function to build the game data.
In the build_cuesheet function, specify the "Cue Sheet information", "Target config information" and "Language settings information"(optional. Specify "None" if omitted).
When executing the function, it will build the specified Cue Sheet and at the same time, build the Global settings to create ACF files.
The return value of the function is whether the build is successful. It is stored in the "result" variable and use as the conditions for log output.
This concludes the scripting portion of this tutorial.
Save and run the Script.
If the build is successful, it will output a log called "Build of CueSheet "Tutorial" is completed.", and outputs the ACF file and ACB file in the "PC" target folder (same hierarchy as project file).