Skip to content

Instantly share code, notes, and snippets.

View marth8880's full-sized avatar

Aaron Gilbert marth8880

  • Deep Silver Dambuster
  • Edinburgh, UK
View GitHub Profile
@marth8880
marth8880 / SWBF2 dialogue.lua
Last active March 17, 2024 14:28
The dialogue system used for Return to Jinglin' Town
-- dialogue line definitions
-- 'name' : the name of the SoundStreamProperty
-- 'duration' : the length of the line in seconds rounded up a bit
voiceLines = {
Cut_1 = {
[1] = { name = "XM2_cut_1_1", duration = 7.6 },
[2] = { name = "XM2_cut_1_2", duration = 6.1 },
[3] = { name = "XM2_cut_2_1", duration = 5.65 },
[4] = { name = "XM2_cut_2_2", duration = 19.9 },
[5] = { name = "XM2_cut_2_3", duration = 9.9 },
set vw = Desktop.ActiveLayout.Views.Find( "View Manager" )
vw.setattributevalue "suspenddrawing","true"
vw.setattributevalue "viewport:a","explorer"
vw.setattributevalue "activecamera:b","user"
vw.setattributevalue "displaymode:b","textured decal"
vw.setattributevalue "layout","vertical:ab"
vw.setattributevalue "suspenddrawing","false"
set myexplorer = vw.views("d")
myexplorer.setattributevalue "scope","Scene"
@marth8880
marth8880 / SWBF2 era mod ids.md
Last active April 29, 2025 20:28
This is a comprehensive list of the era ids used by all era mods. Please feel free to add yours or any missing ones. Originally compiled by CdtFox from the Gametoast forums - original thread here: http://gametoast.com/viewtopic.php?f=27&t=34258

Letter: a used by the following mod(s):

  • Battlefront Extreme 2.2's CW Era by ARC_Commander
  • Battlefront II: Mandalorians by BusinessBILL
  • Battlefront II: Republic Combat by BusinessBILL
  • Shattered Galaxy (CW Era) by Delta327

Letter: b used by the following mod(s):

  • Battlefront Extreme 2.2's GCW Era by ARC_Commander
AB CA A5 CA 8A BB 20 AB D8 D1 4C A5 BB
incompatible version
buffer error
insufficient memory
-- **************************************************************
-- TCW Damage Feedback Script
-- Aaron Gilbert - Marth8880@gmail.com
-- Copyright (c) 2018 Aaron Gilbert. All rights reserved.
--
-- About:
-- TODO: fill this in!
--
-- Legal:
-- REPRODUCTION OR TRANSMISSION OF ALL OR PART OF THIS COPYRIGHT WORK IN ANY MEDIUM OR BY ELECTRONIC MEANS WITHOUT THE WRITTEN PERMISSION OF AARON GILBERT IS PROHIBITED.
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "Mass Effect Unification R6.5 (Standalone)"
#define MyAppGroupName "Mass Effect Unification"
#define MyAppVersion "1.3.1"
#define MyAppPublisher "Frayed Wires Studios"
#define MyAppPublisherURL "http://www.moddb.com/company/frayedwiresstudios"
#define MyAppURL "http://www.moddb.com/mods/the-mass-effect-mod"
#define MySupportURL "http://www.moddb.com/mods/the-mass-effect-mod/forum/board/support"
@marth8880
marth8880 / getn.lua
Created August 12, 2018 23:23
Shortcut function to get the length of the specified table or string. Only useful for Lua 5.0 and below.
-- Gets the length of the specified table or string
function getn(v)
local v_type = type(v);
if v_type == "table" then
return table.getn(v);
elseif v_type == "string" then
return string.len(v);
else
return;
end
@marth8880
marth8880 / IsBetween.lua
Created August 12, 2018 23:21
Shortcut function to check if the value of a number is equal to or somewhere in between the specified min/max.
-- Returns true if the specified number is equal to or somewhere in between the specified min and max
function IsBetween(v, min, max)
local v_type = type(v);
if v_type == "number" then
return v >= min and v <= max;
else
return;
end
end
@marth8880
marth8880 / swbf2autodetect.pas
Last active August 1, 2018 19:12
SWBF2 directory auto-detect for Inno Setup Compiler
// USAGE: Paste the following code in your setup script's [Code] section. Then, in your [Setup] section,
// use {code:GetDirName} for the value of DefaultDirName.
function ParseSteamConfig(FileName: string; var Paths: TArrayOfString): Boolean;
var
Lines: TArrayOfString;
I: Integer;
Line: string;
P: Integer;
Key: string;
@marth8880
marth8880 / string.formatcs.lua
Last active August 12, 2018 23:26
Lua implementation of C#'s String.Format method. Tokens are 1-based.
-- Lua implementation of C#'s String.Format method. Tokens are 1-based.
--
-- Usage:
-- string.formatcs("first = {1}, second = {2}, third = {3}", "value one", "value two", "value three")
--
-- This example would return the following string:
-- first = value one, second = value two, three = value three
--
-- Further documentation: https://msdn.microsoft.com/en-us/library/system.string.format
function string.formatcs(str, ...)