Warcraft II Forum

Warcraft II => Mods & Development => Topic started by: Erenussocrates on May 20, 2015, 11:34:42 AM

Title: Want to change some units' stats
Post by: Erenussocrates on May 20, 2015, 11:34:42 AM
Hey guys, I've just recently registered here. I've always wanted to make some small modifications to my Battle.net Edition campaigns. That's what I wanted to do.
Namely 5 tides of darkness heroes, uther, lothar, zuljin, chogall and guldan, I want to make some changes in their stats in those campaign missions, and if possible, maybe even add some of them to the beyond the dark portal campaign maps as well.
I've thought that this kind of modification might be an easy task.

So, is there anyone who could show me the ropes and show me how I can learn to do it?
Title: Re: Want to change some units' stats
Post by: Delete mine too on May 20, 2015, 01:58:55 PM
You could extract the map out of mpq make the unit changes and put then back into mpq
Title: Re: Want to change some units' stats
Post by: Erenussocrates on May 20, 2015, 03:21:15 PM
Hmm. How could I do that?
Title: Re: Want to change some units' stats
Post by: Delete mine too on May 20, 2015, 04:46:22 PM
Get a MPQ editor.

http://www.hiveworkshop.com/forums/tools-560/ladiks-mpq-editor-32bit-249562/ (http://www.hiveworkshop.com/forums/tools-560/ladiks-mpq-editor-32bit-249562/)
http://www.zezula.net/en/mpq/download.html (http://www.zezula.net/en/mpq/download.html)

Open Ladik's MPQ Editor for example. Click the tools tab > click add > navigate to the path where you downloaded the ATTACHED list file below > click ok

(http://s27.postimg.org/7wbjqp5tv/image.png)

Time to edit WarCraft II!

File > Open MPQ > Go to where WarCraft II is installed > Open war2dat.mpq

(http://s24.postimg.org/d9wlabhgl/image.png)

You can extract these maps and change them and place them back. BOOM done. Go play your custom campaigns. If you would like to change other things such as text, you would need a .bin editor.



Title: Re: Want to change some units' stats
Post by: Erenussocrates on May 20, 2015, 04:58:29 PM
It gave me that error when I tried to implement war2_data.txt
Title: Re: Want to change some units' stats
Post by: Delete mine too on May 20, 2015, 06:48:32 PM
Try to run mpq as admin??? Hmmm
Title: Re: Want to change some units' stats
Post by: SmurfKinG on May 21, 2015, 01:06:50 AM
tupac can a unit or building cost or buildtime be modified from within the core of the game. (i.e. not in just one pud)

Title: Re: Want to change some units' stats
Post by: Delete mine too on May 21, 2015, 01:14:08 AM
Pretty sure never really tried, but you would drop unless someone had your custom exe.
Title: Re: Want to change some units' stats
Post by: Erenussocrates on May 21, 2015, 06:55:00 AM
Try to run mpq as admin??? Hmmm

I cannot run it as administrator. I can only add it to MPQEditor.
I mean, it's not a program by itself anyways.
Edit: I tried running MPQ Editor as administrator, but the result didn't change.

I wonder what are the pcx and xxx files.
Title: Re: Want to change some units' stats
Post by: Delete mine too on May 21, 2015, 02:55:08 PM
Yes try to run mpq editor as admin.. okay the file looks broken for you for some reason. Try a different mpq editor or list file. Once it works those files become known and listed correctly. It Explains all the different files in there. The games uses these files and most of then can be edited.

Edit that screen shot showed you you opened the mpq from war2 then tried to add the listfile... that might cause the error don't open it unless you setup the listfile...

List files http://www.zezula.net/download/listfiles.zip (http://www.zezula.net/download/listfiles.zip)
Title: Re: Want to change some units' stats
Post by: Erenussocrates on July 16, 2015, 12:58:07 PM
Sorry for the late reply. I will try my hand at this once again. I want to download the game from your site (I had downloaded it from somewhere else years ago, and that might have been the problem), but the downloads are gone from the download section? (print screen in the attachment)
Title: Re: Want to change some units' stats
Post by: mousEtopher on July 16, 2015, 02:49:16 PM
The FTP server is currently down, here's an alternate link (https://www.dropbox.com/s/6q4wme6ad692td4/War2Combat401.exe?dl=0).
Title: Re: Want to change some units' stats
Post by: Delete mine too on July 16, 2015, 05:36:23 PM
If you need more help let me know.
Title: Re: Want to change some units' stats
Post by: Erenussocrates on July 17, 2015, 03:11:49 PM
Okay. I am able to extract those files, but I don't know how to put them back in the same .mpq file again. If I can change those files, and put them back to the .mpq together with the listfile, maybe I can retain both the changes I made to the map, and both the original scenario objectives. Because when I attempt to play those campaign maps in custom game, they had no scenario objectives anymore.

Edit: I tried deleting the old campaign map in .mpq, and readding the modified .pud into .mpq. But when I tried to open the mission in campaign, it gives critical error and crashes.

Edit 2: This time, I didn't open any maps with world editor. I opened 1st mission of orc tides of darkness campaign with udtaed, and made some unit stat modifications only, to see if it would work this time. But when try to open the mission it still gives the same critical error. My work is getting desperate here.


Plus, I didn't understand what exactly I have to do with the listfile. Do I have to add it to .mpq each time I opened/made a modification in .mpq file? Also I see multiple listfiles, one belonging to the original game, and one that you probably sent me. It's confusing.
Title: Re: Want to change some units' stats
Post by: Delete mine too on July 17, 2015, 04:11:04 PM
Shows me some screen shots, or maybe we can TeamViewer and I will see your problem.
Title: Re: Want to change some units' stats
Post by: Delete mine too on July 17, 2015, 04:13:25 PM
Don't replace the listfile in the mpq file itself. It's used to list the names of the files in the mpq properly.
Title: Re: Want to change some units' stats
Post by: Erenussocrates on July 18, 2015, 05:05:15 AM
Here, I attached the same error in this post now.

Meanwhile, thank you for providing me with the download mousEtopher.

Title: Re: Want to change some units' stats
Post by: shesycompany on July 18, 2015, 09:19:51 AM
the campaign needs to be ripped out anyhow if it isnt. played by maps the only thing i can see for using it as campaign mode is to make your own voice overs and stories.

it would be a lot more flexible and be compatable to play with a friend 2 player campaign etc.sounds kinda fun.

Title: Re: Want to change some units' stats
Post by: Delete mine too on July 18, 2015, 02:09:25 PM
Can you play that map in regular mode??? Maybe bnet has a check to see if the campaign is editied. I will work on this tonight.
Title: Re: Want to change some units' stats
Post by: Erenussocrates on July 18, 2015, 03:13:50 PM
@tupac, yeah, I can play it as a regular map, on custom game. But as I said, the original mission objectives don't exist that way, they become "destroy your enemy".
Title: Re: Want to change some units' stats
Post by: Delete mine too on July 18, 2015, 07:23:53 PM
I wonder if it's the way the game is setup try that map online with use map settings. I might have to make a plug in or something to give it back those status for objective.
Title: Re: Want to change some units' stats
Post by: Erenussocrates on July 19, 2015, 08:38:56 PM
I just tried playing a campaign map on war2.ru, and I set it to map settings as well. It still didn't work, the map still requires you to destroy all enemies to win. I wish it worked like it does in broodwar.
Title: Re: Want to change some units' stats
Post by: Delete mine too on July 19, 2015, 10:51:17 PM
Are you sure even though it says that did you actually play the map???
Which one did you replace? What campaign map.

Edit:
Found this info in my Thread Tons of info to modify war2...
  00=own 4 farms and 1 barracks
              01=own 4 oil platforms and 1 shipyard
            02=any oil refineries in game
            03=kill attack peasants,build castle,
               destroy enemy
            04=never used
             05=free mages and peasants,destroy
               castle
            06=destroy transports,oil platforms and
                 shipyards
            07=never used
            08=destroy dark portal
            09=destroy castle,have runestone at end
            0A=build shipyard and fortress by circle
               of power
            0B=destroy death knights and their
               temple , Grom must survive
            0C=get violet player units,destory green,
               rescue white and have all heroes
            0D=destroy all,Teron must survive
            0E=capture dragons,capture dragon roost
            0F=destroy all enemy ships,have
               5 shipyards
            10=kill daemon
            11=destroy human buildings,rescue mage,
               return him to circle of power
            12=destroy all mage towers,destroy
               violet player
            13=destroy all humans,capture dark portal
            14=rescue X units , Alleria , Danath ,
               Turalyon must survive
            15=destroy all,Danath must survive
            16=destroy all strongholds and fortresses,
               Turalyon must survive,rescue X units
            17=destroy enemy,have castle
            18=destroy enemy shipyards , have 3 owns
            19=destroy orange,bring Turalyon and
               Danath to circle
            1A=Kill Deathwing,Khadgar , Alleria ,
               Kurdran must survive
            1B=destroy black fortress,raze altar
            1C=play until retreat,heroes must survive
            1D=destroy enemy,heroes must survive
            1E=destroy dark prtal,only Khadgar can
               do this,must survive

        01 B      1=kill all
            2=rescue by contitions below

So I bet you would want to hex or modify memory with a program.
0 = campaign, and which level.
1 = is online bnet style.
2 = custom map settings circle of power, rescue units.....

0 is what you want
1 is you're problem when on bnet..
2 kill all but with conditions.

I'm trying something I'll edit back shorty. To see if my brain storming was accurate.

Title: Re: Want to change some units' stats
Post by: Erenussocrates on July 20, 2015, 12:00:55 PM
Yes, I did actually play the map, it was tides of darkness human 1st mission, I set it as map settings, I played it until I got victory. I built 4 farms and 1 barracks but that didn't satisfy the victory conditions like I said. I killed 4 grunts on the tiny map, then I got victory.

Hmm, I don't know how to implement those numbers that you've presented, into a map/game/campaign. But it looks interesting, and I would like to know
Title: Re: Want to change some units' stats
Post by: Delete mine too on July 20, 2015, 01:44:54 PM
I'm working on this for you. Trying to figure where it's at in the map or just exe or both. If this works and I do this it would be possible to play other objectives then just kill all enemies. So people would need a program to dl to make these changes. I will work on this again tonight.

It's looks to me that blizzard used a totally different map editor than they have gave us :(

Well to make these changes we want to find what we need to change so we need to look in the exe, map file. The info above comes from the exe.

You need a memory scanner / hex editor. (Cheat engine, art money, etc.)

Let's say you want to edit the war2 exe with cheatengine.

1. Load war2, minimize it with alt + tab.
2. Open cheat engine, open process warcraft 2 in the list.
3. Now we need to scan / look for changes.

You need to study a little of how cheat engine works. I'm almost certain that this memory address is not static and will change. Not sure though not in front of pc...

4. So we want to do a 4 byte scan so check hex and put 01 in the box. Don't click first scan yet. Do not scan yet.

5 Go back into war2 load the campaign map that you need
victory conditions.01=own 4 oil platforms and 1 shipyard.

6 once you load that campaign map now go back to cheat engine and scan click first scan. Boom now you probably found around 10,000,000+ results. You need the 1 address to see if we can pull this off. So narrow down these results.

7 go back to war2 find the campaign that requires kill daemon. Now once you loaded it, go back to cheat engine, put 10 in the scan box and click next scan, make sure you click the right button or you will restart the scan..... now you should have a couple thousand values, not millions.

8 repeat this process keep switching campaigns and once loaded scan for the value of victory conditions example 01,10 like we did above.

9 now once you got only like 10 things saying what u scanned for. Then double click each on. You will notice they where added to the bottom of cheat engine. Click the check box to freeze these values. Now once you done that. Load a different map and see if the victory conditions match what you frozen them too.

There are many ways to scan for these values I recommend you watch a 10 minute YouTube video for cheat engine. I'll edit back later to see your questions.
Title: Re: Want to change some units' stats
Post by: shesycompany on July 20, 2015, 02:41:18 PM
i think that would only work in campaign mode..nice finds :)
where is all your hex codes at?looking in here not seeing it.

found it! staring at my face.all my hexes i found are in the puds themselves i never messed with the exe.

u could probably give humans lust in a custom exe :o off topic
Title: Re: Want to change some units' stats
Post by: Delete mine too on July 20, 2015, 03:20:15 PM
We can do alot more than that. ;)

EDIT did you change the mapname? or keep the same one for the campaign you changed???
Human01.pud