Giter Site home page Giter Site logo

speige / wc3mapdeprotector Goto Github PK

View Code? Open in Web Editor NEW
17.0 4.0 2.0 68.65 MB

Warcraft 3 Custom Map deprotector

Home Page: https://www.youtube.com/@ai-gamer

License: MIT License

C# 41.58% Objective-J 50.60% Rich Text Format 2.74% JavaScript 5.04% Batchfile 0.01% GAP 0.04%
warcraft3

wc3mapdeprotector's People

Contributors

dgarner-degasolutions avatar speige avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

wc3mapdeprotector's Issues

Updates!

Yo bro!
Make it update from the software itself, so no need to download and extract, remove, etc.

Some Maps cant be played in Singleplayer

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?

Compatibility for 1.26a

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

Responsive UI

When resized lower, the tools got hidden from the form. Anchored tools would be good.
1

[Bug] Endless loop

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.

Program not responding (despite still doing *something*), any way to get verbose debug logs?

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):
Screenshot from 2024-03-02 16-15-56

This seems to be what the main thread is doing:
image

This is the log from procmon showing it creating and exiting threads:
Screenshot from 2024-03-02 16-15-17

This is what the program itself looks like:
image


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 :)

Stacked processing of triggerdata.txt for GUI trigger regeneration

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.

Implement - Discovered Names Database

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.

Deprotection of "CHS - Custom Hero Sufvival"

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.

Warcraft III.exe Path not configurable

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.

Deprotection of Hero Push 4.3

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)).

Replace Live Game Scanner with Procmon or Something Similar

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/

[Suggestion] Delete old attempts

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.

Live scanner runs sometimes even when not necessary

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"

Option to leave files untouched

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?

CPU Speedup (Unknown Detection)

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.