MatroseFuchs


17 Oct


Sound mod xml question

Comment
6 days ago - MatroseFuchs on Forums - Thread - Direct

Hi, do you working with SoundModCreator or handle editing xml file?

08 Oct


Unbound + ModsAPI

Post
15 days ago - MatroseFuchs on Forums - Thread - Direct

How to add and use Unbound technology on the ModAPI stage

As Unbound layout is processed on the Flash side, then the development of the mod will be associated mainly with ActionScript files. We need a layout handler and the main file for the Flash API similar to what we already did in the previous examples.

But first, let’s prepare a file with a simple layout code that we will experiment with, for example, draw a square in the corner.


test_window.xml

Create an XML file with a simple layout of a simple white square.

The resulting XML file shall be run through the "xml2as.bat" utility in order to compile layout expressions into a SWF file similar to what we did with the modification of the finished XML. Put the resulting SWF file in "..\res_mods\0.8.8.1\gui\unbound\flash" and add its path to "..\gui\ lash\USSExpressionsLoader.xml".


Movie.as

...

Read more

27 Sep


Hello, ModsSDK.zip_0.8.8.0 can be used for version 0.8.8.1. The method extraction didn't change.

18 Sep


[Sound Mod Creator 2.0] Update Sound Mods

Comment
about 1 month ago - MatroseFuchs on Forums - Thread - Direct

Hi, i tried to use without Wwise, and it works. In step 4 there is no point on add the Wwise.

05 Sep


game client

Comment
about 2 months ago - MatroseFuchs on Forums - Thread - Direct

Hello,

unfortunately ModStation does not support a client installed from Microsoft store.

02 Sep


Removing the B/W from the port?

Comment
about 2 months ago - MatroseFuchs on Forums - Thread - Direct

Hello,

you can get it using the wowsunpacker tool

http://prntscr.com/p0lrht

12 Aug


Hi, there’s no such possibility for now, but we will add it as soon as possible.

02 Aug


[ALL] ModStation

Comment
3 months ago - MatroseFuchs on Forums - Thread - Direct

Hello,

on some maps the lighting was reworked which, in turn, when the mod was installed, led to increased brightness, we will try to repair this mod but it is likely that it will enter the game client, moreover, work on the maps continues and this mod will need to be repaired every patch.

25 Jul


Modding SDK - extracting model issue

Comment
3 months ago - MatroseFuchs on Forums - Thread - Direct

Hello,

there is no ship name "JSA037_Hakuryu_Space" in ContentSDK or game client, method "contentSdk.registerShipMod('JSA037_Hakuryu_Space')" can register only ship name 'JSA037_Hakuryu'.

23 Jul


Modstation is stuck on Russian Language

Comment
3 months ago - MatroseFuchs on Forums - Thread - Direct

Hello,

did you try to switch this buttons with language flags?

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.

27 Jun


Unbound 2.0 framework (documentation)

Comment
4 months ago - MatroseFuchs on Forums - Thread - Direct

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)

26 Jun


Unbound 2.0 framework (documentation)

Comment
4 months ago - MatroseFuchs on Forums - Thread - Direct

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)
)
...

Read more

Unbound 2.0 framework (documentation)

Comment
4 months ago - MatroseFuchs on Forums - Thread - Direct

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 more

Unbound 2.0 framework (documentation)

Comment
4 months ago - MatroseFuchs on Forums - Thread - Direct

Top-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'")
)

Unbound 2.0 framework (documentation)

Comment
4 months ago - MatroseFuchs on Forums - Thread - Direct

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"))

Unbound 2.0 framework (documentation)

Comment
4 months ago - MatroseFuchs on Forums - Thread - Direct

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'

Unbound 2.0 framework (documentation)

Comment
4 months ago - MatroseFuchs on Forums - Thread - Direct

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 more

Unbound 2.0 framework (documentation)

Comment
4 months ago - MatroseFuchs on Forums - Thread - Direct

Macro

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.

Unbound 2.0 framework (documentation)

Comment
4 months ago - MatroseFuchs on Forums - Thread - Direct

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...

Read more

Unbound 2.0 framework (documentation)

Comment
4 months ago - MatroseFuchs on Forums - Thread - Direct

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 more

Unbound 2.0 framework (documentation)

Comment
4 months ago - MatroseFuchs on Forums - Thread - Direct

Event

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 more

Unbound 2.0 framework (documentation)

Comment
4 months ago - MatroseFuchs on Forums - Thread - Direct

Element

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...

Read more

Unbound 2.0 framework (documentation)

Comment
4 months ago - MatroseFuchs on Forums - Thread - Direct

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 ...

Read more

Unbound 2.0 framework (documentation)

Comment
4 months ago - MatroseFuchs on Forums - Thread - Direct

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.