wc3edit.net https://forum.wc3edit.net/ |
|
[GUIDE] Advanced Map Editing http://forum.wc3edit.net/tutorials-cheatpacks-f80/advanced-map-editing-t21344.html |
Page 1 of 3 |
Author: | Nuuby [ May 31st, 2011, 10:54 am ] |
Post subject: | [GUIDE] Advanced Map Editing |
Note: If there are any questions, please do ask. I can't do a FAQ otherwise! Stuff Covered:
*Note: still a work in progress. This is also meant for people who have grasp the basics, but do not yet still need help for the above mentioned topics. Cheat detection
Usually you would have found the cheats by now. IF NOT. There is one more chance to find it, search for "TriggerRegisterPlayerChatEvent" and follow what function it executes from the "TriggerAddAction" line. You should investigate only the ones that sound weird so as to save time. Still can't find it? There's a possibility that you've been looking at the war3map.j in the "scripts" folder. If there's a war3map.j in the root folder of the map, Warcraft would load that instead of the one in /scripts. So check the root folder. Ultimately, if you know the types of cheatpacks being used you can find them easily, usually JJ/Fai anyway. If you can't. Post about the problem on this thread, find us on chat or make a PROPER request. Tools A list of tools and some notes on them that are relevant to map editing. You should already have Jasscraft or Notepad++ if you're reading this guide. Click them if you don't have it. MPQ Editor
MPQ Master
MPQ View
W3M Master
RMPQEx
W3MPQFNs - Warcraft 3 MPQ filename detector
Vexorians' Optimizer
Fake version
Spoiler:
Spoiler:
Spoiler:
Spoiler:
Loading screen/Map preview Generally in maps, there are 2 types of loadingscreens. Ones that use 4 .tga files [Top-left/right, Bottom-left/right] and those that use 1 big .blp [Usually named as FullScreen.blp]. Usually when you fake version a map, you only need to edit one of the 4 .tga files or the .blp. This guide will cover both types. Firstly, the tools of the trade:
-An image editor. People generally use GIMP or Photoshop. I'll be using GIMP as Photoshop is a pay to use program. -Warcraft 3 Viewer .blp-Type maps
Extract the .blp file anywhere. Then use your XnView to open up the .blp file. Press Ctrl+Shift+S to open up the save as window, and save it as a .png file. Spoiler:
Then use GIMP to open it. Well... The following part gets rather hands-on and if you don't have experience with this its rather hard, so here's alot of pictures to help. Duplicated the background by right clicking on it's layer and select duplicate, now select this new layer. Zoom in[ctrl+mouse scroll] to the spot where you want to edit~ Now you have to use a combination of the eyedropper to pick colors from the background then brush/clone tool over the letters you want to replace, then use blur/smudge to make it more 'real' Spoiler:
Result~ Spoiler:
Using the text tool type in a suitable font with around the same size as the other fonts. Spoiler:
Adding in some more brush/text outline and stuff... And finished in around 3 minutes :p Spoiler:
Not the best,*The text needs bevel and emboss with a red stroke* but I'm more used to Photoshop so I've got no idea where most stuff in GIMP are so it's not as nice as I would have expected it to be. Once all the editing is done, save your work as a .tga file. Open up Warcraft 3 Viewer. Under the Convert Files tab at the top, select BMP,TGA or JPG -> BLP. Select your .tga file and your output file, select compression level *default is fine* and hit OK. Reinsert the outputted .blp file back into your map and you're done. .tga-Type maps and Map Preview
For the map preview, find the war3mapPreview.tga in the root of the MPQ and simply edit > reinsert it back. If it's not there it would mean that the map doesn't have a map preview picture. Custom Commands Keep in mind, that custom commands being unique in their nature, this guide cannot cover EVERY aspect of it. Caution, this section may confuse. You should at least understand what TriggerPlayerChatEvent and integers(If you don't know, you obvious had no form of education before) do. What it does is if a message you type contains a certain string, either exactly the string or a part of the text you typed, it will do something. That something that it does can be found by looking for the TriggerAddAction or TriggerAddCondition of the trigger. And also DisplayTimedTextToPlayer or any other TextTo variant, no explanation needed here. It also helps that you have some knowledge over the game, which is why we're so picky over details on the Custom Command or Single Player requests.
If you've played JP before, you would know that the command "-show" will display all the players' Jurassic Score. With this in mind, look for the text "-show" in the script. You would arrive to something like this... Spoiler:
From this, you can see that dO is the trigger and it will register chat messages from player 0~6 when they type the phrase "-show" exactly. The true at the end dictates if or if not the trigger should register messages exactly as the string "-show". And also the TriggerAddAction calls the function IT when the player types "-show". Find the function IT. It should show this function... Spoiler:
If you had remembered, we are looking for the display text to function which in this case would be this line that we're interested in. Code: call DisplayTimedTextToForce(fb(GetTriggerPlayer()),10.,((x[bj_forLoopAIndex]+GetPlayerName(Player(-1+(bj_forLoopAIndex))))+((" Jurassic Score is "+I2S(Vx[bj_forLoopAIndex]))+(" , number of dinosaur kills is "+I2S(re[bj_forLoopAIndex]))))) Now we have to look at the string. If you can't see it it's " Jurassic Score is "+I2S(Vx[bj_forLoopAIndex]))+(" , number of dinosaur kills is "+I2S(re[bj_forLoopAIndex]) As you might be able to guess, I2S(Vx[bj_forLoopAIndex])) , is what shows the score. Here's an explanation of the stuff in this. I2S converts an integer into a string. Naturally Vx[bj_forLoopAIndex] is a integer. Whenever you see those [ ] it would mean that it's an array, in this case an integer array. An integer goes into that [ ]. Which in this case would be 1 = Red 2 = blue so on... How would you know this? When the bj_forLoopAIndex is 1, the player is that minus 1, in other words player 0 aka Red. So from this we know that Vx[1] is the Jurassic score for Red. So now we make the command~ The easiest way is to insert this line of code into JJ's cheatpack. Code: elseif SubString(s2s,0,3)=="-cc"then set Vx[Player(GetPlayerId(p2p)+1)]=S2I(SubString(s2s,4,15)) Below the line Code: if SubString(s2s,0,6)=="-gold "then call SetPlayerState(p2p,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(p2p,PLAYER_STATE_RESOURCE_GOLD)+S2I(SubString(s2s,6,13))) What this does is that once you have activated JJ's CP. When you type "-cc 9999" it will set your Jurassic Score to 9999. What the individual stuff do:
-S2I(SubString(s2s,4,15)) S2I is the opposite of I2S. The 4,15 is the location in your string that it will check for the integer. In this case it checks from the range more then 4 less then 15. |
Author: | UndeadxAssassin [ May 31st, 2011, 3:18 pm ] |
Post subject: | Re: [Guide] Map Editing |
Ooh, nice WIP guide. You should consider adding a table of contents or put it in the order that you named it in the beginning. I'mma sticky this. |
Author: | AppleIcon [ May 31st, 2011, 3:27 pm ] |
Post subject: | Re: [Guide] Map Editing |
Wow, nice guide. I am waiting for the custom commands, hoping you can release it asap. Keep up the good work |
Author: | wanit000 [ June 12th, 2011, 2:52 am ] |
Post subject: | Re: [Guide] Map Editing |
Nice that is what i wait for longtime hoping for next step |
Author: | shamanking80 [ June 29th, 2011, 3:40 am ] |
Post subject: | Re: [Guide] Map Editing |
I had wondered the Godly Nuuby shared his tool to the public .. It's so amazing xD Had get it all except W3MPQFNs and JassNewGen because it's seem useless.. haha~.~ Anyway Nubby you did a good job for opened this thread! Respect to Mr.Nuu @@ Regards, Thanks ! |
Author: | Nuuby [ July 5th, 2011, 10:33 am ] |
Post subject: | Re: [Guide] Map Editing |
^Thanks =p Update: -Added CCs -Some cosmetic changes |
Author: | sibagariang [ July 5th, 2011, 6:44 pm ] |
Post subject: | Re: [Guide] Map Editing |
can u please help me, every time i try to open NewGen Warcraft.exe i always get eror ( ongame.dll eror, could not hack game.dll Please post logs/ongame.txt ) |
Author: | Nuuby [ July 6th, 2011, 6:54 am ] |
Post subject: | Re: [Guide] Map Editing |
Erm why would you need NewGen w3? People normally just use it for the world editor. |
Author: | sibagariang [ July 6th, 2011, 6:05 pm ] |
Post subject: | Re: [Guide] Map Editing |
Very-very Nice Guide, help noobs like me, but i have a problem when i replace war3mapPreview.tga and loadingscreentr.tga using mpq master, map grow bigger and i can't play the map. any solution for this bos ? |
Author: | darkfuryex [ July 13th, 2011, 2:40 am ] |
Post subject: | Re: [Guide] Map Editing |
Hey there i got a few questions... Nuuby wrote: As you might be able to guess, I2S(Vx[bj_forLoopAIndex])) , is what shows the score. Here's an explanation of the stuff in this. I2S converts an integer into a string. Naturally Vx[bj_forLoopAIndex] is a integer. Whenever you see those [ ] it would mean that it's an array, in this case an integer array. An integer goes into that [ ]. Which in this case would be 1 = Red 2 = blue so on... How would you know this? When the bj_forLoopAIndex is 1, the player is that minus 1, in other words player 0 aka Red. about this, if the ID of player red is 1...why did it bother to minus 1 from that to make it 0 again? i know that the default color of red is 0..and blue is 1 etc etc but why did it minus 1? Nuuby wrote: So from this we know that Vx[1] is the Jurassic score for Red. So now we make the command~ The easiest way is to insert this line of code into JJ's cheatpack. elseif SubString(s2s,0,3)=="-cc"then set Vx[Player(GetPlayerId(p2p)+1)]=S2I(SubString(s2s,4,15)) may i ask is "s2s" just the "name" for this trigger? sorry i dont have any basic knowledge of jass x(, and "4,15" just means that it will only take whatever value that appears right after 4 letters which is after "-cc " and the max score we can set to is 11 digits eg "-cc 12312312312"..right? then how about the "0,3" what is that for? Nuuby wrote: What this does is that once you have activated JJ's CP. When you type "-cc 9999" it will set your Jurassic Score to 9999. What the individual stuff do: -Player(GetPlayerId(p2p)+1) what this does is that it gets your player ID, ie if you're red it gives you a number of 0. Then adds 1 to it. So if you're red it gives you a number of 1. Which is what we need -S2I(SubString(s2s,4,15)) S2I is the opposite of I2S. The 4,15 is the location in your string that it will check for the integer. In this case it checks from the range more then 4 less then 15. last question, in the 1st question i asked why did the system minus 1 from the ID...why does the system adds 1 value to our ID again after giving you the final code? is it due to some security stuff? i seriously dont understand this minus 1 and plus 1 thingy..can you explain further pls? why is having the value of 1 for generating the final score code important and is what we need as mentioned by you? sorry im a noob but im willing to learn x( pls help.. anyway u got a very nice guide here...u went in depth with some stuff which is what noobs like me needs P.S i hope you can see the words i specially bolded out.. |
Page 1 of 3 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |