Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Sat Nov 16, 2024 2:17 am
All times are UTC + 0
Tunnel Tutorial
Moderators: Global Moderators, Tiberian Sun Moderators
Post new topic   Reply to topic Page 1 of 1 [16 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
TrainStation
Vehicle Driver


Joined: 06 Nov 2017

PostPosted: Mon Nov 06, 2017 10:31 pm    Post subject:  Tunnel Tutorial
Subject description: Need a good explanation for setting up tunnels in your map? Look here.
Reply with quote  Mark this post and the followings unread

TUNNEL TUTORIAL

If you're like me, you might have been interested in making your own maps with tunnels and you tried it in the FinalSun/FinalTI editor and it doesn't work when you try playing the map.  I've looked everywhere for full information on this matter and I can't seem to find it.  After quite a bit of testing, I've figured out how it works.  If you need help with tunnels, this is my gift to you.

Firstly, don't use the editor's tunnel creator.  Go to this page.  (Credit to Q45 for this amazing tool)

Once there, you will be able to open the tool, it does come with its own instructions as well.  Primarily, you need to find the coordinates of the middle tiles of the tunnel entrances.  Don't worry about the other ones.



To make this much easier to identify, I'll show you the exact spots of the tunnel entrances.  I've marked them just like how you should imagine them inside the tunnel tool linked earlier.  Remember, you want the coordinates of the middle tile in the three marked tiles.



To find the coordinates, place your mouse over the "middle tile" of the tunnel and look here look here.  Jot this number down in a notepad or just keep it in mind.



Now that you have the coordinates, place them into the tunnel tool above.  Red or orange does not matter, just make sure the ends look appropriate.  Note that the coordinates in FinalSun/FinalTI will be backwards.   (For example, coordinates in Final sun will read 75/50, but the Tunnel Tool should read 50/75.  There is an option in the tunnel tool to swap these numbers when clicked).  Once the coordinates are entered into the Tunnel Tool, simply create your tunnel.  Your tunnel may have turns and curves in it as well.



Once you have a nice tunnel created that fits your terrain, you will need to use the "Copy to Clipboard" option in the Tunnel Tool.  Copy/paste this information into a notepad.  It should look similar to this:



Each tunnel should create 6 lines of text, so if you want to make additional tunnels, use the "Index" function and add the lines to your text document.  Note that the Tunnel Tool starts at 0, so you should be increasing in increments of 6 each time.



Once your notepad has every tunnel on it, you will need to add via Ini Editing. (Don't worry, you can add/remove/edit things in this notepad later)  Save the notepad as "Tubes.ini" and place it where you remember it.  Once done, go to INI Editing in FinalSun/FinalTI and import the .ini file.



Now that it is in your map, simply save it and try it out.  As a suggestion, I recommend marking each of your tunnels in some way to help you find the specific 6 lines of text for a specific tunnel so you can easily edit it later.  You can also check them by coordinates as well.



ADDITIONAL INFORMATION
I have not explained what the numbers in tunnel creator actually mean.  I will try my best to explain in the simplest terms that I can.  This should help to understand how the numbers work and can even be applied to other modding activities as well.

In the picture below, you can see a partially made tunnel.  As you can see, its a relatively straight tunnel with a curve halfway through.  The numbers below the tunnel maker are the code to insert into FinalSun.

For better viewing:
2=1,1,2,10,1,2,2,2,1,1,3,3,2,2,-1
3=10,1,6,1,1,6,6,7,7,5,5,6,6,6,-1

Each number has a different use.  


1: This one is simple.  This is merely the number which marks the tunnel/tube.  Since it usually starts are 0, the first tunnel is marked 0, the next is marked 1, etc...

2: These two numbers are the starting coordinates of the tunnel.  This is the tile where the units ENTER the tunnel.  In this example, I used coordinates 1,10 and 1,1.  With different coordinates, this number will change wildly.

3: This number is the direction of the tunnel.  From the entrance of the tunnel, this shows which direction the units will travel (so it looks smooth).  To make more sense of this, see the "Direction Grid" further below.

4: These two numbers are the ending coordinates of the tunnel.  This is where the units LEAVE the tunnel.  As you can see, the two numbers mirror the next tube's starting coordinates.

5: This is the tube itself.  Basically, each number is one "move".  This also follows the direction grid below.  In this instance, 2,2,2 means that it will move southeast, 3 times. 1,1 means that it will move east 2 times. 3,3 means it will move south 2 times. 2,2 means it will move southeast 2 more times.  Look at these numbers and compare them to the image of the tunnel above.

6: I could be wrong on this one, but this is the "stop".  Every tunnel I have seen has this -1 at the end of it, seeming to show there are no more moves to complete.

Direction Grid:


Key Words: #Tutorials #Mapping #Modding #TiberianSun #Firestorm #FinalSun #Tunnel 

Last edited by TrainStation on Tue Apr 30, 2019 3:34 am; edited 1 time in total

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Mon Nov 06, 2017 10:58 pm    Post subject: Reply with quote  Mark this post and the followings unread

Now that's what i call an excellent tutorial.
Approved!

@Banshee: can you upload the images to PPM?

btw, i've allowed myself to add some keywords.

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
PussyPus
Commander


Joined: 14 Jul 2015
Location: Egypt

PostPosted: Mon Nov 06, 2017 11:23 pm    Post subject: Reply with quote  Mark this post and the followings unread

This will give modders of TS & RA2 to make tunnels easier for their mods.

_________________
If you are a MetalHead (Heavy Metal Fan) and don't want to be a metalhead, Just remove your metal ball from your head. �:p .

Back to top
View user's profile Send private message ModDB Profile ID Skype Account
HG_SCIPCION
Gauss Rifle Trooper


Joined: 07 Jun 2013
Location: Perú

PostPosted: Mon Nov 06, 2017 11:38 pm    Post subject: Reply with quote  Mark this post and the followings unread

whoa.... Really... this tutorial is good and very helping for the modder... I will make some tunnels right now!

Thanks you!
Do you have more tutorials like this?

_________________
https://www.moddb.com/mods/global-crisis
https://www.patreon.com/scipcion

Back to top
View user's profile Send private message Facebook Profile URL
TrainStation
Vehicle Driver


Joined: 06 Nov 2017

PostPosted: Tue Nov 07, 2017 12:08 am    Post subject: Reply with quote  Mark this post and the followings unread

Sorry, I don't.  I joined the forum to specifically post this tutorial because I spent a few hours trying to figure it all out and once I did, everything went MUCH smoother for my Twisted Insurrection map.  Due to the lack of a tutorial with pictures (That I could find, maybe I missed it), figured I'd save everyone some trouble of having to figure it out on their own.  

I threw this together real quick with MS paint lol Very Happy

Back to top
View user's profile Send private message
E1 Elite
General


Joined: 28 May 2013

PostPosted: Tue Nov 07, 2017 8:46 am    Post subject: Reply with quote  Mark this post and the followings unread

In FinalSun with Marble Madness tiles like the one included in TS Client,
the entrance marking can also be seen in framework mode (Ctrl + F).

For these 3 entrance/exit cells, tunnel graphics in the game is assigned
with the Tunnel's Terrain Type (represented by number 5). A tunnel enter
cursor is shown in the game on mouse over, on these 3 cells. When tubes
entries are plotted with these correct entrance cells, selected units when
clicked on the enter tunnel cursor, will automatically move to the other
end of the tunnel. In case those marked coordinates for tunnel entrances
are not chosen for tubes entries, tunnels still works with limitations. An
alternate path reachable by land to the other end is needed for such tunnels
to work. Even a working tunnel will stop functioning if the alternate route
becomes unreachable in game like a bridge getting destroyed which was
the only alternative path to reach the other end.

In cases where train carriages get disconnected in the game, due to train
crushing some units inside the tunnel, instead of removing one entire
line to make it one-way for such tracks, the middle line could be switched
to the next cell for example
Code:
[Tubes]
0=80,80,0,80,70,0,0,0,0,0,0,0,0,0,0,-1
1=80,70,4,80,80,4,4,4,4,4,4,4,4,4,4,-1
2=81,80,0,81,70,0,0,0,0,0,0,0,0,0,0,-1
3=81,70,4,82,70,-1    ;The facing entry 4 could be changed by 1 value if turn looks drastic.
4=82,80,0,82,70,0,0,0,0,0,0,0,0,0,0,-1
5=82,70,4,82,80,4,4,4,4,4,4,4,4,4,4,-1


Other limitation of tunnels in game:
- A map can have a max of 127 tunnel lines, 21 tunnels with 6 lines each.
- Tunnels traversing different heights have problems, so should be kept
on same height level.

When the tunnel lines are drawn crossing or intersecting each other, a unit
would wait for the next cell (if that cell was occupied) to get cleared, in the
game to proceed further.

Back to top
View user's profile Send private message
Crimsonum
Seth


Joined: 14 Jul 2005
Location: Fineland

PostPosted: Tue Nov 07, 2017 10:37 am    Post subject: Reply with quote  Mark this post and the followings unread

Now this is a good tutorial. Consider this thread stickied Cool

I've never noticed the "Insert another INI file content" button before, that's pretty handy! I've always had to close the map editor, open the map in Notepad and add/edit the [Tubes] section there.

Funny how even someone like me, who've made TS/TI maps for the last 12 years, can still learn something new.

E1 Elite wrote:
In cases where train carriages get disconnected in the game, due to train
crushing some units inside the tunnel


Are you sure this is possible? I don't recall ever having units crush others inside tunnels. They just seem to pass through one another as if they didn't occupy any physical space.

_________________


Back to top
View user's profile Send private message
E1 Elite
General


Joined: 28 May 2013

PostPosted: Tue Nov 07, 2017 11:19 am    Post subject: Reply with quote  Mark this post and the followings unread

I have seen train carriages getting disconnected, not sure if it is train speed
or infantry/visceroids coming accross in the tunnel or some terrain reason.
But I have been using the one-way technique mentioned above.

Not sure on crushing but I have seen the units wait for the next cell to get
cleared to move further instead of passing through that unit in cases of
tunnel lines crossing each other.

Edit: Looks like game behaves differently for units travelling from same
direction and opposite direction in the tunnel. Units coming from opposite
direction pass through and same direction checks for cell occupied status.
So, the one-way technique I was using was not needed at all. Even to and
fro path being same or different wouldn't have benefit of one over other.

Back to top
View user's profile Send private message
Banshee
Supreme Banshee


Also Known As: banshee_revora (Steam)
Joined: 15 Aug 2002
Location: Brazil

PostPosted: Wed Nov 08, 2017 7:31 am    Post subject: Reply with quote  Mark this post and the followings unread

Lin Kuei Ominae wrote:
Now that's what i call an excellent tutorial.
Approved!

@Banshee: can you upload the images to PPM?

btw, i've allowed myself to add some keywords.


The images are now hosted at PPM and the keywords were approved.

Back to top
View user's profile Send private message Visit poster's website Skype Account
swirekster
Energy Commando


Joined: 28 Feb 2011
Location: in soviet Poland >:D

PostPosted: Wed Nov 08, 2017 9:32 am    Post subject: Reply with quote  Mark this post and the followings unread

it would be nice to have more tutorials like this Smile

_________________
[img]https://scontent.xx.fbcdn.net/hphotos-xla1/v/t1.0-9/12376857_987680207984197_4751476020817534897_n.jpg?oh=dc9a1c6437b791272cec3ffcf2aba220&oe=57863E78
[/img]

Back to top
View user's profile Send private message
Q45
Tiberian Fiend


Joined: 28 Feb 2009
Location: Tampere, Finland

PostPosted: Wed Nov 08, 2017 8:42 pm    Post subject: Reply with quote  Mark this post and the followings unread

Awesome tutorial! Just what the tunnel editor was missing, thank you. Smile

_________________

Twisted Insurrection's Lead Campaign Developer

Back to top
View user's profile Send private message Send e-mail Visit poster's website
TrainStation
Vehicle Driver


Joined: 06 Nov 2017

PostPosted: Tue Apr 30, 2019 3:36 am    Post subject: Reply with quote  Mark this post and the followings unread

Bumping thread, I have added additional information to the end of the tutorial.  Let me know of any mistakes.

Back to top
View user's profile Send private message
Banshee
Supreme Banshee


Also Known As: banshee_revora (Steam)
Joined: 15 Aug 2002
Location: Brazil

PostPosted: Tue Apr 30, 2019 11:15 pm    Post subject: Reply with quote  Mark this post and the followings unread

I've uploaded your new images to PPM. Wink

Back to top
View user's profile Send private message Visit poster's website Skype Account
E1 Elite
General


Joined: 28 May 2013

PostPosted: Wed May 01, 2019 3:22 am    Post subject: Reply with quote  Mark this post and the followings unread

For the coordinates being shown in reverse in FinalSun/FinalTI on the status bar as Y / X - H, it can be changed to show as X / Y - H with an EXE hack available here.

On the [Tubes] entry numbers, 1 can be called as index, 3 can be called as facing and 5 as movement direction. 2 and 4 as enter X,Y and exit X,Y coordinates.

Back to top
View user's profile Send private message
Crimsonum
Seth


Joined: 14 Jul 2005
Location: Fineland

PostPosted: Thu May 02, 2019 9:27 am    Post subject: Reply with quote  Mark this post and the followings unread

E1 Elite wrote:
For the coordinates being shown in reverse in FinalSun/FinalTI on the status bar as Y / X - H, it can be changed to show as X / Y - H with an EXE hack available here.


Just want to point out that they will be reversed in the coming update, i.e. shown in X / Y order.

_________________


Back to top
View user's profile Send private message
E1 Elite
General


Joined: 28 May 2013

PostPosted: Sat Jun 22, 2019 12:18 am    Post subject: Reply with quote  Mark this post and the followings unread

How the tunnels are plotted in maps, can now be viewed visually with the updated Map Renderer. Existing maps can be reviewed and mistakes like the missing directional entry plotted by FinalSun can be spotted with it.

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [16 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
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


Powered by phpBB © phpBB Group

[ Time: 0.2254s ][ Queries: 11 (0.0109s) ][ Debug on ]