wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Warcraft III Modding > Developer's Corner > Warcraft Editing Tools
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 08-20-2009, 06:28 AM   #1
midiway
Pro-carnivorous
 
midiway's Avatar
 
Join Date: Nov 2006
Posts: 217

Submissions (1)

midiway will become famous soon enough (43)midiway will become famous soon enough (43)

Default ExtraPatcher

I'm currently formulating an idea which mainly involves developing a patch for the game, like Blizzard's one, an attempt to extend Warcraft functionality. With the current troubles with the new patch, I think this is the best moment to show you what I've planning. I named it ExtraPatcher.

ExtraPatcher would be a dedicated way of managing the distribution of resources. It would firstly comes as an installable patch for players, it would concern with the process of extracting resources and making them available when playing the game, check if the patch is correctly installed, keep track of what version is currently installed and whether it needs an update. For start, the patch will provide as resources, models, icons, sound, ..., so it's a kind of way to distribute resources made by the community making them available in players machine, with maps not needing to import them.

Secondly, it is also aimed for developers in the deployment of theirs maps which are made using the resources of the patch. Like with RTC, only players that have the patch installed can play maps that are made specifically for this additional patch.

Yet about the focus with developers, map makers need to know what resources are at their disposal to their maps that are aimed for players with this patch. Also, those maps need to be compatible with players that do not have the patch installed. Players whithout the patch can still join online games that require the patch. The plan is to check at the start of the game whether players have the patch installed or not, disconnecting those missing it. For this, I managed to externalize some strings for the GetLocalizedString native:

Table:
ParameterReturns if installedReturns if NOT installed
"PATCHER_INSTALLED""Yes""PATCHER_INSTALLED"
"PATCHER_VERSION""1""PATCHER_VERSION"

You can check whether the local player has the patch installed in his machine and in what version:
Expand JASS:

I think it's much easier to enumerate the characteristics/pros/cons/ than writing it in a long textual explanation.

CHARACTERISTICS:
-Resources are made available to the game using local files ("Enable Local Files" registry value)
-Not only resources, but any additional file that it installs are supossed to be local and not mess with MPQ's
-So whatever fix that can be done in warcraft using local files can be added to this patch

PROS:
-As I could verify when making Wc3styler, if you have caution, local files will not prevent you to play on leader beeing banned
-This initiative leads to maps entirely made of imports whithout needing to import them
-I think this attempt seems much more reliable than others like creating a whole new WE
-Maps are able to check what players have the patch installed (I will create a vjass system that syncs this detection and disconnect players missing the patch)
-Map makers have a list of paths to resources that are granted to be working and ready to use
-I can think how nice it would be to inject systems in Blizzard.j

CONS:
-Players have to download and install this patch in order to play any map that need it
-It can scare some peoples thinking on it like some hacking tool, it can scare even blizzard

With all this in mind, I wanted a solid way to test it with an executable application.
This first release, only for testing purpose, is the patch installer:
-for players: enabling them to play maps that require ExtraPatcher
-for map makers: have acess to resources paths and can preview blp images. Also it fixes warcraft enabling it to play MIDI sounds

ExtraPatcher - download (5,3 mb)
Also attached a test map.
Attached Files
File Type: w3x patcher.w3x (17.6 KB, 28 views)

Last edited by midiway : 08-20-2009 at 07:34 AM.
midiway is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 08-20-2009, 02:54 PM   #2
MindWorX
Level 1 Neothelid


Tools Moderator
 
Join Date: Mar 2004
Posts: 254

Submissions (2)

MindWorX has a spectacular aura about (147)

Default

The idea is great, but an installer? That's just too much intrusion, instead you should do it with an mpq injection, that happens during runtime, so you don't need to add anything to the installation. Also, you need to get people to use it, do you have any ideas how to publish the project so alot of people will know about it? When making a check, you should toy with the config function that's native to all maps, maybe you could make it invalidate the map if your localized strings aren't around?
MindWorX is offline   Reply With Quote
Old 08-20-2009, 04:12 PM   #3
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,898

Submissions (37)

Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)

Hero Contest #3 - 2nd Place

Default

For TTor and other mods I just made a wc3 loader that swapped war3patch.mpq with the mod's mpq before running wc3. It works absurdly well and survives wc3 updates. Seriously.
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 08-20-2009, 07:52 PM   #4
midiway
Pro-carnivorous
 
midiway's Avatar
 
Join Date: Nov 2006
Posts: 217

Submissions (1)

midiway will become famous soon enough (43)midiway will become famous soon enough (43)

Default

Quote:
Originally Posted by MindWorX
The idea is great, but an installer? That's just too much intrusion, instead you should do it with an mpq injection, that happens during runtime, so you don't need to add anything to the installation. Also, you need to get people to use it, do you have any ideas how to publish the project so alot of people will know about it? When making a check, you should toy with the config function that's native to all maps, maybe you could make it invalidate the map if your localized strings aren't around?
I can see some advantages of using local files against mpq injection (MPQDraft right?):
-It is more secure use it than mqp injection when it comes to play on leader, I don't know how the injection works, but if it writes to game memory, will probabily trigger blizz 'warden' protection
-The files need also be available in WE, so when you use a path of a resource shipped in ExtraPatcher, WE will see the local file and read it.
-Maybe MPQDraft can patch WE too, but every time you want to run it, you have to use MPQDraft way of starting WE rather than the normal WE, so how could I deal with NewGenPack which also works as an injenction tool?

I would need help of some maps endorsing the project so people would require to install it. Maps won't use it just for fun, but to get the benefits the patch has. So I would like ideas of fixes that could be applied to the game and shipped with the patch.

If I could full it of benefits for maps and break some limitations of the game, it could turns in to a standard for both player and developers. But I doubt I can get it whithout help......

Nice ideia with the config func, when does the game run it? Before you join a game room?
midiway is offline   Reply With Quote
Old 08-24-2009, 12:10 AM   #5
PitzerMike
Alcopops
 
PitzerMike's Avatar


Tools & Tutorials Moderator
 
Join Date: Jan 2003
Posts: 2,794

Submissions (12)

PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)

Approved Map: Pitzer's Minesweeper

Default

Well, in my opinion using local files is a really bad idea.
Experience has shown that if the users have the chance to screw things up - and with local files they have oh so many ways to screw things up - surprisingly many will succeed in doing so.

MPQ injection is much more preferable. Not so much like MPQ draft but more like Grimoire's loadmpq since you can load any number of mpqs and also adjust their prioriy. Havn't seen any problems so far with blizzard's protection.

It's a good idea, but Mindy's concerns are also valid. You'll need a plan to promote this thing.
__________________
Zoom (requires log in)
PitzerMike is offline   Reply With Quote
Old 08-27-2009, 04:40 AM   #6
midiway
Pro-carnivorous
 
midiway's Avatar
 
Join Date: Nov 2006
Posts: 217

Submissions (1)

midiway will become famous soon enough (43)midiway will become famous soon enough (43)

Default

How does Grimoire ways works, just tell me the guide lines? Any kind of source available?

Is it at your repository?
midiway is offline   Reply With Quote
Old 08-27-2009, 07:39 AM   #7
deathminion1
User
 
deathminion1's Avatar
 
Join Date: Aug 2009
Posts: 24

deathminion1 has little to show at this moment (0)

Default RANDOM INCURSION

+1 reputation
deathminion1 is offline   Reply With Quote
Old 09-23-2009, 03:20 PM   #8
PitzerMike
Alcopops
 
PitzerMike's Avatar


Tools & Tutorials Moderator
 
Join Date: Jan 2003
Posts: 2,794

Submissions (12)

PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)

Approved Map: Pitzer's Minesweeper

Default

Oh sorry, I forgot about this.
Well there's a different repository for Griomoire.

Here's the sourceforge project: http://sourceforge.net/projects/w3grimoire/
Afaik the source code there is free to view for all.
__________________
Zoom (requires log in)
PitzerMike is offline   Reply With Quote
Old 09-23-2009, 06:55 PM   #9
thelifelessone
User
 
thelifelessone's Avatar
 
Join Date: Jul 2009
Posts: 91

thelifelessone has little to show at this moment (4)

Default

So... This just adds models, skins, sounds, etc. into the MPQ?
thelifelessone is offline   Reply With Quote
Old 09-23-2009, 08:31 PM   #10
midiway
Pro-carnivorous
 
midiway's Avatar
 
Join Date: Nov 2006
Posts: 217

Submissions (1)

midiway will become famous soon enough (43)midiway will become famous soon enough (43)

Default

Yes, but currently it works by using local files, not extracting to the MPQ
midiway is offline   Reply With Quote
Old 09-24-2009, 01:56 AM   #11
thelifelessone
User
 
thelifelessone's Avatar
 
Join Date: Jul 2009
Posts: 91

thelifelessone has little to show at this moment (4)

Default

Wait, local files? O_o

Edit: Oh wait, yeah I see it.
That's interesting... How'd you get them to load in WC3? An exe hack or something?

Last edited by thelifelessone : 09-24-2009 at 01:56 AM.
thelifelessone is offline   Reply With Quote
Old 09-24-2009, 03:35 AM   #12
midiway
Pro-carnivorous
 
midiway's Avatar
 
Join Date: Nov 2006
Posts: 217

Submissions (1)

midiway will become famous soon enough (43)midiway will become famous soon enough (43)

Default

Well, it is a very known method, setting the key "Enable Local Files" in the Windows registry to "1", the game will try to load any file that it needs from the game directory, if it doesn't find the file, it will then get the original from the MPQ
midiway is offline   Reply With Quote
Old 09-24-2009, 07:16 AM   #13
thelifelessone
User
 
thelifelessone's Avatar
 
Join Date: Jul 2009
Posts: 91

thelifelessone has little to show at this moment (4)

Default

Oh now that's cool.
What's the registry key? /random

Last edited by thelifelessone : 09-24-2009 at 07:17 AM.
thelifelessone is offline   Reply With Quote
Old 09-24-2009, 07:30 AM   #14
midiway
Pro-carnivorous
 
midiway's Avatar
 
Join Date: Nov 2006
Posts: 217

Submissions (1)

midiway will become famous soon enough (43)midiway will become famous soon enough (43)

Default

Quote:
Originally Posted by thelifelessone
Oh now that's cool.
What's the registry key? /random

Plz use the search if want to know more about it.
You create this DWORD value directly under the "HKEY_CURRENT_USER\Software\Blizzard Entertainment\Warcraft III" key

Btw, as I could see, inject a MPQ in the game is simply as:
PHP Code:
// ( C++ )

typedef BOOL __stdcall (* pSFileOpenArchive)(const char *fnlong priolong flagslong *mpq);

HMODULE storm GetModuleHandle("storm.dll");
SFileOpenArchive = (pSFileOpenArchive)GetProcAddress(storm,(const char *)266);
SFileOpenArchive(mpqname,prio,0,&mpq); 
midiway is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 05:40 AM.


Affiliates
The Hubb The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2017, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services