Entities & Action Types
As you already know, VNgen is built upon the Quantum framework by XGASOFT. In essence, this makes VNgen a collection of actions to be run in Quantum’s events.
VNgen’s actions can be categorized into several groups where each group relates to a separate entity. There are 14 main entity types in VNgen:
- The perspective camera
- Character attachments
Each entity may have as many as 15 functions or even more, but don’t worry: while it might seem like a lot to learn at first glance, most of these functions are standardized so you only need to familiarize yourself with one entity to have a basic grasp on all of them. There are exceptions, however, so be sure to read the full reference guide to get the most out of VNgen.
In general, each entity possesses functions to…
- Create a new instance of an entity
- Modify an existing entity’s position, scale, rotation, and color blending
- Replace an existing entity with a new one
- Destroy an existing entity
- Animate an existing entity
- Deform an existing entity
- Apply a shader on an existing entity
Some of these functions are provided in multiple variants which, again, are typically standardized across other entities. The best example of this is extended functions, which provide the same functionality as their simpler counterparts while extending the number of available options to customize the entity being modified.
Example: vngen_textbox_create("textbox", spr_textbox, 0, 1080, 0, trans_fade, 3); vngen_textbox_create_ext("textbox", spr_textbox, orig_left, orig_bottom, 0, 1080, 0, scale_stretch_x, trans_fade, 3, ease_cubic_out);
Note: Because both scripts serve the same purpose, they should never be used to create the same entity twice as shown in the example above. This is merely to demonstrate what the two types of functions look like side-by-side.
In the example above, both scripts will create a new textbox named “textbox”, display it at the bottom of the screen, and fade it in with a duration of 3 seconds. However, the first script assumes the sprite named ‘spr_textbox’ is already aligned to the bottom left corner, while the second script allows us to determine its origin point on the fly. The extended function also allows us to scale our textbox, in this case stretching it horizontally to fill the screen regardless of the sprite’s dimensions and the screen’s display resolution. Last, but not least, we can even specify an ease mode for the fade transition in the more advanced function, while the simpler version does not require easing.
Each of these properties will be covered in detail later, so don’t worry about all the extended options for now. This just goes to show why multiple versions of the same function exist: in the end, they’re all just different ways to perform the same handful of fundamental operations as listed above: create, modify, replace, animate, destroy.