Skip to content

Instantly share code, notes, and snippets.

View efrec's full-sized avatar
🍍

efrec efrec

🍍
  • USA
View GitHub Profile
## Command history
# Improve on PSReadLine's history heuristic without having to re-implement from scratch.
$commandHistoryHandler = @{
HistoryNoDuplicates = $false
HistorySaveStyle = [Microsoft.PowerShell.HistorySaveStyle]::SaveIncrementally
AddToHistoryHandler = {
param([string] $line)
<# spammy #> if ($line -in 'exit', 'ls', 'pwd', 'cls', 'clear' ) { return $false }
<# buried #> if ($line -match '\A[ ]{2}\S') { return $false }
// Use this script to lazy-load a Dataview query, delaying its execution:
// 1. Create a vault folder with a friendly name (e.g. 'lazy-query').
// 2. Create a file named 'view.js' containing the below code in that folder.
// 3. In a `dataviewjs` block, define a DQL query.
// 4. In the same block, lazily evaulate with `await dv.view('friendly-name', dql)`.
const rootNode = dv.el("div", "");
const rootView = rootNode.closest(".view-content");
const viewObserver = new IntersectionObserver(
(entries, o) => {
-- Effect damage consists of scripted effects (which deal burst) and temporal effects (which change DPS).
-- This becomes a nebulous categorization when both effect types occur on the same weapon. Please do not.
-- The data presentation of effect damage is as extra/bonus damage, e.g. 120 + 40 with the "40" stylized.
local effectExplain
local effectBurst, effectRate = 0, 0
if weaponDef.customParams.spark_basedamage then
effectExplain = i18n.explain_spark
local damage = weaponDef.customParams.spark_basedamage * weaponDef.customParams.spark_forkdamage
effectBurst = damage * weaponDef.customParams.spark_maxunits
@efrec
efrec / Community Patch - Small Teams and 1v1.md
Last active June 12, 2025 23:31
Project doc for the next balance pack by Neb, this time with an eye on some unit reworks, too.

DUST-UP T1

A Duels and Small Teams Unit Patch for T1

Note: This is not the Unofficial Tech Overhaul but an even-less-official-than-that patch. You have stumbled upon a door in time and space, a door to which your mind is the only key, a door to that which came before and shall follow after. Or whatever.

Beyond All Reason supports user mods through widgets and tweaks—and this is an entirely tweak-based mod project. You can take these tweakdefs (or tweakunits) and easily make your own changes. Balance packs focus on the community meta so rely on people taking an interest to keep them alive. We hope to make something you'd be willing not just to test but to help evolve.

@efrec
efrec / how-to-tweak.md
Last active June 20, 2025 20:30 — forked from badosu/how-to-tweak.md
A simple guide to simple mods, called "tweaks", for Beyond All Reason.

Basic modding guide

Important

When playing in a public lobby, make sure the players actually want to play with mods. Not everyone does, and not everyone can be convinced. In addition, you will need to be the lobby boss to be able to set modoptions and/or apply tweaks.

Get started

If you are new to the game's files, the first two steps may be the most cumbersome: