Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Kotor/TSL Utility Proposal - Warning: Concerns Programming

Page: 1 of 1
 coaxmetal
11-16-2005, 10:15 PM
#1
Hello all,

Since I'm not so good with modeling, skinning, or anything but file editing and some in-game scripting, I've decided to try and tackle a utility.

I'm wondering if anyone's currently working on/planning to create a utility that runs as a Windows service/daemon for NTFS to shift around Kotor mods? The program in question would work a bit like a mod manager, but would also be able to create a schedule of mod installations/deletions to move various files into and out of your override directory at various points in the game as detailed by debug/output the game produces at various points (saves, other stuff) by interpreting game files and so forth.

The question is, has anyone done this? Because while I'm willing to try it now that i have the time and some of the knowledge, I'd hate to reinvent the wheel.

Some specifics
(warning to non-programmers: scrolling down may lead to a migraine)

This would be useful for:
-Switching custom models/force powers/skins/whatever in and out of use at different times, which effectivley removes restrictions on what modifications are allowed in-game due to hardcoded limitations.
-A quick and dirty workaround for some compatibility issues with mods for modders who are uncomfortable with editing .2da files/people who handle lots of such files and are sick of editing everything by hand.
-Playing with the soundset/music files?
-Testing of new mods?

Preferred languages for writing one of these things seems to be C/C++/C# or VB.net, I think.

The main algorythm as i envision it breaks down into something like this:
-User establishes scheduled file transfer events, indicating triggering event, files to be transfered, etc,
-User fires up game and plays until user triggers a scheduled event and reaches an autosave point
-Application receives event trigger
-Application executes on Autosave when it detects a savegame creation/update
EDIT: -Application displays game load screen and shuts down game
-Application transfers files to Override folder (renaming files if necessary? bit of a strech, i suppose).
EDIT: -Application restarts the game (so the mods load properly), using mouse&keyboard macros to do what can't be done with code.
-Application then returns to dormancy to await next trigger.

And sorry if this was supposed to be posted in another forum.
 Det. Bart Lasiter
11-16-2005, 11:34 PM
#2
If I'm understanding you correctly, I'm fairly sure that Windows blocks file modifications (ie copying, moving, deleting) when it's being used, and the game would be using it. Also, most modern games use a lot of system resources, and running another application would reduce game performance. However, there is a mod installer/uninstaller that cchargin made called KMM. (http://cchargin.home.comcast.net/kotor/index.html)
 stoffe
11-17-2005, 7:13 AM
#3
Another problem with this would be that the game engine caches some resources into memory when a game is loaded to cut down on disk accesses (which are a big source of slowdowns). Thus switching the content of the override folder while the game runs would have no effect in some cases, and produce strange results in other.
 coaxmetal
11-17-2005, 9:31 PM
#4
More newbie thoughts.

I'm fairly sure that Windows blocks file modifications (ie copying, moving, deleting) when it's being used, and the game would be using it. Also, most modern games use a lot of system resources, and running another application would reduce game performance. However, there is a mod installer/uninstaller that cchargin made called KMM.

Thanks for showing some interest. Although I did make a boneheaded mistake when I wrote the algorythm above (I had meant to have the daemon terminate the swkotor.exe process, thus closing the game, before shifting files around, I edited the error), I believe there are workarounds to what windows will and won't let you do while certain files are in use; it all seems to depend on how much of the NTFS API one has access to.

And I was aware of KMM, but what I'm proposing would work to switch mods in and out of the game when playing instead of just coordinating installations; for example, say you've got some unique item or appearance in a plot mod, like a new villian or an object in a custom-made module. This utility would allow you to import the models for the new character/object when the PC enters the module that the character/object appears in. When the PC leaves and you don't need those models, the files in question are removed, restoring original content or a slot for the next custom model to be inserted. Or it could be used to replace a default head with a custom retexture/reskin for part of the game and then switch back to the default head or another custom head, if there's ever a mod that uses more than the hardcoded max number of heads (is there a hardcoded upper limit on heads.2da? i forgot).

the game engine caches some resources into memory when a game is loaded to cut down on disk accesses (which are a big source of slowdowns). Thus switching the content of the override folder while the game runs would have no effect in some cases, and produce strange results in other.

Thanks for the reply. You're dead right on that count, and I edited the process to account for that.
Page: 1 of 1