Map Disassembling + tutorial

Started by Blackcode, February 28, 2010, 06:49:28 AM

Previous topic - Next topic

Kernel64

Quote from: Yuna_Q on March 05, 2010, 09:13:18 AM
Blackcode, could u make 1vs1 ai observer map  for ai testers  with losttemple or other map?
it's very useful for test ai.
plz

Seconded.

bassMD

Making an observer map is easy, I can provide a Lost Temple observer map when I come home from work (I guess Blackcode has better things to do, as he seems quite advanced in his research on hacking the game).

What I didn't figure out yet is how to load two different AIs in order to compare them. The only way I see is including them in the map, which seems quite uncomfortable as you would need to repackage the map after every change to the AI. But maybe that's the best we get, seeing that the map files also include things like player color that change every game...although I feel that the feature of including AIs in the maps seems more suited to custom maps like DOTA.

kblood

Quote from: Yuna_Q on March 05, 2010, 09:13:18 AM
Blackcode, could u make 1vs1 ai observer map  for ai testers  with losttemple or other map?
it's very useful for test ai.
plz
I beat you other pplz to it  ;D
http://dionysus.dk/SC2/
I just took the 2 player map from the AI map pack, and used Blackcode's info to make it an observer map. I will be uploading several maps to this folder. So far I put a (2) Lost Temple (Observer) map there. I already tested it. I will add a few more.

kblood

Quote from: bassMD on March 05, 2010, 10:50:26 AM
Making an observer map is easy, I can provide a Lost Temple observer map when I come home from work (I guess Blackcode has better things to do, as he seems quite advanced in his research on hacking the game).

What I didn't figure out yet is how to load two different AIs in order to compare them. The only way I see is including them in the map, which seems quite uncomfortable as you would need to repackage the map after every change to the AI. But maybe that's the best we get, seeing that the map files also include things like player color that change every game...although I feel that the feature of including AIs in the maps seems more suited to custom maps like DOTA.
You cannot test two AIs for the same race, you can however take one race from one AI and mix it with another. So far anyway, because as AIs begins getting more advanced, I guess more than just the race AI files will be edited. If that happens it will take more than a bit of editing to match these AIs against each other. Try have a look at the IAI Protoss 0.3 AI in the AI scripts section. That AI can be put in a TriggerLibs folder in the SC2 Beta folder, and it will be that protoss AI that will be used with whatever other AI you have installed. Even if the AI is put into a map file. So if it is just to test an AI, then no reason to put it directly into the map. Unless that for some reason makes more sense to you. Having a TriggerLibs folder in the SC2 Beta folder can give problems though, because if you try using another AI you need to either delete the folder or overwrite all the files in it with the new AI.

kblood

Quote from: Kernel64 on March 05, 2010, 09:44:52 AM
Quote from: Yuna_Q on March 05, 2010, 09:13:18 AM
Blackcode, could u make 1vs1 ai observer map  for ai testers  with losttemple or other map?
it's very useful for test ai.
plz

Seconded.
Hmmm, just added StarCraft II Launcher 2.0.2 to my site: http://dionysus.dk/SC2/
Seems rather relevant since it can somehow take any map and choose the number of players it should be launched with. No need to make maps with 2 or 4 players when using this. I removed the lazylaunch2.exe in the zip though, so you have to put your own file in that folder. Since it is my domain I guess they might detect the file as a Trojan. I doubt it, but I just rather not host cracks.
Credits and info:
Quote© Zoxc 2010

This is a simple tool that let's you import files to a map on-the-fly.
You can place maps in a folder named 'Maps' in the directory of the
executable. You can also group sets of files (called mods) in folders
in the folder 'Mods'. It will also include every file in the directory
'Base'.

This makes changes files in maps alot easier, you can also use it to
test an AI without modifing your StarCraft II installation.

Thanks to:
- ShadowFlare for SFmpq
- Team Lazytown for their launcher
- Team StarCrack for the included AI
- Blizzard for StarCraft II

Enjoy, sure seems a more permanent solution than me making 5 different maps of each map. Now player race and color just needs to be found and the launcher can setup just about everything :) I also really like how it can choose launcher options.

Kernel64

I get system error: code 2

The system cannot find the file specified.

my sc2 directory is not within the default install location. Could this be the reason?

sYk0

Quote from: Kernel64 on March 05, 2010, 02:16:23 PM
I get system error: code 2

The system cannot find the file specified.

my sc2 directory is not within the default install location. Could this be the reason?

it's because kblood removed "lazylaunch2.exe" from the archive, i suggest you go to the original thread to download the loader (http://darkblizz.org/Forum2/sc2-tools/starcraft-ii-launcher/)

Kernel64

#22
Oh, thanks. The launcher should also be placed within the \files directory.

My mod includes a modification to GameData\abildata.xml, does the launcher support other folders besides \TriggerLibs?

edit: Also, maps with these configuration would be nice:

observer maps for:
ZvZ comps
ZvP comps
ZvT comps
TvP comps
TvT comps
PvP comps

1v1 Player vs AI

ZvZ Player vs. comp
ZvP Player vs. comp
ZvT Player vs. comp
TvP Player vs. comp
TvT Player vs. comp
PvP Player vs. comp

One map, like Lost Temple with all the above items preset would be nice. Would make things easier. If not, is there somewhere I can find a simple tutorial to edit maps and make the above myself?

Blackcode

Kernel the race selection is what we are trying to do on this forum and with some of the guys from the starcrack team... we do not have a working race selection for now... i hope soon i'll get a solution with basttmp and usmc23

kblood

Quote from: sYk0 on March 05, 2010, 03:36:23 PM
Quote from: Kernel64 on March 05, 2010, 02:16:23 PM
I get system error: code 2

The system cannot find the file specified.

my sc2 directory is not within the default install location. Could this be the reason?

it's because kblood removed "lazylaunch2.exe" from the archive, i suggest you go to the original thread to download the loader (http://darkblizz.org/Forum2/sc2-tools/starcraft-ii-launcher/)
true, sorry about that. I did try to explain it and was going to add this link as well. I am having a look at your maps. Well done making a 6 player map. So far I only understood how you made the mapinfo file include more players. Where these extra players are placed on the map is still a mystery to me.
I remember there was a user made MAP editor for Warcraft 3. I expect it was only possible because they had the actual map editor to back engineer it from. Would be nice if we could decode the basic map makeup though, although quite a few things are still both simpler to do and more needed, like race selection.
I am trying to make the gamemode melee instead of FFA, but I am not sure if that is possible. Did it not start out being melee maps? Melee being a all AI vs player map? Well, I will look around some more.

kblood

Quote from: Kernel64 on March 05, 2010, 04:00:31 PM
Oh, thanks. The launcher should also be placed within the \files directory.

My mod includes a modification to GameData\abildata.xml, does the launcher support other folders besides \TriggerLibs?
Several ways to do this. If it is a mod you are making, which takes place in one certain map, you can just add the file to the map. Other than that, I think the launcher can do the same as any map with its mod folder.
I just tested the launcher way, and making a GameData folder in the mod folder of this launcher might make everything produce double units. I think it is because the XML files somehow "stack" their code. Not sure though, because a few other things should be double as well then I guess.

bassMD

Update on the player colors:

The decimal values for the colors (taken from replay files) are:

255,180,20,30   (red),
255,0,66,255    (dark blue)
255,28,167,234  (teal)
255,84,0,129    (purple)

Translating these into hex values and putting them into the map file unfortunately did not change the player colors at all (standard colors were the outcome). I also tried reversing the hex blocks, but no success either. White remains the only color I can set apart from the standard ones.

kblood

I have been experimenting some more with the attributes file. Could it be that, partly since it is an XML file, that it is mostly cosmetic? Giving the settings for the Interface to set up the map? Ie. no value to us since the launcher we use choose those settings.
At least that is how I see it. Is it not Lazylaunch1 or 2 that somehow chooses default gamemode or some set gamemode? Which makes me wonder why GameType 3 seems to be the default one in the attributes file.
[/code]    <Variant>
        <Id Value="2"/>
        <Genre Value="1"/>
        <GameType Value="3"/>
        <MaxTeamSize Value="2"/>
        <Name Value="Variant002/Name"/>
        <Description Value="Variant002/Desc"/>
        <IsDefault/>
        <Attribute Id="3010">
            <Locked/>
            <Default>
                <Slot Id="Global"/>
                <Value Id="7955827"/>
            </Default>
        </Attribute>

DFA

I am not sure exactly how to go about this, but will i be able to do this opening the map file as binary, and modifying it on the byte level?

bassMD

Sure, it could be that these things in the Attributes file are only for the UI, but XML files are for example also used by the AI, so it would be foolish to think that XML = cosmetical.

I actually have no idea what the different game types mean, maybe you can enlighten me.


@ DFA: the map files for Blizzard games are actually MPQ archives. In the Starcraft II ones, there is a file called MapInfo that is the main concern of this thread, and opening it in a hex editor and modifying it on the byte level is exactly the way we work with it.