645 lines
48 KiB
YAML
645 lines
48 KiB
YAML
AltLookAngle:
|
|
x: 0.0
|
|
y: 0.0
|
|
z: 0.0
|
|
Autoraise: true
|
|
ColorDiffuse:
|
|
b: 1.0
|
|
g: 1.0
|
|
r: 1.0
|
|
CustomImage:
|
|
CustomToken:
|
|
MergeDistancePixels: 15.0
|
|
Stackable: false
|
|
StandUp: false
|
|
Thickness: 0.2
|
|
ImageScalar: 1.0
|
|
ImageSecondaryURL: ''
|
|
ImageURL: http://cloud-3.steamusercontent.com/ugc/1972044023029431107/BD301A89BF259BFD397DEAF650BF9072730DD504/
|
|
WidthScale: 0.0
|
|
Description: ''
|
|
DragSelectable: true
|
|
GMNotes: ''
|
|
GUID: eda22b
|
|
Grid: true
|
|
GridProjection: false
|
|
Hands: false
|
|
HideWhenFaceDown: false
|
|
IgnoreFoW: false
|
|
LayoutGroupSortIndex: 0
|
|
Locked: false
|
|
LuaScript: !include 'Custom_Token The Colour Out of Oz Campaign Log 1 eda22b.ttslua'
|
|
LuaScriptState: '{"checkbox":[],"counter":[{"hideBG":true,"pos":[-1.08,0.1,-1.01],"size":800,"value":0},{"hideBG":true,"pos":[-1.27,0.1,-0.79],"size":600,"value":0},{"hideBG":true,"pos":[-1,0.1,-0.79],"size":600,"value":0},{"hideBG":true,"pos":[-0.251,0.1,-1.01],"size":800,"value":0},{"hideBG":true,"pos":[-0.441,0.1,-0.79],"size":600,"value":0},{"hideBG":true,"pos":[-0.171,0.1,-0.79],"size":600,"value":0},{"hideBG":true,"pos":[0.579,0.1,-1.01],"size":800,"value":0},{"hideBG":true,"pos":[0.389,0.1,-0.79],"size":600,"value":0},{"hideBG":true,"pos":[0.659,0.1,-0.79],"size":600,"value":0},{"hideBG":true,"pos":[1.407,0.1,-1.01],"size":800,"value":0},{"hideBG":true,"pos":[1.217,0.1,-0.79],"size":600,"value":0},{"hideBG":true,"pos":[1.487,0.1,-0.79],"size":600,"value":0}],"textbox":[{"alignment":2,"font_size":300,"label":"Empty","pos":[-1.265,0.1,-1.39],"rows":1,"value":"","width":3800},{"alignment":2,"font_size":300,"label":"Empty","pos":[-1.265,0.1,-1.195],"rows":1,"value":"","width":3800},{"alignment":2,"font_size":300,"label":"Empty","pos":[-1.265,0.1,-0.42],"rows":7,"value":"","width":3800},{"alignment":2,"font_size":300,"label":"Empty","pos":[-0.436,0.1,-1.39],"rows":1,"value":"","width":3800},{"alignment":2,"font_size":300,"label":"Empty","pos":[-0.436,0.1,-1.195],"rows":1,"value":"","width":3800},{"alignment":2,"font_size":300,"label":"Empty","pos":[-0.436,0.1,-0.42],"rows":7,"value":"","width":3800},{"alignment":2,"font_size":300,"label":"Empty","pos":[0.394,0.1,-1.39],"rows":1,"value":"","width":3800},{"alignment":2,"font_size":300,"label":"Empty","pos":[0.394,0.1,-1.195],"rows":1,"value":"","width":3800},{"alignment":2,"font_size":300,"label":"Empty","pos":[0.394,0.1,-0.42],"rows":7,"value":"","width":3800},{"alignment":2,"font_size":300,"label":"Empty","pos":[1.222,0.1,-1.39],"rows":1,"value":"","width":3800},{"alignment":2,"font_size":300,"label":"Empty","pos":[1.222,0.1,-1.195],"rows":1,"value":"","width":3800},{"alignment":2,"font_size":300,"label":"Empty","pos":[1.222,0.1,-0.42],"rows":7,"value":"","width":3800},{"alignment":2,"font_size":300,"label":"Empty","pos":[-0.93,0.1,0.93],"rows":27,"value":"","width":7800},{"alignment":2,"font_size":300,"label":"Empty","pos":[0.82,0.1,0.707],"rows":20,"value":"","width":7800},{"alignment":2,"font_size":300,"label":"Empty","pos":[1.01,0.1,1.7],"rows":5,"value":"","width":7400}]}'
|
|
MeasureMovement: false
|
|
Name: Custom_Token
|
|
Nickname: The Colour Out of Oz Campaign Log 1
|
|
Snap: true
|
|
States:
|
|
'2':
|
|
AltLookAngle:
|
|
x: 0.0
|
|
y: 0.0
|
|
z: 0.0
|
|
Autoraise: true
|
|
ColorDiffuse:
|
|
b: 1.0
|
|
g: 1.0
|
|
r: 1.0
|
|
CustomImage:
|
|
CustomToken:
|
|
MergeDistancePixels: 15.0
|
|
Stackable: false
|
|
StandUp: false
|
|
Thickness: 0.2
|
|
ImageScalar: 1.0
|
|
ImageSecondaryURL: ''
|
|
ImageURL: http://cloud-3.steamusercontent.com/ugc/1972044023029161519/42C9A219F8AA692EF52C393F73DE20EDBD50DBFC/
|
|
WidthScale: 0.0
|
|
Description: ''
|
|
DragSelectable: true
|
|
GMNotes: ''
|
|
GUID: f8dd62
|
|
Grid: true
|
|
GridProjection: false
|
|
Hands: false
|
|
HideWhenFaceDown: false
|
|
IgnoreFoW: false
|
|
LayoutGroupSortIndex: 0
|
|
Locked: false
|
|
LuaScript: "--[[ Character Sheet Template by: MrStump\r\n\r\nYou can set
|
|
up your own character sheet if you follow these steps.\r\n\r\nStep 1) Change
|
|
the character sheet image\r\n -Right click on the character sheet, click
|
|
Custom\r\n -Replace the image URL with one for your character sheet\r\n -Click
|
|
import, make sure your sheet loads\r\n -SAVE THE GAME (the table setup)\r\n
|
|
\ -LOAD FROM THAT SAVE YOU JUST MADE\r\n\r\nStep 2) Edit script to fit your
|
|
character sheet\r\n -Below you will see some general options, and then the
|
|
big data table\r\n -The data table is what determines how many of which buttons
|
|
are made\r\n -Checkboxes\r\n -Counters\r\n -Textboxes\r\n
|
|
\ -By default, there are 3 of each. You can add more or remove entries\r\n
|
|
\ -If you intend to add/remove, be sure only to add/remove ENTRIES\r\n -This
|
|
is what an entry looks like:\r\n {\r\n pos = {-0.977,0.1,-0.589},\r\n
|
|
\ size = 800,\r\n state = false\r\n },\r\n
|
|
\ -Deleting the whole thing would remove that specific item on the sheet\r\n
|
|
\ -Copy and pasting it after another entry would create another\r\n -Each
|
|
entry type has unique data points (pos, size, state, etc)\r\n -Do not
|
|
try to add in your own data points or remove them individually\r\n -There
|
|
is a summary of what each point does at the top of its category\r\n\r\nStep
|
|
3) Save and check script changes\r\n -Hit Save & Apply in the script window
|
|
to save your code\r\n -You can edit your code as needed and Save+Apply as
|
|
often as needed\r\n -When you are finished, make disableSave = false below
|
|
then Save+apply\r\n -This enables saving, so your sheet will remember
|
|
whats on it.\r\n\r\nBonus) Finding/Editing Positions for elements\r\n I have
|
|
included a tool to get positions for buttons in {x,y,z} form\r\n Place it
|
|
where you want the center of your element to be\r\n Then copy the table from
|
|
the notes (lower right of screen)\r\n You can highlight it and CTRL+C\r\n
|
|
\ Paste it into the data table where needed (pos=)\r\n If you want to manually
|
|
tweek the values:\r\n {0,0,0} is the center of the character sheet\r\n
|
|
\ {1,0,0} is right, {-1,0,0} is left\r\n {0,0,-1} is up, {0,0,1}
|
|
is down\r\n 0.1 for Y is the height off of the page.\r\n If
|
|
it was 0, it would be down inside the model of the sheet\r\n\r\nBegin editing
|
|
below: ]]\r\n\r\n--Set this to true while editing and false when you have
|
|
finished\r\ndisableSave = false\r\n--Remember to set this to false once you
|
|
are done making changes\r\n--Then, after you save & apply it, save your game
|
|
too\r\n\r\n--Color information for button text (r,g,b, values of 0-1)\r\nbuttonFontColor
|
|
= {0,0,0}\r\n--Color information for button background\r\nbuttonColor = {1,1,1}\r\n--Change
|
|
scale of button (Avoid changing if possible)\r\nbuttonScale = {0.1,0.1,0.1}\r\n\r\n--This
|
|
is the button placement information\r\ndefaultButtonData = {\r\n --Add checkboxes\r\n
|
|
\ checkbox = {\r\n --[[\r\n pos = the position (pasted from
|
|
the helper tool)\r\n size = height/width/font_size for checkbox\r\n
|
|
\ state = default starting value for checkbox (true=checked, false=not)\r\n
|
|
\ ]]\r\n --1A\r\n {\r\n pos = {-0.152,0.1,-0.756},\r\n
|
|
\ size = 400,\r\n state = false\r\n },\r\n --1B\r\n
|
|
\ {\r\n pos = {0.074,0.1,-0.754},\r\n size =
|
|
400,\r\n state = false\r\n },\r\n --1C\r\n {\r\n
|
|
\ pos = {0.298,0.1,-0.752},\r\n size = 400,\r\n state
|
|
= false\r\n },\r\n --1D\r\n {\r\n pos = {0.522,0.1,-0.75},\r\n
|
|
\ size = 400,\r\n state = false\r\n },\r\n --2A\r\n
|
|
\ {\r\n pos = {-0.155,0.1,-0.63},\r\n size =
|
|
400,\r\n state = false\r\n },\r\n --2B\r\n {\r\n
|
|
\ pos = {0.071,0.1,-0.628},\r\n size = 400,\r\n state
|
|
= false\r\n },\r\n --2C\r\n {\r\n pos = {0.295,0.1,-0.626},\r\n
|
|
\ size = 400,\r\n state = false\r\n },\r\n --2D\r\n
|
|
\ {\r\n pos = {0.519,0.1,-0.624},\r\n size =
|
|
400,\r\n state = false\r\n },\r\n --3A\r\n {\r\n
|
|
\ pos = {-0.157,0.1,-0.504},\r\n size = 400,\r\n state
|
|
= false\r\n },\r\n --3B\r\n {\r\n pos = {0.069,0.1,-0.502},\r\n
|
|
\ size = 400,\r\n state = false\r\n },\r\n --3C\r\n
|
|
\ {\r\n pos = {0.293,0.1,-0.5},\r\n size = 400,\r\n
|
|
\ state = false\r\n },\r\n --3D\r\n {\r\n pos
|
|
\ = {0.517,0.1,-0.498},\r\n size = 400,\r\n state =
|
|
false\r\n },\r\n --4A\r\n {\r\n pos = {-0.16,0.1,-0.378},\r\n
|
|
\ size = 400,\r\n state = false\r\n },\r\n --4B\r\n
|
|
\ {\r\n pos = {0.066,0.1,-0.376},\r\n size =
|
|
400,\r\n state = false\r\n },\r\n --4C\r\n {\r\n
|
|
\ pos = {0.29,0.1,-0.374},\r\n size = 400,\r\n state
|
|
= false\r\n },\r\n --4D\r\n {\r\n pos = {0.514,0.1,-0.372},\r\n
|
|
\ size = 400,\r\n state = false\r\n },\r\n --5A\r\n
|
|
\ {\r\n pos = {-0.162,0.1,-0.252},\r\n size =
|
|
400,\r\n state = false\r\n },\r\n --5B\r\n {\r\n
|
|
\ pos = {0.064,0.1,-0.25},\r\n size = 400,\r\n state
|
|
= false\r\n },\r\n --5C\r\n {\r\n pos = {0.288,0.1,-0.248},\r\n
|
|
\ size = 400,\r\n state = false\r\n },\r\n --5D\r\n
|
|
\ {\r\n pos = {0.512,0.1,-0.244},\r\n size =
|
|
400,\r\n state = false\r\n },\r\n --6A\r\n {\r\n
|
|
\ pos = {-0.164,0.1,-0.126},\r\n size = 400,\r\n state
|
|
= false\r\n },\r\n --6B\r\n {\r\n pos = {0.062,0.1,-0.124},\r\n
|
|
\ size = 400,\r\n state = false\r\n },\r\n --6C\r\n
|
|
\ {\r\n pos = {0.286,0.1,-0.122},\r\n size =
|
|
400,\r\n state = false\r\n },\r\n --6D\r\n {\r\n
|
|
\ pos = {0.51,0.1,-0.12},\r\n size = 400,\r\n state
|
|
= false\r\n },\r\n --7A\r\n {\r\n pos = {-0.166,0.1,0},\r\n
|
|
\ size = 400,\r\n state = false\r\n },\r\n --7B\r\n
|
|
\ {\r\n pos = {0.06,0.1,0.002},\r\n size = 400,\r\n
|
|
\ state = false\r\n },\r\n --7C\r\n {\r\n pos
|
|
\ = {0.284,0.1,0.004},\r\n size = 400,\r\n state = false\r\n
|
|
\ },\r\n --7D\r\n {\r\n pos = {0.508,0.1,0.006},\r\n
|
|
\ size = 400,\r\n state = false\r\n },\r\n --8A\r\n
|
|
\ {\r\n pos = {-0.168,0.1,0.126},\r\n size =
|
|
400,\r\n state = false\r\n },\r\n --8B\r\n {\r\n
|
|
\ pos = {0.058,0.1,0.128},\r\n size = 400,\r\n state
|
|
= false\r\n },\r\n --8C\r\n {\r\n pos = {0.282,0.1,0.13},\r\n
|
|
\ size = 400,\r\n state = false\r\n },\r\n --8D\r\n
|
|
\ {\r\n pos = {0.506,0.1,0.132},\r\n size = 400,\r\n
|
|
\ state = false\r\n },\r\n --End of checkboxes\r\n },\r\n
|
|
\ --Add counters that have a + and - button\r\n counter = {\r\n --[[\r\n
|
|
\ pos = the position (pasted from the helper tool)\r\n size
|
|
\ = height/width/font_size for counter\r\n value = default starting
|
|
value for counter\r\n hideBG = if background of counter is hidden (true=hidden,
|
|
false=not)\r\n ]]\r\n --End of counters\r\n },\r\n --Add
|
|
editable text boxes\r\n textbox = {\r\n --[[\r\n pos =
|
|
the position (pasted from the helper tool)\r\n rows = how many lines
|
|
of text you want for this box\r\n width = how wide the text box is\r\n
|
|
\ font_size = size of text. This and \"rows\" effect overall height\r\n
|
|
\ label = what is shown when there is no text. \"\" = nothing\r\n
|
|
\ value = text entered into box. \"\" = nothing\r\n alignment
|
|
= Number to indicate how you want text aligned\r\n (1=Automatic,
|
|
2=Left, 3=Center, 4=Right, 5=Justified)\r\n ]]\r\n --Advantages\r\n
|
|
\ {\r\n pos = {1.177,0.1,1.303},\r\n rows
|
|
\ = 6,\r\n width = 6200,\r\n font_size = 700,\r\n
|
|
\ label = \"Advantages\",\r\n value = \"\",\r\n
|
|
\ alignment = 2\r\n },\r\n --End of textboxes\r\n }\r\n}\r\n\r\n\r\n\r\n--Lua
|
|
beyond this point, I recommend doing something more fun with your life\r\n\r\n\r\n\r\n--Save
|
|
function\r\nfunction updateSave()\r\n saved_data = JSON.encode(ref_buttonData)\r\n
|
|
\ if disableSave==true then saved_data=\"\" end\r\n self.script_state =
|
|
saved_data\r\nend\r\n\r\n--Startup procedure\r\nfunction onload(saved_data)\r\n
|
|
\ if disableSave==true then saved_data=\"\" end\r\n if saved_data ~= \"\"
|
|
then\r\n local loaded_data = JSON.decode(saved_data)\r\n ref_buttonData
|
|
= loaded_data\r\n else\r\n ref_buttonData = defaultButtonData\r\n
|
|
\ end\r\n\r\n spawnedButtonCount = 0\r\n createCheckbox()\r\n createCounter()\r\n
|
|
\ createTextbox()\r\nend\r\n\r\n\r\n\r\n--Click functions for buttons\r\n\r\n\r\n\r\n--Checks
|
|
or unchecks the given box\r\nfunction click_checkbox(tableIndex, buttonIndex)\r\n
|
|
\ if ref_buttonData.checkbox[tableIndex].state == true then\r\n ref_buttonData.checkbox[tableIndex].state
|
|
= false\r\n self.editButton({index=buttonIndex, label=\"\"})\r\n else\r\n
|
|
\ ref_buttonData.checkbox[tableIndex].state = true\r\n self.editButton({index=buttonIndex,
|
|
label=string.char(10008)})\r\n end\r\n updateSave()\r\nend\r\n\r\n--Applies
|
|
value to given counter display\r\nfunction click_counter(tableIndex, buttonIndex,
|
|
amount)\r\n ref_buttonData.counter[tableIndex].value = ref_buttonData.counter[tableIndex].value
|
|
+ amount\r\n self.editButton({index=buttonIndex, label=ref_buttonData.counter[tableIndex].value})\r\n
|
|
\ updateSave()\r\nend\r\n\r\n--Updates saved value for given text box\r\nfunction
|
|
click_textbox(i, value, selected)\r\n if selected == false then\r\n ref_buttonData.textbox[i].value
|
|
= value\r\n updateSave()\r\n end\r\nend\r\n\r\n--Dud function for
|
|
if you have a background on a counter\r\nfunction click_none() end\r\n\r\n\r\n\r\n--Button
|
|
creation\r\n\r\n\r\n\r\n--Makes checkboxes\r\nfunction createCheckbox()\r\n
|
|
\ for i, data in ipairs(ref_buttonData.checkbox) do\r\n --Sets up reference
|
|
function\r\n local buttonNumber = spawnedButtonCount\r\n local
|
|
funcName = \"checkbox\"..i\r\n local func = function() click_checkbox(i,
|
|
buttonNumber) end\r\n self.setVar(funcName, func)\r\n --Sets up
|
|
label\r\n local label = \"\"\r\n if data.state==true then label=string.char(10008)
|
|
end\r\n --Creates button and counts it\r\n self.createButton({\r\n
|
|
\ label=label, click_function=funcName, function_owner=self,\r\n position=data.pos,
|
|
height=data.size, width=data.size,\r\n font_size=data.size, scale=buttonScale,\r\n
|
|
\ color=buttonColor, font_color=buttonFontColor\r\n })\r\n
|
|
\ spawnedButtonCount = spawnedButtonCount + 1\r\n end\r\nend\r\n\r\n--Makes
|
|
counters\r\nfunction createCounter()\r\n for i, data in ipairs(ref_buttonData.counter)
|
|
do\r\n --Sets up display\r\n local displayNumber = spawnedButtonCount\r\n
|
|
\ --Sets up label\r\n local label = data.value\r\n --Sets
|
|
height/width for display\r\n local size = data.size\r\n if data.hideBG
|
|
== true then size = 0 end\r\n --Creates button and counts it\r\n self.createButton({\r\n
|
|
\ label=label, click_function=\"click_none\", function_owner=self,\r\n
|
|
\ position=data.pos, height=size, width=size,\r\n font_size=data.size,
|
|
scale=buttonScale,\r\n color=buttonColor, font_color=buttonFontColor\r\n
|
|
\ })\r\n spawnedButtonCount = spawnedButtonCount + 1\r\n\r\n --Sets
|
|
up add 1\r\n local funcName = \"counterAdd\"..i\r\n local func
|
|
= function() click_counter(i, displayNumber, 1) end\r\n self.setVar(funcName,
|
|
func)\r\n --Sets up label\r\n local label = \"+\"\r\n --Sets
|
|
up position\r\n local offsetDistance = (data.size/2 + data.size/4) *
|
|
(buttonScale[1] * 0.002)\r\n local pos = {data.pos[1] + offsetDistance,
|
|
data.pos[2], data.pos[3]}\r\n --Sets up size\r\n local size =
|
|
data.size / 2\r\n --Creates button and counts it\r\n self.createButton({\r\n
|
|
\ label=label, click_function=funcName, function_owner=self,\r\n position=pos,
|
|
height=size, width=size,\r\n font_size=size, scale=buttonScale,\r\n
|
|
\ color=buttonColor, font_color=buttonFontColor\r\n })\r\n
|
|
\ spawnedButtonCount = spawnedButtonCount + 1\r\n\r\n --Sets up
|
|
subtract 1\r\n local funcName = \"counterSub\"..i\r\n local func
|
|
= function() click_counter(i, displayNumber, -1) end\r\n self.setVar(funcName,
|
|
func)\r\n --Sets up label\r\n local label = \"-\"\r\n --Set
|
|
up position\r\n local pos = {data.pos[1] - offsetDistance, data.pos[2],
|
|
data.pos[3]}\r\n --Creates button and counts it\r\n self.createButton({\r\n
|
|
\ label=label, click_function=funcName, function_owner=self,\r\n position=pos,
|
|
height=size, width=size,\r\n font_size=size, scale=buttonScale,\r\n
|
|
\ color=buttonColor, font_color=buttonFontColor\r\n })\r\n
|
|
\ spawnedButtonCount = spawnedButtonCount + 1\r\n end\r\nend\r\n\r\nfunction
|
|
createTextbox()\r\n for i, data in ipairs(ref_buttonData.textbox) do\r\n
|
|
\ --Sets up reference function\r\n local funcName = \"textbox\"..i\r\n
|
|
\ local func = function(_,_,val,sel) click_textbox(i,val,sel) end\r\n
|
|
\ self.setVar(funcName, func)\r\n\r\n self.createInput({\r\n input_function
|
|
= funcName,\r\n function_owner = self,\r\n label =
|
|
data.label,\r\n alignment = data.alignment,\r\n position
|
|
\ = data.pos,\r\n scale = buttonScale,\r\n width
|
|
\ = data.width,\r\n height = (data.font_size*data.rows)+24,\r\n
|
|
\ font_size = data.font_size,\r\n color =
|
|
buttonColor,\r\n font_color = buttonFontColor,\r\n value
|
|
\ = data.value,\r\n })\r\n end\r\nend\r\n"
|
|
LuaScriptState: ''
|
|
MeasureMovement: false
|
|
Name: Custom_Token
|
|
Nickname: The Colour Out of Oz Campaign Log 2
|
|
Snap: true
|
|
Sticky: true
|
|
Tooltip: true
|
|
Transform:
|
|
posX: -1.46572852
|
|
posY: 1.581499
|
|
posZ: -26.9305687
|
|
rotX: -5.83260622e-08
|
|
rotY: 270.015381
|
|
rotZ: 2.45958034e-07
|
|
scaleX: 3.98522162
|
|
scaleY: 1.0
|
|
scaleZ: 3.98522162
|
|
Value: 0
|
|
XmlUI: ''
|
|
'3':
|
|
AltLookAngle:
|
|
x: 0.0
|
|
y: 0.0
|
|
z: 0.0
|
|
Autoraise: true
|
|
ColorDiffuse:
|
|
b: 1.0
|
|
g: 1.0
|
|
r: 1.0
|
|
CustomImage:
|
|
CustomToken:
|
|
MergeDistancePixels: 15.0
|
|
Stackable: false
|
|
StandUp: false
|
|
Thickness: 0.2
|
|
ImageScalar: 1.0
|
|
ImageSecondaryURL: ''
|
|
ImageURL: http://cloud-3.steamusercontent.com/ugc/1972044023029291824/9EB949236CBC3CD9C73EF3F766E4FB3DB8B946FA/
|
|
WidthScale: 0.0
|
|
Description: ''
|
|
DragSelectable: true
|
|
GMNotes: ''
|
|
GUID: fc2c05
|
|
Grid: true
|
|
GridProjection: false
|
|
Hands: false
|
|
HideWhenFaceDown: false
|
|
IgnoreFoW: false
|
|
LayoutGroupSortIndex: 0
|
|
Locked: false
|
|
LuaScript: "--[[ Character Sheet Template by: MrStump\r\n\r\nYou can set
|
|
up your own character sheet if you follow these steps.\r\n\r\nStep 1) Change
|
|
the character sheet image\r\n -Right click on the character sheet, click
|
|
Custom\r\n -Replace the image URL with one for your character sheet\r\n -Click
|
|
import, make sure your sheet loads\r\n -SAVE THE GAME (the table setup)\r\n
|
|
\ -LOAD FROM THAT SAVE YOU JUST MADE\r\n\r\nStep 2) Edit script to fit your
|
|
character sheet\r\n -Below you will see some general options, and then the
|
|
big data table\r\n -The data table is what determines how many of which buttons
|
|
are made\r\n -Checkboxes\r\n -Counters\r\n -Textboxes\r\n
|
|
\ -By default, there are 3 of each. You can add more or remove entries\r\n
|
|
\ -If you intend to add/remove, be sure only to add/remove ENTRIES\r\n -This
|
|
is what an entry looks like:\r\n {\r\n pos = {-0.977,0.1,-0.589},\r\n
|
|
\ size = 800,\r\n state = false\r\n },\r\n
|
|
\ -Deleting the whole thing would remove that specific item on the sheet\r\n
|
|
\ -Copy and pasting it after another entry would create another\r\n -Each
|
|
entry type has unique data points (pos, size, state, etc)\r\n -Do not
|
|
try to add in your own data points or remove them individually\r\n -There
|
|
is a summary of what each point does at the top of its category\r\n\r\nStep
|
|
3) Save and check script changes\r\n -Hit Save & Apply in the script window
|
|
to save your code\r\n -You can edit your code as needed and Save+Apply as
|
|
often as needed\r\n -When you are finished, make disableSave = false below
|
|
then Save+apply\r\n -This enables saving, so your sheet will remember
|
|
whats on it.\r\n\r\nBonus) Finding/Editing Positions for elements\r\n I have
|
|
included a tool to get positions for buttons in {x,y,z} form\r\n Place it
|
|
where you want the center of your element to be\r\n Then copy the table from
|
|
the notes (lower right of screen)\r\n You can highlight it and CTRL+C\r\n
|
|
\ Paste it into the data table where needed (pos=)\r\n If you want to manually
|
|
tweek the values:\r\n {0,0,0} is the center of the character sheet\r\n
|
|
\ {1,0,0} is right, {-1,0,0} is left\r\n {0,0,-1} is up, {0,0,1}
|
|
is down\r\n 0.1 for Y is the height off of the page.\r\n If
|
|
it was 0, it would be down inside the model of the sheet\r\n\r\nBegin editing
|
|
below: ]]\r\n\r\n--Set this to true while editing and false when you have
|
|
finished\r\ndisableSave = false\r\n--Remember to set this to false once you
|
|
are done making changes\r\n--Then, after you save & apply it, save your game
|
|
too\r\n\r\n--Color information for button text (r,g,b, values of 0-1)\r\nbuttonFontColor
|
|
= {0,0,0}\r\n--Color information for button background\r\nbuttonColor = {1,1,1}\r\n--Change
|
|
scale of button (Avoid changing if possible)\r\nbuttonScale = {0.1,0.1,0.1}\r\n\r\n--This
|
|
is the button placement information\r\ndefaultButtonData = {\r\n --Add checkboxes\r\n
|
|
\ checkbox = {\r\n --[[\r\n pos = the position (pasted from
|
|
the helper tool)\r\n size = height/width/font_size for checkbox\r\n
|
|
\ state = default starting value for checkbox (true=checked, false=not)\r\n
|
|
\ ]]\r\n --The Road to Oz\r\n {\r\n pos = {-1.807,0.1,-1.363},\r\n
|
|
\ size = 500,\r\n state = false\r\n },\r\n --Royal
|
|
Audience\r\n {\r\n pos = {-1.604,0.1,-1.164},\r\n size
|
|
\ = 500,\r\n state = false\r\n },\r\n --Deep Impact\r\n
|
|
\ {\r\n pos = {-1.799,0.1,-0.947},\r\n size =
|
|
500,\r\n state = false\r\n },\r\n --Double Whammy\r\n
|
|
\ {\r\n pos = {-1.795,0.1,-0.741},\r\n size =
|
|
500,\r\n state = false\r\n },\r\n --Desaturation\r\n
|
|
\ {\r\n pos = {-1.592,0.1,-0.542},\r\n size =
|
|
500,\r\n state = false\r\n },\r\n --Chasing Rainbows\r\n
|
|
\ {\r\n pos = {-1.787,0.1,-0.332},\r\n size =
|
|
500,\r\n state = false\r\n },\r\n --Misery Loves Company\r\n
|
|
\ {\r\n pos = {0.023,0.1,-1.402},\r\n size =
|
|
500,\r\n state = false\r\n },\r\n --War Council\r\n
|
|
\ {\r\n pos = {0.204,0.1,-1.195},\r\n size =
|
|
500,\r\n state = false\r\n },\r\n --Hall of the Mountain
|
|
King\r\n {\r\n pos = {0.003,0.1,-0.996},\r\n size
|
|
\ = 500,\r\n state = false\r\n },\r\n --Defense of
|
|
the Realm\r\n {\r\n pos = {-0.007,0.1,-0.788},\r\n size
|
|
\ = 500,\r\n state = false\r\n },\r\n --Illumination\r\n
|
|
\ {\r\n pos = {0.182,0.1,-0.576},\r\n size =
|
|
500,\r\n state = false\r\n },\r\n --Defense of the
|
|
Realm\r\n {\r\n pos = {-0.027,0.1,-0.38},\r\n size
|
|
\ = 500,\r\n state = false\r\n },\r\n --Wizard 1\r\n
|
|
\ {\r\n pos = {-1.458,0.1,0.319},\r\n size =
|
|
400,\r\n state = false\r\n },\r\n --Wizard 2\r\n {\r\n
|
|
\ pos = {-1.319,0.1,0.319},\r\n size = 400,\r\n state
|
|
= false\r\n },\r\n --Wizard 3\r\n {\r\n pos
|
|
\ = {-1.183,0.1,0.319},\r\n size = 400,\r\n state =
|
|
false\r\n },\r\n --Wizard 4\r\n {\r\n pos =
|
|
{-1.04,0.1,0.319},\r\n size = 400,\r\n state = false\r\n
|
|
\ },\r\n --Wizard 5\r\n {\r\n pos = {-0.904,0.1,0.319},\r\n
|
|
\ size = 400,\r\n state = false\r\n },\r\n --Scarecrow
|
|
1\r\n {\r\n pos = {-1.458,0.1,0.6},\r\n size
|
|
\ = 400,\r\n state = false\r\n },\r\n --Scarecrow 2\r\n
|
|
\ {\r\n pos = {-1.319,0.1,0.6},\r\n size = 400,\r\n
|
|
\ state = false\r\n },\r\n --Scarecrow 3\r\n {\r\n
|
|
\ pos = {-1.183,0.1,0.6},\r\n size = 400,\r\n state
|
|
= false\r\n },\r\n --Scarecrow 4\r\n {\r\n pos
|
|
\ = {-1.04,0.1,0.6},\r\n size = 400,\r\n state = false\r\n
|
|
\ },\r\n --Scarecrow 5\r\n {\r\n pos = {-0.904,0.1,0.6},\r\n
|
|
\ size = 400,\r\n state = false\r\n },\r\n --Tin
|
|
Woodman 1\r\n {\r\n pos = {-1.458,0.1,0.885},\r\n size
|
|
\ = 400,\r\n state = false\r\n },\r\n --Tin Woodman
|
|
2\r\n {\r\n pos = {-1.319,0.1,0.885},\r\n size
|
|
\ = 400,\r\n state = false\r\n },\r\n --Tin Woodman
|
|
3\r\n {\r\n pos = {-1.183,0.1,0.885},\r\n size
|
|
\ = 400,\r\n state = false\r\n },\r\n --Tin Woodman
|
|
4\r\n {\r\n pos = {-1.04,0.1,0.885},\r\n size
|
|
\ = 400,\r\n state = false\r\n },\r\n --Tin Woodman
|
|
5\r\n {\r\n pos = {-0.904,0.1,0.885},\r\n size
|
|
\ = 400,\r\n state = false\r\n },\r\n --Tik-Tok 1\r\n
|
|
\ {\r\n pos = {-1.458,0.1,1.169},\r\n size =
|
|
400,\r\n state = false\r\n },\r\n --Tik-Tok 2\r\n {\r\n
|
|
\ pos = {-1.319,0.1,1.169},\r\n size = 400,\r\n state
|
|
= false\r\n },\r\n --Tik-Tok 3\r\n {\r\n pos
|
|
\ = {-1.183,0.1,1.169},\r\n size = 400,\r\n state =
|
|
false\r\n },\r\n --Tik-Tok 4\r\n {\r\n pos =
|
|
{-1.04,0.1,1.169},\r\n size = 400,\r\n state = false\r\n
|
|
\ },\r\n --Tik-Tok 5\r\n {\r\n pos = {-0.904,0.1,1.169},\r\n
|
|
\ size = 400,\r\n state = false\r\n },\r\n --Jack
|
|
Pumpkinhead 1\r\n {\r\n pos = {-1.458,0.1,1.451},\r\n size
|
|
\ = 400,\r\n state = false\r\n },\r\n --Jack Pumpkinhead
|
|
2\r\n {\r\n pos = {-1.319,0.1,1.451},\r\n size
|
|
\ = 400,\r\n state = false\r\n },\r\n --Jack Pumpkinhead
|
|
3\r\n {\r\n pos = {-1.183,0.1,1.451},\r\n size
|
|
\ = 400,\r\n state = false\r\n },\r\n --Jack Pumpkinhead
|
|
4\r\n {\r\n pos = {-1.04,0.1,1.451},\r\n size
|
|
\ = 400,\r\n state = false\r\n },\r\n --Jack Pumpkinhead
|
|
5\r\n {\r\n pos = {-0.904,0.1,1.451},\r\n size
|
|
\ = 400,\r\n state = false\r\n },\r\n --Patchwork Girl
|
|
1\r\n {\r\n pos = {-1.458,0.1,1.736},\r\n size
|
|
\ = 400,\r\n state = false\r\n },\r\n --Patchwork Girl
|
|
2\r\n {\r\n pos = {-1.319,0.1,1.736},\r\n size
|
|
\ = 400,\r\n state = false\r\n },\r\n --Patchwork Girl
|
|
3\r\n {\r\n pos = {-1.183,0.1,1.736},\r\n size
|
|
\ = 400,\r\n state = false\r\n },\r\n --Patchwork Girl
|
|
4\r\n {\r\n pos = {-1.04,0.1,1.736},\r\n size
|
|
\ = 400,\r\n state = false\r\n },\r\n --Patchwork Girl
|
|
5\r\n {\r\n pos = {-0.904,0.1,1.736},\r\n size
|
|
\ = 400,\r\n state = false\r\n },\r\n --Frogman 1\r\n
|
|
\ {\r\n pos = {-0.342,0.1,0.319},\r\n size =
|
|
400,\r\n state = false\r\n },\r\n --Frogman 2\r\n {\r\n
|
|
\ pos = {-0.204,0.1,0.319},\r\n size = 400,\r\n state
|
|
= false\r\n },\r\n --Frogman 3\r\n {\r\n pos
|
|
\ = {-0.063,0.1,0.319},\r\n size = 400,\r\n state =
|
|
false\r\n },\r\n --Frogman 4\r\n {\r\n pos =
|
|
{0.075,0.1,0.319},\r\n size = 400,\r\n state = false\r\n
|
|
\ },\r\n --Frogman 5\r\n {\r\n pos = {0.213,0.1,0.319},\r\n
|
|
\ size = 400,\r\n state = false\r\n },\r\n --Cap'n
|
|
Bill 1\r\n {\r\n pos = {-0.342,0.1,0.6},\r\n size
|
|
\ = 400,\r\n state = false\r\n },\r\n --Cap'n Bill
|
|
2\r\n {\r\n pos = {-0.204,0.1,0.6},\r\n size
|
|
\ = 400,\r\n state = false\r\n },\r\n --Cap'n Bill
|
|
3\r\n {\r\n pos = {-0.063,0.1,0.6},\r\n size
|
|
\ = 400,\r\n state = false\r\n },\r\n --Cap'n Bill
|
|
4\r\n {\r\n pos = {0.075,0.1,0.6},\r\n size =
|
|
400,\r\n state = false\r\n },\r\n --Cap'n Bill 5\r\n
|
|
\ {\r\n pos = {0.213,0.1,0.6},\r\n size = 400,\r\n
|
|
\ state = false\r\n },\r\n --Shaggy Man 1\r\n {\r\n
|
|
\ pos = {-0.342,0.1,0.885},\r\n size = 400,\r\n state
|
|
= false\r\n },\r\n --Shaggy Man 2\r\n {\r\n pos
|
|
\ = {-0.204,0.1,0.885},\r\n size = 400,\r\n state =
|
|
false\r\n },\r\n --Shaggy Man 3\r\n {\r\n pos
|
|
\ = {-0.063,0.1,0.885},\r\n size = 400,\r\n state =
|
|
false\r\n },\r\n --Shaggy Man 4\r\n {\r\n pos
|
|
\ = {0.075,0.1,0.885},\r\n size = 400,\r\n state = false\r\n
|
|
\ },\r\n --Shaggy Man 5\r\n {\r\n pos = {0.213,0.1,0.885},\r\n
|
|
\ size = 400,\r\n state = false\r\n },\r\n --Cowardly
|
|
Lion 1\r\n {\r\n pos = {-0.342,0.1,1.169},\r\n size
|
|
\ = 400,\r\n state = false\r\n },\r\n --Cowardly Lion
|
|
2\r\n {\r\n pos = {-0.204,0.1,1.169},\r\n size
|
|
\ = 400,\r\n state = false\r\n },\r\n --Cowardly Lion
|
|
3\r\n {\r\n pos = {-0.063,0.1,1.169},\r\n size
|
|
\ = 400,\r\n state = false\r\n },\r\n --Cowardly Lion
|
|
4\r\n {\r\n pos = {0.075,0.1,1.169},\r\n size
|
|
\ = 400,\r\n state = false\r\n },\r\n --Cowardly Lion
|
|
5\r\n {\r\n pos = {0.213,0.1,1.169},\r\n size
|
|
\ = 400,\r\n state = false\r\n },\r\n --Hungry Tiger
|
|
1\r\n {\r\n pos = {-0.342,0.1,1.451},\r\n size
|
|
\ = 400,\r\n state = false\r\n },\r\n --Hungry Tiger
|
|
2\r\n {\r\n pos = {-0.204,0.1,1.451},\r\n size
|
|
\ = 400,\r\n state = false\r\n },\r\n --Hungry Tiger
|
|
3\r\n {\r\n pos = {-0.063,0.1,1.451},\r\n size
|
|
\ = 400,\r\n state = false\r\n },\r\n --Hungry Tiger
|
|
4\r\n {\r\n pos = {0.075,0.1,1.451},\r\n size
|
|
\ = 400,\r\n state = false\r\n },\r\n --Hungry Tiger
|
|
5\r\n {\r\n pos = {0.213,0.1,1.451},\r\n size
|
|
\ = 400,\r\n state = false\r\n },\r\n --Sawhorse 1\r\n
|
|
\ {\r\n pos = {-0.342,0.1,1.736},\r\n size =
|
|
400,\r\n state = false\r\n },\r\n --Sawhorse 2\r\n
|
|
\ {\r\n pos = {-0.204,0.1,1.736},\r\n size =
|
|
400,\r\n state = false\r\n },\r\n --Sawhorse 3\r\n
|
|
\ {\r\n pos = {-0.063,0.1,1.736},\r\n size =
|
|
400,\r\n state = false\r\n },\r\n --Sawhorse 4\r\n
|
|
\ {\r\n pos = {0.075,0.1,1.736},\r\n size = 400,\r\n
|
|
\ state = false\r\n },\r\n --Sawhorse 5\r\n {\r\n
|
|
\ pos = {0.213,0.1,1.736},\r\n size = 400,\r\n state
|
|
= false\r\n },\r\n --Skull 1\r\n {\r\n pos =
|
|
{0.603,0.1,1.026},\r\n size = 500,\r\n state = false\r\n
|
|
\ },\r\n --Cultist 1\r\n {\r\n pos = {0.777,0.1,1.038},\r\n
|
|
\ size = 500,\r\n state = false\r\n },\r\n --Tablet
|
|
1\r\n {\r\n pos = {0.934,0.1,1.041},\r\n size
|
|
\ = 500,\r\n state = false\r\n },\r\n --Monster 1\r\n
|
|
\ {\r\n pos = {1.086,0.1,1.05},\r\n size = 500,\r\n
|
|
\ state = false\r\n },\r\n --Skull 2\r\n {\r\n
|
|
\ pos = {0.592,0.1,1.231},\r\n size = 500,\r\n state
|
|
= false\r\n },\r\n --Cultist 2\r\n {\r\n pos
|
|
\ = {0.761,0.1,1.242},\r\n size = 500,\r\n state = false\r\n
|
|
\ },\r\n --Tablet 2\r\n {\r\n pos = {0.922,0.1,1.243},\r\n
|
|
\ size = 500,\r\n state = false\r\n },\r\n --Monster
|
|
2\r\n {\r\n pos = {1.082,0.1,1.254},\r\n size
|
|
\ = 500,\r\n state = false\r\n },\r\n --Skull 3\r\n
|
|
\ {\r\n pos = {0.58,0.1,1.436},\r\n size = 500,\r\n
|
|
\ state = false\r\n },\r\n --Cultist 3\r\n {\r\n
|
|
\ pos = {0.742,0.1,1.445},\r\n size = 500,\r\n state
|
|
= false\r\n },\r\n --Tablet 3\r\n {\r\n pos
|
|
\ = {0.907,0.1,1.453},\r\n size = 500,\r\n state = false\r\n
|
|
\ },\r\n --Monster 3\r\n {\r\n pos = {1.069,0.1,1.465},\r\n
|
|
\ size = 500,\r\n state = false\r\n },\r\n --Skull
|
|
4\r\n {\r\n pos = {0.579,0.1,1.638},\r\n size
|
|
\ = 500,\r\n state = false\r\n },\r\n --Cultist 4\r\n
|
|
\ {\r\n pos = {0.733,0.1,1.648},\r\n size = 500,\r\n
|
|
\ state = false\r\n },\r\n --Tablet 4\r\n {\r\n
|
|
\ pos = {0.9,0.1,1.659},\r\n size = 500,\r\n state
|
|
= false\r\n },\r\n --Monster 4\r\n {\r\n pos
|
|
\ = {1.058,0.1,1.663},\r\n size = 500,\r\n state = false\r\n
|
|
\ },\r\n --End of checkboxes\r\n },\r\n --Add counters that
|
|
have a + and - button\r\n counter = {\r\n --[[\r\n pos =
|
|
the position (pasted from the helper tool)\r\n size = height/width/font_size
|
|
for counter\r\n value = default starting value for counter\r\n hideBG
|
|
= if background of counter is hidden (true=hidden, false=not)\r\n ]]\r\n
|
|
\ --End of counters\r\n },\r\n --Add editable text boxes\r\n textbox
|
|
= {\r\n --[[\r\n pos = the position (pasted from the helper
|
|
tool)\r\n rows = how many lines of text you want for this box\r\n
|
|
\ width = how wide the text box is\r\n font_size = size of
|
|
text. This and \"rows\" effect overall height\r\n label = what is
|
|
shown when there is no text. \"\" = nothing\r\n value = text entered
|
|
into box. \"\" = nothing\r\n alignment = Number to indicate how you want
|
|
text aligned\r\n (1=Automatic, 2=Left, 3=Center, 4=Right,
|
|
5=Justified)\r\n ]]\r\n --First country\r\n {\r\n pos
|
|
\ = {1.503,0.1,1.052},\r\n rows = 1,\r\n width
|
|
\ = 3000,\r\n font_size = 300,\r\n label = \"First
|
|
Country\",\r\n value = \"\",\r\n alignment = 2\r\n
|
|
\ },\r\n --Second country\r\n {\r\n pos =
|
|
{1.498,0.1,1.260},\r\n rows = 1,\r\n width =
|
|
3000,\r\n font_size = 300,\r\n label = \"Second Country\",\r\n
|
|
\ value = \"\",\r\n alignment = 2\r\n },\r\n
|
|
\ --Third country\r\n {\r\n pos = {1.493,0.1,1.468},\r\n
|
|
\ rows = 1,\r\n width = 3000,\r\n font_size
|
|
= 300,\r\n label = \"Third Country\",\r\n value =
|
|
\"\",\r\n alignment = 2\r\n },\r\n --Fourth country\r\n
|
|
\ {\r\n pos = {1.488,0.1,1.676},\r\n rows
|
|
\ = 1,\r\n width = 3000,\r\n font_size = 300,\r\n
|
|
\ label = \"Fourth Country\",\r\n value = \"\",\r\n
|
|
\ alignment = 2\r\n },\r\n --End of textboxes\r\n }\r\n}\r\n\r\n\r\n\r\n--Lua
|
|
beyond this point, I recommend doing something more fun with your life\r\n\r\n\r\n\r\n--Save
|
|
function\r\nfunction updateSave()\r\n saved_data = JSON.encode(ref_buttonData)\r\n
|
|
\ if disableSave==true then saved_data=\"\" end\r\n self.script_state =
|
|
saved_data\r\nend\r\n\r\n--Startup procedure\r\nfunction onload(saved_data)\r\n
|
|
\ if disableSave==true then saved_data=\"\" end\r\n if saved_data ~= \"\"
|
|
then\r\n local loaded_data = JSON.decode(saved_data)\r\n ref_buttonData
|
|
= loaded_data\r\n else\r\n ref_buttonData = defaultButtonData\r\n
|
|
\ end\r\n\r\n spawnedButtonCount = 0\r\n createCheckbox()\r\n createCounter()\r\n
|
|
\ createTextbox()\r\nend\r\n\r\n\r\n\r\n--Click functions for buttons\r\n\r\n\r\n\r\n--Checks
|
|
or unchecks the given box\r\nfunction click_checkbox(tableIndex, buttonIndex)\r\n
|
|
\ if ref_buttonData.checkbox[tableIndex].state == true then\r\n ref_buttonData.checkbox[tableIndex].state
|
|
= false\r\n self.editButton({index=buttonIndex, label=\"\"})\r\n else\r\n
|
|
\ ref_buttonData.checkbox[tableIndex].state = true\r\n self.editButton({index=buttonIndex,
|
|
label=string.char(10008)})\r\n end\r\n updateSave()\r\nend\r\n\r\n--Applies
|
|
value to given counter display\r\nfunction click_counter(tableIndex, buttonIndex,
|
|
amount)\r\n ref_buttonData.counter[tableIndex].value = ref_buttonData.counter[tableIndex].value
|
|
+ amount\r\n self.editButton({index=buttonIndex, label=ref_buttonData.counter[tableIndex].value})\r\n
|
|
\ updateSave()\r\nend\r\n\r\n--Updates saved value for given text box\r\nfunction
|
|
click_textbox(i, value, selected)\r\n if selected == false then\r\n ref_buttonData.textbox[i].value
|
|
= value\r\n updateSave()\r\n end\r\nend\r\n\r\n--Dud function for
|
|
if you have a background on a counter\r\nfunction click_none() end\r\n\r\n\r\n\r\n--Button
|
|
creation\r\n\r\n\r\n\r\n--Makes checkboxes\r\nfunction createCheckbox()\r\n
|
|
\ for i, data in ipairs(ref_buttonData.checkbox) do\r\n --Sets up reference
|
|
function\r\n local buttonNumber = spawnedButtonCount\r\n local
|
|
funcName = \"checkbox\"..i\r\n local func = function() click_checkbox(i,
|
|
buttonNumber) end\r\n self.setVar(funcName, func)\r\n --Sets up
|
|
label\r\n local label = \"\"\r\n if data.state==true then label=string.char(10008)
|
|
end\r\n --Creates button and counts it\r\n self.createButton({\r\n
|
|
\ label=label, click_function=funcName, function_owner=self,\r\n position=data.pos,
|
|
height=data.size, width=data.size,\r\n font_size=data.size, scale=buttonScale,\r\n
|
|
\ color=buttonColor, font_color=buttonFontColor\r\n })\r\n
|
|
\ spawnedButtonCount = spawnedButtonCount + 1\r\n end\r\nend\r\n\r\n--Makes
|
|
counters\r\nfunction createCounter()\r\n for i, data in ipairs(ref_buttonData.counter)
|
|
do\r\n --Sets up display\r\n local displayNumber = spawnedButtonCount\r\n
|
|
\ --Sets up label\r\n local label = data.value\r\n --Sets
|
|
height/width for display\r\n local size = data.size\r\n if data.hideBG
|
|
== true then size = 0 end\r\n --Creates button and counts it\r\n self.createButton({\r\n
|
|
\ label=label, click_function=\"click_none\", function_owner=self,\r\n
|
|
\ position=data.pos, height=size, width=size,\r\n font_size=data.size,
|
|
scale=buttonScale,\r\n color=buttonColor, font_color=buttonFontColor\r\n
|
|
\ })\r\n spawnedButtonCount = spawnedButtonCount + 1\r\n\r\n --Sets
|
|
up add 1\r\n local funcName = \"counterAdd\"..i\r\n local func
|
|
= function() click_counter(i, displayNumber, 1) end\r\n self.setVar(funcName,
|
|
func)\r\n --Sets up label\r\n local label = \"+\"\r\n --Sets
|
|
up position\r\n local offsetDistance = (data.size/2 + data.size/4) *
|
|
(buttonScale[1] * 0.002)\r\n local pos = {data.pos[1] + offsetDistance,
|
|
data.pos[2], data.pos[3]}\r\n --Sets up size\r\n local size =
|
|
data.size / 2\r\n --Creates button and counts it\r\n self.createButton({\r\n
|
|
\ label=label, click_function=funcName, function_owner=self,\r\n position=pos,
|
|
height=size, width=size,\r\n font_size=size, scale=buttonScale,\r\n
|
|
\ color=buttonColor, font_color=buttonFontColor\r\n })\r\n
|
|
\ spawnedButtonCount = spawnedButtonCount + 1\r\n\r\n --Sets up
|
|
subtract 1\r\n local funcName = \"counterSub\"..i\r\n local func
|
|
= function() click_counter(i, displayNumber, -1) end\r\n self.setVar(funcName,
|
|
func)\r\n --Sets up label\r\n local label = \"-\"\r\n --Set
|
|
up position\r\n local pos = {data.pos[1] - offsetDistance, data.pos[2],
|
|
data.pos[3]}\r\n --Creates button and counts it\r\n self.createButton({\r\n
|
|
\ label=label, click_function=funcName, function_owner=self,\r\n position=pos,
|
|
height=size, width=size,\r\n font_size=size, scale=buttonScale,\r\n
|
|
\ color=buttonColor, font_color=buttonFontColor\r\n })\r\n
|
|
\ spawnedButtonCount = spawnedButtonCount + 1\r\n end\r\nend\r\n\r\nfunction
|
|
createTextbox()\r\n for i, data in ipairs(ref_buttonData.textbox) do\r\n
|
|
\ --Sets up reference function\r\n local funcName = \"textbox\"..i\r\n
|
|
\ local func = function(_,_,val,sel) click_textbox(i,val,sel) end\r\n
|
|
\ self.setVar(funcName, func)\r\n\r\n self.createInput({\r\n input_function
|
|
= funcName,\r\n function_owner = self,\r\n label =
|
|
data.label,\r\n alignment = data.alignment,\r\n position
|
|
\ = data.pos,\r\n scale = buttonScale,\r\n width
|
|
\ = data.width,\r\n height = (data.font_size*data.rows)+24,\r\n
|
|
\ font_size = data.font_size,\r\n color =
|
|
buttonColor,\r\n font_color = buttonFontColor,\r\n value
|
|
\ = data.value,\r\n })\r\n end\r\nend\r\n"
|
|
LuaScriptState: ''
|
|
MeasureMovement: false
|
|
Name: Custom_Token
|
|
Nickname: The Colour Out of Oz Campaign Log 3
|
|
Snap: true
|
|
Sticky: true
|
|
Tooltip: true
|
|
Transform:
|
|
posX: -1.46572852
|
|
posY: 1.581499
|
|
posZ: -26.9305687
|
|
rotX: -2.648407e-07
|
|
rotY: 270.015381
|
|
rotZ: -1.90774131e-07
|
|
scaleX: 3.98515677
|
|
scaleY: 1.0
|
|
scaleZ: 3.98515677
|
|
Value: 0
|
|
XmlUI: ''
|
|
Sticky: true
|
|
Tooltip: true
|
|
Transform:
|
|
posX: -1.35
|
|
posY: 1.58
|
|
posZ: -26.61
|
|
rotX: 0.0
|
|
rotY: 270.0
|
|
rotZ: 0.0
|
|
scaleX: 4.04
|
|
scaleY: 1.0
|
|
scaleZ: 4.04
|
|
Value: 0
|
|
XmlUI: ''
|