This user manual overviews the powerful scripting tools and systems provided for the Visual3D Game Engine.
It provides an overview of the user interface and key features of those tools, clarifies the when and how they should be used, and links to further information and tutorials about them. This document also defines the different types of assets you can create and wire-up using Visual3D's All-in-One Development Tool to design and script the gameplay, animation, AI and interactivity for your Visual3D-powered game or virtual world.
This manual, and the documents linked to from the titles of its different sections, describes the soon-to-be-released Behavior Tree Editor and support for creating and wiring up Smart Objects and Area State, as well as existing tools such as Visual3D's built-in Script Editor (for Python), Visual Script Editor (for behavior and game logic diagrams / graphs), Dialog Editor (for conversations), Cinematics Editor (for recorded and scripted sequences), and Path Editor (for waypoints and pathfinding AI).

This tutorial is the first in the sequence showing how to create the new Isles of War demo game included with Visual3D from start to finish using the new visual authoring tools available in the latest release of the Visual3D All-in-One toolset. This segment specifically covers how to add gameplay, such as for a Capture the Flag (CTF) mission, to a scene, how to create your own custom component classes (such as for Scenario, Entity, Ability and Action, in C# or any other .NET language) and have them automatically appear assets for use in the toolset. It also covers how to use Visual Studio's edit-and-continue and debugging tools side-by-side while editing and running your game or simulation in the Visual3D toolset.

You can find out more about hooking up actions, animations, sound and movement (user controls) to events and key mappings (for user controls) via entity states for avatars and object entities in the Avatar & Entity Creation user manual.
This tutorial will give you an idea of how to configure key maps for Visual3D and configure your own model animations to be triggered by Key Mapped Event Names. There are also new simpler ways of defining motion, animation and editing using Entity States and Actions which will be covered in this or other tutorials soon.

In the tutorial we will create a simple action that will resize an entity in a certain range.
Actions are designed to perform some work and can be attached on different events / user input. Example of actions: attack, jump, gun shot, creation of entity, opening the door.
This section of the scripting / programming guide provides an overview of the extensibility for Visual3D All-in-One Development Tool editors as well as creating your own component classes ranging from entities and scenarios to lower-level entity abilities, actions, and events, as well as plugin services.


This manual and tutorial covers the following topics on how to trigger actions and script behaviors using Visual3D's built-in Script Editor and other scripting tools.
Actions and Behaviors are the most basis building blocks for a script. For example, StartBehavior and StopBehavior are two types of actions which can be added to a Behavior Tree (State Machine / Sequence), Trigger (Event-Triggered Action Sequence), Cinematics Sequence, or Visual Script (Diagram) to start and stop more complex "Behavior Scripts", which can be written in C#, Python, or another .NET language, using Visual Studio or Visual3D's built-in Script Editor.

Tutorial coming soon for the new Behavior Tree Editor available with the upcoming v0.9.7 release of the Visual3D Game Engine.

Covers different base classes, standard components, and coding style and design guidelines. Creating and using components in C# is covered towards bottom of Mission / Scenario Editing & Gameplay Scripting and in Creating an Action Script with C# and attaching on Area Trigger/Event .
Cinematic Editor is intended to create in-game cutscenes. Using it you can record and play back smooth camera and entities movement on scene, add effects and scripts at certain points of cinematic.
At the moment by means of Visual Script Editor it is possible to create scripts which can be established game entity as behavior or as reaction to user input (as task).

Creating Entity, Component and Plugin Classes in C# with Visual Studio
Creating and Using Component Classes and Assets
You can add Scenarios, Entities, Abilitys, Actions and other components into the scene by drag-dropping them from Asset Explorer onto the Scene Editor (Design tab) viewport, or right click on th entity in the Scene Editor or World Explorer (or Asset Explorer, for entity prefabs), and using the "Add" context menus, or using the Add button(s) in the Scene Editor toolbar. Then after adding a scenario (or other entity/component), it will be selected automatically, you can configure its properties (settings or parameters) in the Object Editor tool window, and expand its abilities, states, and other components there to edit their properties as well. Also, you can modify existing entities and scenarios in the scene by selecting it in World Explorer (eg. using the search filter box) or clicking on the entity in the Scene Editor (Design tab) viewport, or, if it was added to another "prefab" asset instead of the scene, by selecting that asset in Asset Explorer.
You can use the growing library of components that come standard with Visual3D, such as RobotWarGame, AssaultDroid, Missile, Attack, without any need for programming, or you can create your own component classes based on existing demo ones, or modify the existing ones, most of which have the C# source code provided for them. You can use the Object Editor to edit any public fields or properties you had defined on your own custom component classes, allowing you or your scripters/programming to provide highly reusable building blocks for your games and simulations which can be fully used and configured by those designing or building the virtual world.
You can create multiple "prefab" or "preset" assets for any type of component, whether Scenario, Entity, Ability or Action, for quickly reusing common setups. And, for entities, you can configure their Persistence property for each instance (and the default for the prefab) to control whether each instance will be saved as completely unique or share part or all of the settings, components, and edits made to the prefab it was created from, so that they apply to the instances when they are next loaded (eg. the scene they are in is loaded or reloaded).
Through this "Smart Copy" feature for Entity Prefab instances, y can create your own "virtual entity classes" simply by creating an entity prefab asset (selecting its Object Type, like Character, Vehicle, etc., or by creating a copy of an existing entity prefab asset), and just adding abilities, entity states (aka. actions/triggers), and other basic entity building blocks onto it using drag-drop and right-click context menu in Object Editor or Asset Explorer, and use the Behavior Tree Editors and other editors for Conversation, Entity, and Key Maps, to name a few - to define the gameplay or simulation logic visually instead of through programming or scripting languages.
And, you can even use the Visual3D's built-in Script Editor to define your own component classes by creating Python Modules or Python Behavior assets.
Edit-and-Continue, Visual Studio Integration, and Live Importing of Component Classes
We support use of edit-and-continue with Visual Studio, allowing you to make edits to live components and watch them take effect, without any need to restart the toolset or even reload the scene. Similarly, Visual3D is unique in allowing you to take advantage of the benefits of Visual Studio's best of breed tools for programming, debugging and rapid development of games/simulations with .NET, while at the same time accelerating and simplifying your building of virtual worlds using the wide range of editors and visual authoring tools included in the Visual3D All-in-One toolset.
Visual3D supports live importing or reloading of media assets (eg. textures, models, etc.) when it automatically detects that the files they were imported from have been modified have been modified. Building on this, Visual3D will, in an upcoming release, also provide live importing of new component classes without needing to restart the toolset, as well as have any edits made to existing component classes take effect when your reload the scene (eg. via Ctrl-Shift-R) or begin editing or viewing a different scene or entity prefab.
You can also create your own reusable component library with any .NET language and IDE, which can be reused by any of your multiple world projects, similar to how the Standard Assets project is reused. The easiest way to do this is by compiling a .NET assembly .dll which has the predefined name of My Assets.dll directly into the My Assets/ project folder (not in a subfolder like bin) or into the Visual3D/Projects/ folder (where Standard Assets.dll is found). You can find out more about how to define many new plugin/library projects with your own names, instead of adding My Assets.dll to the existing My Assets project, by following the steps described in the documentation for "Creating Engine Plugins and Component Libraries with any .NET Language".
Creating Engine Plugins and Component Libraries with any .NET Language
In addition to using Visual Studio with the C# project automatically generated for you, you can add projects for any other .NET language such as Visual Basic, IronPython, C++/CLI or JavaScript, and use those as well to define your own custom component classes which will automatically appear in Asset Explorer for use from the toolset. This can be done by compiling a .NET assembly (.dll) directly into your world project's folder (or any folder of a content package project, like Demo Assets, which your project references), or into the Visual3D/Projects/ folder (where Tech Demos.dll, Demo Assets, and .dlls for C# projects automatically generated for world projects created by Visual3D are automatically placed). Assets will automatically appear in Asset Explorer for your custom classes, when either they are derived from certain Visual3D base classes (such as ModelEntity, Scenario, Ability or ActionBase, or indirectly, such as when deriving from demo component classes like RobotWar, AssaultDroid, NewLizardman, or Character), or when you apply [ComponentTypeAttribute] (or a derived attribute, like [EntityType]) to your class. New classes will be automatically added to Asset Explorer as components, and existing ones will be updated, when you restart the toolset after recompiling your projects.
For security reasons, Visual3D doesn't automatically load any dll it finds in the project folders. To add your own dll, whether as a plugin, reusable component/asset project , like the Demo Assets C# Visual Studio project, or to use any other .NET language besides C# (and IDEs other than Visual Studio), you should add an entry to the Content Packages found under the World Manifest in either World Explorer or in Object Editor, after selecting the World Manifest from the Settings menubar. You can do this by right click > Add New for the Content Packages folder in World Explorer or property in Object Editor, then renaming it to the name of your dll (without .dll at the end), for example "My Components", and then saving your world (eg. via Ctrl-Shift-S), and then ensuring you .dll is compiled into its own project folder (eg. {Visual3D Install Path}/My Components/My Components.dll). Alternatively, or if you have issues with that, you can try compiling it to the same folder that Tech Demos and new world projects are compiled to by default (example: {Visual3D Install Path}/Visual3D/Projects/My Components.dll).
Older Tutorials and Documentation
Documentation
-
Assets and Actors - Creating and Placing Avatars and Smart Objects; Configuring Behavior Presets, Covers Visual3D Terminology and Concepts.
-
Programming with C# and Visual Studio
Actors and Input
Other C# Programming Topics