speige / wc3mapdeprotector Goto Github PK
View Code? Open in Web Editor NEWWarcraft 3 Custom Map deprotector
Home Page: https://www.youtube.com/@ai-gamer
License: MIT License
Warcraft 3 Custom Map deprotector
Home Page: https://www.youtube.com/@ai-gamer
License: MIT License
Yo bro!
Make it update from the software itself, so no need to download and extract, remove, etc.
Already supported for Jass. Finish the lua=>jass transpiler & run it through the jass war3mapunits.doo decompiler
Hey,
some maps cant be played in singleplayer. they will detect if you are alone with a bot and wont do anything.
does the automatic file name detection work if it starts the map in singleplayer first and than i quit to the main screen and open the same map in LAN?
Hello,
I followed with interest this topic because I have the same problem, I use only version 1.26.a: #29
My big request is if you can make a patch for 1.26a, because many of us stayed on old school w3. Or is there a way to convert from Reforge to 1.26a? In my case it is a map from 2012-2014, made for 1.26a and does not open in Reforged.
Please help
if these aren't in the config or main anywhere, add them
call SetMapName( "Just another Warcraft III map" )
call SetMapDescription( "Nondescript" )
You've helped me previously with this map in the YouTube comments but the deprotecter doesnt seem to be able to tackle it yet.
Its not the missing 2 methods mentioned in https://github.com/speige/WC3MapDeprotector/issues/4 we dont get that far.
Map: FOA S3 Rebirth v1.1b.w3x (https://www.epicwar.com/maps/331384/)
Left it running for 40 minutes and came to the conclusion that its an endless loop.
Default settings (nothing checked) and latest code from master was used. (in Debug mode)
Stuck at function: Deprotector.cs protected List<string> ScanTextForPotentialUnknownFileNames(string text, List<string> unknownFileExtensions)
foreach (var entry in strings.ToList())
{
var directory = Path.GetDirectoryName(entry) ?? "";
string multipleExtensions = entry;
string lastValue;
do
{
lastValue = multipleExtensions;
multipleExtensions = Path.Combine(directory, Path.GetFileNameWithoutExtension(lastValue));
strings.Add(multipleExtensions);
} while (multipleExtensions != lastValue);
}
It keeps iterating the same hash with "\\." and without.
Disclaimer: It takes 10 minutes for me to reach that point with a workstation PC.
Disclaimer: I'm running this on Windows 7 in a VM, so maybe that's unsupported?
I've run the program on a specific map, it seems to make progress until it reaches a specific point and then "freezes". I have minimal Windows debugging experience (but plenty of experience in Linux) but I can see that it's still doing something, it's pegged at 25% CPU (maybe 100% of a single core?), and it's still creating and exiting threads, but I can't really tell what it's stuck on trying to do.
This shows the currently running threads (I believe):
This seems to be what the main thread is doing:
This is the log from procmon showing it creating and exiting threads:
This is what the program itself looks like:
My main question: is there a way that I can get any more verbose debugging output, so that I can see what it's stuck on? My guess would be that it's successfully processed up to whatever point, and then the next thing it's trying to do ends up confusing it (e.g. maybe something was done when protecting the map which is even confusing your program?), but I don't really have any way of knowing this.
Another question: how would one build this from source? I assume there's some common windows dotnet whatever development environment that you can use? If you can give me some basic details (e.g. the name of whatever program/etc is used) I can probably work the rest out from there :)
I tried to use the Deprotector several times on the map in this link: https://xgm.guru/p/wc3/ACG-Arena-Original--l8.
The Deprotector hangs every time during the scanning.
I suppose Drake53's lib doesn't support this but here's the basic idea. The GUI trigger definitions are loaded by the game from 2 files: ai-somethingsomething.txt (for AI Editor) and triggerdata.txt (the main GUI editor). These files are completely declarative to the WorldEditor and some WE mods over the years have expanded these files to add new trigger functions (much like Reforged itself did with new game APIs).
It's possible map creators used these custom WE mods and unless the correct triggerdata.txt was loaded, the GUI regeneration wouldn't recognize these functions in code as triggers. To be frank, vanilla WE wouldn't either. Though another mod that'll gain traction is GrapesOfWath's GuiGui - this program provides a nice interface to add custom triggerdata and I assume at some point his default triggerdata distribution will become somewhat popular. Another triggerdata mod I know of is YDWE (probably more in Chinese community) and probably one or two from the Russian community.
For the purposes of adding to jassdoc, I wrote my own triggerdata parser and with the above requirements in mind, I intend to add "stacked" processing of triggerdata, when multiple definitions are specified, they are processed and merged together to form one output. I'll call it a stacked approach, because with the __index
metatable in Lua it's easy fall through to underlying tables that do hold the data, which is missing from a higher up table.
That tool in its current form is not ready to be used as a library in any form other than a CLI.
The alternative: the advantages of going all this way, is to restore the map to the point as it was when the original author was making it in modded WE. Obviously this is not required and all unrecognized trigger code could simply be made into "custom code". Modified triggerdata is not openable/workable in the vanilla editor anyway.
But if given the choice, the user could decide if s/he wants vanilla triggers or custom triggers with a notice which WE mod to use. Some simple counting (how many modded triggers found) would be needed to avoid false-positives, like one real custom code function recognized as modded triggerdata.
The need for this could be evaluated while scanning the current map corpus.
MPQEditor's tool only works on old versions of WC3. Re-code it for reforged. It should attach to exe before map is loaded & then monitor for file names extracted from the MPQ file.
There are properties of units in war3mapunits.doo that aren't yet being recovered search for "todo" comments in War3Net jassdecompiler class
It would be great to implement a database in which the names of the files found can be stored.
Perhaps the hash value of the map file could also be stored there in order to be able to search in the database.
This would perhaps make it easier for many users.
For example, if someone has found the names by brute force, others no longer have to do this if they want to restore the same map.
Can be fixed by deleting these methods:
call CreateNeutralPassiveBuildings_old()
call CreatePlayerBuildings_old()
call CreateNeutralPassive_old()
call CreatePlayerUnits_old()
I try to deptrotect the newest Version of the CHS Map. It can be found here:
Customherosurvival.com
The deptrotection seems to work fine at the first moment (it doenst find 36 files but that is not a problem).
But when i play the deptrotected map all heroes are replaced with i think default wc3 heroes.
Why did it happen? I havent opened it in the world editor. Just tried to play it.
Normaly when you start the map you can choose from many different heroes.
My intention is to just edit the jason script file to increase the timer between the fight round so that you have more time to read the abilitys and to shop items.
Error: The type initializer for 'WC3MapDeprotector.StormLibrary' threw an exception.
This allows users to benefit from each other because the entries can be included in the next release
Use this decompiler to convert to c, then step through code while executing in order to rewrite from scratch https://github.com/NationalSecurityAgency/ghidra/releases
It is not possible to give the path to the warcraft.exe in a config file.
If you have the game not in the default path it will always ask where the game exe is located.
I tried to deprotect hero push 4.3 and during the test everything was working really good, but when i tried to host it manually the game was different and it does not look like the original one. Heroes have different abilities and items and all items was in different places. In map deprotector it said that it did not find 6 files ((WARNING: 6 files have unresolved names)).
Hey Guy,
since brute force is supported for finding file names, it would also be cool if you could use rainbow tables as an alternative.
Is this helpful in such a scenario or is it only useful for calculating passwords?
https://de.wikipedia.org/wiki/Rainbow_Table
Live Game Scanner is too slow and unreliable at times. Procmon is not only way faster in getting file paths but can also get the obscure ones. The only issue is that It might also grab stuff unrelated to a map as well. You just need to filter the results given from the program.
Link to tool: https://learn.microsoft.com/en-us/sysinternals/downloads/procmon
How it can be used: https://web.archive.org/web/20231201201948/https://www.hiveworkshop.com/threads/poc-reforged-mpq-name-scanner.351760/
Those specific lines need to be converted to custom script within the visual trigger
Probably IsCustomScript property in War3Net Trigger object
In case the program crashes or needs to be force closed it leaves behind all work files and creates another folder instead.
I'm currently testing with a big map and got GB worth of data real quick. (FOA S3 Rebirth v1.1b.w3x map size 177MB)
Suggestion: Add a checkbox to delete by default.
Can be unchecked if the User wants to keep it.
If this is intended feel free to close this issue.
Example: Enfo's 1 Team Survival v9.0 Fix.w3x
// These all have an empty predictedFileExtension because they're native files that I don't have a "checker" for. Code assumes an empty extension is a file with an invalid encryption key (fake file name).
_fileIndexToDiscoveredFileNames[1]
Count = 1
[0]: "war3map.w3i"
_fileIndexToDiscoveredFileNames[11]
Count = 1
[0]: "war3map.mmp"
_fileIndexToDiscoveredFileNames[14]
Count = 1
[0]: "war3map.shd"
_fileIndexToDiscoveredFileNames[15]
Count = 1
[0]: "war3map.w3b"
Hi,
i often want to deprotect Maps to just be able to edit the jasson script file. So i do not need the ability to open it in the Map Editor.
I think you optimize many files to be able to open the map in the map editor, right?
But i think these procedures could break the map.
Could you give me the option to just edit the script file?
example map: ORD11.089
Deprotection succeeds & WorldEditor opens, but it crashes when clicking unit tab in ObjectManager.
JSONConvert code from ParseMapForUnknowns is very slow [freezes debugger if "Just My Code" is disabled]
allDecompiledStrings could instead only include properties that are known to include external files
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.