Skip to content

Commit

Permalink
Data fixes and deployment zones
Browse files Browse the repository at this point in the history
  • Loading branch information
dicewrench committed Aug 31, 2024
1 parent 6449b04 commit 0c93b93
Show file tree
Hide file tree
Showing 5 changed files with 164 additions and 55 deletions.
4 changes: 2 additions & 2 deletions contrib/cards/Rebel/RebelUnits.json
Original file line number Diff line number Diff line change
Expand Up @@ -608,12 +608,12 @@
},
{
"name": "Swift Protector",
"image": "https://steamusercontent-a.akamaihd.net/ugc/2495640747384887431/0C4CEEE37F50E23C00735F501DB569C5364D8C38/FD",
"image": "https://steamusercontent-a.akamaihd.net/ugc/2022720184107019696/F82E451FABCD16AB411E88409AFC81201DB9D43A/",
"pip": 2
},
{
"name": "Family Reunion",
"image": "http://cloud-3.steamusercontent.com/ugc/2022720184107019640/F5F69B23E0B7E1734BE3B7AE3A8DE6738680EA87/",
"image": "https://steamusercontent-a.akamaihd.net/ugc/2022720184107019640/F5F69B23E0B7E1734BE3B7AE3A8DE6738680EA87/",
"pip": 2
},
{
Expand Down
23 changes: 23 additions & 0 deletions contrib/cards/Separatist/SeparatistUnits.json
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,29 @@
}
]
},
{
"name": "LM-432 Crab Droid",
"image": "https://steamusercontent-a.akamaihd.net/ugc/2491139050708063278/ED3246E4E67C5213E1DDDA3064AFAB7213BDD737/",
"size": "medium",
"type": "Ground Vehicle",
"points": 70,
"speed": 1,
"upgrades": {
"Comms": 1,
"Programming": 1,
"Hardpoint": 1
},
"silhouette": {
"height": 1.453,
"offset": 0.0
},
"minis": [
{
"bundle": "https://steamusercontent-a.akamaihd.net/ugc/2491139050708070860/182C259E1AD62DCEEA34E2F87EE1A4D50908E956/",
"secondary": "https://steamusercontent-a.akamaihd.net/ugc/2491139050708070994/E763691AC8C24925DA2CA117DE90A54BAC836230/"
}
]
},
{
"name": "STAP Riders",
"image": "http://cloud-3.steamusercontent.com/ugc/1683770969788789443/7BE1E58EECCFE75EA2705CD1345E6C0602711AB7/",
Expand Down
64 changes: 42 additions & 22 deletions contrib/cards/official.json
Original file line number Diff line number Diff line change
Expand Up @@ -894,6 +894,26 @@
}
}
},
{
"name": "Twin Blaster Cannons",
"image": "https://steamusercontent-a.akamaihd.net/ugc/2491139050708067017/3B8BBCCFB6181F624CFF09DA5C4F762815CA4983/",
"points": 5,
"restrictions": {
"include": {
"unit": ["LM-432 Crab Droid"]
}
}
},
{
"name": "Heavy Laser Cannon",
"image": "https://steamusercontent-a.akamaihd.net/ugc/2491139050708063813/02A958048D55355C0A3FECAADB08B690785AE4FF/",
"points": 10,
"restrictions": {
"include": {
"unit": ["LM-432 Crab Droid"]
}
}
},
{
"name": "AG-2G Quad Laser",
"image": "http://cloud-3.steamusercontent.com/ugc/1680393865568138060/2F0A343971984B412473C58FD82F4922B7399B1A/",
Expand Down Expand Up @@ -2844,7 +2864,7 @@
{
"name": "Rebel Veteran Squad",
"image": "http://cloud-3.steamusercontent.com/ugc/1680393865568144901/B379F1B7C63F853ECAA61149EDEEA7D2AD83D813/",
"mini": [
"minis": [
{
"mesh": "http://cloud-3.steamusercontent.com/ugc/788608699499192232/D15615AF2A0F4F4887E9BD3DFFA141C8ACCCEC78/",
"diffuse": "http://cloud-3.steamusercontent.com/ugc/788608699499192135/526538CE10AC6856578996BE6B8AB7263D32D5C7/"
Expand Down Expand Up @@ -2983,7 +3003,7 @@
{
"name": "Snowtrooper Squad",
"image": "https://steamusercontent-a.akamaihd.net/ugc/2495640747384858227/A2DD159803E85A5524E3BA6C4ED0BA54FF2BA33E/",
"mini": [
"minis": [
{
"mesh": "http://cloud-3.steamusercontent.com/ugc/785234540541801837/D52F333945BF667A37E06611977C36186CEFC7B6/",
"diffuse": "http://cloud-3.steamusercontent.com/ugc/785234540541801215/595165C57A67BF2BD505BE6F0DF8F11AD4EA55D2/"
Expand Down Expand Up @@ -3937,12 +3957,12 @@
"image": "https://steamusercontent-a.akamaihd.net/ugc/2482129948501051767/3260475F48F6C58305E14413669DE2D10455871B/",
"type": "vertical",
"zone": [
["r", "r", "r", " ", " ", " ", " ", " ", " ", "r", "r", "r"],
[" ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "],
["r", "r", "r", "rs", " ", " ", " ", " ", "rss", "r", "r", "r"],
["rh", "rh", "rh", "rc", " ", " ", " ", " ", "rcc", "rh", "rh", "rh"],
[" ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "],
[" ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "],
[" ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "],
["b", "b", "b", " ", " ", " ", " ", " ", " ", "b", "b", "b"]
["bh", "bh", "bh", "bcc", " ", " ", " ", " ", "bc", "bh", "bh", "bh"],
["b", "b", "b", "bss", " ", " ", " ", " ", "bs", "b", "b", "b"]
],
"additionalObjects": [
"Close the Pocket Map",
Expand All @@ -3957,10 +3977,10 @@
"type": "vertical",
"zone": [
[" ", " ", "r", "r", "r", "r", "r", "r", "r", "r", " ", " "],
[" ", " ", "rh", "rh", "rh", "rh", "rh", "rh", "rh", "rh", " ", " "],
[" ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "],
[" ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "],
[" ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "],
[" ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "],
[" ", " ", "bh", "bh", "bh", "bh", "bh", "bh", "bh", "bh", " ", " "],
[" ", " ", "b", "b", "b", "b", "b", "b", "b", "b", " ", " "]
],
"additionalObjects": [
Expand All @@ -3977,10 +3997,10 @@
"type": "vertical",
"zone": [
["r", "r", "r", "r", "r", "r", "r", "r", "r", " ", " ", " "],
["r", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "],
["r", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "],
[" ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", "b"],
[" ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", "b"],
["r", "rl", "rh", "rh", "rh", "rh", "rh", "rh", "rh", " ", " ", " "],
["r", "rs", " ", " ", " ", " ", " ", " ", " ", " ", "bc", "bh"],
["rh", "rc", " ", " ", " ", " ", " ", " ", " ", " ", "bs", "b"],
[" ", " ", " ", "bh", "bh", "bh", "bh", "bh", "bh", "bh", "bl", "b"],
[" ", " ", " ", "b", "b", "b", "b", "b", "b", "b", "b", "b"]
],
"additionalObjects": [
Expand All @@ -3997,10 +4017,10 @@
"type": "vertical",
"zone": [
[" ", " ", "r", "r", "r", "r", "r", "r", "r", "r", " ", " "],
[" ", " ", "rh", "rh", "rh", "rh", "rh", "rh", "rh", "rh", " ", " "],
[" ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "],
[" ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "],
[" ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "],
[" ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "],
[" ", " ", "bh", "bh", "bh", "bh", "bh", "bh", "bh", "bh", " ", " "],
[" ", " ", "b", "b", "b", "b", "b", "b", "b", "b", " ", " "]
],
"additionalObjects": [
Expand All @@ -4016,12 +4036,12 @@
"image": "https://steamusercontent-a.akamaihd.net/ugc/2482129948501052764/CBD5436D90279F40330A62F85582862E6FA4F0F0/",
"type": "vertical",
"zone": [
["r", "r", "r", "r", "r", "r", "r", "r", "r", "r", " ", " "],
[" ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "],
[" ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "],
["r", "r", "r", "r", "r", "r", "r", "r", "r", " ", " ", " "],
["rh", "rh", "rh", "rh", "rh", "rh", "rh", "rh", "rh", " ", " ", " "],
[" ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "],
[" ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "],
[" ", " ", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b"]
[" ", " ", " ", "bh", "bh", "bh", "bh", "bh", "bh", "bh", "bh", "bh"],
[" ", " ", " ", "b", "b", "b", "b", "b", "b", "b", "b", "b"]
],
"additionalObjects": [
"Recover the Research Map",
Expand All @@ -4038,12 +4058,12 @@
"image": "https://steamusercontent-a.akamaihd.net/ugc/2482129948501053065/3A8AE5DD93D1FEEEE72DB9E9936F918CFFDCF7CC/",
"type": "vertical",
"zone": [
["r", "r", "r", "r", "r", "r", "r", "r", "r", "r", " ", " "],
[" ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "],
[" ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "],
["r", "r", "r", "r", "r", "r", "r", "r", "r", " ", " ", " "],
["rh", "rh", "rh", "rh", "rh", "rh", "rh", "rh", "rh", " ", " ", " "],
[" ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "],
[" ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "],
[" ", " ", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b"]
[" ", " ", " ", "bh", "bh", "bh", "bh", "bh", "bh", "bh", "bh", "bh"],
[" ", " ", " ", "b", "b", "b", "b", "b", "b", "b", "b", "b"]
],
"additionalObjects": [
"Shifting Priorities Map",
Expand Down
118 changes: 94 additions & 24 deletions mod/src/StarWarsLegion/SETUP_CONTROLLER.1cb552.lua
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,89 @@ function spawnObjs(cardType, selectedBattleCardName)
})
end

local xStart = -25
local zStart = 15
local yValue = 20

local deployLinks = {}
deployLinks.r = "http://cloud-3.steamusercontent.com/ugc/1738944060882006204/75F636F4133C5F85682ECDEBBECB9F6CD821315F/"
deployLinks.rh = "https://steamusercontent-a.akamaihd.net/ugc/2491139050708249497/CC08277B7D876CF1FFCEDD3FC499AC38034B36D8/"
deployLinks.rs = "https://steamusercontent-a.akamaihd.net/ugc/2491139050708249497/CC08277B7D876CF1FFCEDD3FC499AC38034B36D8/"
deployLinks.rss = "https://steamusercontent-a.akamaihd.net/ugc/2491139050708249497/CC08277B7D876CF1FFCEDD3FC499AC38034B36D8/"
deployLinks.rl = "https://steamusercontent-a.akamaihd.net/ugc/2491139050708336160/21601D81F35521B72E015AA6316913521943E73F/"
deployLinks.rc = "https://steamusercontent-a.akamaihd.net/ugc/2491139050708336119/D74B484417970BC524ED4624932102C6BF956E91/"
deployLinks.rcc = "https://steamusercontent-a.akamaihd.net/ugc/2491139050708336119/D74B484417970BC524ED4624932102C6BF956E91/"
deployLinks.b = "http://cloud-3.steamusercontent.com/ugc/1738944060882006162/077B3B0AE278E39363F5BD3AE070B5AE36F025FA/"
deployLinks.bh = "https://steamusercontent-a.akamaihd.net/ugc/2491139050708249441/767C99D0983A24618F97511192498FBEED1557F2/"
deployLinks.bs = "https://steamusercontent-a.akamaihd.net/ugc/2491139050708249441/767C99D0983A24618F97511192498FBEED1557F2/"
deployLinks.bss = "https://steamusercontent-a.akamaihd.net/ugc/2491139050708249441/767C99D0983A24618F97511192498FBEED1557F2/"
deployLinks.bl = "https://steamusercontent-a.akamaihd.net/ugc/2491139050708335699/9EF627695432090869A748114A0ED41B262FAE46/"
deployLinks.bc = "https://steamusercontent-a.akamaihd.net/ugc/2491139050708335638/DB6B86B4DA42884BDF3D899DD66AF5DBD94263B8/"
deployLinks.bcc = "https://steamusercontent-a.akamaihd.net/ugc/2491139050708335638/DB6B86B4DA42884BDF3D899DD66AF5DBD94263B8/"

local deployRotations = {}
deployRotations.r = 0
deployRotations.rh = 0
deployRotations.rs = 90
deployRotations.rss = 90
deployRotations.rl = 0
deployRotations.rc = 0
deployRotations.rcc = 0
deployRotations.b = 0
deployRotations.bh = 0
deployRotations.bs = 90
deployRotations.bss = 90
deployRotations.bl = 0
deployRotations.bc = 0
deployRotations.bcc = 0

local deployOffset = {}
deployOffset.r = {0, 0, 0}
deployOffset.rh = {0, 0, -1.5}
deployOffset.rs = {1.5, 0, 0}
deployOffset.rss = {-1.5, 0, 0}
deployOffset.rl = {0, 0, 0}
deployOffset.rc = {1.5, 0, -1.5}
deployOffset.rcc = {-1.5, 0, -1.5}
deployOffset.b = {0, 0, 0}
deployOffset.bh = {0, 0, 1.5}
deployOffset.bs = {-1.5, 0, 0}
deployOffset.bss = {1.5, 0, 0}
deployOffset.bl = {0, 0, 0}
deployOffset.bc = {-1.5, 0, 1.5}
deployOffset.bcc = {1.5, 0, 1.5}

function AddVectors(vectorA, vectorB)
vectorA[1] = vectorA[1] + vectorB[1]
vectorA[2] = vectorA[2] + vectorB[2]
vectorA[3] = vectorA[3] + vectorB[3]
return vectorA
end

function spawnBoundaryCell(cell, x, z)
local asset = deployLinks[cell]
local offset = deployOffset[cell]
local pos = {
xStart + (6 * (x - 1)),
yValue,
zStart - (6 * (z - 1)),
}

pos = AddVectors(pos, offset)

local projector = spawnObject({
type = "Custom_AssetBundle",
position = pos,
scale = {0, 0, 0},
rotation = {0, deployRotations[cell], 0}
})
projector.setName("Deployment Boundary")
projector.setLock(true)
projector.setCustomObject({
assetbundle = asset,
})
end

function spawnDeploymentBoundary(matrix)
local function invertMatrix(input)
-- See https://github.com/swlegion/tts/issues/275.
Expand All @@ -200,11 +283,7 @@ function spawnDeploymentBoundary(matrix)
end
return output
end
local bAsset = "http://cloud-3.steamusercontent.com/ugc/1738944060882006162/077B3B0AE278E39363F5BD3AE070B5AE36F025FA/"
local rAsset = "http://cloud-3.steamusercontent.com/ugc/1738944060882006204/75F636F4133C5F85682ECDEBBECB9F6CD821315F/"
local xStart = -25
local zStart = 15
local yValue = 20

matrix = invertMatrix(matrix)
-- matrix is in the format of
-- { x, x, x, x, x, x, x, x, x, x, x, x }
Expand All @@ -219,25 +298,16 @@ function spawnDeploymentBoundary(matrix)
-- "" : ignore
for z, row in pairs(matrix) do
for x, cell in pairs(row) do
if cell == "r" or cell == "b" then
local projector = spawnObject({
type = "Custom_AssetBundle",
position = {
xStart + (6 * (x - 1)),
yValue,
zStart - (6 * (z - 1)),
},
scale = {0, 0, 0},
})
local asset = rAsset
if cell == "b" then
asset = bAsset
end
projector.setName("Deployment Boundary")
projector.setLock(true)
projector.setCustomObject({
assetbundle = asset,
})
if cell == " " then
-- skip the blank cells
elseif cell == "bl" then
spawnBoundaryCell("bs", x, z)
spawnBoundaryCell("bcc", x, z)
elseif cell == "rl" then
spawnBoundaryCell("rs", x, z)
spawnBoundaryCell("rcc", x, z)
else
spawnBoundaryCell(cell, x, z)
end
end
end
Expand Down
10 changes: 3 additions & 7 deletions mod/src/includes/ui/Welcome.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<VerticalLayout padding="5">
<Text alignment="UpperLeft" color="#ffffff" fontSize="12">
<!--Welcome to Star Wars: Legion for TTS, <b>v8.0.0</b>.-->
Welcome to Star Wars: Legion for TTS, <b>v8.0.5-beta</b>.
Welcome to Star Wars: Legion for TTS, <b>v8.0.7-beta</b>.

This is a <b>beta release</b>, and is <textcolor color="#f03333"><b>not suitable for tournament play</b></textcolor>.

Expand All @@ -46,12 +46,8 @@
<b>CHANGELOG</b>
(Since last <i>Beta</i>)
<!--(Since last <i>Stable</i>)-->
- Fix: Small Base Full-Move end point aligned with tool "Prongs" to match recent ruling

- PSA: MOVE PROJECTORS ARE NOT YET UPDATED TO MATCH NEW FULL MOVES!!!

- Add: Unit Token re-arranged and now has Surge button
- Add: Unit Token now has Deploy button for Deploy Moves that offsets and locks the Move Tool to accurately Deploy
- Fix: Snowtrooper Squad Data
- Fix: A couple CC urls
</Text>
</VerticalLayout>
</VerticalScrollView>
Expand Down

0 comments on commit 0c93b93

Please sign in to comment.