vscode extension recommends, lua extension settings, jupyter notebook for batch changes, mod info tweaks and global notes

This commit is contained in:
cardboardbread committed 2026-09-19 23:25:52 -04:00
1 parent c3446207af
commit 06b08ea102
4 files changed
+239 -11

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
{
"recommendations": [
"khahn.lua",
"ms-toolsai.jupyter",
"ms-toolsai.vscode-jupyter-cell-tags",
"ms-toolsai.jupyter-keymap",
"ms-toolsai.jupyter-renderers",
"ms-toolsai.vscode-jupyter-slideshow",
"ms-python.vscode-pylance",
"ms-python.python",
"ms-python.debugpy",
"ms-python.vscode-python-envs"
]
}
+24 -2
View File
@@ -5,6 +5,28 @@
"Sound", "Sound",
"UnitBlueprint", "UnitBlueprint",
"CreateSlider", "CreateSlider",
"WaitFor" "WaitFor",
] "moho"
],
"Lua.runtime.version": "Lua 5.1",
"Lua.runtime.path": [
"?.lua",
"?/init.lua",
"/?"
],
"Lua.completion.showWord": "Disable",
"Lua.runtime.special": {
"import": "require",
"doscript": "require"
},
"Lua.runtime.nonstandardSymbol": [
"!="
],
"Lua.completion.requireSeparator": "/",
"Lua.runtime.exportEnvDefault": true,
"Lua.runtime.plugin": "${3rd}/fa/plugin.lua",
"Lua.workspace.library": [
"${3rd}/fa/library"
],
"Lua.workspace.checkThirdParty": false
} }
+18 -9
View File
@@ -2,16 +2,25 @@ name = "Supreme Mech Commander 2"
uid = "6ceff22d-b021-44d2-86a1-638c2af4ef95" uid = "6ceff22d-b021-44d2-86a1-638c2af4ef95"
version = 1 version = 1
copyright = "GPL v3" copyright = "GPL v3"
description = "Supreme Mech Commander 2 v1" description = "Supreme Mech Commander 2"
author = "Kamisama171 and FuegoTigre and CardboardBread" author = "Kamisama171 and FuegoTigre and CardboardBread"
url = "https://example.com" -- url = "https://example.com"
icon = "/mods/Supreme Mech Commander 2/Mini_icon.jpg" icon = "/mods/Supreme Mech Commander 2/Mini_icon.jpg"
selectable = true -- selectable = true
enabled = false -- enabled = false
exclusive = false exclusive = false
ui_only = false ui_only = false
requires = {} -- requires = {}
requiresNames = {} -- requiresNames = {}
conflicts = {} -- conflicts = {}
before = {} -- before = {}
after = {} -- after = {}
-- Conversion Notes
--
-- 1 Hex in BT is 30 meters
-- BT Structure and Armor are summed for a Max HP value
-- One unit in SupCom is 19.525m, we'll round to 20m
-- Threat level is just BV, build cost is BV or BV*10
--
-- Damage conversions between BT and SupCom are 1:30, battlemechs have 30 times the HP as in tabletop
+183
View File
@@ -0,0 +1,183 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"id": "48125b87",
"metadata": {},
"outputs": [],
"source": [
"import glob\n",
"import re\n",
"import pprint\n",
"\n",
"files = glob.glob('units/*/*_unit.bp')\n",
"pprint.pprint(files)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "100d0de8",
"metadata": {},
"outputs": [],
"source": [
"for filename in files:\n",
" file = open(filename, 'r')\n",
" lines = file.readlines()\n",
"\n",
" for idx, line in enumerate(lines):\n",
" check = re.match(\"^(\\s*)(Health) = ([0-9]+),$\", line)\n",
" if check is not None:\n",
" white = check.group(1)\n",
" label = check.group(2)\n",
" value = check.group(3)\n",
" num = int(value)\n",
" lines[idx] = f\"{white}{label} = {num * 30}, -- ({value}) * 30\\n\"\n",
"\n",
" file.close()\n",
"\n",
" out = open(filename, 'w')\n",
" out.writelines(lines)\n",
" out.close()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "f1a0bbd2",
"metadata": {},
"outputs": [],
"source": [
"for filename in files:\n",
" file = open(filename, 'r')\n",
" lines = file.readlines()\n",
"\n",
" for idx, line in enumerate(lines):\n",
" maxcheck = re.match(\"^(\\s*)(MaxHealth) = ([0-9]+),$\", line)\n",
" if maxcheck is not None:\n",
" white = maxcheck.group(1)\n",
" label = maxcheck.group(2)\n",
" value = maxcheck.group(3)\n",
" num = int(value)\n",
" lines[idx] = f\"{white}{label} = {num * 30},\\n\"\n",
"\n",
" file.close()\n",
"\n",
" out = open(filename, 'w')\n",
" out.writelines(lines)\n",
" out.close()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "63e82c8d",
"metadata": {},
"outputs": [],
"source": [
"for filename in files:\n",
" file = open(filename, 'r')\n",
" lines = file.readlines()\n",
"\n",
" for idx, line in enumerate(lines):\n",
" typecheck = re.match(\"^(\\s*)(ArmorType) = '(\\w+)',$\", line)\n",
" if typecheck is not None:\n",
" white = typecheck.group(1)\n",
" value = typecheck.group(3)\n",
" lines[idx] = f\"{white}ArmorType = 'Normal', -- '{value}'\\n\"\n",
"\n",
" file.close()\n",
"\n",
" out = open(filename, 'w')\n",
" out.writelines(lines)\n",
" out.close()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "0e1a79be",
"metadata": {},
"outputs": [],
"source": [
"for filename in files:\n",
" file = open(filename, 'r')\n",
" lines = file.readlines()\n",
"\n",
" for idx, line in enumerate(lines):\n",
" damcheck = re.match(\"^(\\s*)(Damage) = (.+),$\", line)\n",
" if damcheck is not None:\n",
" dncheck = re.match(\"^(\\s*)(DisplayName) = '(.+)',$\", lines[idx + 3])\n",
" if dncheck is not None:\n",
" white = damcheck.group(1)\n",
" value = damcheck.group(3)\n",
" num = \"\"\n",
"\n",
" dn = dncheck.group(3)\n",
" if dn is \"Particle Projector Cannon\":\n",
" num = \"30, -- (10) * 30\"\n",
" if dn is \"Medium Laser\":\n",
" num = \"150, -- (5) * 30\"\n",
"\n",
" lines[idx] = f\"{white}Damage = {num},\\n\"\n",
"\n",
" file.close()\n",
"\n",
" out = open(filename, 'w')\n",
" out.writelines(lines)\n",
" out.close()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "2792e0e6",
"metadata": {},
"outputs": [],
"source": [
"for filename in files:\n",
" file = open(filename, 'r')\n",
" lines = file.readlines()\n",
"\n",
" for idx, line in enumerate(lines):\n",
" check = re.match(\"^(\\s*)(DamageType) = '(.+)',$\", line)\n",
" if check is not None and check.group(3) == \"BTCluster\":\n",
" white = check.group(1)\n",
" label = check.group(2)\n",
" second = re.match(\"^(\\s*)(DisplayName) = '(.+)',$\", lines[idx + 1])\n",
" if second is not None:\n",
" if second.group(3) == \"Long Range Missles\" or second.group(3) == \"Short Range Missles\":\n",
" lines[idx] = f\"{white}{label} = 'BTClusterMissile',\\n\"\n",
" if second.group(3) == \"LB 10-X Autocannon\" or second.group(3) == \"LBX5_rounds\":\n",
" lines[idx] = f\"{white}{label} = 'BTClusterBallistic',\\n\"\n",
" file.close()\n",
"\n",
" out = open(filename, 'w')\n",
" out.writelines(lines)\n",
" out.close()"
]
}
],
"metadata": {
"kernelspec": {
"display_name": ".venv (3.11.3)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.3"
}
},
"nbformat": 4,
"nbformat_minor": 5
}