Hello,
With SoundModCreator you can use sounds for guns, ships and commanders at the same time, but it works only for default value, if you want to use for current commander or ship, you have to wait when we'll fix bug.
Hello,
With SoundModCreator you can use sounds for guns, ships and commanders at the same time, but it works only for default value, if you want to use for current commander or ship, you have to wait when we'll fix bug.
CSS Tips and Tricks
Usage of style objects (similar to css-classes)
Create style objects:
(def css SomeStyleObject()
(position = "absolute")
(width = 100%)
(height = 100%)
)
Invoke:
(block
(class SomeStyleObject)
)
Example of implementing the Hover pseudo class
The Hover is triggered when you point to the cursor to a specific area, and not the entire block
If you need to set a certain area as hitArea, add a block whose name='hoverArea' and pass the block's name to the hitArea property of the parentElement element with the help of the $target object.
Styles change depending on the screen's width/height (similar to media requests)
Styles and CSS
General Description
A block's layout parameters can be customized via its style. Each block has its own set of style parameters.
Customizing style for the tf block:
(tf
(style
(fontSize = 32)
(textColor = 0xFFFFFFFF)
)
(text = 'Hello world!!!')
)
Customizing style for the block-type block:
(block
(style
(backgroundColor = 0xffff0000)
(width = 100px)
(height = 100px)
)
)
Customizing style for the mc block:
(mc 'Window_BG'
(style
(width=100)
(height=50)
...
)
)
Styles can be described in a separate definition and transferred to the block's class property.
(def element TestView() layout = true
(block
(class BlockStyle)
)
...
UI Widgets
Symbol
Adding a MovieClip to the stage by linkage. Symbols are used inside definitions of elements, whose layout parameter is set as false. Layout system is disabled.
Example:
(style
(backgroundImage = "'symbol:minimap_aim_position'")
)
'symbol:' + toLower('minimap_' + markerIcon)
Sprite
Adding a Sprite instance to the stage. Sprites are used inside definitions of elements, whose layout parameter is set as false.
Example:
MC
Adding a MovieClip instance to the stage by linkage. MovieClips are used inside definitions of elements, whose layout parameter is set as true. Layout system is enabled.
Example:
(def element TestView() layout=true
(mc 'FWCloseButtonSlimMC'
(name = 'closeBtnCrossAnim')
(bindcall gotoAndPlay "stateFrame")
)
)
T...
Read moreTop-Level Trace
A top-level trace returns a message to the log and has all the capabilities of a top-level method:
Bindings to events (both events of the scope and the events whose names are passed via the *on* parameter).
Bindings to changes in parameters (if an expression is passed as a parameter).
Examples:
(trace 'Some message')
(trace 'Some message' init=false (event SomeEvent))
(trace "'Some message:' + someValue" init=false watch=false on='eventName')
(trace "someValue1 + ': ' + someValue2" watch=true)
# Below is an example of a trace upon condition: for example, if you've placed it inside some general macro and want to cut off irrelevant actuations
(trace 'Some message' init=false on='eventName'
(bind enabled "name == 'anyName'")
)
toplevel exec
Top level function exec is used to execute any calculated expression. Optionally possible to set event that will trigger execution of target expression.
Syntax:
(exec "someExpression" (event "someScopeEvent"))
Examples:
1. Play sound by mouse click:
(exec "playSound(R.sounds.gui.yes1)" on='click')
2. Play sound by event from scope:
(exec "playSound(R.sounds.gui.yes1)" (event "evBtnLeftClickEvent"))
toplevel def
(def) or Definition
Construction (def object Name) allows to define global object that can be invoked from any file in working directories.
Warning! Name of the object have to be unique. No matter in the same or separate files this definitions placed. Otherwise you'll get error and only first object will be created.
(def element TestView())
(def element TestView())
ERROR: Duplicate element definition: 'TestView'
Scope
A scope is a storage of data, available in the body of the element's description. It is not inherited from parent elements. The markup features strong typing — all the used variables and their types, as well as events, must be defined before they are used in the calculated expression. Otherwise, they must be passed from an external scope when calling the element.
A scope can contain:
Variables (var)
Constants (const)
Definition of an event
Call of the bind method
Dispatch of an event
The $Animation controller for animating variables in the scope
Example:
The scope can be described in different parts of the element (for example, the level variable). On the execution stage, all the parts will be integrated into one scope. Display of the scope's content:
(trace "$scope")...
Read moreMacro
A macro is a named and parametrized markup fragment, which is added to the place where it's called on the parsing stage. This allows using a markup fragment several times.
Usage example:
Once defined, the macro can be called at any place.
# A structure that calls a macro
(macro trace expr="variable")
This mechanism is used for autogeneration of the scope, which will be bound with a Python model.
Layout
Unbound has a layout system, which serves to position the blocks, located in one container, based on certain parameters. To turn on the layout system, set layout=true|false in the element's definition. The description of the element with layout=true is equivalent to def layout.
Layout's parameters are described in style.
Example:
Positioning of Blocks
The layout system positions the blocks based on the values of the position property. Position can have the following values:
flow — the layout system positions nested blocks one by one (a block's position depends on the position of the previous block); by default, position="flow"
absolute — the layout system excludes the block from the flow (positioning list)
To position blocks relative to each other with position="flow" you can use the following style properties:
p...
Functions for calculated expressions
The list of functions is arranged in the form of a table.
Function name in markup
Description
Example
round(number)
Mathematical rounding to an integer
"round(0.423456)" # 0
toUpper(str)
Converts lower case symbols to upper case symbols
toLower(str)
Converts upper case symbols to lower case symbols
(var test:number = "clamp(smth, 0, 10)")
tr
IDS string localization
...
Read moreEvent
An event is an object, generated and dispatched upon any action of the user (a mouse click, a button pressed, etc.). To distribute the event, the dispatch method is used.
Events are defined in the scope.
(event valChanged)
(event evKilled)
...
(dispatch evKilled args={} dir="EventDirection.DOWN" (event $datahub.getEntity(entityId).health.evKilled))
dir sets the direction of the event in a hierarchy. By default, dispatch dispatches an event only within the element itself. To send an event to the parent, you need to specify EventDirection.UP in dir. In the child - EventDirection.DOWN. In siblings - just declare the event in the desired siblings, and dir can be omitted. For dir, a dict with values is entered in hud_replaces. By default, dir = 0.
(def constant EventDirection { NONE: 0,
UP: 1,
DOWN: 2
})
In ...
Read moreElement
An element is a top-level object. An element has its own name, so it can be called (inter alia, from outside the document that contains it) or reused. There are two ways to reuse an element: create its instance by calling a Controller or create its instance by calling the element method with the element's name as the argument. An element has its individual scope, but variables of the parent scope can be set to it.
Element has params:
the layout boolean parameter, which enables and disables the layout system. Possible values: layout=true|false.
the isReadyTracked boolean parameter, which turns on (it equals true) tracking of dependency resolving for each child of element. Also tracking that additional conditions are ok for some specific blocks. For example, image block has additional condition - image is loaded. Element is hidden while tracking works. Event $evReadyChanged is triggered when dependencies are resol...
Controllers
A controller is an entity that applies one type of action to the assigned object. For the $Instance, $FxInstance, and $Repeat controllers, specify the object in the renderer field. The $Animation controller targets the parent object. The $Sector controller is an object itself.
$Instance
This controller adds an instance of the element to the stage.
renderer sets the element, with which the controller will perform its operations. Available for binding.
layout determines whether the layout system is enabled or not. By default, the value is false.
args is a controller method. It passes the value from the parent scope to the renderer.
exprs is carried out inside the renderer, but this method has access to the parent scope. exprs can contain expressions and bindings. With the help of this method, the controller allows you subscribe to changes in variables from the ...
Base blocks of markup language
Constant
Unbound constants have the same purpose as those in other languages: they serve to store fixed values.
Two types of constants can be used in Unbound:
Global constants
The (def function is used to declare a global constant. The value of the constant is added after its name. In the example below, C_ALLY is the constant's name, and 0xFF80c0ff is the constant's value.
Local constants
These constants are declared in the element's scope and can be used only inside this element.
Declarative Markup Language and S-expressions
A markup consists of S-expressions . There are four types of S-expressions, each intended for a specific action:
Call method
( * *
+
)
:= =
(bind isEnabled "$event.enabled" init=false
(event "isEnableChanged")
)
bind -
isEnabled, "$event.enabled" - *
init=false - *
(event "isEnableChanged") - +
Add definition
(def (*) *
+
)
:= : [ = ]
:= =
This definition is essentially a specific instance of an S-expression method. It was introduced only for the special syntax, used for declaring parameters.
(def element TestView(name:str = '', count:number) layout=true
(block ...
No
No, modpaks do not overwrite each other, but we do not recommend installing modifications from both modpacks as this may lead to modification errors.
Both modpacks have the function of deleting previous modifications, it is recommended to clear the "res_mods / version" folder before installing.
It has five dynamic crosshairs, firs five of them.
We periodically add new mods to our modpack, maybe one of the updates will add that crosshair.
The game client contains only the most necessary features, if some mods will be very much in demand by a large number of players, then perhaps such a mod will be included in the game.
This is the official modpack, the crosshairs section contains both static and dynamic.
If you want to change camos, extract files with unpacker and modify them.