VNgen Reference Guide

  1. Introduction
  2. Buy Now
  3. Download PDF
  4. Changelog
    1. Compatibility Notes
    2. Feature Comparison
  5. Getting Started
    1. Setup & Installation
    2. Intro to Q-script
    3. Your First Visual Novel
      1. Entities & Action Types
      2. A Simple Dialog
      3. A Simple Choice
      4. A Simple Scene
      5. A Simple Script
  6. Reference Guide
    1. Debug Functions
      1. Intro to QCMD
      2. Included Commands
      3. show_debug_vngen
    2. Macros & Keywords
    3. Animations
      1. Creating Custom Animations
      2. Included Animations
      3. deform
      4. keyframe
    4. Effects
      1. Creating Custom Effects
      2. Included Effects
      3. effect
    5. Shaders
      1. Included Shaders
    6. Engine Functions
      1. sys_config
      2. sys_action_init
      3. sys_action_skip
      4. sys_action_term
      5. sys_anim_init
      6. sys_anim_perform
      7. sys_anim_term
      8. sys_anim_speech
      9. sys_cmd_init
      10. sys_cmd_add
      11. sys_cmd_perform
      12. sys_cmd_draw
      13. sys_toggle_cmd
      14. sys_deform_init
      15. sys_deform_perform
      16. sys_deform_term
      17. sys_effect_init
      18. sys_effect_perform
      19. sys_effect_term
      20. sys_event_skip
      21. sys_grid_delete
      22. sys_grid_last
      23. sys_layer_set_target
      24. sys_layer_draw_scene
      25. sys_layer_draw_char
      26. sys_layer_draw_emote
      27. sys_layer_draw_perspective
      28. sys_layer_draw_effect
      29. sys_layer_draw_textbox
      30. sys_layer_draw_text
      31. sys_layer_draw_label
      32. sys_layer_draw_prompt
      33. sys_layer_draw_option
      34. sys_layer_reset_target
      35. sys_log_init
      36. sys_log_perform
      37. sys_log_get_style
      38. sys_log_get_xoffset
      39. sys_mouse_hover
      40. sys_orig_init
      41. sys_queue_enqueue
      42. sys_queue_submit
      43. sys_queue_destroy
      44. sys_queue_empty
      45. sys_read_skip
      46. sys_scale_init
      47. sys_shader_init
      48. sys_shader_perform
      49. sys_shader_set_sampler
      50. sys_text_init
      51. sys_text_perform
      52. sys_text_get_label
      53. sys_text_get_xoffset
      54. sys_text_style_init
      55. sys_trans_init
      56. sys_trans_perform
      57. sys_vox_add
    7. Global Functions
      1. array_create_2d
      2. interp
      3. is_even
      4. make_color_hex_to_rgb
      5. make_color_rgb_to_hex
      6. mouse_region
      7. mouse_region_gui
      8. shader_exists
      9. vngen_continue
      10. vngen_exists
      11. vngen_get_index
      12. vngen_get_structure
      13. vngen_goto
      14. vngen_goto_unread
      15. vngen_instance_create
      16. vngen_room_goto
      17. vngen_set_cursor
      18. vngen_set_halign
      19. vngen_set_lineheight
      20. vngen_get_renderlevel
      21. vngen_set_renderlevel
      22. vngen_set_scale
      23. vngen_set_shader_float
      24. vngen_set_shader_matrix
      25. vngen_set_shader_sampler
      26. vngen_toggle_auto
      27. vngen_toggle_pause
      28. vngen_toggle_visible
    8. File Functions
      1. vngen_file_save
      2. vngen_file_load
      3. vngen_file_delete
    9. Language Functions
      1. vngen_set_lang
      2. vngen_get_lang
    10. Property Functions
      1. vngen_get_width
      2. vngen_get_height
      3. vngen_get_x
      4. vngen_get_y
      5. vngen_get_xscale
      6. vngen_get_yscale
      7. vngen_get_rot
    11. Backlog Functions
      1. Input
        1. vngen_log_button_create
        2. vngen_log_button_destroy
        3. vngen_log_nav
        4. vngen_log_nav_touch
        5. vngen_log_play_audio
        6. vngen_toggle_log
      2. vngen_log_init
      3. vngen_log_add
      4. vngen_log_draw
      5. vngen_log_clear
      6. vngen_log_count
      7. vngen_log_get_index
    12. Object Functions
      1. vngen_object_init
      2. vngen_object_draw
      3. vngen_object_clear
    13. Events
      1. vngen_event_set_target
      2. vngen_event
      3. vngen_event_pause
      4. vngen_event_reset_target
      5. vngen_event_count
      6. vngen_event_get_index
    14. Actions
    15. Perspective Actions
      1. vngen_perspective_modify
      2. vngen_perspective_modify_direct
      3. vngen_perspective_replace
      4. vngen_perspective_anim_start
      5. vngen_perspective_anim_stop
      6. vngen_perspective_shader_start
      7. vngen_perspective_shader_stop
    16. Scene Actions
      1. vngen_scene_create
      2. vngen_scene_create_ext
      3. vngen_scene_modify_style
      4. vngen_scene_modify_pos
      5. vngen_scene_modify_ext
      6. vngen_scene_modify_direct
      7. vngen_scene_replace
      8. vngen_scene_replace_ext
      9. vngen_scene_destroy
      10. vngen_scene_anim_start
      11. vngen_scene_anim_stop
      12. vngen_scene_deform_start
      13. vngen_scene_deform_stop
      14. vngen_scene_shader_start
      15. vngen_scene_shader_stop
    17. Character Actions
      1. vngen_char_create
      2. vngen_char_create_ext
      3. vngen_char_modify_style
      4. vngen_char_modify_pos
      5. vngen_char_modify_ext
      6. vngen_char_modify_direct
      7. vngen_char_replace
      8. vngen_char_replace_ext
      9. vngen_char_destroy
      10. vngen_char_anim_start
      11. vngen_char_anim_stop
      12. vngen_char_deform_start
      13. vngen_char_deform_stop
      14. vngen_char_shader_start
      15. vngen_char_shader_stop
    18. Character Attachment Actions
      1. vngen_attach_create
      2. vngen_attach_create_ext
      3. vngen_attach_modify_style
      4. vngen_attach_modify_pos
      5. vngen_attach_modify_ext
      6. vngen_attach_modify_direct
      7. vngen_attach_replace
      8. vngen_attach_replace_ext
      9. vngen_attach_destroy
      10. vngen_attach_anim_start
      11. vngen_attach_anim_stop
      12. vngen_attach_deform_start
      13. vngen_attach_deform_stop
      14. vngen_attach_shader_start
      15. vngen_attach_shader_stop
    19. Emote Actions
      1. vngen_emote_create
      2. vngen_emote_create_ext
    20. Effect Actions
      1. vngen_effect_start
      2. vngen_effect_stop
    21. Textbox Actions
      1. vngen_textbox_create
      2. vngen_textbox_create_ext
      3. vngen_textbox_modify_style
      4. vngen_textbox_modify_pos
      5. vngen_textbox_modify_ext
      6. vngen_textbox_modify_direct
      7. vngen_textbox_replace
      8. vngen_textbox_replace_ext
      9. vngen_textbox_destroy
      10. vngen_textbox_anim_start
      11. vngen_textbox_anim_stop
      12. vngen_textbox_deform_start
      13. vngen_textbox_deform_stop
      14. vngen_textbox_shader_start
      15. vngen_textbox_shader_stop
    22. Text Actions
      1. Inline Markup
      2. vngen_text_create
      3. vngen_text_create_ext
      4. vngen_text_modify_style
      5. vngen_text_modify_pos
      6. vngen_text_modify_ext
      7. vngen_text_modify_direct
      8. vngen_text_replace
      9. vngen_text_replace_ext
      10. vngen_text_destroy
      11. vngen_text_anim_start
      12. vngen_text_anim_stop
      13. vngen_text_deform_start
      14. vngen_text_deform_stop
      15. vngen_text_shader_start
      16. vngen_text_shader_stop
    23. Label Actions
      1. vngen_label_create
      2. vngen_label_create_ext
      3. vngen_label_modify_style
      4. vngen_label_modify_pos
      5. vngen_label_modify_ext
      6. vngen_label_modify_direct
      7. vngen_label_replace
      8. vngen_label_replace_ext
      9. vngen_label_destroy
      10. vngen_label_anim_start
      11. vngen_label_anim_stop
      12. vngen_label_deform_start
      13. vngen_label_deform_stop
      14. vngen_label_shader_start
      15. vngen_label_shader_stop
    24. Prompt Actions
      1. vngen_prompt_create
      2. vngen_prompt_create_ext
      3. vngen_prompt_modify_style
      4. vngen_prompt_modify_pos
      5. vngen_prompt_modify_ext
      6. vngen_prompt_modify_direct
      7. vngen_prompt_replace
      8. vngen_prompt_replace_ext
      9. vngen_prompt_destroy
      10. vngen_prompt_anim_start
      11. vngen_prompt_anim_stop
      12. vngen_prompt_deform_start
      13. vngen_prompt_deform_stop
      14. vngen_prompt_shader_start
      15. vngen_prompt_shader_stop
    25. Options Actions
      1. vngen_option
      2. vngen_option_create
      3. vngen_option_create_ext
      4. vngen_get_option
      5. vngen_option_exists
      6. vngen_option_count
      7. vngen_option_clear
      8. vngen_option_nav
      9. vngen_option_select
    26. Audio Actions
      1. vngen_audio_play_sound
      2. vngen_audio_play_music
      3. vngen_audio_play_voice
      4. vngen_audio_modify
      5. vngen_audio_replace
      6. vngen_audio_pause
      7. vngen_audio_resume
      8. vngen_audio_stop
      9. vngen_vox_play
      10. vngen_vox_modify
      11. vngen_vox_replace
      12. vngen_vox_add
      13. vngen_vox_remove
      14. vngen_vox_pause
      15. vngen_vox_resume
      16. vngen_vox_stop
    27. Code Actions
      1. vngen_script_execute
  7. Special Thanks
  8. EULA

Version History #

0.9.9 (Early Access)

  • Added vngen_goto_unread to skip to the nearest option block or unread event
  • Added functions to set shader floats, samplers, and matrices
  • Added functions to replace sounds and vox while synchronizing playback position and other properties
  • Added multi-track and pitch range support to vox
    • Vox source can now be input as an array to create a list of vox which will be randomly selected from each time text increments
    • Additional sounds can be added or removed post-creation
    • Pitch is now randomized between two min/max values rather than simply enabled/disabled with a switch
  • Added trans_spin_in and trans_spin_out transitions
  • Added [event] markup to execute events inline directly (a la links, but without requiring a click)
  • Updated deforms to use 2D point arrays instead of 1D fixed variables
    • This will allow for meshes of any number of columns and rows in a future update
  • Updated effects to use custom variable array, allowing for infinite custom effect variables
  • Raised vngen_script_execute argument limit to 32.
  • Fixed compatibility issues with YYC. YYC is now fully supported
  • Fixed audio fade transitions not being skipped if vngen_goto is run
  • Improved HTML5 compatibility
    • Fixed broken mouse/touch hotspots when using scaling
    • Reduced renderlevel 2 surface usage to mitigate texture swapping glitches
  • Miscellaneous additional fixes and improvements

 

0.9.8 (Early Access)

  • Added per-entity shader support and a selection of included shaders
    • Support for custom uniforms coming in a future update
  • Added make_color_rgb_to_hex to complement make_color_hex, which has now been renamed make_color_hex_to_rgb for consistency
  • Added optional “perform” argument to vngen_goto to allow disabling performing skipped events
  • Added optional “id” argument to vngen_option_select to allow selecting a specific option directly without navigation
  • Fixed wrong colors being used when auto labels are replaced with the ‘previous’ color/font setting at the target event of vngen_goto
  • Fixed style inheritance failing to record certain properties. Backlog now inherits label styles for speaker names
  • Fixed incorrect scaling when launched directly in fullscreen
  • Removed audio wrappers in favor of native functions
  • Miscellaneous additional fixes and improvements

 

0.9.7 (Early Access)

  • Added vngen_room_goto to switch rooms while properly cleaning up VNgen data and preserving log data
  • Added support for multiple renderlevels to improve compatibility with some platforms such as Android, iOS, and HTML5
    • Also added command to set renderlevel in debug console
  • Updated backlog with improved text processing and support for new rendering features such as text alignment
  • Updated display scaling to function as a setting—running a script every step is no longer require
    • Scaling now supports HTML5
    • Also added command to set scaling view in debug console
  • Unified label and text rendering to fix numerous bugs with labels
  • Fixed a bug causing transitions to never be considered complete
  • Standardized code to reduce redundancy and improve performance
  • Miscellaneous additional fixes and improvements

 

0.9.6 (Early Access)

  • Externalized transitions as a new category of keyframe animations
  • Added support for performing animations, deformations, and effects in reverse
  • Added optional ease override support to animations, deformations, and effects to match transition ease behavior
  • Added input_rot as an available constant for keyframe animations (where applicable)
  • Fixed a bug causing text links to crash
  • Standardized code to reduce redundancy and improve performance
  • Miscellaneous additional fixes and improvements

 

0.9.5 (Early Access)

  • Added new tiled scenes system with support for rotation, gradient color blending, wipe transitions, and deforms
  • Added paragraph alignment support to text (labels coming soon)
  • Added animation blending support to transforms and deforms
  • Added color gradient and wipe transition support to deforms
  • Updated file functions to save/load text alignment and language settings
  • Improved replace fade transitions to better support transparent entities
  • Improved text auto linebreak accuracy
  • Fixed character flipping in vngen_char_replace_ext being absolute instead of relative
  • Fixed memory leaks in vngen_object_clear
  • Removed scale from perspective calculations. Distance is now determined solely by z-index for better control and more predictable perspective behavior.
  • Standardized code to reduce redundancy and improve performance
  • Miscellaneous additional fixes and improvements

 

0.9.4 (Early Access)

  • Updated syntax for consistency and ease of use
    • Added ‘all’ keyword support to modify, animate, effects, audio, and log button functions
    • Added ‘idle’ argument to vngen_char_create_ext for consistency with vngen_char_replace_ext
    • Added ‘name’ argument to vngen_text_create_ext and vngen_text_replace_ext for consistency with other functions
    • Added ‘any’ keyword support to vngen_exists to check whether any entity of a given type exists
    • Added optional easing support for all non-extended functions
    • Added vngen_option_create_ext with support for origin, scaling, and variable text colors, and simplified vngen_option_create
    • Added support for checking log buttons to vngen_exists and vngen_get_index
  • Updated prompts to accurately reflect current state during replacement fade and accurately auto-position on rotated text
  • Updated vngen_get_option to clear option results by default–setting the ‘true’ argument is no longer required
  • Updated replace functions to fade the most recently viewed resource when combined with vngen_goto (rather than the most recent resource chronologically, which isn’t always visually correct)
  • Updated animations to rotate coordinates relative to perspective only, not the rotation of the animated entity
  • Fixed option position being calculated incorrectly
  • Fixed destroy actions never completing when ‘all’ keyword is used if no entities of the given type exist
  • Fixed skip failure when skipping to an event label where the event is last in a series
  • Fixed effects causing errors during some uses of vngen_goto
  • Renamed audio functions for consistency with other functions and added wrappers for legacy syntax support
  • Renamed vngen_get_option_number to vngen_option_count for consistency with other functions
  • Renamed vngen_get_option_active to vngen_option_exists for consistency with other functions
  • Standardized code to reduce redundancy and improve performance
  • Miscellaneous additional fixes and improvements

 

0.9.3 (Early Access)

  • Rewrote developer command console (now QCMD!)
    • Added support for keyboard cursor navigation (left/right/home/end)
    • Added support for repeat input if key is held down
    • Externalized commands – console is now extensible!
    • Added new language, log, and window commands (type ‘help’ in QCMD to learn more!)
  • Added keyframe-based effect scripting system
    • Execute arbitrary code in VNgen keyframes!
    • Includes effect scripts for haptic feedback, screen flash, screen shake, and Dualshock 4 lightbar flash
  • Added vngen_get_index function to retrieve internal numeric index for any given entity from the entity type and ID
  • Added vngen_event_count function to retrieve the current total number of events
  • Added support for ‘all’ keyword in vngen_*_destroy functions for destroying all entities of a given type
  • Merged backgrounds and foregrounds into a single internal data structure for more efficient memory management
  • Separated vox speech synthesis into its own data structure and added audio functions to independently pause, stop, and modify vox audio
  • Renamed vngen_log_get_size to vngen_log_count for consistency with other functions
  • Renamed vngen_get_event to vngen_event_get_index for consistency with other functions
  • Updated skip functionality to allow skipping past the final event
  • Updated vngen_script_execute to accept a full 16 arguments (as opposed to the previous 15-argument limitation)
  • Fixed vngen_file_load failing due to outdated use of vngen_goto to restore object event
  • Fixed vngen_log_draw generating errors if log was cleared without destroying the running object
  • Fixed skipped event data being added to the backlog when jumping across objects
  • Fixed text/label actions generating errors if empty string is input
  • Standardized code to reduce redundancy and improve performance
  • Miscellaneous additional fixes and improvements

 

0.9.2 (Early Access)

  • Fixed an issue causing touch scrolling to sometimes scroll the backlog infinitely
  • Fixed manual linebreaks being removed from backlog text
  • Fixed backlog entries being listed in literal order rather than historical order.
  • Added vngen_log_get_index script to return historical log entry index from an
    entry’s on-screen order.
  • Added new proportion scaling modes which scale relatively to changes in display scale
  • Added new properties functions (vngen_get_*) to return the calculated width, height, x, y, xscale,
    yscale, and rotation of VNgen entities, factoring in animations and modifications
  • Updated vngen_exists to optionally check a specific character for attachments, rather
    than check all characters
  • Enhanced all built-in animations for use with perspective
  • Reduced linebreak strictness so that text surface width can expand or shrink to fit
    text automatically
  • Renamed vngen_pragma to sys_config for consistency with other new engine functions
  • Standardized code to reduce redundancy and improve performance
  • Miscellaneous additional fixes and improvements

 

0.9.1 (Early Access)

  • Added online and offline documentation
  • Added additional macros for entity types, which can now be tested with vngen_exists
  • Added new zoom transitions which replace the old scale transition
  • Rewrote skip functionality to fix bugs with labels and some jumps taking more than a frame to complete
  • Fixed backlog data being duplicated when the window is resized, forcing an event restart–without also disabling duplicate data for intentional restarts. This required creating a new backlog queue system to hold all new log data until rescaling is complete.
  • Fixed attachments scaling to the display rather than the parent character with vngen_attach_replace_ext
  • Fixed option button sprites not respecting sprite alignment
  • Renamed existing vngen_emote_create to vngen_emote_create_ext and added a simplified vngen_emote_create in its place.
  • Standardized code to reduce redundancy and improve performance
  • Miscellaneous additional fixes and improvements

 

0.9.0 (Early Access)

  • Initial release
Last updated on May 4, 2018
Suggest Edit