Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
:trollface: :trollface: :trollface: :trollface:

Jeremy L. JJL772

:octocat:
:trollface: :trollface: :trollface: :trollface:
View GitHub Profile
@JJL772
JJL772 / build.md
Last active May 27, 2023 06:41
Building EPICS base and modules with clang
View build.md
@JJL772
JJL772 / migration-and-lfs-setup.md
Created March 5, 2023 09:19
git repo migration notes
View migration-and-lfs-setup.md

Steps for migrating Git repos (including LFS objects) to GitHub

Documents the steps taken to migrate P2CE's internal git repos to github with self-hosted LFS storage (literally just a gitlab instance lol).

Step 1: Mirror LFS Contents (Do this first!)

This is done first because LFS is entirely separate from the git repo itself. Relying on .lfsconfig makes it a bit tricky to mirror using "standard" procedures since there's typically no working tree available.

  1. Clone your repo
  2. Run git lfs fetch --all. We'll need all LFS objects here!
@JJL772
JJL772 / mod-config.kv3
Last active April 24, 2023 09:36
Generic mod config
View mod-config.kv3
addonsystem:
- handle mounting/unmounting of addons
- download/upload of UGC files
- mounting/unmounting of games too?
View game-rules.md

Game Rules System

System that helps manage player and map specific configurations.

System Overview

  • Comprised of three layers: player, map and config. Think of this as a stack.
  • Each layer has a different priority, map being the lowest, and player being the highest. Priority determines where and which options may be overridden.
  • Since the player layer has the highest priority, it may override any map-level or config-level option, assuming that option isn't limited to a specific layer(s).
  • The config layer is intended to be used by speedrun or other gameplay altering configs. For example, you'd create a config layer for hl2 to enable suit, disable health regen, enable flashlight, etc. This layer could then be activated on map load when the player selects the hl2 campaign from the start game UI.
@JJL772
JJL772 / mimalloc-stub.c
Last active July 15, 2022 00:22
Tiny library to override reallocarray for valgrind
View mimalloc-stub.c
// Compile with: gcc -o libmimalloc-proxy.so -shared mimalloc-stub.c
#include <stdlib.h>
#include <stddef.h>
void* reallocarray(void* ptr, size_t nmemb, size_t size) {
return realloc(ptr, nmemb*size);
}
View run-with-zink.txt
__GLX_VENDOR_LIBRARY_NAME=mesa MESA_LOADER_DRIVER_OVERRIDE=zink GALLIUM_DRIVER=zink
@JJL772
JJL772 / useful-debug-commands.md
Created April 19, 2022 05:38
Useful debug commands for p2ce/momentum
View useful-debug-commands.md

Debugging Commands/Cvars

Below is a useful list of debugging commands and console variables. They can be used to display material names, entity info and even visualize entity IO.

General Debugging

Name Acceptable Values Description
version Print version info to console
@JJL772
JJL772 / client.classes.txt
Last active March 20, 2022 00:03
Aperture desk job classes & inheritance tree for client, host and server libraries
View client.classes.txt
AWS_AbilityUsageData_t
AmmoTypeInfo_t
AnimGraphUtils::CTraceFilterAnimGraphSlope: CTraceFilterSkipPlayersAndNPCsAndChildren
CAI_AbilityServices
CAI_AbilityServices::NetworkVar_m_AbilityBeingUsed: AWS_AbilityUsageData_t
CAI_AbilityServices::NetworkVar_m_AbilityToBeUsed: AWS_AbilityUsageData_t
CAI_BaseActorVData: CAI_DefaultNPCVData
CAI_BaseNPCVData: CEntitySubclassVDataBase
CAI_DefaultNPCVData: CAI_BaseNPCVData
CAI_StanceServices
@JJL772
JJL772 / how-to-run-p2ce-hammer-in-wine.txt
Created January 23, 2022 19:37
P2CE Hammer in WINE
View how-to-run-p2ce-hammer-in-wine.txt
1. Obtain a sufficiently new version of WINE.
Any version >= 6.0 should work. You may need to build this from source if your distro doesn't offer up to date packages for it.
Ubuntu and Mint users can read this page for how to install new versions of wine: https://github.com/Winetricks/winetricks/pull/1873
2. Install wintricks.
This is technically optional, if you want to install things manually skip this and move onto the next step.
Winetricks can usually be obtained through your distro's package manager. `winetricks --self-update` can be
used to update it to the latest version.