Is there a mod or script change, a way to set up where maps always load on campaign with certain cheats enable at start of maps?
yeah there is a way
Yeah, pretty sure you can set specific cheats to be enabled in the editor.
But you can also just make up your own rules for everything anyway, so using the cheats is usually a pretty crude way to do things in custom maps. Take the money cheat for instance, you can just create in-map scripts to give money to the player, you don’t need to use the cheat code. Instant win and instant lose cheats, there’s specific actions in the built in script system that do that already.
Cool, thanks. Was specifically looking for doing it in Campaign though. Dont feel like skipping early missions, but still want to “do” them
WHO IS YOUR DADDY AND WHAT DOES HE DO?
But seriously. The campaign already has all the cheats available if I recall. Just type “whosyourdaddy” and you become invincible. Similarly, “greedisgood 999999” makes you infinitely wealthy. These have worked since 2002.
If, as you say, infinite money, invincibility and instant kill are not good enough for you, then you can take it to the next level. Open the World Editor and go to the Trigger Editor and set up some triggers, such as:
Event - Play enters "gimmeArchimonde" as An Exact Match chat message
Action - Create 1 Archimonde for (Triggering player) at (Start location of (Triggering player))
Then use the “Convert to Custom Text” function on the trigger to generate the equivalent game script. Then save the map, and then go to your Documents folder where you may have something like “Documents/Warcraft III/JassHelper/Blizzard.j”. Copy this script file named “Blizzard.j” into a new subdirectory you need to create inside your retail install folder. The retail install folder is probably located at C:/Program Files/Warcraft III/_retail_/
or something. When you find it, you need to create a subfolder named Scripts. In that folder, paste the copy of Blizzard.j.
Then open Blizzard.j in a text editor like Notepad. Search for the “function initBlizzard” or something like that. This function is called when everything is starting up on all Warcraft 3 maps including both versus mode and campaigns, so remove this file before playing versus mode or else you would get desyncs and have horrible problems.
Paste the trigger you created in World Editor above the initBlizzard. But be careful here. World editor lies to you and leaves out part of the code. So if you paste the code all above “function initBlizzard” at first it still will not work.
1.) You need to find in your trigger where it says something like
set gg_trg_MyCheatyTrigger = CreateTrigger()
This line is referencing a gg_trg
which stands for something like G enerated G lobal trigger or something. Anyway the “generator” for this is part of the map editor’s Trigger Editor and not part of your game install, so it wont generate this global inside Blizzard.j like it does for your map.
So you need to change this line:
Before:
set gg_trg_MyCheatyTrigger = CreateTrigger()
After:
local trigger gg_trg_MyCheatyTrigger = CreateTrigger()
Basically, we changed “set” to “local trigger”. That way, instead of assigning some junk generated by World Editor for the map, we make a new one. Some 20 year Warcraft modding gurus will tell you that doing this leaks some memory in some way and has non ideal performance, and it does, but when you are playing Reforged campaign you won’t notice (so just ignore them).
Now there is a second step to do. In the code you copied there is some function with a name like InitTrig_MyCheatyTrigger
that was generated. This is your initialization function to create your trigger, so you have to make sure something in the normal flow of the game calls to it.
As a simple solution, start where you see “function initBlizzard” that you had searched for, and scroll down until you find the first “endfunction” after that. You probably dont even have to scroll; initBlizzard is usually not very long.
At the bottom here, right before the endfunction
line, add this:
call InitTrig_MyCheatyTrigger()
Now, as long as you picked a unique trigger name like MyCheatyTrigger back when you were in Trigger Editor, and the name is so unique that is not used by any other map in the campaign then you should be almost done. Dont be stupid and name your trigger “Untitled Trigger 001” (the default name) because then it will crash certain campaign missions where the campaign developers were equally lazy. (A name clash will make the map script corrupted and unplayable.)
Now, as a final step, search online for the guide for how to change a 0 to a 1 in the Windows Registry for the magic local files setting that allows game data changes like the one described above to activate. Unfortunately, because it is so easy to make yourself desync by modding your local install, the developers put it behind a magic registry flag so that not everyone would do it. Also, local files are basically the only way of modding an install that we have left due to all the modding Reforged CASC took away, so I prefer not to describe the technical details here of how to do it so that the people who own and run this game will not remove it and end all modding or something. I am a Warcraft III modder, so their interests and mine are sometimes kind of at odds. I don’t want to help them kill my hobby. I paid good money for this game.
For the record: For the reforged mode achievements, the game does not care if you cheat. Even if you use the instant win cheat, you will still earn the achievements.