Jump to content

Problem with CCMap and other questions


Commander_Jack

Recommended Posts

Hello,

 

I'm really new to this forum so be gentle with me, not knowing where to better ask this questions, than in this section.

 

I was making some new maps for TD with CCMap Maker and now I have some questions and some problems.

Hope someone can help me.

 

1. It looks like some of the Units and Buildings in CCMap Maker are wrong. E.g. the concrete walls are shown as temple of Nod, but when I open my map in XCC Editor the walls are correct.

Is it possible to fix it?

 

2. Is it possible to make some new tiles and place it onto the map? E.g. for the Terrain Layer it would be good to customize the coast line tiles.

 

3. I could transform my map with civilian buildings from temperate to desert theme and it worked, look at the picture.

So how can I place the buildings onto the desert map directly? I want some of the tiles in my desert map, but now i can't transform my map back to temperate only to place the buildings where i want them.

 

Finally one question about scripting; (Haven't done any scripting or triggering jet,sry)

4. Is it possible to make the techlevel ajustable ingame?

 

Let me explain what adjustable means to me: Player starts with tech level 2 or so, he can build basic troops. Then the player goes exploring and finds a crate with money, but the position of that crate is also a trigger who increases the techlevel to 6 or so.

Would that work, or is it impossible, not only in Singleplayer, but also in Multiplayer?

 

Thank you very much.

Greetings Jack

Civilian.png.5de7139defbf54835254489de1d84fae.png

Link to comment
Share on other sites

Hello Jack!

 

Seems you've come to the right place to ask this stuff so I'll do my best-- and I'm sure others will chime in.

 

1)This I'm not sure of as I haven't used ccmap in years, but I think I remember seeing another post about a similar issue, probably here on the mapping board.  Found it: http://forums.cncnet.org/index.php?topic=2495.0

 

2)I don't see why it wouldn't be possible to add tiles as long as it's in the correct palette.  (someone may correct me on this one)  However, I have found with proper tile stacking and overlapping you can accomplish just about anything.  I actually hex-edit cells all of the time to make shit look really awesome.  Hmmm... I should do a tutorial on THAT!

3)Hmmm... this is probably a bad idea.  At best I think the colors will be all kinds of messed up.  But if you really wanted to, you could just find out the structure "name" i.e. V31, FACT, etc and manually type it into the .ini  And if I understand you correctly you cannot mix desert and temperate tiles.  this leads to graphical hall of mirrors effects or crashes.

 

4)For the player, the tech level is not adjustable.

 

I made some scripting tutorials, too:

https://www.youtube.com/playlist?list=PLgVvRqoxkObvfNAz_I9PsvdZ3pafMDQZ4

Link to comment
Share on other sites

Thank you for the link.

Was the same problem, that the CCMap maker had the wrong conquer file.

Now the Units and Buildings are perfectly showing again.

 

The rest is sad to hear about. I don't want to HEX edit stuff, because its too deep in the matrix  :P

I'm a IT Specialist, but don't want to hang around code or something that looks like it in my spare time.

 

I can give you a sneak peak of my map to show you what i did there. Hope its not that bad...

Preview.png.cbc00f91dc13ed3b2ec53b762d682b7a.png

Link to comment
Share on other sites

1. It looks like some of the Units and Buildings in CCMap Maker are wrong. E.g. the concrete walls are shown as temple of Nod, but when I open my map in XCC Editor the walls are correct.

Is it possible to fix it?

I got a pack with ccmap + the correct mix files on my site.

http://nyerguds.arsaneus-design.com/cncstuff/ccmap31full.zip

 

[edit] Ah, that's what was linked in that topic MattAtack linked you to :) [/edit]

 

 

2. Is it possible to make some new tiles and place it onto the map? E.g. for the Terrain Layer it would be good to customize the coast line tiles.

The "Terrain" layer are trees and such. Not terrain tiles; that's the "Template" layer. As for making new tiles, that's not really easy, since all of their settings are hardcoded in the exe file. There's a trick that can allow you to extend any existing tileset file with more cells, but then you're invariably stuck with it using the primary terrain type of that tileset, and you need a hex editor to actually insert the tiles on the map, and you need some way to distribute your tile extension with the map. If it's a multiplayer map, this certainly won't work with cncnet; it only transfers the map files, not the .mix file you'd need to add to put your edited graphics in.

 

3. I could transform my map with civilian buildings from temperate to desert theme and it worked, look at the picture.

So how can I place the buildings onto the desert map directly? I want some of the tiles in my desert map, but now i can't transform my map back to temperate only to place the buildings where i want them.

It only "worked" in the editor. It won't work ingame. You need to use the specific Desert civilian buildings. Any civilian buildings from the wrong theater will show up as invisible ingame.

 

Finally one question about scripting; (Haven't done any scripting or triggering jet,sry)

4. Is it possible to make the techlevel ajustable ingame?

 

Let me explain what adjustable means to me: Player starts with tech level 2 or so, he can build basic troops. Then the player goes exploring and finds a crate with money, but the position of that crate is also a trigger who increases the techlevel to 6 or so.

Would that work, or is it impossible, not only in Singleplayer, but also in Multiplayer?

Uh, no. Nope. Not possible at all.

 

If you're planning to go into mission scripting, here are some hints:

-It doesn't work well in multiplayer.

-You should read this file. Completely. Start to end. http://nyerguds.arsaneus-design.com/cncstuff/cctxt/ccmanual.txt

Link to comment
Share on other sites

On the technical side, a .bin map is a collection of byte pairs, with each pair being one cell. The first value of that pair is the ID of the tileset to use (so the graphics file). The second byte is simply the cell number inside that tileset file. These tileset files don't actually have tile dimension information in them (as I said, that stuff is hardcoded in the exe file), so they're really just seen as a list of cells. Meaning, on a 2x2 tileset, like most rock ridge pieces, the second tile on the second row is just "3" (since it starts from 0)

 

Simple example: the temperate 2-cell wide rock in water (called "SH4" internally in the game and game files) has id '6', which, converted to base-16, conveniently remains '6' :P. Inside the bin file, that rock's two cells will show up as the sequence "06 00 06 01".

 

You can use MattAttack's trick of getting the ID from the first map cell, but with just the Windows calculator on 'programmer' mode, you can just convert it from this list:

http://nyerguds.arsaneus-design.com/cnc95upd/inirules/tilesets.ini (This file is basically that aforementioned hardcoded data from the exe, converted to ini format)

The index numbers in the list at the top of that file are the internal IDs inside the game (though this file has them in decimal, not hex), and XCC Editor will give you the tile name if you hover over the tile in the sidebar. You see in that list that, as I said, 6=SH4.

 

That's it, really. A map is 64 cells wide, and is simply saved as one row of cells after the next, so each row is 2*64, or 128 bytes long. So to get to the cell right under a cell in the .bin file, you just add 128 to your current position in the file. Once you get a bit of a feel for hex editing in general, the format of these maps is about the simplest you could possibly get :)

 

---

 

Knowing this format, as I said, it's possible to "add" tiles to the map by modding an existing tileset file to add more cells into it, and then manually hex edit these onto the map with the method MattAttack showed, and just counting which are the extra cells of the tileset file you expanded to get the second byte. But yeah... that's modding, not really map making anymore. I used this trick to add an actual Desert version of that helicopter cockpit crash that MattAttack used. If you start the N64 Special Ops Nod mission #2 from the game's New Missions menu and explore a bit to the right side of your starting location you should see the trick in action :)

Link to comment
Share on other sites

O right, forgot that having several for one side doesn't add any more.

You might want to experiment with it though. To see which houses can make use of this structure. I think it would make a great addition for "survival" maps if you know how to apply properly.

Link to comment
Share on other sites

The witch doctor's ion cannon is actually a silly culmination of bugs. Originally, this didn't happen because another bug in the game caused the civilians to have low power. I fixed that (by making every building produce a miniscule amount of power), because one notable side effect of this was that all civilian buildings decay over time without any reason. And then this ridiculous bug showed up :(

Link to comment
Share on other sites

No, in longer missions you really saw them all collapse for no reason. Those things don't exactly have much health.

 

And anyway, a 0/0 power balance should still not be low power, and Westwood should just have built in a system to exclude all IDs above 32 from the prerequisites to prevent the ion cannon bug -_-

 

So, in short, what I refrained from posting before: it was you who gave the witchdoctor the power to ion people...

Pfff, dammit, cn2mc  :laugh:

 

When I made this fix I honestly had no idea that multiplayer AI even used superweapons  O_o

Link to comment
Share on other sites

wow, neat looking landscape!  As cn2mc said, XCC has a "power status" under tools, although there's a couple minor bugs.  Off the top of my head, a structure that's not on the map at the start, but built by the AI is counted in the power status.  It's likely Nyer has a helpful guide somewhere with all those power stats, though :)

Link to comment
Share on other sites

As with most things in XCC Editor, I'm not sure the power tool is entirely correct. (I know for a fact its passability filter is completely wrong on a lot of cliff and river pieces)

The ini file I linked to earlier is part of a large set of such extracted data, which also includes the buildings. Just go to the bare folder to find them all:

http://nyerguds.arsaneus-design.com/cnc95upd/inirules/

The structures one, which includes all information on power production and consumption, is "structs.ini" Just look at the PowerDrain and PowerProduction values of all buildings in there :)

 

Why is there a steel crate in that base? Is that actually linked to something? Steel crates need celltriggers to have any effect at all.

 

kind of interesting that it's the witchdoctor's hut as opposed to the church ;)

It's just linked to the building IDs. Prerequisites are checked by going over all player buildings on the map, converting the building ID to its corresponding bit value (id -> 2^id, for example, 10 -> 2^10 = 1024 = 0100 0000 0000 in binary), and then adding them all together using logical OR, so you end up with a value in which each enabled bit is a building the player owns. For example, a weapons factory and a radar building are 0 and 4 respectively, so that becomes 0000 0001 for the weapons factory, and 0001 0000 for the HQ, and with the bits added together that becomes 0001 0001. These bit masks are then compared to the bit masks saved as "prerequisites" value in each building to see whether the player is allowed to build stuff.

 

This system works great, except that the game is 32-bit, and thus, integers are only... 32 bits. So for any building id value over 32, the system messes up, cuts off the highest parts, somehow ends up wrapping around, and makes al ids above 32 act as if they're the same as those for the same ids 32 lower. So a lot of these buildings provide "ghost prerequisites" for others. I know one of the fields in Temperate/Winter, when given to the player, will also give them radar.

Link to comment
Share on other sites

As with most things in XCC Editor, I'm not sure the power tool is entirely correct. (I know for a fact its passability filter is completely wrong on a lot of cliff and river pieces)

The ini file I linked to earlier is part of a large set of such extracted data, which also includes the buildings. Just go to the bare folder to find them all:

http://nyerguds.arsaneus-design.com/cnc95upd/inirules/

The structures one, which includes all information on power production and consumption, is "structs.ini" Just look at the PowerDrain and PowerProduction values of all buildings in there :)

 

Yes the template blocked layer would be that with the information of units being able to pass, or am I wrong?

And yes, many things are try and error, so much playtesting is needed.

 

Why is there a steel crate in that base? Is that actually linked to something? Steel crates need celltriggers to have any effect at all.

 

I know that, but now its just for decoration, later on its planned to make a scripted acion upon the crate.

 

It's just linked to the building IDs. Prerequisites are checked by going over all player buildings on the map, converting the building ID to its corresponding bit value (id -> 2^id, for example, 10 -> 2^10 = 1024 = 0100 0000 0000 in binary), and then adding them all together using logical OR, so you end up with a value in which each enabled bit is a building the player owns. For example, a weapons factory and a radar building are 0 and 4 respectively, so that becomes 0000 0001 for the weapons factory, and 0001 0000 for the HQ, and with the bits added together that becomes 0001 0001. These bit masks are then compared to the bit masks saved as "prerequisites" value in each building to see whether the player is allowed to build stuff.

 

This system works great, except that the game is 32-bit, and thus, integers are only... 32 bits. So for any building id value over 32, the system messes up, cuts off the highest parts, somehow ends up wrapping around, and makes al ids above 32 act as if they're the same as those for the same ids 32 lower. So a lot of these buildings provide "ghost prerequisites" for others. I know one of the fields in Temperate/Winter, when given to the player, will also give them radar.

 

Nice to know that, so in Singleplayer, you could deny some buildings to be built if the mask is set correct? Or is that not possible?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...