Compare commits

..
3 Commits
Author SHA1 Message Date
iamBadgers 9d17f5f07b initial cyberware page 2026-11-09 21:57:06 -08:00
iamBadgers a9e25a0da4 add cyberware route 2026-11-01 21:41:12 -08:00
iamBadgers 9298ebcd3e get ammo and gear tables working 2026-11-01 21:01:00 -08:00
25 changed files with 1275 additions and 371 deletions

No files matched your search

+35 -27
View File
@@ -1,29 +1,30 @@
import { Health } from "./health"; import { Health } from "./health";
const baseUrl = typeof window !== 'undefined' const baseUrl =
typeof window !== "undefined"
? window.location.origin ? window.location.origin
: process.env.VITE_VERCEL_URL || 'http://localhost:5173' // Fallback for your server env : process.env.VITE_VERCEL_URL || "http://localhost:5173"; // Fallback for your server env
const st = await fetch(`${baseUrl}/characters/collateral/stats.json`) const st = await fetch(`${baseUrl}/characters/collateral/stats.json`).then(
.then(r => r.json()); (r) => r.json(),
);
const sk = await const sk = await fetch(`${baseUrl}/characters/collateral/skills.json`).then(
fetch(`${baseUrl}/characters/collateral/skills.json`) (r) => r.json(),
.then(r => r.json()); );
const dt = await const dt = await fetch(`${baseUrl}/characters/collateral/details.json`).then(
fetch(`${baseUrl}/characters/collateral/details.json`) (r) => r.json(),
.then(r => r.json()); );
function RockerRole({rank}) {
function RockerRole({ rank }) {
const topDiv = { const topDiv = {
display: "flex", display: "flex",
flexDirection: "column", flexDirection: "column",
marginTop: "10px", marginTop: "10px",
paddingTop: "10px", paddingTop: "10px",
borderTop: "1px solid var(--color-border-default)" borderTop: "1px solid var(--color-border-default)",
} };
if (rank > 0) { if (rank > 0) {
return ( return (
@@ -34,18 +35,17 @@ function RockerRole({rank}) {
</main> </main>
); );
} }
return (<main />); return <main />;
} }
function TechRole({rank, fabrication, upgrade, field}) { function TechRole({ rank, fabrication, upgrade, field }) {
const topDiv = { const topDiv = {
display: "flex", display: "flex",
flexDirection: "column", flexDirection: "column",
marginTop: "10px", marginTop: "10px",
paddingTop: "10px", paddingTop: "10px",
borderTop: "1px solid var(--color-border-default)" borderTop: "1px solid var(--color-border-default)",
} };
if (rank > 0) { if (rank > 0) {
return ( return (
@@ -59,30 +59,38 @@ function TechRole({rank, fabrication, upgrade, field}) {
</main> </main>
); );
} }
return (<main />); return <main />;
} }
export function Details() { export function Details() {
return ( return (
<main style={{display: "flex", flexDirection:"column"}}> <main style={{ display: "flex", flexDirection: "column" }}>
<div className="cyber-card"> <div className="cyber-card">
<div className="cyber-card__body flex flex-col"> <div className="cyber-card__body flex flex-col">
<div className="flex"> <div className="flex">
<img style={{ width: "100%" }} src={`${baseUrl}/characters/collateral/portrait.jpg`}></img> <img
<TechRole rank={dt.role_one_rank} fabrication={dt.fabrication_exp} upgrade={dt.upgrade_exp} field={dt.field_exp}/> style={{ width: "100%" }}
src={`${baseUrl}/characters/collateral/portrait.jpg`}
></img>
<TechRole
rank={dt.role_one_rank}
fabrication={dt.fabrication_exp}
upgrade={dt.upgrade_exp}
field={dt.field_exp}
/>
<RockerRole rank={dt.role_two_rank} /> <RockerRole rank={dt.role_two_rank} />
</div> </div>
<br /> <br />
</div> </div>
</div> </div>
<span style={{flexGrow:"1"}}/> <span style={{ flexGrow: "1" }} />
<div className="cyber-card" style={{marginTop: "20px", flexGrow:1}}> <div className="cyber-card" style={{ marginTop: "20px", flexGrow: 1 }}>
<div className="cyber-card__body"> <div className="cyber-card__body">
<Health /> <Health />
</div> </div>
</div> </div>
</main > </main>
) );
} }
+16 -13
View File
@@ -1,27 +1,30 @@
import { useState, useEffect } from 'react' import { useState, useEffect } from "react";
const baseUrl = typeof window !== 'undefined' const baseUrl =
typeof window !== "undefined"
? window.location.origin ? window.location.origin
: process.env.VITE_VERCEL_URL || 'http://localhost:5173'; // Fallback for your server env : process.env.VITE_VERCEL_URL || "http://localhost:5173"; // Fallback for your server env
const st = await fetch(`${baseUrl}/characters/collateral/stats.json`) const st = await fetch(`${baseUrl}/characters/collateral/stats.json`).then(
.then(r => r.json()); (r) => r.json(),
);
const sk = await const sk = await fetch(`${baseUrl}/characters/collateral/skills.json`).then(
fetch(`${baseUrl}/characters/collateral/skills.json`) (r) => r.json(),
.then(r => r.json()); );
export function Health() { export function Health() {
const [stats, setStats] = useState(st); const [stats, setStats] = useState(st);
const [skills, setSkills] = useState(sk) const [skills, setSkills] = useState(sk);
return ( return (
<main> <main>
<div style={{display: "flex", flexDirection: "column"}}> <div style={{ display: "flex", flexDirection: "column" }}>
<span>Health: {stats.hp} / {stats.maxhp}</span> <span>
Health: {stats.hp} / {stats.maxhp}
</span>
<span>Seriously Wounded: {stats.seriouslywounded}</span> <span>Seriously Wounded: {stats.seriouslywounded}</span>
</div> </div>
</main> </main>
) );
} }
+1 -1
View File
@@ -5,5 +5,5 @@ export function Humanity() {
<span>30</span> <span>30</span>
<span>44</span> <span>44</span>
</main> </main>
) );
} }
+18 -14
View File
@@ -1,20 +1,21 @@
import { useState, useEffect } from 'react' import { useState, useEffect } from "react";
const baseUrl = typeof window !== 'undefined' const baseUrl =
typeof window !== "undefined"
? window.location.origin ? window.location.origin
: process.env.VITE_VERCEL_URL || 'http://localhost:5173'; // Fallback for your server env : process.env.VITE_VERCEL_URL || "http://localhost:5173"; // Fallback for your server env
const st = await fetch(`${baseUrl}/characters/collateral/stats.json`) const st = await fetch(`${baseUrl}/characters/collateral/stats.json`).then(
.then(r => r.json()); (r) => r.json(),
);
const sk = await const sk = await fetch(`${baseUrl}/characters/collateral/skills.json`).then(
fetch(`${baseUrl}/characters/collateral/skills.json`) (r) => r.json(),
.then(r => r.json()); );
export function Stats() { export function Stats() {
const [stats, setStats] = useState(st); const [stats, setStats] = useState(st);
const [skills, setSkills] = useState(sk) const [skills, setSkills] = useState(sk);
return ( return (
<main> <main>
@@ -52,7 +53,9 @@ export function Stats() {
</tr> </tr>
<tr> <tr>
<td>LUCK</td> <td>LUCK</td>
<td>{stats.luck}/{stats.luck}</td> <td>
{stats.luck}/{stats.luck}
</td>
</tr> </tr>
<tr> <tr>
<td>MOVE</td> <td>MOVE</td>
@@ -64,11 +67,13 @@ export function Stats() {
</tr> </tr>
<tr> <tr>
<td>EMP</td> <td>EMP</td>
<td>{stats.emp}/{stats.emp}</td> <td>
{stats.emp}/{stats.emp}
</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</main > </main>
); );
} }
@@ -131,5 +136,4 @@ const resources = [
</svg> </svg>
), ),
}, },
]; ];
+39 -27
View File
@@ -1,14 +1,13 @@
import type { ReactElement } from 'react' import type { ReactElement } from "react";
const baseUrl = typeof window !== 'undefined' const baseUrl =
typeof window !== "undefined"
? window.location.origin ? window.location.origin
: process.env.VITE_VERCEL_URL || 'http://localhost:5173' // Fallback for your server env : process.env.VITE_VERCEL_URL || "http://localhost:5173"; // Fallback for your server env
const wandr = await fetch(`${baseUrl}/characters/collateral/weaponsandarmor.json`) const wandr = await fetch(
.then(r => { `${baseUrl}/characters/collateral/weaponsandarmor.json`,
console.log(r) ).then((r) => r.json());
return r.json()
});
type DisplayArmor = { type DisplayArmor = {
displayheadarmor: string; displayheadarmor: string;
@@ -17,7 +16,7 @@ type DisplayArmor = {
displaybodyarmor: number; displaybodyarmor: number;
displaybodyarmorsp: number; displaybodyarmorsp: number;
displaybodyarmorpenalty: number; displaybodyarmorpenalty: number;
} };
type DisplayWeapon = { type DisplayWeapon = {
name: string; name: string;
@@ -25,52 +24,58 @@ type DisplayWeapon = {
magazine: number; magazine: number;
damage: string; damage: string;
rof: number; rof: number;
} };
function Armor({ armor }: { armor: DisplayArmor }): ReactElement { function Armor({ armor }: { armor: DisplayArmor }): ReactElement {
return ( return (
<table className="cyber-table" style={{ fontSize: "10px" }}> <table className="cyber-table" style={{ fontSize: "10px" }}>
<tbody> <tbody>
<tr style={{ lineHeight: 1 }}> <tr style={{ lineHeight: 1 }}>
<td><b>Head: {armor.displayheadarmor}</b></td> <td>
<b>Head: {armor.displayheadarmor}</b>
</td>
<td>SP: {armor.displayheadarmorsp}</td> <td>SP: {armor.displayheadarmorsp}</td>
<td>AP: {armor.dislpayheadarmorpenalty}</td> <td>AP: {armor.dislpayheadarmorpenalty}</td>
</tr> </tr>
<tr style={{ lineHeight: 1 }}> <tr style={{ lineHeight: 1 }}>
<td><b>Body: {armor.displaybodyarmor}</b></td> <td>
<b>Body: {armor.displaybodyarmor}</b>
</td>
<td>SP: {armor.displaybodyarmorsp}</td> <td>SP: {armor.displaybodyarmorsp}</td>
<td>AP: {armor.displaybodyarmorpenalty}</td> <td>AP: {armor.displaybodyarmorpenalty}</td>
</tr> </tr>
<tr style={{ lineHeight: 1 }}> <tr style={{ lineHeight: 1 }}>
<td><b>Shield:</b></td> <td>
<b>Shield:</b>
</td>
<td>HP:</td> <td>HP:</td>
<td>AP:</td> <td>AP:</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
) );
} }
function Weapons({ weapons }: { weapons: Array<DisplayWeapon> }): ReactElement { function Weapons({ weapons }: { weapons: Array<DisplayWeapon> }): ReactElement {
const rows: ReactElement[] = weapons.map((weapon, index) => { const rows: ReactElement[] = weapons.map((weapon, index) => {
return ( return (
<tr key={index}> <tr key={index}>
<td><b>{weapon.name}</b></td> <td>
<b>{weapon.name}</b>
</td>
<td>MAG: {weapon.magazine}</td> <td>MAG: {weapon.magazine}</td>
<td>SMG: {weapon.damage}</td> <td>SMG: {weapon.damage}</td>
<td>ROF: {weapon.rof}</td> <td>ROF: {weapon.rof}</td>
<td>{weapon.features.join(' | ')}</td> <td>{weapon.features.join(" | ")}</td>
</tr> </tr>
) );
}); });
return ( return (
<table className="cyber-table" style={{ fontSize: "10px" }}> <table className="cyber-table" style={{ fontSize: "10px" }}>
<tbody> <tbody>{rows}</tbody>
{rows}
</tbody>
</table> </table>
) );
} }
const card = { const card = {
@@ -79,17 +84,24 @@ const card = {
paddingLeft: "15px", paddingLeft: "15px",
paddingRight: "15px", paddingRight: "15px",
paddingBottom: "10px", paddingBottom: "10px",
fontWeight: "10px" fontWeight: "10px",
} };
const header = { const header = {
marginBottom: "5px", marginBottom: "5px",
paddingBottom: "15px" paddingBottom: "15px",
} };
export function WeaponsAndArmor() { export function WeaponsAndArmor() {
return ( return (
<div style={{ display: "flex", flexDirection: "row", justifyContent:"space-between", height: "230px" }}> <div
style={{
display: "flex",
flexDirection: "row",
justifyContent: "space-between",
height: "230px",
}}
>
<div className="cyber-card" style={card}> <div className="cyber-card" style={card}>
<div className="cyber-card__header" style={header}> <div className="cyber-card__header" style={header}>
<div>Armor</div> <div>Armor</div>
@@ -103,5 +115,5 @@ export function WeaponsAndArmor() {
<Weapons weapons={wandr.displayweapons} /> <Weapons weapons={wandr.displayweapons} />
</div> </div>
</div> </div>
) );
} }
+26
View File
@@ -38,6 +38,32 @@ export function Layout({ children }: { children: React.ReactNode }) {
</head> </head>
<body> <body>
<nav className="cyber-nav">
<span className="cyber-nav__brand">Collateral</span>
<ul className="cyber-nav__links">
<li>
<a href="/" className="cyber-nav__link cyber-nav__link--active">
Stats and Skills
</a>
</li>
<li>
<a href="/cyber" className="cyber-nav__link">
Cyber
</a>
</li>
<li>
<a
href="/gear"
className="cyber-nav__link cyber-nav__link--active"
>
Gear
</a>
</li>
<li>
<a className="cyber-nav__link">Loadouts</a>
</li>
</ul>
</nav>
{children} {children}
<ScrollRestoration /> <ScrollRestoration />
<Scripts /> <Scripts />
+6 -2
View File
@@ -1,3 +1,7 @@
import { type RouteConfig, index } from "@react-router/dev/routes"; import { type RouteConfig, index, route } from "@react-router/dev/routes";
export default [index("routes/home.tsx")] satisfies RouteConfig; export default [
index("routes/statsandskills.tsx"),
route("gear", "routes/gear.tsx"),
route("cyber", "routes/cyberware.tsx"),
] satisfies RouteConfig;
+147
View File
@@ -0,0 +1,147 @@
import { useState, useEffect } from "react";
import type { Route } from "./+types/home";
export function meta({}: Route.MetaArgs) {
return [
{ title: "Collateral - Cyberware" },
{ name: "description", content: "Stats and Skills" },
];
}
const baseUrl =
typeof window !== "undefined"
? window.location.origin
: process.env.VITE_VERCEL_URL || "http://localhost:5173"; // Fallback for your server env
const c = await fetch(`${baseUrl}/characters/collateral/cyberware.json`).then(
(r) => r.json(),
);
type CyberBodyData = {
neural: FoundationData;
audio: FoundationData;
lefteye: FoundationData;
righteye: FoundationData;
leftarm: FoundationData;
rightarm: FoundationData;
leftleg: FoundationData;
rightleg: FoundationData;
internal: CyberData[];
external: CyberData[];
borgware: CyberData[];
};
type FoundationData = {
name: string;
slots: number;
upgraded: boolean;
hl: number;
contents: CyberData[];
};
type CyberData = {
name: string;
description: string;
hl: number;
};
function FoundationHeader(): ReactElement {
return (
<thead>
<tr>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
);
}
function FoundationRow({
cyber,
}: {
cyber: CyberData | undefined;
}): ReactElement {
if (!cyber) {
return (
<tr>
<td>--</td>
<td>--</td>
</tr>
);
}
const upgrade = !cyber.upgraded ? (
<></>
) : (
<tr>
<td colspan="2">
{cyber.upgraded.name}: {cyber.upgraded.description}
</td>
</tr>
);
return (
<>
<tr>
<td>{cyber.name}</td>
<td>{cyber.description}</td>
</tr>
</>
);
}
function Foundation({
foundation,
}: {
foundation: FoundationData;
}): ReactElement {
const rows: ReactElement[] = Array(foundation.slots);
for (let i = 0; i < foundation.slots; i++) {
rows[i] = <FoundationRow key={i} cyber={foundation.contents[i]} />;
}
return (
<>
<div>{foundation.name}</div>
<table className="cyber-table">
<FoundationHeader />
<tbody>{rows}</tbody>
</table>
</>
);
}
const rowStyle = {
display: "flex",
flexDirection: "column",
width: "25%",
};
export default function Cyberware() {
const [cyber, setCyber] = useState(c);
return (
<div style={{ display: "flex", flexDirection: "row" }}>
<div style={rowStyle}>
<Foundation foundation={cyber.lefteye} />
<Foundation foundation={cyber.leftarm} />
<Foundation foundation={cyber.leftleg} />
</div>
<div style={rowStyle}>
<Foundation foundation={cyber.neural} />
<Foundation foundation={cyber.audio} />
</div>
<div style={rowStyle}>
<Foundation foundation={cyber.righteye} />
<Foundation foundation={cyber.rightarm} />
<Foundation foundation={cyber.rightleg} />
</div>
<div style={rowStyle}>
<Foundation foundation={cyber.internal} />
<Foundation foundation={cyber.external} />
<Foundation foundation={cyber.borgware} />
</div>
</div>
);
}
+135
View File
@@ -0,0 +1,135 @@
import { useState, useEffect } from "react";
import type { Route } from "./+types/home";
export function meta({}: Route.MetaArgs) {
return [
{ title: "Collateral - Gear" },
{ name: "description", content: "Gear" },
];
}
const baseUrl =
typeof window !== "undefined"
? window.location.origin
: process.env.VITE_VERCEL_URL || "http://localhost:5173"; // Fallback for your server env
const g = await fetch(`${baseUrl}/characters/collateral/gear.json`).then((r) =>
r.json(),
);
type AmmunitionData = {
caliber: string;
type: string;
count: number;
};
type GearData = {
name: string;
description: string;
count: number;
contents: GearData[];
};
function AmmunitionRow({ ammo }: { ammo: AmunitionData }) {
return (
<tr>
<td>{ammo.caliber}</td>
<td>{ammo.type}</td>
<td>{ammo.count}x</td>
</tr>
);
}
function AmmunitionHeader() {
return (
<thead>
<tr>
<th>Caliber</th>
<th>Type</th>
<th>Count</th>
</tr>
</thead>
);
}
function Ammunition({ ammo }: { ammo: AmmunitionData[] }) {
const ammoRows: ReactElement[] = ammo.map((entry, index) => (
<AmmunitionRow key={index} ammo={entry} />
));
return (
<table className="cyber-table">
<AmmunitionHeader />
<tbody>{ammoRows}</tbody>
</table>
);
}
function InventoryHeader(): ReactElement {
return (
<thead>
<tr>
<th>Name</th>
<th>Description</th>
<th>Count</th>
</tr>
</thead>
);
}
function InventoryWithDepth(name: string, depth: number): string {
if (depth === 0) {
return name;
}
return "|" + "-".repeat(depth - 1) + "> " + name;
}
function InventoryRow({
gear,
depth,
}: {
gear: GearData;
depth: number;
}): ReactElement {
const contents = gear.contents
? gear.contents.map((entry, index) => (
<InventoryRow gear={entry} key={index} depth={depth + 1} />
))
: [];
return (
<>
<tr>
<td>{InventoryWithDepth(gear.name, depth)}</td>
<td>{InventoryWithDepth(gear.description, depth)}</td>
<td>{gear.count}x</td>
</tr>
{contents}
</>
);
}
function Inventory({ gear }: { gear: GearData[] }) {
const inventoryRows = gear.map((entry, index) => (
<InventoryRow key={index} gear={entry} depth={0} />
));
return (
<table className="cyber-table">
<InventoryHeader />
<tbody>{inventoryRows}</tbody>
</table>
);
}
export default function Gear() {
const [gear] = useState(g);
return (
<main>
<Ammunition ammo={gear.ammo} />
<Inventory gear={gear.gear} />
</main>
);
}
-79
View File
@@ -1,79 +0,0 @@
import type { Route } from "./+types/home";
import { Awareness } from "../skills/awareness";
import { Body } from "../skills/body";
import { Control } from "../skills/control";
import { EducationTop, EducationBottom } from "../skills/education"
import { Fighting } from "../skills/fighting"
import { Performance } from "../skills/performance"
import { RangedTop, RangedBottom } from "../skills/ranged"
import { Social } from "../skills/social"
import { Technique } from "../skills/technique"
import { Details } from "../details/details"
import { Stats } from "../details/stats"
import { WeaponsAndArmor } from "../details/weaponsandarmor"
export function meta({ }: Route.MetaArgs) {
return [
{ title: "New React Router App" },
{ name: "description", content: "Welcome to React Router!" },
];
}
function SkillTable() {
return (
<div style={{display: "flex", flexDirection: "row"}}>
<div style={{flexGrow: 1}} >
<Awareness />
<Body />
<Control />
<EducationTop />
</div>
<div style={{flexGrow: 1}} >
<EducationBottom />
<Fighting />
<Performance />
<RangedTop />
</div>
<div style={{flexGrow: 1}} >
<RangedBottom />
<Social />
<Technique />
</div>
</div>
)
}
export default function Home() {
return (
<main style={{display:"flex", flexDirection:"column", height:"100vh"}}>
<nav className="cyber-nav">
<span className="cyber-nav__brand">Collateral</span>
<ul className="cyber-nav__links">
<li><span className="cyber-nav__link cyber-nav__link--active">Stats and Skills</span></li>
<li><span className="cyber-nav__link">Cyber</span></li>
<li><span className="cyber-nav__link">Gear</span></li>
<li><span className="cyber-nav__link">Loadouts</span></li>
</ul>
</nav>
<div style={{position:"relative", height:"100%", margin:"10px"}}>
<div style={{display:"flex", flexDirection:"row", justifyContent:"space-evenly", position:"absolute", height:"100%"}}>
<div style={{width: "400px", height: "100%"}}>
<Details />
</div>
<div style={{overflow:"auto"}}><Stats /></div>
<div style={{display:"flex", flexDirection:"column"}}>
<div style={{overflow:"auto"}}><SkillTable /></div>
<div><WeaponsAndArmor /></div>
</div>
</div>
</div>
</main>
);
}
View File
Whitespace-only changes.
+80
View File
@@ -0,0 +1,80 @@
import type { Route } from "./+types/home";
import { Awareness } from "../skills/awareness";
import { Body } from "../skills/body";
import { Control } from "../skills/control";
import { EducationTop, EducationBottom } from "../skills/education";
import { Fighting } from "../skills/fighting";
import { Performance } from "../skills/performance";
import { RangedTop, RangedBottom } from "../skills/ranged";
import { Social } from "../skills/social";
import { Technique } from "../skills/technique";
import { Details } from "../details/details";
import { Stats } from "../details/stats";
import { WeaponsAndArmor } from "../details/weaponsandarmor";
export function meta({}: Route.MetaArgs) {
return [
{ title: "Collateral - Stats and Skills" },
{ name: "description", content: "Stats and Skills" },
];
}
function SkillTable() {
return (
<div style={{ display: "flex", flexDirection: "row" }}>
<div style={{ flexGrow: 1 }}>
<Awareness />
<Body />
<Control />
<EducationTop />
</div>
<div style={{ flexGrow: 1 }}>
<EducationBottom />
<Fighting />
<Performance />
<RangedTop />
</div>
<div style={{ flexGrow: 1 }}>
<RangedBottom />
<Social />
<Technique />
</div>
</div>
);
}
export default function StatsAndSkills() {
return (
<main style={{ display: "flex", flexDirection: "column", height: "100vh" }}>
<div style={{ position: "relative", height: "100%", margin: "10px" }}>
<div
style={{
display: "flex",
flexDirection: "row",
justifyContent: "space-evenly",
position: "absolute",
height: "100%",
width: "100%",
}}
>
<div style={{ width: "400px", height: "100%" }}>
<Details />
</div>
<div style={{ overflow: "auto" }}>
<Stats />
</div>
<div style={{ display: "flex", flexDirection: "column" }}>
<div style={{ overflow: "auto" }}>
<SkillTable />
</div>
<div>
<WeaponsAndArmor />
</div>
</div>
</div>
</div>
</main>
);
}
+40 -19
View File
@@ -1,34 +1,55 @@
import { useState, useEffect } from 'react' import { useState, useEffect } from "react";
import { SkillHeader, SkillRow } from './skill' import { SkillHeader, SkillRow } from "./skill";
const baseUrl = typeof window !== 'undefined' const baseUrl =
typeof window !== "undefined"
? window.location.origin ? window.location.origin
: process.env.VITE_VERCEL_URL || 'http://localhost:5173' // Fallback for your server env : process.env.VITE_VERCEL_URL || "http://localhost:5173"; // Fallback for your server env
const st = await fetch(`${baseUrl}/characters/collateral/stats.json`) const st = await fetch(`${baseUrl}/characters/collateral/stats.json`).then(
.then(r => r.json()); (r) => r.json(),
);
const sk = await const sk = await fetch(`${baseUrl}/characters/collateral/skills.json`).then(
fetch(`${baseUrl}/characters/collateral/skills.json`) (r) => r.json(),
.then(r => r.json()); );
export function Awareness() { export function Awareness() {
const [stats, setStats] = useState(st);
const [stats, setStats] = useState(st) const [skills, setSkills] = useState(sk);
const [skills, setSkills] = useState(sk)
return ( return (
<main> <main>
<table className="cyber-table"> <table className="cyber-table">
<SkillHeader skillGroup="AWARENES SKILLS"/> <SkillHeader skillGroup="AWARENES SKILLS" />
<tbody> <tbody>
<SkillRow skillName="CONCENCTRATION" skillRank={skills.concentration} stat={stats.will} /> <SkillRow
<SkillRow skillName="CONCEAL/REVEAL" skillRank={skills.cro} stat={stats.int} /> skillName="CONCENCTRATION"
<SkillRow skillName="LIP READING" skillRank={skills.lipreading} stat={stats.int} /> skillRank={skills.concentration}
<SkillRow skillName="PERCEPTION" skillRank={skills.perception} stat={stats.int} /> stat={stats.will}
<SkillRow skillName="TRACKING" skillRank={skills.tracking} stat={stats.int} /> />
<SkillRow
skillName="CONCEAL/REVEAL"
skillRank={skills.cro}
stat={stats.int}
/>
<SkillRow
skillName="LIP READING"
skillRank={skills.lipreading}
stat={stats.int}
/>
<SkillRow
skillName="PERCEPTION"
skillRank={skills.perception}
stat={stats.int}
/>
<SkillRow
skillName="TRACKING"
skillRank={skills.tracking}
stat={stats.int}
/>
</tbody> </tbody>
</table> </table>
</main> </main>
) );
} }
+44 -19
View File
@@ -1,35 +1,60 @@
import { useState, useEffect } from 'react' import { useState, useEffect } from "react";
import { SkillHeader, SkillRow } from './skill' import { SkillHeader, SkillRow } from "./skill";
const baseUrl = typeof window !== 'undefined' const baseUrl =
typeof window !== "undefined"
? window.location.origin ? window.location.origin
: process.env.VITE_VERCEL_URL || 'http://localhost:5173' // Fallback for your server env : process.env.VITE_VERCEL_URL || "http://localhost:5173"; // Fallback for your server env
const st = await fetch(`${baseUrl}/characters/collateral/stats.json`) const st = await fetch(`${baseUrl}/characters/collateral/stats.json`).then(
.then(r => r.json()); (r) => r.json(),
);
const sk = await const sk = await fetch(`${baseUrl}/characters/collateral/skills.json`).then(
fetch(`${baseUrl}/characters/collateral/skills.json`) (r) => r.json(),
.then(r => r.json()); );
export function Body() { export function Body() {
const [stats, setStats] = useState(st);
const [stats, setStats] = useState(st) const [skills, setSkills] = useState(sk);
const [skills, setSkills] = useState(sk)
return ( return (
<main> <main>
<table className="cyber-table"> <table className="cyber-table">
<SkillHeader skillGroup="BODY SKILLS" /> <SkillHeader skillGroup="BODY SKILLS" />
<tbody> <tbody>
<SkillRow skillName="ATHLETICS" skillRank={skills.athletics} stat={stats.dex} /> <SkillRow
<SkillRow skillName="CONTOTION" skillRank={skills.contortion} stat={stats.dex} /> skillName="ATHLETICS"
<SkillRow skillName="DANCE" skillRank={skills.dance} stat={stats.dex} /> skillRank={skills.athletics}
<SkillRow skillName="ENDURANCE" skillRank={skills.endurance} stat={stats.will} /> stat={stats.dex}
<SkillRow skillName="RESIST T/D" skillRank={skills.stealth} stat={stats.will} /> />
<SkillRow skillName="STEALTH" skillRank={skills.stealth} stat={stats.dex} /> <SkillRow
skillName="CONTOTION"
skillRank={skills.contortion}
stat={stats.dex}
/>
<SkillRow
skillName="DANCE"
skillRank={skills.dance}
stat={stats.dex}
/>
<SkillRow
skillName="ENDURANCE"
skillRank={skills.endurance}
stat={stats.will}
/>
<SkillRow
skillName="RESIST T/D"
skillRank={skills.stealth}
stat={stats.will}
/>
<SkillRow
skillName="STEALTH"
skillRank={skills.stealth}
stat={stats.dex}
/>
</tbody> </tbody>
</table> </table>
</main> </main>
) );
} }
+34 -17
View File
@@ -1,33 +1,50 @@
import { useState, useEffect } from 'react' import { useState, useEffect } from "react";
import { SkillHeader, SkillRow } from './skill' import { SkillHeader, SkillRow } from "./skill";
const baseUrl = typeof window !== 'undefined' const baseUrl =
typeof window !== "undefined"
? window.location.origin ? window.location.origin
: process.env.VITE_VERCEL_URL || 'http://localhost:5173' // Fallback for your server env : process.env.VITE_VERCEL_URL || "http://localhost:5173"; // Fallback for your server env
const st = await fetch(`${baseUrl}/characters/collateral/stats.json`) const st = await fetch(`${baseUrl}/characters/collateral/stats.json`).then(
.then(r => r.json()); (r) => r.json(),
);
const sk = await const sk = await fetch(`${baseUrl}/characters/collateral/skills.json`).then(
fetch(`${baseUrl}/characters/collateral/skills.json`) (r) => r.json(),
.then(r => r.json()); );
export function Control() { export function Control() {
const [stats, setStats] = useState(st);
const [stats, setStats] = useState(st) const [skills, setSkills] = useState(sk);
const [skills, setSkills] = useState(sk)
return ( return (
<main> <main>
<table className="cyber-table"> <table className="cyber-table">
<SkillHeader skillGroup="CONTROL SKILLS" /> <SkillHeader skillGroup="CONTROL SKILLS" />
<tbody> <tbody>
<SkillRow skillName="DRIVE LAND" skillRank={skills.driveland} stat={stats.dex} /> <SkillRow
<SkillRow skillName="PILOT AIR" skillRank={skills.pilotair} stat={stats.dex} /> skillName="DRIVE LAND"
<SkillRow skillName="PILOT SEA" skillRank={skills.pilotsea} stat={stats.dex} /> skillRank={skills.driveland}
<SkillRow skillName="RIDING" skillRank={skills.riding} stat={stats.dex} /> stat={stats.dex}
/>
<SkillRow
skillName="PILOT AIR"
skillRank={skills.pilotair}
stat={stats.dex}
/>
<SkillRow
skillName="PILOT SEA"
skillRank={skills.pilotsea}
stat={stats.dex}
/>
<SkillRow
skillName="RIDING"
skillRank={skills.riding}
stat={stats.dex}
/>
</tbody> </tbody>
</table> </table>
</main> </main>
) );
} }
+113 -40
View File
@@ -1,54 +1,128 @@
import { useState, useEffect } from 'react' import { useState, useEffect } from "react";
import { SkillHeader, SkillRow } from './skill' import { SkillHeader, SkillRow } from "./skill";
const baseUrl = typeof window !== 'undefined' const baseUrl =
typeof window !== "undefined"
? window.location.origin ? window.location.origin
: process.env.VITE_VERCEL_URL || 'http://localhost:5173' // Fallback for your server env : process.env.VITE_VERCEL_URL || "http://localhost:5173"; // Fallback for your server env
const st = await fetch(`${baseUrl}/characters/collateral/stats.json`) const st = await fetch(`${baseUrl}/characters/collateral/stats.json`).then(
.then(r => r.json()); (r) => r.json(),
);
const sk = await const sk = await fetch(`${baseUrl}/characters/collateral/skills.json`).then(
fetch(`${baseUrl}/characters/collateral/skills.json`) (r) => r.json(),
.then(r => r.json()); );
function EducationTopSkills({ stats, skills }) { function EducationTopSkills({ stats, skills }) {
return (<> return (
<SkillRow skillName="ACCOUNTING" skillRank={skills.accounting} stat={stats.int} /> <>
<SkillRow skillName="ANIMAL HANDLING" skillRank={skills.animalhandling} stat={stats.int} /> <SkillRow
<SkillRow skillName="BUREAUCRAY" skillRank={skills.bureaucracy} stat={stats.int} /> skillName="ACCOUNTING"
<SkillRow skillName="BUSINESS" skillRank={skills.business} stat={stats.int} /> skillRank={skills.accounting}
<SkillRow skillName="COMPOSITION" skillRank={skills.composition} stat={stats.int} /> stat={stats.int}
<SkillRow skillName="CRIMINOLOGY" skillRank={skills.criminology} stat={stats.int} /> />
<SkillRow skillName="CRYPTOGRAPHY" skillRank={skills.cryptography} stat={stats.int} /> <SkillRow
<SkillRow skillName="DEDUCTION" skillRank={skills.deduction} stat={stats.int} /> skillName="ANIMAL HANDLING"
<SkillRow skillName="EDUCATION" skillRank={skills.education} stat={stats.int} /> skillRank={skills.animalhandling}
stat={stats.int}
/>
<SkillRow
skillName="BUREAUCRAY"
skillRank={skills.bureaucracy}
stat={stats.int}
/>
<SkillRow
skillName="BUSINESS"
skillRank={skills.business}
stat={stats.int}
/>
<SkillRow
skillName="COMPOSITION"
skillRank={skills.composition}
stat={stats.int}
/>
<SkillRow
skillName="CRIMINOLOGY"
skillRank={skills.criminology}
stat={stats.int}
/>
<SkillRow
skillName="CRYPTOGRAPHY"
skillRank={skills.cryptography}
stat={stats.int}
/>
<SkillRow
skillName="DEDUCTION"
skillRank={skills.deduction}
stat={stats.int}
/>
<SkillRow
skillName="EDUCATION"
skillRank={skills.education}
stat={stats.int}
/>
<SkillRow skillName="GAMBLE" skillRank={skills.gamble} stat={stats.int} /> <SkillRow skillName="GAMBLE" skillRank={skills.gamble} stat={stats.int} />
</>) </>
);
} }
function EducationBottomSkills({ stats, skills }) { function EducationBottomSkills({ stats, skills }) {
return (<> return (
<>
<SkillRow skillName="LANGUAGE:" skillRank="---" stat="---" /> <SkillRow skillName="LANGUAGE:" skillRank="---" stat="---" />
<SkillRow skillName="-- STREETSLANG" skillRank={skills.lang_streetslang} stat={stats.int} /> <SkillRow
<SkillRow skillName="-- ENGLISH" skillRank={skills.lang_english} stat={stats.int} /> skillName="-- STREETSLANG"
<SkillRow skillName="-- SPANISH" skillRank={skills.lang_spanish} stat={stats.int} /> skillRank={skills.lang_streetslang}
<SkillRow skillName="LIBRARY SEARCH" skillRank={skills.librarysearch} stat={stats.int} /> stat={stats.int}
/>
<SkillRow
skillName="-- ENGLISH"
skillRank={skills.lang_english}
stat={stats.int}
/>
<SkillRow
skillName="-- SPANISH"
skillRank={skills.lang_spanish}
stat={stats.int}
/>
<SkillRow
skillName="LIBRARY SEARCH"
skillRank={skills.librarysearch}
stat={stats.int}
/>
<SkillRow skillName="LOCAL EXPERT:" skillRank="---" stat="---" /> <SkillRow skillName="LOCAL EXPERT:" skillRank="---" stat="---" />
<SkillRow skillName="-- THE OCZ" skillRank={skills.localex_ocz} stat={stats.int} /> <SkillRow
<SkillRow skillName="-- HOT ZONE" skillRank={skills.localex_hotzone} stat={stats.int} /> skillName="-- THE OCZ"
skillRank={skills.localex_ocz}
stat={stats.int}
/>
<SkillRow
skillName="-- HOT ZONE"
skillRank={skills.localex_hotzone}
stat={stats.int}
/>
<SkillRow skillName="--" skillRank="---" stat="---" /> <SkillRow skillName="--" skillRank="---" stat="---" />
<SkillRow skillName="SCIENCE:" skillRank="---" stat="---" /> <SkillRow skillName="SCIENCE:" skillRank="---" stat="---" />
<SkillRow skillName="--" skillRank="---" stat="---" /> <SkillRow skillName="--" skillRank="---" stat="---" />
<SkillRow skillName="--" skillRank="---" stat="---" /> <SkillRow skillName="--" skillRank="---" stat="---" />
<SkillRow skillName="TACTICS" skillRank={skills.tactics} stat={stats.int} /> <SkillRow
<SkillRow skillName="WILDERNESS SURVIVAL" skillRank={skills.wildernesssurvival} stat={stats.int} /> skillName="TACTICS"
</>) skillRank={skills.tactics}
stat={stats.int}
/>
<SkillRow
skillName="WILDERNESS SURVIVAL"
skillRank={skills.wildernesssurvival}
stat={stats.int}
/>
</>
);
} }
export function EducationTop() { export function EducationTop() {
const [stats] = useState(st) const [stats] = useState(st);
const [skills] = useState(sk) const [skills] = useState(sk);
return ( return (
<main> <main>
@@ -59,12 +133,12 @@ export function EducationTop() {
</tbody> </tbody>
</table> </table>
</main> </main>
) );
} }
export function EducationBottom() { export function EducationBottom() {
const [stats] = useState(st) const [stats] = useState(st);
const [skills] = useState(sk) const [skills] = useState(sk);
return ( return (
<main> <main>
@@ -75,13 +149,12 @@ export function EducationBottom() {
</tbody> </tbody>
</table> </table>
</main> </main>
) );
} }
export function Education() { export function Education() {
const [stats] = useState(st);
const [stats] = useState(st) const [skills] = useState(sk);
const [skills] = useState(sk)
return ( return (
<main> <main>
@@ -93,5 +166,5 @@ export function Education() {
</tbody> </tbody>
</table> </table>
</main> </main>
) );
} }
+29 -16
View File
@@ -1,33 +1,46 @@
import { useState, useEffect } from 'react' import { useState, useEffect } from "react";
import { SkillHeader, SkillRow } from './skill' import { SkillHeader, SkillRow } from "./skill";
const baseUrl = typeof window !== 'undefined' const baseUrl =
typeof window !== "undefined"
? window.location.origin ? window.location.origin
: process.env.VITE_VERCEL_URL || 'http://localhost:5173' // Fallback for your server env : process.env.VITE_VERCEL_URL || "http://localhost:5173"; // Fallback for your server env
const st = await fetch(`${baseUrl}/characters/collateral/stats.json`) const st = await fetch(`${baseUrl}/characters/collateral/stats.json`).then(
.then(r => r.json()); (r) => r.json(),
);
const sk = await const sk = await fetch(`${baseUrl}/characters/collateral/skills.json`).then(
fetch(`${baseUrl}/characters/collateral/skills.json`) (r) => r.json(),
.then(r => r.json()); );
export function Fighting() { export function Fighting() {
const [stats, setStats] = useState(st);
const [stats, setStats] = useState(st) const [skills, setSkills] = useState(sk);
const [skills, setSkills] = useState(sk)
return ( return (
<main> <main>
<table className="cyber-table"> <table className="cyber-table">
<SkillHeader skillGroup="FIGHTING SKILLS" /> <SkillHeader skillGroup="FIGHTING SKILLS" />
<tbody> <tbody>
<SkillRow skillName="BRAWLING" skillRank={skills.brawling} stat={stats.dex} /> <SkillRow
<SkillRow skillName="EVASION" skillRank={skills.evasion} stat={stats.dex} /> skillName="BRAWLING"
skillRank={skills.brawling}
stat={stats.dex}
/>
<SkillRow
skillName="EVASION"
skillRank={skills.evasion}
stat={stats.dex}
/>
<SkillRow skillName="MARTIAL ARTS" skillRank={0} stat={4} /> <SkillRow skillName="MARTIAL ARTS" skillRank={0} stat={4} />
<SkillRow skillName="MELEE WEAPONS" skillRank={skills.meleeweapons} stat={stats.dex} /> <SkillRow
skillName="MELEE WEAPONS"
skillRank={skills.meleeweapons}
stat={stats.dex}
/>
</tbody> </tbody>
</table> </table>
</main> </main>
) );
} }
+19 -14
View File
@@ -1,33 +1,38 @@
import { useState, useEffect } from 'react' import { useState, useEffect } from "react";
import { SkillHeader, SkillRow } from './skill' import { SkillHeader, SkillRow } from "./skill";
const baseUrl = typeof window !== 'undefined' const baseUrl =
typeof window !== "undefined"
? window.location.origin ? window.location.origin
: process.env.VITE_VERCEL_URL || 'http://localhost:5173' // Fallback for your server env : process.env.VITE_VERCEL_URL || "http://localhost:5173"; // Fallback for your server env
const st = await fetch(`${baseUrl}/characters/collateral/stats.json`) const st = await fetch(`${baseUrl}/characters/collateral/stats.json`).then(
.then(r => r.json()); (r) => r.json(),
);
const sk = await const sk = await fetch(`${baseUrl}/characters/collateral/skills.json`).then(
fetch(`${baseUrl}/characters/collateral/skills.json`) (r) => r.json(),
.then(r => r.json()); );
export function Performance() { export function Performance() {
const [stats, setStats] = useState(st);
const [stats, setStats] = useState(st) const [skills, setSkills] = useState(sk);
const [skills, setSkills] = useState(sk)
return ( return (
<main> <main>
<table className="cyber-table"> <table className="cyber-table">
<SkillHeader skillGroup="PERFORMANCE SKILLS" /> <SkillHeader skillGroup="PERFORMANCE SKILLS" />
<tbody> <tbody>
<SkillRow skillName="ACTING" skillRank={skills.acting} stat={stats.cool} /> <SkillRow
skillName="ACTING"
skillRank={skills.acting}
stat={stats.cool}
/>
<SkillRow skillName="PLAY INSTRUMENT:" skillRank="---" stat="---" /> <SkillRow skillName="PLAY INSTRUMENT:" skillRank="---" stat="---" />
<SkillRow skillName="--" skillRank="---" stat="---" /> <SkillRow skillName="--" skillRank="---" stat="---" />
<SkillRow skillName="--" skillRank="---" stat="---" /> <SkillRow skillName="--" skillRank="---" stat="---" />
</tbody> </tbody>
</table> </table>
</main> </main>
) );
} }
+50 -27
View File
@@ -1,36 +1,60 @@
import { useState, useEffect } from 'react' import { useState, useEffect } from "react";
import { SkillHeader, SkillRow } from './skill' import { SkillHeader, SkillRow } from "./skill";
const baseUrl = typeof window !== 'undefined' const baseUrl =
typeof window !== "undefined"
? window.location.origin ? window.location.origin
: process.env.VITE_VERCEL_URL || 'http://localhost:5173' // Fallback for your server env : process.env.VITE_VERCEL_URL || "http://localhost:5173"; // Fallback for your server env
const st = await fetch(`${baseUrl}/characters/collateral/stats.json`) const st = await fetch(`${baseUrl}/characters/collateral/stats.json`).then(
.then(r => r.json()); (r) => r.json(),
);
const sk = await const sk = await fetch(`${baseUrl}/characters/collateral/skills.json`).then(
fetch(`${baseUrl}/characters/collateral/skills.json`) (r) => r.json(),
.then(r => r.json()); );
function RangedTopSkills({ stats, skills }) { function RangedTopSkills({ stats, skills }) {
return ( return (
<> <>
<SkillRow skillName="ARCHERY" skillRank={skills.archery} stat={stats.ref} /> <SkillRow
<SkillRow skillName="AUTOFIRE" skillRank={skills.autofire} stat={stats.ref} /> skillName="ARCHERY"
<SkillRow skillName="HANDGUNS" skillRank={skills.handgun} stat={stats.ref} /> skillRank={skills.archery}
</>) stat={stats.ref}
/>
<SkillRow
skillName="AUTOFIRE"
skillRank={skills.autofire}
stat={stats.ref}
/>
<SkillRow
skillName="HANDGUNS"
skillRank={skills.handgun}
stat={stats.ref}
/>
</>
);
} }
function RangedBottomSkills({ stats, skills }) { function RangedBottomSkills({ stats, skills }) {
return ( return (
<> <>
<SkillRow skillName="HEAVY WEP" skillRank={skills.archery} stat={stats.ref} /> <SkillRow
<SkillRow skillName="SHOULDER ARMS" skillRank={skills.autofire} stat={stats.ref} /> skillName="HEAVY WEP"
</>) skillRank={skills.archery}
stat={stats.ref}
/>
<SkillRow
skillName="SHOULDER ARMS"
skillRank={skills.autofire}
stat={stats.ref}
/>
</>
);
} }
export function RangedTop() { export function RangedTop() {
const [stats] = useState(st) const [stats] = useState(st);
const [skills] = useState(sk) const [skills] = useState(sk);
return ( return (
<main> <main>
@@ -41,12 +65,12 @@ export function RangedTop() {
</tbody> </tbody>
</table> </table>
</main> </main>
) );
} }
export function RangedBottom() { export function RangedBottom() {
const [stats] = useState(st) const [stats] = useState(st);
const [skills] = useState(sk) const [skills] = useState(sk);
return ( return (
<main> <main>
@@ -57,13 +81,12 @@ export function RangedBottom() {
</tbody> </tbody>
</table> </table>
</main> </main>
) );
} }
export function Ranged() { export function Ranged() {
const [stats, setStats] = useState(st);
const [stats, setStats] = useState(st) const [skills, setSkills] = useState(sk);
const [skills, setSkills] = useState(sk)
return ( return (
<main> <main>
@@ -75,5 +98,5 @@ export function Ranged() {
</tbody> </tbody>
</table> </table>
</main> </main>
) );
} }
+4 -4
View File
@@ -1,8 +1,8 @@
function BaseVal({ skillRank, stat }) { function BaseVal({ skillRank, stat }) {
if (skillRank === "---") { if (skillRank === "---") {
return <td>---</td> return <td>---</td>;
} else { } else {
return (<td>{skillRank + stat}</td>) return <td>{skillRank + stat}</td>;
} }
} }
@@ -17,7 +17,7 @@ export function SkillRow({ skillName, skillRank, stat }) {
); );
} }
export function SkillHeader({skillGroup}) { export function SkillHeader({ skillGroup }) {
return ( return (
<thead> <thead>
<tr> <tr>
@@ -27,5 +27,5 @@ export function SkillHeader({skillGroup}) {
<th style={{ width: "10%" }}>BASE</th> <th style={{ width: "10%" }}>BASE</th>
</tr> </tr>
</thead> </thead>
) );
} }
+59 -22
View File
@@ -1,38 +1,75 @@
import { useState, useEffect } from 'react' import { useState, useEffect } from "react";
import { SkillHeader, SkillRow } from './skill' import { SkillHeader, SkillRow } from "./skill";
const baseUrl = typeof window !== 'undefined' const baseUrl =
typeof window !== "undefined"
? window.location.origin ? window.location.origin
: process.env.VITE_VERCEL_URL || 'http://localhost:5173' // Fallback for your server env : process.env.VITE_VERCEL_URL || "http://localhost:5173"; // Fallback for your server env
const st = await fetch(`${baseUrl}/characters/collateral/stats.json`) const st = await fetch(`${baseUrl}/characters/collateral/stats.json`).then(
.then(r => r.json()); (r) => r.json(),
);
const sk = await const sk = await fetch(`${baseUrl}/characters/collateral/skills.json`).then(
fetch(`${baseUrl}/characters/collateral/skills.json`) (r) => r.json(),
.then(r => r.json()); );
export function Social() { export function Social() {
const [stats, setStats] = useState(st);
const [stats, setStats] = useState(st) const [skills, setSkills] = useState(sk);
const [skills, setSkills] = useState(sk)
return ( return (
<main> <main>
<table className="cyber-table"> <table className="cyber-table">
<SkillHeader skillGroup="SOCIAL SKILLS" /> <SkillHeader skillGroup="SOCIAL SKILLS" />
<tbody> <tbody>
<SkillRow skillName="BRIBERY" skillRank={skills.bribery} stat={stats.cool} /> <SkillRow
<SkillRow skillName="CONVERSATION" skillRank={skills.conversation} stat={stats.emp} /> skillName="BRIBERY"
<SkillRow skillName="HUMAN PERCEPTION" skillRank={skills.humper} stat={stats.emp} /> skillRank={skills.bribery}
<SkillRow skillName="INTEROGATION" skillRank={skills.interogation} stat={stats.cool} /> stat={stats.cool}
<SkillRow skillName="PERSUASION" skillRank={skills.persuasion} stat={stats.cool} /> />
<SkillRow skillName="PERSONAL GROOM" skillRank={skills.personalgrooming} stat={stats.cool} /> <SkillRow
<SkillRow skillName="STREETWISE" skillRank={skills.streetwise} stat={stats.cool} /> skillName="CONVERSATION"
<SkillRow skillName="TRADING" skillRank={skills.trading} stat={stats.cool} /> skillRank={skills.conversation}
<SkillRow skillName="WARDROBE/STYLE" skillRank={skills.wardrobe} stat={stats.cool} /> stat={stats.emp}
/>
<SkillRow
skillName="HUMAN PERCEPTION"
skillRank={skills.humper}
stat={stats.emp}
/>
<SkillRow
skillName="INTEROGATION"
skillRank={skills.interogation}
stat={stats.cool}
/>
<SkillRow
skillName="PERSUASION"
skillRank={skills.persuasion}
stat={stats.cool}
/>
<SkillRow
skillName="PERSONAL GROOM"
skillRank={skills.personalgrooming}
stat={stats.cool}
/>
<SkillRow
skillName="STREETWISE"
skillRank={skills.streetwise}
stat={stats.cool}
/>
<SkillRow
skillName="TRADING"
skillRank={skills.trading}
stat={stats.cool}
/>
<SkillRow
skillName="WARDROBE/STYLE"
skillRank={skills.wardrobe}
stat={stats.cool}
/>
</tbody> </tbody>
</table> </table>
</main> </main>
) );
} }
+90 -29
View File
@@ -1,44 +1,105 @@
import { useState, useEffect } from 'react' import { useState, useEffect } from "react";
import { SkillHeader, SkillRow } from './skill' import { SkillHeader, SkillRow } from "./skill";
const baseUrl = typeof window !== 'undefined' const baseUrl =
typeof window !== "undefined"
? window.location.origin ? window.location.origin
: process.env.VITE_VERCEL_URL || 'http://localhost:5173' // Fallback for your server env : process.env.VITE_VERCEL_URL || "http://localhost:5173"; // Fallback for your server env
const st = await fetch(`${baseUrl}/characters/collateral/stats.json`) const st = await fetch(`${baseUrl}/characters/collateral/stats.json`).then(
.then(r => r.json()); (r) => r.json(),
);
const sk = await const sk = await fetch(`${baseUrl}/characters/collateral/skills.json`).then(
fetch(`${baseUrl}/characters/collateral/skills.json`) (r) => r.json(),
.then(r => r.json()); );
export function Technique() { export function Technique() {
const [stats, setStats] = useState(st);
const [stats, setStats] = useState(st) const [skills, setSkills] = useState(sk);
const [skills, setSkills] = useState(sk)
return ( return (
<main> <main>
<table className="cyber-table"> <table className="cyber-table">
<SkillHeader skillGroup="TECH SKILLS"/> <SkillHeader skillGroup="TECH SKILLS" />
<tbody> <tbody>
<SkillRow skillName="AV Tech" skillRank={skills.avt} stat={stats.tech} /> <SkillRow
<SkillRow skillName="BASIC TECH" skillRank={skills.basic} stat={stats.tech} /> skillName="AV Tech"
<SkillRow skillName="CYBER TECH" skillRank={skills.cyber} stat={stats.tech} /> skillRank={skills.avt}
<SkillRow skillName="DEMOLITIONS" skillRank={skills.demo} stat={stats.tech} /> stat={stats.tech}
<SkillRow skillName="ELEC/SEC" skillRank={skills.elecsec} stat={stats.tech} /> />
<SkillRow skillName="FIRST AID" skillRank={skills.firstaid} stat={stats.tech} /> <SkillRow
<SkillRow skillName="FORGERY" skillRank={skills.forgery} stat={stats.tech} /> skillName="BASIC TECH"
<SkillRow skillName="LV TECH" skillRank={skills.lvt} stat={stats.tech} /> skillRank={skills.basic}
<SkillRow skillName="P/D/S" skillRank={skills.pds} stat={stats.tech} /> stat={stats.tech}
<SkillRow skillName="PARAMEDIC" skillRank={skills.paramedic} stat={stats.tech} /> />
<SkillRow skillName="PHOTO/FILM" skillRank={skills.photofilm} stat={stats.tech} /> <SkillRow
<SkillRow skillName="PICK LOCK" skillRank={skills.picklock} stat={stats.tech} /> skillName="CYBER TECH"
<SkillRow skillName="PICK POCKET" skillRank={skills.pickpocket} stat={stats.tech} /> skillRank={skills.cyber}
<SkillRow skillName="SV TECH" skillRank={skills.svt} stat={stats.tech} /> stat={stats.tech}
<SkillRow skillName="WEAPONS TECH" skillRank={skills.weapons} stat={stats.tech} /> />
<SkillRow
skillName="DEMOLITIONS"
skillRank={skills.demo}
stat={stats.tech}
/>
<SkillRow
skillName="ELEC/SEC"
skillRank={skills.elecsec}
stat={stats.tech}
/>
<SkillRow
skillName="FIRST AID"
skillRank={skills.firstaid}
stat={stats.tech}
/>
<SkillRow
skillName="FORGERY"
skillRank={skills.forgery}
stat={stats.tech}
/>
<SkillRow
skillName="LV TECH"
skillRank={skills.lvt}
stat={stats.tech}
/>
<SkillRow
skillName="P/D/S"
skillRank={skills.pds}
stat={stats.tech}
/>
<SkillRow
skillName="PARAMEDIC"
skillRank={skills.paramedic}
stat={stats.tech}
/>
<SkillRow
skillName="PHOTO/FILM"
skillRank={skills.photofilm}
stat={stats.tech}
/>
<SkillRow
skillName="PICK LOCK"
skillRank={skills.picklock}
stat={stats.tech}
/>
<SkillRow
skillName="PICK POCKET"
skillRank={skills.pickpocket}
stat={stats.tech}
/>
<SkillRow
skillName="SV TECH"
skillRank={skills.svt}
stat={stats.tech}
/>
<SkillRow
skillName="WEAPONS TECH"
skillRank={skills.weapons}
stat={stats.tech}
/>
</tbody> </tbody>
</table> </table>
</main> </main>
) );
} }
+195
View File
@@ -0,0 +1,195 @@
{
"neural": {
"name": "Neural Link",
"installed": true,
"slots": 5,
"upgraded": false,
"hl": 2,
"contents": [
{
"name": "Interfacec Plugs",
"description": "Plugs in your brain.",
"hl": 2
},
{
"name": "Interfacec Plugs",
"description": "Plugs in your brain.",
"hl": 2
},
{
"name": "Subdermal Grip Res.",
"description": "Subdermal Grip requires 1 neural slot.",
"hl": 0
}
]
},
"audio": {
"name": "Audio Suite",
"installed": false,
"slots": 3,
"upgraded": false,
"hl": 2,
"contents": []
},
"lefteye": {
"name": "Left Meat Eye",
"installed": true,
"slots": 3,
"upgraded": false,
"hl": 2,
"contents": []
},
"righteye": {
"name": "Right Meat Eye",
"installed": true,
"slots": 3,
"upgraded": false,
"hl": 2,
"contents": []
},
"leftarm": {
"name": "Left Cyber Arm",
"installed": true,
"slots": 5,
"upgraded": {
"name": "slot+",
"description": "Add an extra option slot."
},
"hl": 2,
"contents": [
{
"name": "PopUp Dragon (Open Bay)",
"description": "SQ Flamethrower with S.Choke.",
"hl": 2
},
{
"name": "PopUp Dragon (Open Bay)",
"description": "Second Slot.",
"hl": 0
},
{
"name": "Tech Scanner",
"description": "+2 to tech skills.",
"hl": 2
},
{
"name": "Tech Scanner",
"description": "Second Slot.",
"hl": 2
},
{
"name": "Tech Tool",
"description": "Never loose your tools.",
"hl": 2
}
]
},
"rightarm": {
"name": "Right Cyber Arm",
"installed": true,
"slots": 5,
"upgraded": {
"name": "slot+",
"description": "Add an extra option slot."
},
"hl": 2,
"contents": [
{
"name": "PopUp HSMG+",
"description": "EQ sub-caliber chaingun. S.Link | D.Mag",
"hl": 2
},
{
"name": "PopUp HSMG+",
"description": "Second Slot.",
"hl": 0,
"upgraded": {
"name": "Open Bay Mounting",
"description": "Swap mounted weapons."
}
},
{
"name": "PopUp HSMG+",
"description": "EQ sub-caliber chaingun. S.Link | D.Mag",
"hl": 2
},
{
"name": "PopUp HSMG+",
"description": "Second Slot.",
"hl": 0
},
{
"name": "Subdermal Grip",
"description": "Gun Connection via Skin.",
"hl": 2
}
]
},
"rightleg": {
"name": "Right Cyber Leg",
"installed": true,
"slots": 3,
"upgraded": {
"name": "Burden Managment",
"description": "Reduce MOVE Armor Penalty by 2."
},
"hl": 1,
"contents": [
{
"name": "Bilatteral Coprocessor",
"description": "Havles HL contributions.",
"hl": 0
}
]
},
"leftleg": {
"name": "Left Cyber Leg",
"installed": true,
"slots": 3,
"upgraded": {
"name": "Burden Managment",
"description": "Reduce MOVE Armor Penalty by 2."
},
"hl": 1,
"contents": [
{
"name": "Bilatteral Coprocessor",
"description": "Havles HL contributions.",
"hl": 0
}
]
},
"internal": {
"name": "Internal",
"installed": true,
"slots": 7,
"upgraded": {
"name": "Burden Managment",
"description": "Reduce MOVE Armor Penalty by 2."
},
"hl": 1,
"contents": []
},
"external": {
"name": "External",
"installed": true,
"slots": 7,
"upgraded": {
"name": "Burden Managment",
"description": "Reduce MOVE Armor Penalty by 2."
},
"hl": 1,
"contents": []
},
"borgware": {
"name": "Borgware",
"installed": true,
"slots": 7,
"upgraded": {
"name": "Burden Managment",
"description": "Reduce MOVE Armor Penalty by 2."
},
"hl": 1,
"contents": []
}
}
+95
View File
@@ -0,0 +1,95 @@
{
"cash": 100,
"ammo": [
{
"type": "Tracer",
"caliber": "HP",
"count": "210"
},
{
"type": "Armor Piercing",
"caliber": "Grenade",
"count": "3"
},
{
"type": "Chalk",
"caliber": "Grenade",
"count": "5"
},
{
"type": "Targeting",
"caliber": "Grenade",
"count": "1"
},
{
"type": "Smoke",
"caliber": "Grenade",
"count": "2"
}
],
"gear": [
{
"name": "Agent",
"description": "Standard SAAI powered device. +2 to Lib Search",
"count": 1
},
{
"name": "Radio",
"description": "Standard comms. 1 mile range. Discrete ear piece.",
"count": 1
},
{
"name": "Grapple Gun",
"description": "One-handed grapple gun with 30m of rope.",
"count": 1
},
{
"name": "Kit Bags",
"description": "A set of kit bags worn around the waist.",
"count": 1,
"contents": [
{
"name": "Kaisarin EOD Bag",
"description": "+2 to Demolitions Checks.",
"count": 1,
"contents": [
{
"name": "Remote Detonantor",
"description": "1 Mile Range.",
"count": 1
}
]
},
{
"name": "Tech Bag",
"description": "Tools of the trade.",
"count": 1,
"contents": [
{
"name": "Tech Tool",
"description": "Every kit needs one.",
"count": 1
}
]
},
{
"name": "Smart Artists Kit",
"description": "+2 to Paint / Draw / Sculpt Checks.",
"count": 1,
"contents": [
{
"name": "Smart-Linked Rattle Can",
"description": "'Cause sometimes a bad idea just works.",
"count": 1
},
{
"name": "Glow Paint",
"description": "Flourescing paint, so you can enjoy the art in all wavelngths.",
"count": 4
}
]
}
]
}
]
}
@@ -32,4 +32,3 @@
} }
] ]
} }