Community > Multimedia

How to make your own maps.

(1/22) > >>

Leandro:
Well, Codewalker posted a tiny patch which allows you load files that the COH client normally wouldn't, so I guess I should bring you all into the exciting world of creating your own maps. The game has a built-in editor, but that requires a server, so your options are to edit the maps manually or make an external map editor. I won't be making an external map editor because I figure we'll eventually be able to use the in-game one, so here are some instructions to do it manually.

If you don't want to mess with hex editors yourself, click here to download the already-patched cityofheroes.exe for issue 24 beta. In order to make sure nobody thinks I added malware to it (or that the download site modified the file in any way) do the following:

* Rename your original cityofheroes.exe to cityofheroes.i24.exe and copy the linked cityofheroes.exe to the folder.

* Shift+Right click your City of Heroes folder. A menu will appear. Select Command Prompt here.

* Type in fc /b cityofheroes.exe cityofheroes.i24.exe

This will File Compare in /Binary the two files, and display the differences between the two files. Specifically, four bytes:

007237A8: F0 E4
007237AC: F0 D8
007237B0: F0 C8
007237B4: F0 C0

With that patch in place, you can go ahead and add maps to your data folder and play them from demos.

City of Heroes maps are simple text files. Good ol' Notepad can be used to create your own maps. The main problem is figuring out WHAT you want to put in the map. We'll start with the demo for our experiment; save this as mymap.cohdemo in your client_demos folder:


--- Code: ---1 0 Version 2
0 0 Map maps/mymap.txt
0 0 Time 6
0 1 Player
0 1 NEW Puddle
0 1 NPC Puddle
0 1 POS 0 0 0
0 1 PYR 0 0 0
0 CAM POS 0 10 0
0 CAM PYR 0 -2.2 0
1000 CAM POS 0 10 0
1000 CAM POS 0 10 0
1000 CAM POS 0 10 0
1000 CAM POS 0 10 0
1000 CAM POS 0 10 0
1000 CAM POS 0 10 0
1000 CAM POS 0 10 0
1000 CAM POS 0 10 0
1000 CAM POS 0 10 0
1000 CAM POS 0 10 0

--- End code ---

This just loads the map and leaves the camera floating at 0,0,0 for 10 seconds. If you try to run the demo now, you'll just see the standard blue sky and nothing else.

Under the city of heroes folder, create the folder data if necessary, then a folder named maps inside it. Paste the following into a file called mymap.txt and save it there:


--- Code: ---Version 2
Scenefile scenes/cityscene_stormpalace.txt
--- End code ---

If you were to run the file now, you're still on an empty map, but you'll notice the sky is different; if the filename didn't clue you in, that's the Storm Palace's scene.  Scene files are stored in the piggs, but since you only need the filename, I put a list here. Just remember to put scenes/ before the actual file name.

If you can't see the Storm Palace sky when you run this demo, check your paths. Make sure you have client_demos/mymap.cohdemo and data/maps/mymap.txt

Note that scenes do more than just set the sky; they also do texture swaps. For example, the Winter scene turns a lot of grass textures into snow textures, and the Ruined scene replaced a lot of textures with their damaged counterparts. So, to avoid confusion, I'll be using the Altas Park city scene.

Moving on! We should have some solid ground under our feet. Time to Reference some geometry.


--- Code: ---Version 2
Scenefile scenes/cityscene_atlas_park.txt

Ref grass_plate_flat_01
   Rot 0 0 0
   Pos 0 0 0
End

Ref grass_plate_flat_02
   Rot 0 0 0
   Pos 128 0 128
End

Ref grass_plate_rolling_01
   Rot 0 0 0
   Pos 128 0 0
End

Ref grass_plate_rolling_02
   Rot 0 0 0
   Pos 0 0 128
End
--- End code ---

If you run the demo after saving mymap.txt, this is what you'll see:



It's not pretty, but it's ground. Plates come in many varieties, but here I used two flat ones and two irregular ones in diagonal. They are 128 units by 128 units, so I just placed them one next to each other, and that's what the Pos statements are about: placement. Rot is obviously rotation, which we'll see shortly.

Now, where did I get those geometry names? Here's the ugly part: they are not easy to get to, and there's not a list or a sample library... yet, anyway. It's one of those projects I have in the backburner, but I'll need help. So if you want to help catalog the game's geometry, post here! Basically I'd give you a list of geometry, you'd make a map containing one of the items (and just that item) and screenshot it, and so we'll slowly build a library of stuff. But I'm getting ahead of myself.

I'm going to use all flat grass plates because they're easier to handle, and then I'll add a little house. And some trees. This is when I opened Cameraman to help me find coordinates to place stuff in.


--- Code: ---Version 2
Scenefile scenes/cityscene_atlas_park.txt

Ref grass_plate_flat_01
   Rot 0 0 0
   Pos 0 0 0
End

Ref grass_plate_flat_02
   Rot 0 0 0
   Pos 128 0 0
End

Ref grass_plate_flat_03
   Rot 0 0 0
   Pos 0 0 128
End

Ref grass_plate_flat_04
   Rot 0 0 0
   Pos 128 0 128
End

Ref rmn_bldg_04
   Rot 0 -2.5 0
   Pos 128 0 128
End

Ref conifer_sml1
   Rot 0 0 0
   Pos 156 0 95
End

Ref conifer_med1
   Rot 0 0 0
   Pos 136 0 94
End

Ref conifer_med2
   Rot 0 0 0
   Pos 95 0 129
End

Ref conifer_lrg1
   Rot 0 0 0
   Pos 105 0 166
End
--- End code ---

If you run the demo now, this is what you'll see:



That's starting to look like something that might be usable in a demo. Or as the very basic beginnings of a city zone.

Note the use of the Rot command in order to make the house face the right way. Pos and Rot works the same as POS and PYR in demos, so if you're familiar with demos you should feel right at home with those two.

Oh, but how am I going to get into this zone? And for what purpose would I go into this tiny little map? Well, for an entry, we could use a portal. Portals are FX scripts, which those familiar with demo editing should already know. In order to use an FX, it has to be defined inside a group; so add these lines at the bottom of the map:


--- Code: ---Def Portal
   Group Omni/PARTICLE_100
      Rot 0 0 0
      Pos 0 0 0
   End
   Type Scripted/Praetorian/Magic_Door/Magic_Door.fx
End

Ref Portal
   Rot 0 -1.21 0
   Pos 133 4 63
End

--- End code ---

The Def command allows you to group several things together and then use them as a unit, but I won't be touching that topic on this post because it's already too long as it is. Suffice to day, you use Def with a name, and then group items inside. You can attach FX to one of the items using the Type command.

You will notice that the Pos and Rot in the group is 0. That's because the Def has its own little set of coordinates for grouping items. The Ref statement afterwards, which calls the group I just defined, places it in the right location with the right rotation.

Def names must be unique. That is, unique across the whole game. I used "Portal" here and it worked, but if there's already an item named "Portal" that you want to use, the Def would conflict. So if you want to make sure, add something unique to your defs, like grpMyPortal.

As for why go there, I have just the incentive. Add this bit to the end, then run the demo.


--- Code: ---Ref Tourism_plaque_01
   Rot 0 0 0
   Pos 74 0 82
End

--- End code ---



Where there's a badge, a badge whore is sure to follow.

And that concludes my first post on this topic. Certainly not the last. I just wanted to show you guys how easy it is to actually create your own maps from scratch (editing existing ones is a completely different story), and we really just need to start cataloguing all the existing map elements in the game.

Leandro:
(Post reserved for Part 2)

If you want to help screenshot specific map elements, please PM me! There's TONS of things that need to be catalogued, and I could really use the help.

Leandro:
Some items to mess with

Sparky collected the water/grass plates in this Photobucket album: http://s139.beta.photobucket.com/user/spectacular_sparky/library/Plates

A water plate

* OutsideWater_Smooth1024_NoSFX
Grass plates

* grass_plate_flat_01
* grass_plate_flat_02
* grass_plate_flat_04
* grass_plate_flat_03
* grass_path_str_01
* grass_path_str_02
* grass_path_str_03
* grass_path_str_04
* grass_path_4way_02
* grass_path_4way_03
* grass_path_4way_04
* grass_path_4way_01
* grass_path_3way_02
* grass_path_3way_03
* grass_path_3way_04
* grass_path_3way_01
* grass_path_bnd_02
* grass_path_bnd_03
* grass_path_bnd_04
* grass_path_bnd_01
* grass_path_end_02
* grass_path_end_03
* grass_path_end_04
* grass_path_end_01
* grass_slope_42ft_90in
* grass_plate_rolling
* grass_plate_bnd
* grass_slope_42ft_90out
* grass_slope_42ftslope
* grass_slope_32ft_90out
* grass_slope_32ftslope
* grass_slope_32ft_90in
* grass_plate_rolling_01
* grass_plate_rolling_02
Gothic buildings (screenshot by Sparky)

These are large, with a footprint of at least 2 plates (256 units) per side.

Cimeroran buildings (screenshot by Sparky)


Old Town style buildings (screenshot by Sparky)


Shiny skyscrapers from new Atlas (screenshot by Sparky)


Shops and filler buildings (screenshot by Sparky)

Notes: FillerShop_Garage is JUST the garage, to be added to the rest of a building; Z_Fillershop_Floors_* are to be attached on top of another building to make it taller.


Paragon-specific buildings (screenshot by Sparky)


Behavioural Adjustment Facility (screenshot by Sparky)




Roads (2 lane) (screenshot by Sparky)


Roads (4 lane) (screenshots by Sparky)


Roads (6 lane) (screenshot by Sparky)


Plates of different materials (for sidewalks, to place under buildings, etc) (screenshot by Sparky)


Old Style Atlas Buildings (screenshot by Sparky)


Rocks (screenshot by Sparky)


Park walls (screenshot by Hotaru)


Industrial Walls (screenshot by Hotaru)


War Walls (screenshot by Hotaru)

Blue war wall effects don't show in the screenies because of the stark white background, but should display correctly in a normal scene.

Tunnels (screenshot by Hotaru)


City Walls (screenshot by Hotaru)


Ruined buildings (screenshot by Hotaru)


Industrial Warehouses (screenshot by Hotaru)


Factories (screenshot by Hotaru)


NOTE: Many building won't show up unless they're called from Group. So in order to get it to display, you have to do something like this:

[/list][/list]
--- Code: ---Def myBuilding01
Group deco_skyscraper_10
PYR 0 0 0
Pos 0 0 0
End
End

Ref myBuilding01
   Pos 0 0 0
End

--- End code ---

This happens for sure with all the others marked with an asterisk, and might happen with others. If the building is invisible, try putting it into a Def. Post 2 will have a proper exploration of Defs, but for now, just use them that way.

Mister Bison:
HOLY RULARUU.

If someone makes an external editor, or a patch to use the client to edit the map, call it RULARUU. For he is a creator of worlds. Like the costume creator is Icon.

Also, I'm really sorry if this hurts you, brace for impact. Am I the only one to think that the game may be even better dead ? At least we have some good points out of our grief.

Keep up the good work guys.

EDIT: of course, this is discounting the firing of the whole of Paragon Studio, which is terrible. I'm really sorry for them and I'm happy it didn't end bad as they all got landings or bearings for one.

Turgenev:
I came. I saw. I came again.


(taking notes on how to be more Leandroic in my life)

Navigation

[0] Message Index

[#] Next page

Go to full version