Skip to content

Commit

Permalink
Initial release
Browse files Browse the repository at this point in the history
OFF+ & Additional Equipment patch:
Release v1.0
- Give OFF+ starting Assassin bro Reinforced Padded Armor

Expanded Markets & Additional Equipment patch:
Release v1.0
- Add Masked Nomad Light Helmet to Nomad gear list
  • Loading branch information
jcsato committed Nov 13, 2022
0 parents commit d7e4702
Show file tree
Hide file tree
Showing 7 changed files with 210 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dist/
old_versions/
testing/
59 changes: 59 additions & 0 deletions build_offp_sae.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
@echo off

set modname=off_plus_additional_equipment_patch
set modkitdir=YOUR_MODKIT_BIN_PATH
set version=1.0

echo.
echo Creating temporary directory...
echo.

@REM /i means create tmp\scripts if it's not there, /e means copy subdirectories even if empty, /f outputs full src/dst paths (if you want), /y means overwrite, /c ignores errors
mkdir "%~dp0\tmp_scripts"
xcopy "%~dp0\scripts\!mods_preload\mod_p_offp_sae*" "%~dp0\tmp_scripts\" /i /e /y

cd "%modkitdir%"
CALL "%modkitdir%\masscompile.bat" "%~dp0\tmp_scripts"

REM %~dp0 refers to the drive letter + path of where THIS batch file lives

echo.
echo Copying files to dist\scripts
echo.

REM after build, copy scripts folder to dist\scripts folder. /i means create dist\scripts if it's not there, /e means copy subdirectories even if empty, /f outputs full src/dst paths (if you want), /y means overwrite, /c ignores errors
xcopy "%~dp0\tmp_scripts" "%~dp0\dist\scripts" /i /e /y /c

echo %~dp0

echo.
echo Removing temporary directory...
echo.

REM Remove tmp_scripts directory
rmdir "%~dp0\tmp_scripts" /s /q

echo.
echo Removing uncompiled source from dist...
echo.

REM Remove uncompiled source from dist\scripts directory
for /r "%~dp0\dist\scripts" %%f in (*.nut) do del /f /q "%%f"

echo.
echo Packaging mod into .zip...
echo.

REM Requires Powershell 5.0 / .NET Framework 4.x (some claim 4, some claim 4.5, some claim 4.8)
powershell.exe -nologo -noprofile -command "& { Compress-Archive -Force -Path '%~dp0\dist\scripts' -DestinationPath '%~dp0\dist\%modname%_%version%.zip' }"

echo.
echo Cleaning up dist\scripts
echo.

REM Remove dist\scripts directory
rmdir "%~dp0\dist\scripts" /s /q

echo Done.

pause
59 changes: 59 additions & 0 deletions build_sem_sae.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
@echo off

set modname=expanded_markets_additional_equipment_patch
set modkitdir=YOUR_MODKIT_BIN_PATH
set version=1.0

echo.
echo Creating temporary directory...
echo.

@REM /i means create tmp\scripts if it's not there, /e means copy subdirectories even if empty, /f outputs full src/dst paths (if you want), /y means overwrite, /c ignores errors
mkdir "%~dp0\tmp_scripts"
xcopy "%~dp0\scripts\!mods_preload\mod_p_sem_sae*" "%~dp0\tmp_scripts\" /i /e /y

cd "%modkitdir%"
CALL "%modkitdir%\masscompile.bat" "%~dp0\tmp_scripts"

REM %~dp0 refers to the drive letter + path of where THIS batch file lives

echo.
echo Copying files to dist\scripts
echo.

REM after build, copy scripts folder to dist\scripts folder. /i means create dist\scripts if it's not there, /e means copy subdirectories even if empty, /f outputs full src/dst paths (if you want), /y means overwrite, /c ignores errors
xcopy "%~dp0\tmp_scripts" "%~dp0\dist\scripts" /i /e /y /c

echo %~dp0

echo.
echo Removing temporary directory...
echo.

REM Remove tmp_scripts directory
rmdir "%~dp0\tmp_scripts" /s /q

echo.
echo Removing uncompiled source from dist...
echo.

REM Remove uncompiled source from dist\scripts directory
for /r "%~dp0\dist\scripts" %%f in (*.nut) do del /f /q "%%f"

echo.
echo Packaging mod into .zip...
echo.

REM Requires Powershell 5.0 / .NET Framework 4.x (some claim 4, some claim 4.5, some claim 4.8)
powershell.exe -nologo -noprofile -command "& { Compress-Archive -Force -Path '%~dp0\dist\scripts' -DestinationPath '%~dp0\dist\%modname%_%version%.zip' }"

echo.
echo Cleaning up dist\scripts
echo.

REM Remove dist\scripts directory
rmdir "%~dp0\dist\scripts" /s /q

echo Done.

pause
32 changes: 32 additions & 0 deletions install_offp_sae.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
@echo off
set modname=off_plus_additional_equipment_patch
set year=%DATE:~10,4%
set month=%DATE:~4,2%
set day=%DATE:~7,2%
set ymddate=%year%-%month%-%day%

set paddedtime=%TIME: =0%
set hour=%paddedtime:~0,2%
set min=%paddedtime:~3,2%
set sec=%paddedtime:~6,2%
set hmstime=%hour%%min%%sec%

set datadir=YOUR_DATA_DIR

echo.
echo Preserving old version, if any, in data directory...
echo.

REM Make a directory for old versions, if necessary, silencing error output
mkdir "%~dp0\old_versions" > nul 2> nul
move "%datadir%\%modname%*.zip" "%~dp0\old_versions\%modname%-%ymddate%-%hmstime%.zip"

echo.
echo Installing new version, if any, to data directory...
echo.

move "%~dp0\dist\%modname%*.zip" "%datadir%\" 2> nul

echo Done.

pause
32 changes: 32 additions & 0 deletions install_sem_sae.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
@echo off
set modname=expanded_markets_additional_equipment_patch
set year=%DATE:~10,4%
set month=%DATE:~4,2%
set day=%DATE:~7,2%
set ymddate=%year%-%month%-%day%

set paddedtime=%TIME: =0%
set hour=%paddedtime:~0,2%
set min=%paddedtime:~3,2%
set sec=%paddedtime:~6,2%
set hmstime=%hour%%min%%sec%

set datadir=YOUR_DATA_DIR

echo.
echo Preserving old version, if any, in data directory...
echo.

REM Make a directory for old versions, if necessary, silencing error output
mkdir "%~dp0\old_versions" > nul 2> nul
move "%datadir%\%modname%*.zip" "%~dp0\old_versions\%modname%-%ymddate%-%hmstime%.zip"

echo.
echo Installing new version, if any, to data directory...
echo.

move "%~dp0\dist\%modname%*.zip" "%datadir%\" 2> nul

echo Done.

pause
17 changes: 17 additions & 0 deletions scripts/!mods_preload/mod_p_offp_sae.nut
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
::mods_registerMod("off_plus_additional_equipment_patch", 1.0, "OFF+ & Additional Equipment Patch");

::mods_queue("off_plus_additional_equipment_patch", "of_flesh_and_faith_plus, sato_additional_equipment(>=3.2)", function() {
::mods_hookExactClass("scenarios/world/southern_assassins_scenario", function(sas) {
local onSpawnAssets = ::mods_getMember(sas, "onSpawnAssets");

::mods_override(sas, "onSpawnAssets", function() {
onSpawnAssets();

local roster = World.getPlayerRoster();
local bros = roster.getAll();
local items = bros[1].getItems();
items.unequip(items.getItemAtSlot(Const.ItemSlot.Body));
items.equip(new("scripts/items/armor/oriental/reinforced_padded_armor"));
});
});
});
8 changes: 8 additions & 0 deletions scripts/!mods_preload/mod_p_sem_sae.nut
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
::mods_registerMod("expanded_markets_additional_equipment_patch", 1.0, "Expanded Markets & Additional Equipment Patch");

::mods_queue("expanded_markets_additional_equipment_patch", "sato_expanded_markets(>=1.2), sato_additional_equipment(>=3.2)", function() {
::SEM_SOUTHERN_ARMOR.extend([
"helmets/oriental/masked_nomad_light_helmet",
"helmets/oriental/masked_nomad_light_helmet"
])
});

0 comments on commit d7e4702

Please sign in to comment.