xXJDrocks450Xx
Well-Known Member
Want to get started making a UIScript for FreeSO? Maybe not now, but eventually you might need this!
Let's setup the file:
We first need to setup the script with a Comment tag (#), and show where to Begin and End the script.
Put all of your code in between these tags!
Definitions:
Let's define an image to use in our new control:
Remember the name you gave it! "assetID" is a little tricky as it can be a Hexadecimal number or a file path (courtesy of FreeSO)
Let's define a String to use in our new control:
The content of these strings is defined in a string table (*.cst file). The stringDir directive dictates which folder to look for this string table in, however for our uses, this should be left as "UIText". stringTable is an index referring to the unique string table to refer to that contains our strings to use. Which string this definition represents is dictated by the stringIndex property. If multiple tables are required, use multiple Begin, SetSharedProperties and End tags.
Scripting the Control Using Parameters
Below are functions that use parameter lists to define properties of controls in the script
The parameters that can be used in these tags are:
This sets properties of a control referenced by FreeSO internally. The properties can be applied programmatically using C# through the UIScript class.
AddText, AddTextEdit, AddSlider, AddListBox, AddFormatedText, AddProgressBar
Each of these adds the advertised control to the parent control (the one being scripted right now).
[params] can be filled in with properties that you wish to set values for. Refer to the parameter list above in case you do not know the name of the parameter you wish to set. Some controls have properties that others do not!
Let's setup the file:
HTML:
#Appended UI properties for House Page control (freeso)
<Begin>
<End>
Put all of your code in between these tags!
Definitions:
Let's define an image to use in our new control:
HTML:
# Images ---------------------------------------------------------------------------------------------------
<DefineImage "NAME" assetID="ID"> # optional image filepath comment goes here
<DefineImage "HouseCategoryBackgroundImage" assetID="0x00000B5B00000001"> # example: This is a category background image
<DefineImage "Background" assetID="neighp/neighp_bg.png"> # example: This is a dialog background image
Let's define a String to use in our new control:
HTML:
# Strings ---------------------------------------------------------------------------------------------------
<Begin><SetSharedProperties stringDir = "UIText" stringTable = TABLE_INDEX>
<DefineString "NAME" stringIndex=INDEX> # template: fill in your own values!
<DefineString "DefaultNeighborhoodButtonCaption" stringIndex = 35> # example: This string reads: "Neighborhood"
<End>
Scripting the Control Using Parameters
Below are functions that use parameter lists to define properties of controls in the script
The parameters that can be used in these tags are:
SetControlPropertiesFSO.Client.UI.Controls.UIButton
size: Vector2
imageStates: Integer
text: StringTable
font: Unknown
image: Texture
id: Integer
position: Vector2
tooltip: StringTable
toolTip: StringTable
FSO.Client.UI.Controls.UILabel
font: Unknown
text: StringTable
size: Vector2
alignment: Integer
wrapped: Boolean
id: Integer
position: Vector2
tooltip: StringTable
toolTip: StringTable
FSO.Client.UI.Controls.UITextEdit
mode: String
font: Unknown
alignment: Integer
flashOnEmpty: Boolean
frameColor: Color
size: Vector2
lines: Integer
capacity: Integer
scrollbarImage: Texture
scrollbarGutter: Integer
id: Integer
position: Vector2
tooltip: StringTable
toolTip: StringTable
FSO.Client.UI.Controls.UISlider
image: Texture
orientation: Integer
size: Vector2
id: Integer
position: Vector2
tooltip: StringTable
toolTip: StringTable
FSO.Client.UI.Controls.UIImage
image: Texture
size: Point
id: Integer
position: Vector2
tooltip: StringTable
toolTip: StringTable
FSO.Client.UI.Controls.UIListBox
rowHeight: Integer
visibleRows: Integer
font: Unknown
selectionFillColor: Color
columns: Unknown
size: Vector2
scrollbarImage: Texture
scrollbarGutter: Integer
id: Integer
position: Vector2
tooltip: StringTable
toolTip: StringTable
FSO.Client.UI.Controls.UIListBoxTextStyle
normal: Color
selected: Color
highlighted: Color
disabled: Color
FSO.Client.UI.Panels.UIGizmoPIP
buttonImage: Texture
maskImage: Texture
id: Integer
position: Vector2
tooltip: StringTable
toolTip: StringTable
FSO.Client.UI.Controls.UISkillBar
size: Vector2
id: Integer
position: Vector2
tooltip: StringTable
toolTip: StringTable
FSO.Client.UI.UIRelationshipBar
size: Vector2
id: Integer
position: Vector2
tooltip: StringTable
toolTip: StringTable
FSO.Client.UI.Controls.UISim
size: Vector2
id: Integer
position: Vector2
tooltip: StringTable
toolTip: StringTable
FSO.Client.UI.Panels.UILotThumbButton
id: Integer
position: Vector2
tooltip: StringTable
toolTip: StringTable
FSO.Client.UI.Panels.UIRoommateList
id: Integer
position: Vector2
tooltip: StringTable
toolTip: StringTable
FSO.Client.UI.Controls.UIPersonButton
id: Integer
position: Vector2
tooltip: StringTable
toolTip: StringTable
FSO.Client.UI.Panels.Neighborhoods.UINeighBanner
id: Integer
position: Vector2
tooltip: StringTable
toolTip: StringTable
FSO.Client.UI.Panels.Neighborhoods.UIRatingSummaryPanel
id: Integer
position: Vector2
tooltip: StringTable
toolTip: StringTable
FSO.Client.UI.Controls.UIRatingDisplay
id: Integer
position: Vector2
tooltip: StringTable
toolTip: StringTable
FSO.Client.UI.Panels.Neighborhoods.UIBigPersonButton
id: Integer
position: Vector2
tooltip: StringTable
toolTip: StringTable
HTML:
<SetControlProperties "NAME" [params]> # template: fill in your own values!
<SetControlProperties "CategoryButtonPosition_Money" position=(74,167)>
AddText, AddTextEdit, AddSlider, AddListBox, AddFormatedText, AddProgressBar
Each of these adds the advertised control to the parent control (the one being scripted right now).
HTML:
<FUNCTION "NAME" [params]> # template: fill in your own values!
<AddButton "HouseLinkButton" id = 100 image = "HouseLinkButtonImage" position=(32,41)> #example: creates a button with the name, id, image, and position defined.
Last edited: