Staredit Network

Staredit Network -> Modding Chat -> Program for making Starcraft load certain files
Report, edit, etc...Posted by ShadowFlare on 2006-03-22 at 15:06:59
I've also posted this here: http://forum.samods.org/index.php?topic=7313.0

This program boosts the priority of the scm/scx file to be above everything else and also keeps the map open after it was initially opened until a different map is opened. This combination allows any files that get loaded after the map is clicked on the map selection screen to be able to get loaded from the map. This includes various data files and even the chat screen you see when joining the game. smile.gif It also is able to force Starcraft to reload the preloaded graphics-related files on supported versions.

The program is in the form of a self-patcher or an MPQDraft plugin. To use it, first make a map which has modified Starcraft files in it, then load SCMLoader.exe.

http://shadowflare.samods.org/dwnload.html#SCMLoader

I've made some test maps. You can try them out and see some things this can do.

http://shadowflare.samods.org/files/(8)The%20Hunters.scm
http://shadowflare.samods.org/files/(4)Space%20Battle.scx
http://shadowflare.samods.org/files/(1)Space%20Battle.scx

All three of those have the same modified files, they are just different maps.

I'm also in the process of making a Use Map Settings map that makes extensive use of various modified files. The thread for the map: http://www.staredit.net/index.php?showtopic=35478


Here is a list of types of files and specific files used while playing, but are currently unpatchable by SCMLoader because they are loaded too early. I'm not going to list any files that don't have any effect on anything that you see before you click the map in the list, like menu graphics and layouts from before you click the map and files for game type settings.

.grp files for cursors (patchable in current beta)
Most .tbl files in arr\
rez\sfxdata.dat


Now for the files that ARE patchable:
(mostly just put in the order I saw them in the log file)

scripts\iscript.bin
Most other .grp files
All .lo* files
rez\images.dat
rez\images.tbl
rez\gluChat.bin and all files that go along with it (seems to only work for host, others only see it on the next game they join)
Tileset graphics
All color palette related files (used in the test maps to change all the colors smile.gif )
parallax\star.spk
arr\sprites.dat
arr\flingy.dat
arr\upgrades.dat
arr\weapons.dat
arr\techdata.dat
arr\portdata.dat and .tbl
arr\orders.dat
In-game fonts
All in-game sounds, including music
rez\stat_txt.tbl
scripts\aiscript.bin
scripts\bwscript.bin
Mission briefing .bin files and graphics
In-game interface graphics
game\icons.grp
unit\wirefram\tranwire.grp
unit\wirefram\grpwire.grp
unit\wirefram\wirefram.grp
unit\cmdbtns\zcmdbtns.grp
unit\cmdbtns\cmdicons.grp
The .trg files
Custom unit portraits might be possible
Custom .bin files for in-game menus and interfaces
Everything on the victory and defeat screens

Also, a custom music\playlist.txt file may be added, with the same format used for my playlist plugin.

FireGraft patches from the FireGraft beta are now supported in the current SCMLoader beta.

ASM actions are not supported yet (and not in FireGraft either). However, I don't think I want to have it support ASM actions or at least not be enabled by default. I will likely put in an alternative language for the code that SCMLoader will compile itself when it is used, which will have certain things pre-defined to make it so it can potentially be cross-version compatible but mainly to keep arbitrary code from being put in, since that is a serious security risk. To do the cross-version compatibility, there would be names associated with various offsets and those offsets would be updated for new versions. Of course, for this to work I would need input from people about what kinds of offsets to support. If someone wishes to help with making this happen, writing a parser in C/C++ or pointing me to where I could find a general parser for this would help it happen sooner.

I didn't make a complete list of every single file because that would take too long to write and too long to read. smile.gif The information given should be sufficient, though.

In the current release, there is also a "Use Map Settings (SCMLoader)" game type that SCMLoader automatically registers with Starcraft when SCMLoader is running. With this game type you can make it easier to find others playing SCMLoader-enabled maps.

It now also has auto notification of updates to help keep features consistent between SCMLoader users.

In addition to that, it has a feature that would allow map-makers to have optional graphics/sound/music packs for their SCMLoader-enabled maps so that they don't have to include these with the map and make the file size too large, but instead would be able to have them as an optional download (most likely they would put a url to it somewhere in the map).
Report, edit, etc...Posted by Darktossgen(MM) on 2006-03-22 at 15:34:39
I say, this pwns. X-D

Oh, and those *.wpe's, can I use them in my mod?
Report, edit, etc...Posted by ShadowFlare on 2006-03-22 at 15:54:49
QUOTE(Darktossgen(MM) @ Mar 22 2006, 01:34 PM)
I say, this pwns. X-D

Oh, and those *.wpe's, can I use them in my mod?
[right][snapback]450690[/snapback][/right]

Sure, if you want. biggrin.gif BTW, did you try out the maps with the program already?

Besides the colors and chat screen, it also has one modified unit - the wraith.

Also, if you want the rest of those *.wpe files I made for the other tilesets, you can get them from one of the mpq files here: http://shadowflare.samods.org/download/patch/
I think the ones I used were from colors 2 SC.mpq

When you load a regular map after loading one of those special ones I posted, everything is back to normal. smile.gif


Sadly, this method doesn't work for patching all of the files used during gameplay, though. There are many files that are preloaded before it even gets to the map selection screen. Maybe I'll try coordinating my efforts with the author of DatLoader, especially for those preloaded files, since the method needed for patching those would be more along the lines of what DatLoader does.

Some of the suggestions here have given me some ideas for what things that could be done to force people to use this program to play maps that were designed for it: http://www.staredit.net/index.php?showtopic=26388 smile.gif I think I know a way of implementing that type of thing. Of course, it woun't be something that map makers would have to do. It would only be if the map maker wanted to force the map to be played with the mods.
Report, edit, etc...Posted by EzDay281 on 2006-03-22 at 21:20:54
Ooo, this sounds interesting.
Report, edit, etc...Posted by Firebird on 2006-03-23 at 02:55:24
so.... does this mod a map and not starcraft? im not rly getting what it does...

Is this like the UED triggers but its built-in memory changes?
Report, edit, etc...Posted by ShadowFlare on 2006-03-23 at 13:47:58
This is an MPQDraft plugin that will allow files to be loaded from the maps you open and not just from preloaded mpq archives.

BTW, why was this topic moved? Just wondering, because the topic for DatLoader is in the forum category I posted in and hasn't been moved here, and it basically about nearly the same type of thing. Besides, I also posted it in there because it looks like more people check that/post there.


I've officially released the plugin on my site now, so I've changed the download location.
Report, edit, etc...Posted by EzDay281 on 2006-03-23 at 18:28:50
Well, General Dicussion seemed to be more appropriate for the topic, but DatEdit's just been there for so long... eh'...
I don't know.
Report, edit, etc...Posted by ShadowFlare on 2006-03-23 at 21:53:24
OK, I've thought of two ways I could make it so an author of a map could force using this plugin to play the map, however there may be more possibilities.

1) Just compress staredit\scenario.chk with Zlib's deflate compression, which is supported by Warcraft 3's storm.dll, but not Starcraft's.

Positives: easy to do, I already know it works, makes maps a little smaller, might still be able to get title and description before joining on battle.net

Negatives: would be very unpleasant for people who don't have the plugin, since it makes Starcraft crash...; does not give any method of letting people know how to use the map, since it can't display the title or description after loading the map (just crashes)


2) Change a part of staredit\scenario.chk to make the map invalid, but make the plugin give Starcraft the valid version of it.

Positives: does not cause Starcraft to crash without the plugin, title and description are viewable without the plugin

Negatives: it might not be able to actually work, I don't know since I haven't yet tried giving Starcraft different data for the map than what is actually there; though it doesn't cause starcraft to crash, it will still cause you to be booted to the main screen in Starcraft when the map is loaded if you aren't using the plugin


The second option is what I would prefer to do if it will work. I want to absolutely stay away from the first one, if possible. I don't want people without the plugin to have Starcraft crash just because they clicked the map in the list...
Report, edit, etc...Posted by EzDay281 on 2006-03-23 at 22:30:18
Wait, so how do you insert the files into the maps?
Report, edit, etc...Posted by ShadowFlare on 2006-03-24 at 02:17:38
Just add the files using WinMPQ or any other MPQ archiver, it doesn't matter which. This plugin just makes it so the files will get used and does nothing other than that and is required to be running for it to do anything. wink.gif It has no visual interface whatsoever, it does everything it is supposed to do without you seeing anything except the effects of what it does. You can kind of think of it as MPQDraft for Starcraft maps. wink.gif

When I add the other feature I mentioned, which is for forcing users of a map to use the MPQDraft plugin to play, there will be a separate utility that will perform the modification to the map.


BTW, because of the nature of some of the code used in this plugin and its potential for abuse; unlike what the author of DatLoader is going to do, I am going to keep this closed-source. The reason is that the methods used allow the game to still be able to go on battle.net when performing the modfications. With a certain critical portion of the code for the plugin, one could easily make no-cd cracks for many of Blizzard's games which could still connect to battle.net when in use (unlike some of the popular cracks for the games), I know because I've done it in the past for my own use (which I am never ever giving to anyone). wink.gif Plus, this particular type is not version-specific like others usually are, which is part of why I want to prevent the creation and distribution of one by someone else but based off my code.
Report, edit, etc...Posted by Doodle77(MM) on 2006-03-24 at 18:43:56
QUOTE(ShadowFlare @ Mar 24 2006, 02:17 AM)
Just add the files using WinMPQ or any other MPQ archiver, it doesn't matter which.  This plugin just makes it so the files will get used and does nothing other than that and is required to be running for it to do anything. wink.gif  It has no visual interface whatsoever, it does everything it is supposed to do without you seeing anything except the effects of what it does.  You can kind of think of it as MPQDraft for Starcraft maps. wink.gif

When I add the other feature I mentioned, which is for forcing users of a map to use the MPQDraft plugin to play, there will be a separate utility that will perform the modification to the map.
BTW, because of the nature of some of the code used in this plugin and its potential for abuse; unlike what the author of DatLoader is going to do, I am going to keep this closed-source.  The reason is that the methods used allow the game to still be able to go on battle.net when performing the modfications.  With a certain critical portion of the code for the plugin, one could easily make no-cd cracks for many of Blizzard's games which could still connect to battle.net when in use (unlike some of the popular cracks for the games), I know because I've done it in the past for my own use (which I am never ever giving to anyone). wink.gif  Plus, this particular type is not version-specific like others usually are, which is part of why I want to prevent the creation and distribution of one by someone else but based off my code.
[right][snapback]451746[/snapback][/right]

What, you mean like it does crap to the hashing functions?

QUOTE
2) Change a part of staredit\scenario.chk to make the map invalid, but make the plugin give Starcraft the valid version of it.

Positives: does not cause Starcraft to crash without the plugin, title and description are viewable without the plugin

When a map is made invalid you can't view the title and description. Easiest way to do this would be to change the version short.

ShadowFlare, you horribly pwnt me to the floor. surrender.gif
Report, edit, etc...Posted by BroodKiller on 2006-03-25 at 13:28:01
QUOTE(ShadowFlare @ Mar 24 2006, 09:17 AM)
BTW, because of the nature of some of the code used in this plugin and its potential for abuse; unlike what the author of DatLoader is going to do, I am going to keep this closed-source.  The reason is that the methods used allow the game to still be able to go on battle.net when performing the modfications.  With a certain critical portion of the code for the plugin, one could easily make no-cd cracks for many of Blizzard's games which could still connect to battle.net when in use (unlike some of the popular cracks for the games), I know because I've done it in the past for my own use (which I am never ever giving to anyone). wink.gif  Plus, this particular type is not version-specific like others usually are, which is part of why I want to prevent the creation and distribution of one by someone else but based off my code.

Hmm...this was predictable. But are you sure that this works just fine on Bnet? I can imagine load of desynchronisation taking plac...
Report, edit, etc...Posted by Darkomni on 2006-03-25 at 15:27:37
Hey, Shadowflare, would you like to help me test out my modded RP map? it requires SCMLoader, When i release it here, it'll have every single unit modded! i'll also release the data files so that everyone here can test tongue.gif
Report, edit, etc...Posted by ShadowFlare on 2006-03-27 at 01:32:55
QUOTE(Doodle77(MM) @ Mar 24 2006, 04:43 PM)
What, you mean like it does crap to the hashing functions?

? What do you mean by that? And what part of the message were you referring to by that?

QUOTE
When a map is made invalid you can't view the title and description. Easiest way to do this would be to change the version short.

I already have one way I've tried making the map invalid by modifying staredit\scenario.chk, but I think I will try other parts of it. Maybe one will make it so that not only is the title and description viewable, but that it doesn't kick you out to the main screen either (so it doesn't make you go off of battle.net).

QUOTE
ShadowFlare, you horribly pwnt me to the floor.  surrender.gif
[right][snapback]452115[/snapback][/right]

You mean that I released this before you released DatLoader? happy.gif (or did you release DatLoader and I didn't know it?) Anyway, there are still other files to patch that this can't. I'd like it to be able to patch many more files, like the .lo* files and certain .tbl files that are currently unpatchable with it, for example. Hmm, I think I'll make a list of the types of files that are currently unpatchable with this plugin.


QUOTE(BroodKiller @ Mar 25 2006, 11:27 AM)
Hmm...this was predictable. But are you sure that this works just fine on Bnet? I can imagine load of desynchronisation taking plac...
[right][snapback]452860[/snapback][/right]

Hmm, based on the part you quoted, it seems you are talking about what I was saying about cracks, correct? Yeah, I've actually played on Battle.net with a crack I made which uses the same exe patching code as this plugin. No desync issues whatsoever. And if you aren't talking about the the cracks, no issues there either, as long as everyone is using the same modified data files.


QUOTE(Darkomni @ Mar 25 2006, 01:27 PM)
Hey, Shadowflare, would you like to help me test out my modded RP map? it requires SCMLoader, When i release it here, it'll have every single unit modded! i'll also release the data files so that everyone here can test tongue.gif
[right][snapback]452937[/snapback][/right]

Sure, I'd like to try it out so I can see some uses of my program. smile.gif
Report, edit, etc...Posted by EzDay281 on 2006-03-27 at 01:46:15
I may decide to try using this sometime. My friends have already stated that they like it. happy.gif
Report, edit, etc...Posted by BroodKiller on 2006-03-27 at 02:13:52
Wait, it hit me just now - isn't it that SCMLoader grants what people have been craving for years already: map-specific mods?

I just hope I'm not misundersanding something about the program...
Report, edit, etc...Posted by ShadowFlare on 2006-03-27 at 03:13:46
QUOTE(BroodKiller @ Mar 27 2006, 12:13 AM)
Wait, it hit me just now - isn't it that SCMLoader grants what people have been craving for years already: map-specific mods?

I just hope I'm not misundersanding something about the program...
[right][snapback]454105[/snapback][/right]

Yes, that's exactly what it is for. smile.gif I might even try to coordinate something with the author of MemGraft or FireGraft to get it so I can load patches through it when a map gets loaded, so you could have map-specific patches through there, too. I may also be able to just manually load one of those plugins to do the patches, instead of getting support for it in one of those.

One example of a plugin that works alongside SCMLoader is my playlist plugin. Since I integrated the capabilities of it into SCMLoader, I made it so SCMLoader can disable the playlist plugin when SCMLoader is handling it. When you load a new map which doesn't have a playlist file in it for the plugin, SCMLoader will re-enable the playlist plugin to use the default playlist file that was loaded (if one was loaded).

There are unpatchable files at the moment, but I am going to try working on that. I'll list those files soon.

BTW, I'm thinking of renaming the plugin, but I'm not sure what to name it. Any suggestions? Or should I just leave the name?


QUOTE(EzDay281 @ Mar 26 2006, 11:45 PM)
I may decide to try using this sometime. My friends have already stated that they like it. happy.gif
[right][snapback]454093[/snapback][/right]

Yeah, I like it, too. smile.gif One thing I've used it for so far is to test .dat file mods without closing Starcraft. To do this, I need to click a different map in the list, so that the plugin closes the file for the map (the plugin leaves the map open until you choose a different map, so that it can patch as many files as possible, which is required for loading the .dat files and some other things). Then I can add or change any files I want in the map, switch back to Starcraft and play the map to test the modified files. Though Starcraft loads almost instantly for me, this still saves time, since I don't have to click through as many things.


Hmm, BTW, maybe we should have an SCMLoader channel on Battle.net that we could go to when we want to try this stuff out. smile.gif
Report, edit, etc...Posted by EzDay281 on 2006-03-27 at 17:02:19
QUOTE
BTW, I'm thinking of renaming the plugin, but I'm not sure what to name it. Any suggestions? Or should I just leave the name?

I like it as it is, myself.
Report, edit, etc...Posted by ShadowFlare on 2006-03-27 at 21:13:34
Out of the unpatchable files, I'd like to get these ones patchable by at least some method, if possible:

scripts\iscript.bin
rez\images.dat
All .lo* files
The preloaded .grp files

The number of types of mods that can be loaded with SCMLoader is quite a few already, but if those were able to be patchable, it would make basically all the rest of the mods work through SCMLoader. Now to find a way to patch them...

rez\images.dat might not be too hard, but I'm unsure of the others. For the other files, it may be possible to return a larger file initially to reserve space for larger than default ones. I'll have to try it to found out whether Starcraft will accept it or not. I'm not sure whether there even is a section of memory with these files stored as-is, though.

ADDITION:
Hmm, actually I don't know if I want to put in that feature to allow authors to force the use of SCMLoader to play a certain map. I forgot how little information people get when looking at the list of games to join.
Report, edit, etc...Posted by Doodle77(MM) on 2006-03-29 at 18:00:33
QUOTE(ShadowFlare @ Mar 27 2006, 09:13 PM)
ADDITION:
Hmm, actually I don't know if I want to put in that feature to allow authors to force the use of SCMLoader to play a certain map.  I forgot how little information people get when looking at the list of games to join.
[right][snapback]454605[/snapback][/right]

You can make a seperate game type I guess.
Report, edit, etc...Posted by ShadowFlare on 2006-03-29 at 22:51:01
I need to test this more, but it seems that playing maps with mods loaded by SCMLoader may possibly cause desyncs on non-Use Map Settings game types. I'm not 100% sure of it, though.
Report, edit, etc...Posted by Staredit.Net Essence on 2006-03-31 at 01:42:31
Also let me get this strait. With the program we can...
Host a map that has mod files in it so that the person on the otherside can just download the map and play the map like a normal UMS but with mod capabilities if they have the SCMLoader too.

Isnt that an AutoLoader?

List of name:
TigerMap
ModMap
LoadIt
EZLoadIt
EZMapMod
MapModAuto
1337 shadow flare is the hottest.
QuikLoad
EZLoader Auto
SCMAutoLoader
Screw blizzard/hacker campaign to kill starcraft.
IKeepUBusyTillPR!
CrazyMap
ModMap+
ILoadIt4U
Report, edit, etc...Posted by Ojan on 2006-03-31 at 03:03:31
SCMLoader is a great name.
Report, edit, etc...Posted by BroodKiller on 2006-03-31 at 05:41:41
SCMLoader is ok, but it forgets about the SCX files...tongue.gif
CHKLoader sounds stupid though, so something like ModEmbedder or ModImporter may work.....dunno, they all sound quite bad, when you think of it...
Report, edit, etc...Posted by ShadowFlare on 2006-03-31 at 14:00:57
QUOTE(Doodle77(MM) @ Mar 29 2006, 04:00 PM)
You can make a seperate game type I guess.
[right][snapback]455583[/snapback][/right]

I guess I could maybe do that. SCMLoader wouldn't necessarily have to detect the new game type. Although if SCMLoader could detect it, that would be even better. smile.gif Then you could choose whether you want to use the modified files included with the map or not. If only Use Map Settings works in multiplayer, only a duplicate of that would be needed.
Next Page (1)