PRELUDE
Before I tell how to make the edits, here's the last version made by me with all the edits which I'm about to teach you guys:
There's a few misc things that I don't explained like: changing the map name/map title/preview... since we already have guides here on wc3edit that teach you how to do it.
There's a few misc things that I don't explained like: changing the map name/map title/preview... since we already have guides here on wc3edit that teach you how to do it.
GETTING STARTED
- 1. Open the original version of TWRPG;
2. Extract the "war3map.j" (it's located in "Scripts" folder.);
3. Right click on "war3map.j" and extract (or just press F5 with it selected.)
Spoiler:
- 4. Open the "war3map.j" file on Jasscraft or any text editor; (I prefer Jasscraft since you can check your synthax retarded errors.)
5. It should look like this:
Spoiler:
• Disable Reaper (AFK-System)
• Respawn Time (5 Seconds)
• EXP Rate (gradual by level)
• Drop Rate
• Free Costumes (only works at SHDR version)
• SHDR Commands
• Remove Anti-Singleplayer
• DISABLING THE AFK-SYSTEM •• Respawn Time (5 Seconds)
• EXP Rate (gradual by level)
• Drop Rate
• Free Costumes (only works at SHDR version)
• SHDR Commands
• Remove Anti-Singleplayer
- 1. Press "CTRL+F" and search for "PLAYER_STATE_RESOURCE_LUMBER))>=60";
2. You will find that "if" condition:
Spoiler:
- 3. Just comment the "call" statment with "//".
Spoiler:
• CHANGING RESPAWN TIME •
- 1. Press "CTRL+F" and search for "' seconds." (with the quotation marks);
2. You should find this function:
Spoiler:
- 3. Look at the "hrx" real. Erase the whole text after the equal sign and replace with the new respawn time:
Spoiler:
- 4. Now the respawn time is 5 seconds. (you can set it to any second.)
• CHANGING THE EXP RATE •
- 1. For this one, there's not a certain search thing... just keep searching for "Handicap" until you find a function that looks like this one:
Spoiler:
- 2. Now we have to create a local variable that will represent our hero level;
3. Let's give a name to this local variable. I'll name it as hero_level;
4. Now we also have to set it to catch our hero level... that hero level is already declared ((Bo[(CDx)])), so we will just do some copy.
Spoiler:
- 5. Now we have to edit the exp rates by the current hero level. We're going to do it by editing the current if/elseif statments like this:
Spoiler:
- 6. Now the player will get an exp buff depending on his level. Example:
My hero is level 1 so it will get a 50x original rate buff;
My hero is level 101 so it will get a 100x original rate buff and so on.
• CHANGING THE DROP RATES •
- 1. Search for "endglobals";
2. Select the line above;
3. We're going to create two reals there, they will represent our drop
Spoiler:
Spoiler:
Spoiler:
• CHANGING DROP RATES OF SPECIFIED ITEMS •
Items like Dark Matter and others I edit to 100%... so it will be easier to get geared.
• DARK MATTER •
- 1. Search for "I06W";
2. You will find a global constant integer (depending on version its name can be different but the ID is always the same);
Spoiler:
- 3. Now search for "yC" and you will find this function:
Spoiler:
- 4. We're just going to do a few changes on it;
5. On the first if, change it to "<=(101)";
6. Now at the first elseif, copy the line that creates the item 'fgsk' into the first if;
7. Delete the elseif;
8. It will look like this:
Spoiler:
• ORICHALCUM/MITHRIL/ADAMANTINUM •
- 1. Seach for "I060" until you find a function like this:
Spoiler:
- 2. Change the "<=7.5" to "<=101";
Spoiler:
- 3. Now it has 100% drop rate.
• ESSENCE OF ANGER •
- 1. Search for "I0CD" until you find a function like this:
Spoiler:
- 2. Copy the create item statment from the first elseif;
3. Erase all the others and change the "<=1.20" to "<=101";
4. It should look like this:
Spoiler:
• REMOVING ANTI-SINGLEPLAYER •
- 1. Search for "ReloadGameCachesFromDisk";
2. The first thing that you will find is this statment:
Spoiler:
- 3. Change the if action to else action like so:
Spoiler:
- 4. Now search for "ReloadGameCachesFromDisk" again;
5. You should find this function:
Spoiler:
- 6. Erase all inside of the function:
Spoiler:
- 7. Search once more for "ReloadGameCachesFromDisk";
8. You should find this:
Spoiler:
- 9. Copy the code below of the "else" into the if just like so:
Spoiler:
- 10. Now singleplayer saves/loads will work on multiplayer.
• SHDR COMMANDS •
I made it work like a cheatpack to make it practical to add on any new version. Just download it at the beginning of the thread (or at attachments) and insert it like a cheatpack. Let's start with the globals part.
1. Search for "endglobals" and paste the globals code above like so:
Spoiler:
- 2. Now search for "function main takes nothing returns nothing";
3. Paste the whole endglobals code above the function main (like we did at globals.);
Spoiler:
- 4. Now, inside the function main, copy and paste the function main part:
Spoiler:
BE CAREFUL ON THIS STEP! ANY MISTAKE WILL CRASH THE MAP!
• FREE COSTUMES •
- 1. Search for endglobals;
2. Paste this code after the first function that doesn't has a "return boolean" statment:
Spoiler:
- 3. It should look like this:
Spoiler:
- 4. Now search for "KerB.YH" (it's a player nickname);
5. It should bring us to the first costume function:
Spoiler:
- 6. Now just change one of the "SaveBoolean" to "costume" like so:
Spoiler:
- 7. You can keep scrolling because every save boolean on a different function you'll have to change (at least one of them) to enable the costumes that this function has:
Spoiler:
Spoiler:
That's all! Have fun.
Best regards, devoltz.
Best regards, devoltz.
CREDITS
nuzamacuxe - Remade almost everything: design, etc...
nuzamacuxe - Remade almost everything: design, etc...