-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathIronLauncher_for_devs.lua
More file actions
127 lines (90 loc) · 4.35 KB
/
IronLauncher_for_devs.lua
File metadata and controls
127 lines (90 loc) · 4.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
--[[ IRON LAUNCHER CORE FUNTIONS FILE - ONLY FOR ADVANCED USERS,
[!] DON'T MODIFY IT IF YOU AREN'T SURE YOU'RE DOING!!
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
## M&B Iron Launcher for Warband | Copyright © 2009-2010 Created by Swyter. All rights reserved. ## ]]
-- // Init Variable stuff
--[Iron Launcher]
--#{?} This option is self-explained... optional because the new Multiplayer in-hot module swap... [1] = On [0] = Off | Disabled by Default
-- |-> [!] Deprecated, comment out HideOtherModules() and UnhideOtherModules() functions instead!!
--HideOtherModules = 0
--#{?} Creates a readable and cute Log file where is explained the entire Iron Launcher tasks in your system... [1] = On [0] = Off | Disabled by Default
DebugMode = 1
--#{?} Shows ugly messages if Iron Launcher fails... [1] = On [0] = Off | Disabled by Default
BreakPoints = 0
--#{?} Configures Iron Launcher to find the correct texture bitmap...
--FontDDS_AlternativeFilename = "FONT_SWC.dds"
-- // Restrict Modules
-- // Module Data
--ModuleData2Data("Data\\","falls.txt");
ModuleData2Data("Data\\","flora_kinds.txt");
ModuleData2Data("Data\\","Font_data.xml");
ModuleData2Data("Data\\","ground_specs.txt");
--ModuleData2Data("Data\\","item_modifiers.txt");
--ModuleData2Data("Data\\","mission_types.txt");
ModuleData2Data("Data\\","skeleton_bodies.xml");
--ModuleData2Data("Data\\","skyboxes.txt");
--ModuleData2Data("Data\\","sound_samples1.txt");
-- // Core Resource
CoreResources2CommonRes("Data\\","materials.brf")
--CoreResources2CommonRes("Data\\","pictures.brf")
CoreResources2CommonRes("Data\\","shaders.brf")
CoreResources2CommonRes("Data\\","textures.brf")
CoreResources2CommonRes("Data\\","ui_meshes.brf")
-- // Module Root
ModuleRoot2CommonRoot("Data\\","mb.fx")
ModuleRoot2CommonRoot("Data\\","mb.fxo")
ModuleRoot2CommonRoot("Data\\","specular.pp")
ModuleRoot2CommonRoot("Data\\","man_alpha.pp")
ModuleRoot2CommonRoot("Data\\","man_basic.pp")
ModuleRoot2CommonRoot("Data\\","man_flora.pp")
ModuleRoot2CommonRoot("Data\\","man_plain.pp")
--videos (wb & orig)
--ModuleRoot2CommonRoot("Data\\","taleworlds_intro.bik")
--ModuleRoot2CommonRoot("Data\","paradox.bik")
-- hide the other modules
--HideOtherModules()
--PatchRegistry()
Window.Hide(Application.GetWndHandle()); --> Useful
--#@> start the game
--------------------------------------------------------------------
WriteLogFile("["..System.GetTime(TIME_FMT_AMPM).."] Starting the game at "..MBexec.." ["..Game.."] \r\n >Waiting for M&B close...\r\n")
find_exec = File.Find(current_folder.."\\..\\..", "m*b*a*d*.exe", false, false, nil, nil); --> dynamic exe loader
if find_exec then Shell.Execute(find_exec[1], "open", "", "..\\..\\", SW_SHOWNORMAL, true) end --> Launches the game and waits for close / with right exitcode
--Shell.Execute("..\\..\\"..MBexec, "open", "", "..\\..\\", SW_SHOWNORMAL, true); -> old code
ErrorHandle() --> Diagnoses errors (IL hardcoded)
WriteLogFile("["..System.GetTime(TIME_FMT_AMPM).."] "..Game.." has closed, Undoing all the changes...\r\n")
--#@> when the game exits
--------------------------------------------------------------------
-- // Module Data
--Data2trash("falls.txt");
--Data2trash("flora_kinds.txt");
--Data2trash("Font_data.xml");
--Data2trash("ground_specs.txt");
--Data2trash("item_modifiers.txt");
--Data2trash("mission_types.txt");
--Data2trash("skeleton_bodies.xml");
--Data2trash("skyboxes.txt");
--Data2trash("sound_samples1.txt");
-- // Core Resource COMMENTED (mtarini)
--CommonRes2trash("materials.brf")
--CommonRes2trash("pictures.brf")
--CommonRes2trash("shaders.brf")
--CommonRes2trash("textures.brf")
--CommonRes2trash("ui_meshes.brf")
-- // Shader file
--CommonRoot2trash("mb.fx")
--CommonRoot2trash("mb.fxo")
--CommonRoot2trash("specular.pp")
--CommonRoot2trash("man_alpha.pp")
--CommonRoot2trash("man_basic.pp")
--CommonRoot2trash("man_flora.pp")
--CommonRoot2trash("man_plain.pp")
--videos (wb & orig)
--CommonRoot2trash("taleworlds_intro.bik")
--CommonRoot2trash("paradox.bik")
--restaurar la visibilidad del resto de módulos...
--UnhideOtherModules()
--UnPatchRegistry()
-- Restores old rgl_config.txt / optional :P
--RestoreWarbandConfig()
-- work finished & ends (hardwired)