Skip to content

Commit

Permalink
v2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
bellyillish committed Dec 22, 2023
1 parent 63783f2 commit d408be0
Show file tree
Hide file tree
Showing 21 changed files with 814 additions and 672 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ DART is customizable via a config file that allows you to move and scale various
## Installation:
Install with MO2. Choose "00 Dart Core (Required)" plus any/all fixes during installation. The safest place to install is at the bottom of load order, but in most cases priority won't matter.

- Get v2.0.1 here: https://discord.com/channels/912320241713958912/1169311822139105380/1184663998109597778
- GitHub: https://github.com/bellyillish/dart
- Discord: https://discord.com/channels/912320241713958912/1169311822139105380/1169311822139105380

Expand Down
70 changes: 32 additions & 38 deletions gamedata/scripts/dart_config.script
Original file line number Diff line number Diff line change
@@ -1,65 +1,59 @@
local Dart = Dart_core
local config = dart_core.config


-- moves HUD elements [n] pixels closer to the center of the screen
Dart.config.safezone = 0
config.safezone = 0


-- move an element by {x, y} pixels
-- positive values move down and to the right
Dart.config.ammoWheel.offset = {0, 0}
Dart.config.bhs.offset = {8, 0}
Dart.config.companionList.offset = {-12, -96}
Dart.config.companionWheel.offset = {0, 0}
Dart.config.messages.offset = {0, -12}
Dart.config.minimap.offset = {0, 0}
Dart.config.patches.offset = {12, 0}
Dart.config.statusIcons.offset = {-4, -8}
config.ammoWheel.offset = {0, 0}
config.bhs.offset = {8, 0}
config.companionList.offset = {-12, -96}
config.companionWheel.offset = {0, 0}
config.messages.offset = {0, -12}
config.minimap.offset = {0, 0}
config.patches.offset = {12, 0}
config.statusIcons.offset = {-4, -8}


-- make an element [n] times its normal size
-- results may vary (e.g. text never scales)
Dart.config.ammoWheel.scale = 1
Dart.config.bhs.scale = 1
Dart.config.companionList.scale = 1
Dart.config.companionWheel.scale = 1
Dart.config.inventory.scale = 1 -- scales icons
Dart.config.minimap.scale = 1
Dart.config.messages.scale = 1
Dart.config.patches.scale = 1.25 -- scales patches
Dart.config.statusIcons.scale = 0.75


-- scales an element relative to current screen size
-- (the element gets smaller as the screen size increases)
-- this exists mostly for the companion list which does this anyway
-- results will vary depending on the element
Dart.config.ammoWheel.autoscale = false
Dart.config.bhs.autoscale = false
Dart.config.companionList.autoscale = true
Dart.config.companionWheel.autoscale = false
Dart.config.inventory.autoscale = false
Dart.config.messages.autoscale = false
Dart.config.minimap.autoscale = false
Dart.config.patches.autoscale = false
Dart.config.statusIcons.autoscale = false
config.ammoWheel.scale = 1
config.bhs.scale = 1
config.companionList.scale = 1
config.companionWheel.scale = 1
config.inventory.scale = 1 -- scales icons
config.minimap.scale = 1
config.messages.scale = 1
config.patches.scale = 1.25 -- scales patches
config.statusIcons.scale = 1


-- scales the space between inventory icons
-- I've seen screwy things like missing icons so use with caution
-- I've you have icon issues you can try making this '0'
Dart.config.inventory.padScale = 1
config.inventory.padScale = 1


-- move the minimap to another part of the screen
-- e.g. {"CENTER", "BOTTOM"}
config.minimap.align = nil


-- adjust the transparency of the minimap (0-255)
-- nil value will use the value in the XML file
Dart.config.minimap.alpha = nil
config.minimap.alpha = nil


-- move the minimap clock by {x, y} pixels
Dart.config.minimap.clockOffset = {0, 0}
config.minimap.clockOffset = {0, 0}


-- use cicular ammo wheel (instead of the triangle)
-- probably better to turn off if you're using a mod that skins the UI/wheel
Dart.config.ammoWheel.roundWheel = true
config.ammoWheel.roundWheel = true


-- controls the spacing between status icons
config.statusIcons.spacing = 2
42 changes: 27 additions & 15 deletions gamedata/scripts/dart_core.script
Original file line number Diff line number Diff line change
@@ -1,41 +1,36 @@
-- default config
config = {
loglimit = 10,
logLimit = 10,
safezone = 0,

ammoWheel = {
anchor = {"CENTER", "CENTER"},
offset = {0, 0},
autoscale = false,
scale = 1,
roundWheel = true,
},

bhs = {
anchor = {"LEFT", "BOTTOM"},
offset = {8, 0},
autoscale = false,
safezone = true,
scale = 1,
},

companionList = {
anchor = {"RIGHT", "BOTTOM"},
offset = {-12, 96},
autoscale = true,
safezone = true,
scale = 1,
},

companionWheel = {
anchor = {"CENTER", "CENTER"},
offset = {0, 0},
autoscale = false,
scale = 1,
},

inventory = {
autoscale = false,
scale = 1,
padScale = 1,
},
Expand All @@ -45,25 +40,23 @@ config = {
messages = {
anchor = {"LEFT", "BOTTOM"},
offset = {0, -12},
autoscale = false,
safezone = true,
scale = 1,
},

minimap = {
anchor = {"RIGHT", "BOTTOM"},
offset = {0, 0},
autoscale = false,
safezone = true,
scale = 1,
align = nil,
alpha = nil,
clockOffset = {0, 0},
},

patches = {
anchor = {"LEFT", "BOTTOM"},
offset = {12, 0},
autoscale = false,
safezone = true,
scale = 1.25,
},
Expand All @@ -73,14 +66,26 @@ config = {
statusIcons = {
anchor = {"LEFT", "BOTTOM"},
offset = {-4, -8},
autoscale = false,
safezone = true,
scale = 0.75,
scale = 1,
spacing = 2,
},
}

-- holds state to share data across files
state = {}
state = {
ammoWheel = {},
bhs = {},
companionList = {},
companionWheel = {},
inventory = {},
markers = {},
messages = {},
minimap = {},
patches = {},
scopes = {},
statusIcons = {},
}

-- consts
baseWidth = 1024
Expand All @@ -104,7 +109,6 @@ defaultScaleSettings = {
align = nil,
bounds = screenBounds,
offset = {0, 0},
autoscale = false,
safezone = false,
scale = 1,
}
Expand All @@ -114,16 +118,24 @@ xmlFileSuffixes = {
[""] = ratio16x9,
["16"] = ratio16x9,
["21"] = ratio21x9,
["32"] = ratio32x9,
}

-- override aspect ratios for these files
xmlAspectRatios = {
["ui\\ui_hud.xml"] = ratio4x3,
}

-- replace entire files with files on right

-- replace files on left with ones on right
xmlFileReplacements = {
["ui\\zone_map_21.xml"] = "ui\\zone_map_16.xml",
["ui\\scopes_21.xml"] = "ui\\scopes_16.xml",
}


-- template for missing left/right scope fillers
scopeFillerTemplate = [[
<auto_static x="0" y="0" width="0" height="768" stretch="1">
<texture>%s</texture>
</auto_static>
]]

0 comments on commit d408be0

Please sign in to comment.