Skip to content

Instantly share code, notes, and snippets.

View bukowa's full-sized avatar

Mateusz Kurowski bukowa

View GitHub Profile
@bukowa
bukowa / conditions.txt
Last active March 28, 2025 14:04
rome 2 dump conditions events docs
### FUNCTION START ###
void UndefinedFunction_1000a950(void)
{
@bukowa
bukowa / dump.lua
Last active March 27, 2025 15:21
rome 2 battle script dump
-- local t2 = debug.getregistry()[2]
-- consul.log:info(consul.pretty(debug.getfenv(t2)))
{
["BOOL_Stop_All_Attacking_Closest"] = false,
["Battle_Manager_Battle_Results"] = "function: 569B8978",
["CONST_WATCH_INTERVAL"] = 2000,
["Esc_Key_Pressed"] = "function: 569B88D0",
["PATROL_MANAGER_COULDNT_FIND_TARGET"] = 12,
["PATROL_MANAGER_DEFAULT_GUARD_RADIUS"] = 0,
["PATROL_MANAGER_DEFAULT_INTERCEPT_TIME"] = 10000,
@bukowa
bukowa / dump_ui.lua
Last active March 19, 2025 22:43
rome 2 dump ui
function log_ui_tree(component, depth)
depth = depth or 0
local indent = string.rep("\t", depth)
-- Log component name with indentation
consul.log:_write_to_file(indent .. tostring(component:Id()))
-- Get child count
local count = component:ChildCount()
@bukowa
bukowa / aghidradump.txt
Last active March 13, 2025 13:48
rome 2 cliexecute dump
===============
Sets up cindy live playback
cindy_playback <cindy_xml_path> <clear_animated_scenes on completion true/false> <expire_camera_on_completion true/false>
cindy live
cindy_playback
===============
record frame times to a file
frame_rate_log <log filename>
battle
frame_rate_log
@bukowa
bukowa / decompil.py
Last active March 12, 2025 12:54
ghidra decompiler scripy string
import re
from time import sleep
import ghidra
import ghidra.util.UndefinedFunction.findFunction
def collect_and_print_matches():
pattern = r'L"([^"]+)"' # Regex to capture wide string literals
refs = getReferencesTo(toAddr(0x112A7EB0))
decomp = ghidra.app.decompiler.DecompInterface()
@bukowa
bukowa / functions.md
Created February 19, 2025 18:33
list of uicomponent rome 2 functions

these functions break component

  • IsCharPrintable
  • WidthOfTextLine
@bukowa
bukowa / rebelion.lua
Last active February 19, 2025 16:47
rebelion rome2
-- Helper function to get the faction list from the game model
function getFactionList()
return scripting.game_interface:model():world():faction_list()
end
-- Helper function to get the region list from a faction
function getRegionList(faction)
return faction:region_list()
end
@bukowa
bukowa / autossh-ec2.service
Created February 14, 2025 19:06
sshd reverse tunnel proxy
# pc
[Unit]
Description=AutoSSH tunnel for PC1 to EC2
After=network.target
[Service]
User=buk
ExecStart=/usr/bin/autossh -i /home/buk/.ssh/ec2.pem -M 0 -N -R 2222:localhost:22 ec2-user@<ip> -o ServerAliveInterval=60 -o ServerAliveCountMax=3 -o ExitOnForwardFailure=yes
Restart=always
RestartSec=1min
@bukowa
bukowa / CMakeLists.txt
Created February 4, 2025 12:43
find panelw and ncursesw in msys2 while compiling multitail
find_library(NCURSES_LIB NAMES ncursesw PATHS /mingw64/lib REQUIRED)
find_library(PANEL_LIB NAMES panelw PATHS /mingw64/lib REQUIRED)
@bukowa
bukowa / report.txt
Last active February 3, 2025 22:46
dei 1st turn rome profile
###############################################################################################################
##### ProFi, a lua profiler. This profile was generated on: 02/03/25 23:45:27
##### ProFi is created by Luke Perkin 2012 under the MIT Licence, www.locofilm.co.uk
##### Version 1.3. Get the most recent version at this gist: https://gist.github.com/2838755
###############################################################################################################
| TOTAL TIME = 75.074005
| FILE : FUNCTION : LINE : TIME : RELATIVE : CALLED |
| [C] : remove_effect_bundle_from_characters_force : -1 : 17.858 : 23.79% : 24019 |
| [string "c:\gam