Skyline Changelog V0-9-4 BETA

Well, here we are for the April 2015 Skyline Release. It is slightly overdue, but for good reason.
We have many new tasty goodies for you to try and for scripters, this is almost a christmas release lol :P

Skyline Scripting has advanced considerably in this release allowing you to create scripts that are reusable across many meshes. With this system, each entity can have its own unique properties. There is also the new Custom Qt Editor plugins designed to allow you users to expand what skyline can do and all without a single compile. Simply make the editor in QtDesigner or QtCreator and create a .lua script that controls it. Then you have full power of making your own skyline features( Please let us know what commands are missing and we will be on them ).

To compliment these cool new features, we now have the starting points of multi-select which allows you access to creating multi-presets.
Imagine a house with all the contents layed out on the tables. Simply select each item, right click and save as a preset.
Then simply drag the one file out and all the subentities will repopulate into the scene.
As stated, this is an early system and there are many features to add.

Come to the forums to keep up to date with in dev features.
Link to the Forums

Well, that’s enough rambling on, so here is this releases changelog.

Update Log:

New: Dynamic Properties

This release features an even more enhanced workflow when scripting inside skyline.
We now have a new panel which can display custom properties which are defined in the top of the lua script.
Using this new feature you can use 1 external script over all entities and assign different properties to each one making a lua script more of a tool than a per instance script.

You can even simply assign a script and change the properties of that script on one entity uniquely and never open the script editor which is great for beginners. It would be a workflow like this:

  • Download from the asset store
  • drop script on entity
  • Change it’s properties, all this without looking at a line of script or script editor.

This is part of the enhancements to make skyline a super simple and super easy to use game engine.

With Dynamic Properties, you can even change the properties of a script while running the game which opens up many possibilities and developing speed improvements.
Just run the game, then click on the name in the scene entity list and change the dynamic properties to affect that entities script while it is active.

  • New: Properties Panel: This has a new Header system which can swap between entity properties and Dynamic Properties
  • New: Lua Script: Using the predefined property tags, you can add properties to the dynamic script straight from saving you lua file.
  • New: Dynamic Properties: These can be used from External Script or Microscripts.
  • New: Dynamic Properties: These save with the script actions on the entity, so they are saved with the scene and are usable with presets.
  • New: You can create a variety of dynamic item types such as:
  • New: All Items pass their data through 1 function event. “SetDynamicProperty(eid, property, value)”
    • New: Property Item: “Header”: This will create a header and any property underneath will be added as a child
    • New: Property Item: “bool” : This will create a boolean checkbox. Set the default value to change starting active state
    • New: Property Item: “label”: This will create a label that cannot be edited. Use this for changing data in the scene for help in visualising.
    • New: Property Item: “string”: This will create an editable string. The most simple of property types.
    • New: Property Item: “float”: This will create a spinbox with decimal places
    • New: Property Item: “int”: This will create a spinbox with no decimal places
    • New: Property Item: “button”: This will create a button, that calls through to the SetDynamicProperty
    • New: Property Item: “combo#path”: Create a combobox that is prefilled with all the path names in the scene. Beats having to write them every time.
    • New: Property Item: “combo#name”: Create a combobox that is prefilled with every entity name in the scene.
    • New: Property Item: “combo#tag”: Create a combobox that is prefilled with every tag from al entities in the scene. Good for target settings.
    • New: Property Item: “combo#custom”: Create a combobox that you fill by setting the string in the script variable value. “0@none|AI|NPC|Simple wander|etc”
    • New: Property Item: “slider”: Create a slider dynamic property and fill in the min/max in the variable value inside the script.
    • New: Property Item: “file”: Create a file button that opens a dialog where you can choose the filename you want. Enter the file extensions in the value in script.
  • New: Example Demo usage in: “$(SkylineSDK)/Asset Library/Tech Demos/Lua/DynamicProperties”.
  • New: Example Script in : “$(SkylineSDK)/Asset Library/Scripts/Example Scripts/Dynamic Properties/ExampleDP_CharFollowPath.lua.lua”.
  • New: The Dynamic properties header image can be changed using the tag at the top of the file with no lua variables.: –[[HeaderImage|MyImage.png]]

Note: Remember, when editing with dynamic properties, if an entity has not got the recent script variable changes. Then when grabbing the dynamic properties in lua; it will return nil. So use an if check to see if the property is valid before grabbing and default if it isn’t.

V0-9-4_DynamicProperties_00

V0-9-4_DynamicProperties_01

New: Custom Editor Plugins & Plugins Menu Tab

We have also added a new menu tab called plugins which features some new ways of making content for skyline in the shape of runnable scripts and Custom Editor Plugins.

This menu tab contains a few base features:

  • Create New Plugin – This will create a new .ui and .lua file named in the named folder.
  • Edit Plugin Script – Pressing this will open the script of choice in the custom editors folder. Nice & quick
  • Run Script – Pressing this button will ask to find and choose a lua script file which will then be ran immediately and exit upon completion.
    It is not a scene script or attached to a sceneEntity and is simply ran and then exited, but it has full control over the scene in editor mode.

    This is a useful feature for spawning entities procedurally in a scene or doing specific work to each entity.
    Use the two script entrance functions that are predefined.

    • function main() — This is the main entrance function, it takes no arguments and is called right away
    • function entity_main( entityID ) — This is also a main entrance function. It passes in the selected entity id and is called at the same time as main()

    Call whichever or both functions if you want.

Custom Editor Plugins are Qt Interfaces which hook into the editor side of skyline and are controlled through lua.
This allows you to create specific editors to create and edit scene entities in the scene while NOT playing the game.
There no are compile times with this.
Simply:

  • Create a .ui file in Qt Designer or Qt Creator with everything named.
  • Save it to a folder in the Editor Plugins root.
  • Create a corresponding lua file.
  • Add functions for callbacks into the lua file to control the scene.

Written Tutorials Coming Soon….

V0-9-4_CustomEditor_00

V0-9-4_CustomEditor_01

V0-9-4_CustomEditor_03

New: Animation Mapper

Skyline has a new way of handling animations in script files as the previous method meant you had to change the script for each entity the script was attached to and change the animation names that are used inside it. Which was awkward and very difficult for non scripters.
We now have a new entity specific property if a rigged skeleton with animations is found when loading your mesh into the scene. A Property by the name of
“Anim Mapper” will appear with a button appeared next to it.

When pressed, the animation mapping editor will appear. There are already predefined maps that are already usable.

NOTE: Custom Animation maps are not yet available. They will be introduced over the next few releases.

Assign the mesh animations to each animation map and then in script use this lua command to get the real animation name from the map.

For example: I have “character1.mesh” & “character2.mesh”.

  • Character1.mesh has animation name walking, running, jumping
  • Character2.mesh has animation name Walks, PowerRun, hopping.

As you can see these are similar animation types that can be mapped to Walk, Run, Jump.
In the animation map editor set the dropdowns to match the mapping and then in script call these commands:

  • anim.getFromMap( objID, mapName )

e.g. walk = anim.getFromMap( objID, “Walk”) — returns “walking” or “Walks” depending on the mesh passed through.

V0-9-4_AnimationMapper_00

This allows a reusable script to totally independant from the entity and accompanied by the dynamic properties where no-one will have to touch the script in order to change what happens inside it; will give you quite a bit of new flexibility and the ability to pass scripts to others without more work needing done.

New: Multi Presets & Basic Multi Select

Holding the control key while selecting in the scene now engages the multi select feature. This allows you to select more than 1 scene entity and edit or translate all at the same time.

We needed to implement multi select in order to save out multiple entities as one single preset file(Multi Preset).
This gives you the ability to place a building, populate the building and save it all as one .preset & .xpreset file which you can then drag
back into the scene with all the items still in place and not require you to set it all up again.

You can currently do these things:

  • Select single entities (yes yes, this still works lol :P :P )
  • Hold Ctrl and LMB+click on sceneEntities to multi select.
  • With a selection; the gizmo position sits in the center of all objects.
  • With a selection; drag the x,y,z position gizmo to move all entities at the same time.
  • With a selection; Press the delete key to delete all entities.
  • With a selection; RMB+click and choose “Save As Preset” to save all selected entities to one file.
  • Deselect by clicking in the scene with the control key not held down.
  • The scene entity list is now multi selectable. Note: Folders cannot be multi – selected yet.
  • When dragging a preset into the scene, all preset sub entities will be selected

There are some limitations at the moment since this system is in its infancy.
These are all coming soon:

  • You cannot rotate or scale multiple.
  • You cannot edit multiple entity properties at the same time.
  • You cannot add actions to all entities.
  • Scene entity list items cannot be dragged when multi selected.
  • There is no rubber band drag to select everything within the dragged bounds.
  • Groups are not yet implemented, but are necessary in the development of a scene.

V0-9-4_MultiSelect_00

V0-9-4_MultiSelect_01

Here is the rest of the changelog:

New:

  • New: Animation Mapper: Built into the “Model > Animation”, you can now map mesh animations to shared map names that are accessible in script for easy animation setups in script. This should be used all the time now instead of hardcoding the values into the scripts.
  • New: Main Menu> Plugins > Run Script – This will run a lua script immediately, then exit when complete.
  • New: Dynamic Property System: Create dynamic variables that can be edited per entity in a custom editor with real properties that saves with the scene or preset.
  • New: Scripting: When adding an external script from file, it will now ask you to add to resources if not found already.
  • New: We have 2 new raycast methods. ID to ID and Point to Point instead of direction or quaternion rotation
  • New: Joystick events have now been exposed in the Lua external scripts.
  • New: AI Sensor: You can now use the callback function in an external script.
  • New: AI Sensor: Sensor mode “ALL” now works and calls back to a new contact function “onSensorContact_Stay( idTable )” and sends a table of ids as an argument
  • New: Multi Select: Holding ctrl when selecting engages the multi select
  • New: Script Editor: When you “save as” a new or different file, it is automatically added to the resources.
  • New: When Saving a Micro Script, it will save the contents to a hard drive file in the “Data/_Backup” folder in case of a crash and losing your script which is very annoying. Lol :P
  • New: We have moved the sky.raycastCursor() function to a raycast library. Remember, these are not physics raycast and will be slower.

New Lua:

  • New: Lua Library: anim
    • New: anim.getFromMap(objID, mapName) — This is useful for sharing scripts across many entities that use different animations


  • New: Lua Library: entity
    • New: entity.anim.getDynamicProperty(objID, “paramName”)
    • New: entity.anim.getDynamicProperty(objID, “paramName”, “paramValue”)
    • New: entity.refreshDynamicProperties();
    • New: entity.editorSpawn(meshname , posX, posY, posZ, scaleX, scaleY, scaleZ); — Use in inside an editor side script.
    • New: alignToFloorBounds(id)
    • New: alignToFloorPivot(id)


  • New: Lua Library: physics
    • New: physics. rayFromPointToPoint(rayID, posx1, posy1, posz1, posx2, posy2, posz2, range, query (optional) )
    • New: physics. rayFromEntityToEntity(rayID, srcID, targetID, range, query (optional) )


  • New: Lua Library: sky
    • New: sky.getDir_AssetLibrary()
    • New: sky.getDir_DataFolder()
    • New: sky.getDir_Win32()
    • New: sky.getDir_Win64()
    • New: sky.getDir_Scenes()
    • New: sky.getDir_Presets()
    • New: sky.getDir_Models()
    • New: sky.getDir_Materials()
    • New: sky.getDir_Environements()
    • New: sky.getDir_Scripts()
    • New: sky.getDir_VisualModules()
    • New: sky.getDir_Textures()


  • New: Lua Library: Qt
    • New: qt.setMinSize(editorName, widgetName, sizeX, sizeY)
    • New: qt.setMaxSize(editorName, widgetName, sizeX, sizeY)
    • New: qt.setEnabled(editorName, widgetName)
    • New: qt.setDisabled(editorName, widgetName)
    • New: qt.setValue(editorName, widgetName)
    • New: qt.getValue(editorName, widgetName)
    • New: qt.setText(editorName, widgetName)
    • New: qt.getText(editorName, widgetName)
    • New: qt.setChecked(editorName, widgetName)
    • New: qt.getChecked(editorName, widgetName)
    • New: qt.setCurrentIndex(editorName, widgetName)
    • New: qt.getCurrentIndex(editorName, widgetName)
    • New: qt.setIcon(editorName, widgetName)
    • New: qt.getIcon(editorName, widgetName)
    • New: qt.setPixmap(editorName, widgetName)
    • New: qt.getPixmap(editorName, widgetName)
    • New: qt.getOpen_FileDialog(editorName, widgetName)
    • New: qt.getSave_FileDialog(editorName, widgetName)
    • New: qt.getDirDialog(editorName, widgetName)
    • New: qt.getAllDirsInDirectory(editorName, widgetName)
    • New: qt.getFileInfo_BaseName(editorName, widgetName)
    • New: qt.getFileInfo_path(editorName, widgetName)
    • New: qt.getFileInfo_AbsoluteFilePath(editorName, widgetName)
    • New: qt.getFileInfo_AbsolutePath(editorName, widgetName)
    • New: qt.getFileInfo_Suffix(editorName, widgetName)


  • New: Lua Library: Ray
    • New: ray.raycastToCursor() — this one already existed
    • New: ray.raycastToCenterScreen()
    • New: ray.raycastFromObject(pos.x, pos.y, pos.z, dir.x, dir.y, dir.z)
    • New: ray.getHeightOffGround(pos.x, pos.y, pos.z)


Updated:

  • Updated: Interface Design: We have upgraded all the treewidgets on the main editor to have better headers
  • Updated: Character Controller: Follow Path – It will now move to the closest node on the path when starting instead of 0.
  • Updated: Vehicles: Follow Path – It will now move to the closest node on the path when starting instead of 0.
  • Updated: Default Scene: Set to 60fps lock to save graphics cards
  • Updated: Adding External Scripts: When “RMB+Open Script From File”. It will now overwrite the current script rather than having to remove the current
  • Updated: Adding External Scripts: When Dragging a script onto an entity that has one already, you will now overwrite the active script instead of having to remove it.
  • Updated: Lua external scripts can now use the multi- timers
  • Updated: Script Editor: When you “save as”, it now goes to the Scripts folder.

Fixed:

  • Fixed: Grammar mistake on the update section
  • Fixed: Lua Commands: rayFromPointByAxis was not colliding with anything. This is now fixed
  • Fixed: When dragging upgraded presets into skyline, it was crashing.
  • Fixed: AI Sensor: Distance is now returned as a float instead of an int for better precision
  • Fixed: When open skyline, if you click on scale before selecting. It would crash.
  • Fixed: When open skyline, if you click on position before selecting. It would crash.
  • Fixed: When open skyline, if you click on rotation before selecting. It would crash.
  • Fixed: On some duplications, when you press play and stop, it sometimes moved the entities.
  • Fixed: Action: PhysX Rigidbody – When setting action param “Is Dynamic”, the stored mass was not set into a correct variable and sometimes broke the system
  • Fixed: Scene Upgrader: When upgrading external scripts, it could have corrupted the file.
  • Fixed: System SetPosition has been fixed as it could crash if the entity id was missing. May explain some random crashes. This would also cause a crash from lua if the object was deleted prior to calling lua setPosition.
  • Fixed: Skybox: When the far clip went below 800, the skybox clipped out. You can now go down to 50 units before clipping occurs for near or far

Thanks for reading and updating.
We hope you enjoy this version of skyline and make some cool projects and look forward to seeing your work in the community.
Have fun Developing. :)
Your Skyline Dev Team