Skip to content

Commit

Permalink
Added fix for Han Solo (odf change in pistol) (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
BAD-AL authored Jul 27, 2024
1 parent 8f24561 commit d9b6688
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 0 deletions.
Binary file added deploy_lvl/all_weap_hero_hanpistol.lvl
Binary file not shown.
1 change: 1 addition & 0 deletions munge.bat
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ copy /Y MUNGED\patch_paths.script "0\patch_scripts\"
copy /Y patch_shell.lvl "0\patch_scripts\"
copy /Y patch_ingame.lvl "0\patch_scripts\patch_ingame.lvl"
copy /Y MUNGED\user_script_*.script "0\in-game-options\"
copy /Y deploy_lvl\*.lvl "0\in-game-options\"
copy /Y .\addme.lvl "0\addme.script"

copy /y readme.md "0\readme.txt"
Expand Down
6 changes: 6 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ Options > Video Settings > (X) Custom Options:
| | Aspyr broke mod localization (this fix is imperfect, but usually works). | user_script_loc_fix.script |
| | Aspyr broke in-game-music for most mods. | user_script_cc_music_fix.script |
| | Command Posts 1 and 4 aren't counted as valid CPs for Rhen Var Citadel Conquest.| user_script_rhenvar2_cp_fix.script |
| | Command Posts 1 and 4 aren't counted as valid CPs for Rhen Var Citadel Conquest.| user_script_rhenvar2_cp_fix.script |
| | Adjust to Aspyr making AI heroes work in-game. | removed 'user_script_ai_hero_support.script' |


Expand All @@ -135,3 +136,8 @@ Options > Video Settings > (X) Custom Options:
| | Fake Console - Added various Command Post related commands if playing Conquest mode.| |
| | Fake Console - Added Kit Fisto and Assajj Ventress to the list of Hero commands.| |
| | Fake Console - Minor spelling errors were fixed in a few commands.| |

# July 27 2024 Release notes (Release 2.2)
|Added fixes for:| | |
|----------------|------|-----|
| | Aspyr broke Han Solo| user_script_han_fix.script + all_weap_hero_hanpistol.lvl |
36 changes: 36 additions & 0 deletions src/scripts/user_script_han_fix.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
-- user_script_han_fix.lua
-- HanFix by bad_al_, Rayman1103
-- Description: Fixes issue where Han Solo crashes the game.
--

-- need to set
-- MedalsTypeToLock = -1 in "all_weap_hero_hanpistol.odf"

local oldReadDataFile = ReadDataFile

local function LoadHanPistol()
print("info: LoadHanPistol()")
-- use the zero_fs to find the right file
local result = zero_patch_fs.getFiles("all_weap_hero_hanpistol", {".lvl"})
if( table.getn(result) > 0) then
ReadDataFile(result[1], "all_weap_hero_hanpistol")
print("info: run fix for 'all_weap_hero_hanpistol' ")
else
print("info: Oopsie! 'all_weap_hero_hanpistol.lvl' not found ")
end
end

ReadDataFile = function(...)
if(string.upper(arg[1]) == "SIDE\\ALL1.LVL") then
local index = 2
local length = table.getn(arg)
while index < length do
if( string.lower(arg[index]) == "all_hero_hansolo_tat") then
LoadHanPistol()
break
end
index = index + 1
end
end
return oldReadDataFile(unpack(arg))
end

0 comments on commit d9b6688

Please sign in to comment.