Jump to content

script to install WeiDU mods


agris

Recommended Posts

Hey, my question is pretty straight forward. Is it possible to write a .bat or create a WeiDU setup file that will install a specified range of mods and their individual components?

 

I have about 20 mods in a folder, all with their setup-XXX.exe files and corresponding resources, and I know what I want to install from each, and in what order. I'm just looking for a way to write a script to execute their installers in the order i specify; installing the components that I want. I believe I saw a post about this somewhere one time.. but for the life of me I couldn't find it when searching.

Link to comment
Hey, my question is pretty straight forward. Is it possible to write a .bat or create a WeiDU setup file that will install a specified range of mods and their individual components?

 

I have about 20 mods in a folder, all with their setup-XXX.exe files and corresponding resources, and I know what I want to install from each, and in what order. I'm just looking for a way to write a script to execute their installers in the order i specify; installing the components that I want. I believe I saw a post about this somewhere one time.. but for the life of me I couldn't find it when searching.

Yes. Check out the WeiDU command-line options here. If you want to see a detailed example of this in action, you can check out the BiG World Project's Installpack here.

 

In short, something like this should work for installing different components from 2 English mods.

 

setup-modname1.exe --force-install-list 1 2 3 6 8 --skip-at-view --language 0

setup-modname2.exe --force-install-list 1 5 6 --skip-at-view --language 0

Link to comment

I can do you one better. (If I thought people might've been interested, I would've put this out sooner.)

 

I've got a rather large script that does the full install of BG2 without any need for user input (including installation from the setup discs). It's mostly pretty idiosyncratic. I'm not sure it would work on other systems, and it asks for a pretty specific setup (namely, my own). But it can be made to work on any system, with a bit of effort.

 

This is a stripped-down snippet from the script (the real thing is plugged full of sanity-checks):

for /f "eol=; tokens=1,2*" %%i in (modlist.txt) do (
	echo Installing. . . . . . . . . . . . %%i
	if exist setup-%%i.exe (
			 setup-%%i.exe --language %%j ^
						   --skip-at-view ^
						   --force-install-list %%k >nul
	)
)

Just put that in a ".bat" file.

 

Then all you need is a file called modlist.txt in the same directory as the script, with content similar to this:

 

a6xppatch 0 0 1

bg2fixpack 0 0 1 2 3 101 102 111 112 113

ub 0 6

oversight 0 2

 

... this is the name of the mod (the filename between "setup-" and ".exe"), followed by the language number to use, followed by a list of components to install.

 

The benefit of doing it this way, is it's extensible. It allows you to add runtime options to select a different modlist or whatever. Come to think of it, though, it may just be very annoying... depends what your requirements are, I guess. I started with the single list of calls to WeiDU, but that became very quickly cumbersome, for reasons you'll figure out if you go down that road.

 

If you've got any more questions, or need more code, just ask.

 

razly

Link to comment

So, what you are basically doing, is to create a Megamod... Read this also, if you have interest of reading stuff.

 

If you don't...

The most organized, stable and updated auto-installer is the BWP (v6 currently), but that's for BP-BGT+ stuff.

But that's not all, if you wish to use your own parts, you just have to use a customized .bat, and here a good tutorial.

Link to comment

I'm not really surprised that the community, with such an obvious proficiency at coding, has already created this. Thanks for all the feedback- that tutorial looks to be perfect for what I want to do.

 

-Razlyubleno

That is a good idea. Long ago I converted my BG2 cds + ToB to a single DVD, but I could just modify that script to point to the different folders.

 

Another question: With debug mode on, will CTL-M show me an item's code ingame? I've found with all the item / store mods I've installed, there are some incredibly strong items at a criminally low cost and they need a 3 to 10 fold increase in their price.

Link to comment
That is a good idea. Long ago I converted my BG2 cds + ToB to a single DVD, but I could just modify that script to point to the different folders.

Yeah, I can't believe how long my script got. It started off so simple. But I kept adding to it. And adding to it.

 

... and now I'm not even sure if I know how it all works anymore. If I had to write it again from scratch, I'd shoot myself.

 

Another question: With debug mode on, will CTL-M show me an item's code ingame?

(Edit: Sorry! I misunderstood. Yes it will. And you can edit the prices with NearInfinity: http://www.idi.ntnu.no/~joh/ni/download.html)

 

And this is the (definitive?) CLUAConsole reference: http://iesdp.gibberlings3.net/appendices/clua/bg2.htm

 

I've found with all the item / store mods I've installed, there are some incredibly strong items at a criminally low cost and they need a 3 to 10 fold increase in their price.

You might like the StorePrices mod: http://america.iegmc.net/ardanis/

 

razly

Link to comment

Okay, I'm bored. So I'll waffle about my script a little:

 

choice /c rsefvq /t 10 /d f
if %ERRORLEVEL% == 1 (set modlist=restricted.txt)
if %ERRORLEVEL% == 2 (set modlist=standard.txt)
if %ERRORLEVEL% == 3 (set modlist=expanded.txt)
if %ERRORLEVEL% == 4 (set modlist=full.txt)
if %ERRORLEVEL% == 5 (set modlist=evaluative.txt)
if %ERRORLEVEL% == 6 (exit 0)

This menu allows me to select any one of the five different mod lists that I have sitting around. It's necessary to have different lists, since not all mods are compatible, for one thing; but also because my mood is a fickle little nuisance.

 

After 10 seconds, the menu times-out and defaults to the full install. If I hit the wrong button, it beeps at me.

 

We then run:

for /f "eol=; tokens=1,2*" %%i in (%modlist%) do (
	echo Installing . . . %%i
	if exist setup-%%i.exe (
			 setup-%%i.exe --language %%j --skip-at-view --force-install-list %%k >nul
	)
)

... and get output like:

 

Installing . . . bg2fixpack

Installing . . . bg2_tweaks

Installing . . . something_else

etc.

 

Can you see how much of my life I've wasted?

 

razly

Link to comment
Okay, I'm bored. So I'll waffle about my script a little...

 

Can you see how much of my life I've wasted?

 

razly

Someone {not me, but often attributed to me} wrote that mod-installing is almost as much fun as playing the game. Creating custom scripts is all part of the exciting and wacky world of BG gaming!

 

BiG World scripting emerged from the custom scripts (or better, the custom scripting ideas) that several of us had created and expanded over the years.

 

I like your script idea and might just use some part of it, as I have about 4 installations that I would love to coalesce into a menu interface. Would help/force me to standardize the code structure and naming conventions for the individual install scripts.

 

Since you seem savvy on scripting, if ever you want to add your brains onto getting an existing project working again, please take a look at the Standard MegaMod (SMM) Auto-Installation (and Infinity Engine Mod List & Installer (IEMI))

Link to comment

So, this turned into a bigger project than I had imagined. But I'm finally happy with what I have. So far, I have a very stable game with a lot of extra content. I think I made my own mega-mod install.

pause
rem BG2 fixpack uses modder pack, but with modified .tp2
SETUP-SPELL50.EXE --language 0 --force-install-list 0
SETUP-ASCENSION.EXE --language 0 --force-install-list 0 1 2 3 4 5
SETUP-BG2FIXPACK.EXE --language 0 --force-install-list 0 1 2 3 100 101 106 107 108 110 111 112 113 114
Setup-FamiliarPack.exe --language 0 --force-install-list 0
Setup-fairydragon.exe --language 0 --force-install-list 0
SETUP-ITEMUPGRADE.EXE --language 0 --force-install-list 0 1
SETUP-UNDERREP.EXE --language 0 --force-install-list 0
SETUP-RUAD.EXE --language 0 --force-install-list 0 1
SETUP-VALHORN.EXE --language 0 --force-install-list 0
SETUP-FR_ROV.EXE --language 0 --force-install-list 0 1
SETUP-BG2SOA.EXE --language 0 --force-install-list 1
SETUP-SONG_AND_SILENCE.EXE --language 0 --force-install-list 0 1
SETUP-CLIFFKEY.EXE --language 0 --force-install-list 1
SETUP-SPSTUFF.EXE --language 0 --force-install-list 4
SETUP-EXNEM.EXE --language 0 --force-install-list 0
SETUP-D0QUESTPACK.EXE --language 0 --force-install-list 0 4 5 6 7 9 10 11 13 14 15 16 18 19 20 21
SETUP-IMPASYLUM.EXE --language 0 --force-install-list 0 1
Setup-GBThfKp.EXE --language 0 --force-install-list 0
setup-MunchMod.exe --language 0 --force-install-list 0
SETUP-ASSASSINATIONS.EXE --language 0 --force-install-list 0
SETUP-DC.EXE --language 0 --force-install-list 0
SETUP-G3ANNIVERSARY.EXE --language 0 --force-install-list 0
SETUP-PLANARSPHEREMOD.EXE --language 0 --force-install-list 0 1 2 3
SETUP-CELESTIALS.EXE --language 0 --force-install-list 0
Setup-AzenMOD.EXE --language 0 --force-install-list 0 1
SETUP-OVERSIGHT.EXE --language 0 --force-install-list 0 3 4 6
SETUP-REVISEDBATTLES.EXE --language 0 --force-install-list 0 2 3 5 7 8 17 18 19 22 27
Setup-DSoA.EXE --language 0 --force-install-list 0 1 3 4 5 6 8
SETUP-TACTICS.EXE --language 0 --force-install-list 1 5 8 11 12 28 34 37
Setup-StuffofTheMagi.exe --language 0 --force-install-list 0
Setup-TTSQ.exe --language 0 --force-install-list 0
Setup-DofD.exe --language 0 --force-install-list 0
SETUP-DSR.EXE --language 0 --force-install-list 0
SETUP-UB.EXE --language 0 --force-install-list 0 1 2 3 4 5 6 7 8 9 12 15 21
SETUP-XAN.EXE --language 0 --force-install-list 0 3
setup-c#sb_silber.exe --language 0 --force-install-list 0
setup-tb#quest.EXE --language 0 --force-install-list 2 3
SETUP-NPCKIT.EXE --language 0 --force-install-list 31
setup-1pp.EXE --language 0 --force-install-list 0 1 2 3 4 5 6 7 8 9 10 11
SETUP-1PP_AVATARS.EXE --language 0 --force-install-list 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
SETUP-Z#MISC.EXE --language 0 --force-install-list 1
SETUP-DUNGEONBEGONE.EXE --language 0 --force-install-list 0
SETUP-PICKS_OF_THE_LITTER.EXE --language 0 --force-install-list 0
SETUP-TOD.EXE --language 0 --force-install-list 0 1
SETUP-RR.EXE --language 0 --force-install-list 0 1 2 3 4 5 6 7 8 10 11 12
SETUP-WHEELS.EXE --language 0 --force-install-list 0
SETUP-SCSII.EXE --language 0 --force-install-list 1000 2010 2020 2030 2050 2070 2090 2100 3020 4010 4030 4040 5000 5010 5020 6000 6010 6021 6030 6061 6070 6081 6090 6101 6123 6130 6135 6151 6161 6210 6220 6230 6240 6250 6270 7000 7010 7030 7051 7060 7070 7080 7090 7111 7120 7130 7140 7150 7160
SETUP-EXNEM.EXE --language 0 --force-install-list 1
SETUP-D0TWEAK.EXE --language 0 --force-install-list 0 6 23
SETUP-BG2_TWEAKS.EXE --language 0 --force-install-list 40 60 80 110 120 130 1010 1020 1040 1070 1080 1120 1150 1160 1180 1220 2040 2090 2140 2151 2160 2170 2200 2210 2240 2250 2260 2270 2280 2296 2320 2330 3000 3012 3020 3031 3040 3050 3060 3080 3090 3100 3110 3120 3160 3190 3200 4020 4031 4041 4050 4061 4071 4100
SETUP-D0TWEAK.EXE --language 0 --force-install-list 11
SETUP-P5TWEAKS.EXE --language 0 --force-install-list 10 20 30 40 50
SETUP-TB#TWEAKS.EXE --language 0 --force-install-list 100 150 200 300 1250 2050
SETUP-WIDESCREEN.EXE --language 0 --force-install-list 0
infinitycracker.exe
pause

To get everything to play nicely I used every hotfix and patch I could find in individual mod forums. I had to find overlapping content from D0Quest Pack, Tactics, SCSII, revised battles, DSoA, etc etc and pick components wisely. Someone has released two updates to the D0Quest pack tp2 and resources, which helped compatibility. To keep my game from being horribly unbalanced, I also had to edit / remove almost every item in Exnem's item pack, and raise the prices of underrepresented items, munchmod, sp pack, and AzenMOD. I had to tweak the .tp2's of the G3 fixpack (so the modder pack would just update IDS files), DSoA, scsII and others. Also, a tactics tp2 that patched instead of overriding was used.

 

Whew.

 

Now, finally, I can enjoy my game. Though I have to wonder, will playing for the Nth time be as fun as getting all this to what I consider playable?

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...