Posted: Sun Mar 15, 2009 4:04 pm Post subject:
Couple of questions about tunnels
I'm making a new map, and I was thinking about adding some weird "woodoo stuff" in it by using tunnels. These are my problems:
1) Is it possible to make the tunnel's starting and ending positions be on different levels, like this?
2) Is it possible to make a tunnel that goes over a gorge, so that the unit could "teleport" over it? Weird stuff, as I said.
I tried to make that second part simply by making a tunnel that goes over the gorge, it didn't seem to work. The starting and ending positions were both on same level.
One more thing. Does someone know what those -1's mean in the tunnel's code? _________________
Twisted Insurrection's Lead Campaign Developer QUICK_EDIT
Those -1's at the end of the tunnel coding are completely useless, you only need one "-1" afaik, so leave one around and just delete the others (perhaps you could also do without, but I haven't tested that). As for unusual tunnels like you are suggesting, I did some tunnel research a loooong time ago, which included multi-level stuff, but in the first go it didn't seem to work. Anyhow, as long as the tunnels end on the same level, they should be okay. Tunnels are nothing but a hack to get TS to have units passing below existing terrain, same goes for bridges. FS does a horrible job at making tunnels... So although it's very annoying, you're better off coding them completely in a text editor.
Unfortunately my desktop pc is "fried" (can only get in using safe mode sometimes) and getting my files out is troublesome... I did have a test map in there with fully custom tunnels, I'll see whether I can take out my internal HD and put it in another computer sometime this week, that may help. QUICK_EDIT
I've been trying to make that tunnel over a gorge for a while now. I noticed that none of my new tunnels is working. Even a simple straight tunnel doesn't work, no matter what I tried. So that's why the "teleport" didn't work, not in the current map or in any new map. Has anyone come up with this kind of problem before? _________________
Twisted Insurrection's Lead Campaign Developer QUICK_EDIT
How exactly are you making your tunnels? I suggest you only use FS to get the proper tile coordinates for your tunnels (be awar FS for some reason lists them the other way around, so 57/43 really means 43/57 >_> ). Another suggestion is that you look at the original campaign missions (especially the TS GDI mission where you have to destroy Vega's dam) and how the tunnels in there were coded. QUICK_EDIT
Another suggestion is that you look at the original campaign missions (especially the TS GDI mission where you have to destroy Vega's dam) and how the tunnels in there were coded.
If I recall correctly, this mission featured a tunnel near the top right corner that travelled trough a gap filled with water _________________
I made them using FS, and added the extra number in front of the -1s. Just like before in my other maps. The first one I made in this map worked almost as it should, one of the three tunnels didn't work. But none of the others I've made so far have worked.
I noticed something new about the "teleport". It works as it should if I connect both sides of the gorge with ground that is in the same level with the tunnel all the time, or if I add the tunnel doors in the map. Neither of these fits my map. Here is a demonstrative picture.
I tried to put only a small one cell part of the tunnel door in the map, it didn't work. _________________
Twisted Insurrection's Lead Campaign Developer QUICK_EDIT
This picture is take from the 6th GDI mission "Destroy Vegas Dam". As you can see, the tunnel moves trough a gap of water, and it works perfectly in the game (it even has a curve!)
So, just extract the map with XCC mixer, and examine the tunnel with FinalSun and notepad
EDIT: Oh damn, I just realized you were in need of a tunnel that goes over the gap...sorry for the misunderstanding >_<
I made them using FS, and added the extra number in front of the -1s. Just like before in my other maps. The first one I made in this map worked almost as it should, one of the three tunnels didn't work. But none of the others I've made so far have worked.
I noticed something new about the "teleport". It works as it should if I connect both sides of the gorge with ground that is in the same level with the tunnel all the time, or if I add the tunnel doors in the map. Neither of these fits my map. Here is a demonstrative picture.
I tried to put only a small one cell part of the tunnel door in the map, it didn't work.
Here is your problem, you are trying to do this WITHOUT the tunnel entrances. The tunnel entrances have a special terrain type that gives the enter cursor and probably has other logic attached that makes tunnels work. You can create a special version of the clear terrain tiles using a TMP editor and then add that to the game by modifying the relevant theater .ini file if you really want to go to all that trouble, but you'll need to distribute these files with your map for it to work. QUICK_EDIT
I've done tunnels without the tunnel entrances, and they have worked perfectly. Check this map.
Maybe I'll just leave these out of the map...
But the other problem now is that none of my tunnels in this map are working. I've done everything just like before, I don't understand why the new ones don't work.
Edit: Problem solved, I just wasn't careful enough with the coordinates...
Question no. 2 also solved. It turned out that you can't make this kind of tunnel work if your units are unable to move to the other end of the tunnel by land. And now I mean without the tunnel entrances. It works fine with them.
Thanks to Crimsonum for help! _________________
Twisted Insurrection's Lead Campaign Developer QUICK_EDIT
I've done tunnels without the tunnel entrances, and they have worked perfectly. Check this map.
Maybe I'll just leave these out of the map...
But the other problem now is that none of my tunnels in this map are working. I've done everything just like before, I don't understand why the new ones don't work.
Edit: Problem solved, I just wasn't careful enough with the coordinates...
Question no. 2 also solved. It turned out that you can't make this kind of tunnel work if your units are unable to move to the other end of the tunnel by land. And now I mean without the tunnel entrances. It works fine with them.
Thanks to Crimsonum for help!
Sigh, maybe I wasn't clear enough before since I didn't say tunnels don't work at all without tunnel entrances, but lets try again...
Here is your problem, you are trying to do this WITHOUT the tunnel entrances. The tunnel entrances have a SPECIAL TERRAIN TYPE that gives the enter cursor and probably has OTHER LOGIC ATTACHED TO MAKE THE TUNNELS WORK. You can create a special version of the clear terrain tiles using a TMP editor and then add that to the game by modifying the relevant theater .ini file if you really want to go to all that trouble, but you'll need to distribute these files with your map for it to work.
The fact that tunnels sort of work when you don't have a proper entrance is beside the point. What you are trying to do is not how tunnels were designed to work, it is a hack and as such can be expected to give buggy behaviour or not work at all in some cases. QUICK_EDIT
I can guarantee that the enter cursor is not bound on the Tunnel tiles. It appears perfectly well without any of the tunnel tiles placed.
Calm down, Blade. This guy is new here, and be thankful that he has done quite a lot of mapping before trying this "hack". I'm sure he knew it wouldn't necessarily work correctly, but why deny trying?
We already succeeded at making invisible tunnels that could instantly transport units across a gap or trough a cliff, but it wasn't possible to transport the units to any place unreachable by conventional means (e.g. an island surrounded by cliffs). Even such findings would never have been discovered if we hadn't tried. _________________
I believe the tunnel tiles are also involved in pathfinding which is probably why they can't move somewhere they can't normally reach. You still get enter cursors without the tunnel tiles is news to me, but I'm used to working with RA2 where this isn't the case AFAIK.
The fact that he tested with tunnel entrances and it worked should have given him his answer that what he is trying to do requires the tunnel entrances. I suggested a workaround that has the downside of not transfering online. QUICK_EDIT
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum