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 30, 2024 8:48 pm
All times are UTC + 0
TS & RA2 Tunnel Drawer
Moderators: Community Tools Developpers
Post new topic   Reply to topic Page 1 of 1 [25 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Q45
Tiberian Fiend


Joined: 28 Feb 2009
Location: Tampere, Finland

PostPosted: Thu Jun 12, 2014 5:55 pm    Post subject:  TS & RA2 Tunnel Drawer Reply with quote  Mark this post and the followings unread

Born of frustration, here's a little Flash based tool I wrote that TS mappers such as myself should find useful. It allows you to draw tunnels (three pairs of them, to be precise) between two tunnel entrances and as an output you get the lines of code for the tunnels that you can then copy and paste into your map file. I've made several tunnels with this and so far they've all worked very solid! So in case you're struggling with curved or other more complex tunnels, this program is for you. Smile

Quote:
INSTRUCTIONS

With this program you can easily generate tunnel codes for Tiberian Sun and Red Alert 2 maps. The program's interface is divided into three sections: The options section at the top, the grid section at the middle and the output section at the bottom.

OPTIONS SECTION

First 4 input fields: X and Y coordinates of the red and orange tunnel entrances' middle cells. Press ENTER to apply changes. Values can be between 1-1024. Notice that the coordinates given by the Final Sun and Final Alert map editors are in reversed order, here they are not!
Orientation buttons: Click to change the orientation of the tunnel entrances.
Mirror X/Y button: Changes the entered X values to Y values and vice versa.
Index input field: The index value of the first generated tunnel. Press ENTER to apply changes. Values can be between 0-121.

GRID SECTION

This is where you create your tunnels. Click on one of the tunnel entrances to begin drawing a tunnel. You can draw 3 tunnels, each starting from a different cell of the entrance. Click the grid to add tunnel nodes. Each tunnel must end at a different cell at the other entrance.

Red cells: The first tunnel entrance. This color will also indicate cells that exceed the tunnel max length of 99.
Orange cells: The second tunnel entrance.
Green cells: These show the tunnel's shape. The middle tunnel is drawn in slightly darker color.

Esc: Remove the current tunnel and stop drawing.
Backspace: Remove last entered node.
Arrow keys: Move the view 1 cell to the desired direction.
Shift + arrow keys: Move the view 5 cells to the desired direction.
Spacebar: Center the view between the entrances.
Q & E: Center the view at the entrances.
C: Clear all tunnels.
F: Force the tunnel to end. This will only generate the tunnel in one direction, and without ending coordinates.
T: Toggle the distance text mode/visibility.

OUTPUT SECTION

The codes for your finished tunnels will be generated at this section. Copy and paste them somewhere in your map file using a text editor.


If you find any bugs or have improvements in mind, please let me know and I'll see what I can do about it. Just bare in mind that I intend on keeping the program simple, partly because I'm still quite new to programming.

Fell free to share this on other modding sites as well. PPM's the only modding related site I visit, so this is the only place where I'll post this. #Tongue

Download v1.04



TS & RA2 Tunnel Drawer v1.04.swf
 Description:
TS & RA2 Tunnel Drawer by Q45

Download
 Filename:  TS & RA2 Tunnel Drawer v1.04.swf
 Filesize:  23.48 KB
 Downloaded:  14903 Time(s)


_________________

Twisted Insurrection's Lead Campaign Developer

Last edited by Q45 on Wed Sep 02, 2015 11:09 am; edited 7 times in total

Back to top
View user's profile Send private message Send e-mail Visit poster's website
CCHyper
Defense Minister


Joined: 07 Apr 2005

PostPosted: Thu Jun 12, 2014 7:58 pm    Post subject: Reply with quote  Mark this post and the followings unread

I love things like this, great job!

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


Joined: 16 Aug 2006
Location: Germany

PostPosted: Thu Jun 12, 2014 9:40 pm    Post subject: Reply with quote  Mark this post and the followings unread

ingenious, simple, effective, great. Approved!
Rating 10 out of 10! Perfect!  Rating 10 out of 10! Perfect!  Rating 10 out of 10! Perfect!

I think this needs to be stickied/linked in the mapping forums.

_________________
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
Team Black
Defense Minister


Joined: 25 Sep 2006
Location: Teamblackistan Posts: Over 9000

PostPosted: Fri Jun 13, 2014 5:42 pm    Post subject: Reply with quote  Mark this post and the followings unread


_________________
The Fall of Hammerfest - Epic Tiberian chain story

Tiberian Odyssey mapping department. Discord
The Team Black Index

Back to top
View user's profile Send private message
Aro
Alcohol Fueled


Joined: 10 Sep 2006

PostPosted: Fri Jun 13, 2014 5:54 pm    Post subject: Reply with quote  Mark this post and the followings unread

Amaaaaaaazing!

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


Joined: 28 Feb 2009
Location: Tampere, Finland

PostPosted: Fri Jun 13, 2014 8:44 pm    Post subject: Reply with quote  Mark this post and the followings unread

Thank you for the great response. I also posted this at the Tiberian Sun mapping tools topic, I hope people will notice it from there. Smile

_________________

Twisted Insurrection's Lead Campaign Developer

Back to top
View user's profile Send private message Send e-mail Visit poster's website
Mig Eater
Defense Minister


Joined: 13 Nov 2003
Location: Eindhoven

PostPosted: Sat Jun 14, 2014 9:02 am    Post subject: Reply with quote  Mark this post and the followings unread

I presume this can be used for RA2 too?

_________________



Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID YouTube User URL Facebook Profile URL Twitter Channel URL
Q45
Tiberian Fiend


Joined: 28 Feb 2009
Location: Tampere, Finland

PostPosted: Sat Jun 14, 2014 9:24 am    Post subject: Reply with quote  Mark this post and the followings unread

I'm not very familiar with tunnels in RA2, but as far as I know their syntax under [Tubes] is exactly the same as in TS. So yes, this should work with RA2 too.

_________________

Twisted Insurrection's Lead Campaign Developer

Back to top
View user's profile Send private message Send e-mail Visit poster's website
E1 Elite
General


Joined: 28 May 2013

PostPosted: Sat Jun 14, 2014 10:18 am    Post subject: Reply with quote  Mark this post and the followings unread

Nice tool
- good that you have truncated the unneeded -1s from the entries, will save some bytes of the map size.
- it allows crossover, I have not tested whether they work.
- could have been an option to make forward and backward entries take different paths, anyhow that can be done
by charting 2 paths and combining them manually now. They work in TS.



Crossovers.jpg
 Description:
 Filesize:  7.78 KB
 Viewed:  680694 Time(s)

Crossovers.jpg



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


Joined: 28 Feb 2009
Location: Tampere, Finland

PostPosted: Sat Jun 14, 2014 11:21 am    Post subject: Reply with quote  Mark this post and the followings unread

E1 Elite wrote:
- could have been an option to make forward and backward entries take different paths, anyhow that can be done
by charting 2 paths and combining them manually now. They work in TS.

That did cross my mind, but I ended up coding it the way it is now so that you can draw the tunnels faster. And like you said, if you want the forward and backwards tunnels to be different, you can just draw and copy their lines separately.
At first I planned to code it so that you only need to draw the middle tunnel and it would generate the other ones automatically around it, but that turned out to be a bit too challenging for me and would've limited the programs functionality a lot.

Crossovers should work just fine, as well as crazy shit like in the attachment. Laughing



wut.png
 Description:
 Filesize:  21.95 KB
 Viewed:  680669 Time(s)

wut.png



_________________

Twisted Insurrection's Lead Campaign Developer

Back to top
View user's profile Send private message Send e-mail Visit poster's website
E1 Elite
General


Joined: 28 May 2013

PostPosted: Sat Jun 14, 2014 12:05 pm    Post subject: Reply with quote  Mark this post and the followings unread

No problems on different path for to and fro. It is already a helpful tool.
Crossovers and convergence to a single cell also works, tested. Game just queues up. Had fun with it.

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


Joined: 28 Feb 2009
Location: Tampere, Finland

PostPosted: Sat Jul 12, 2014 12:16 pm    Post subject: Reply with quote  Mark this post and the followings unread

I updated the program a little bit, the first post has the latest version.

v1.01:
- Changed the name to TS & RA2 Tunnel drawer, because there's no reason why this should be limited to TS only. #Tongue
- Increased the orange orient button's hitbox size.
- Changed the min and max limits of the tunnel entrance coordinates to 1 and 399, which are the min and max coordinates in a 200x200 map.
- Because the tunnels can be max 99 cells long, the entrances can now be max 99 cells from each other in both directions. If you try to place the entrances more than 99 cells from each other, the larger coordinate is changed so it's 99 plus the smaller coordinate.
- Made some small changes to the instructions.

_________________

Twisted Insurrection's Lead Campaign Developer

Back to top
View user's profile Send private message Send e-mail Visit poster's website
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Sun Jul 13, 2014 11:07 am    Post subject: Reply with quote  Mark this post and the followings unread

min and max on DTAs Africatorial map are 1 and 509 since it's a 430x80 map. I think best would be to set max on 1024 or don't set a max at all, since you could theoretically also create a 511x1 map and maybe in future an exe pro finds a way to raise the map limit to 1024x1024.

Q45 wrote:
- Because the tunnels can be max 99 cells long, the entrances can now be max 99 cells from each other in both directions. If you try to place the entrances more than 99 cells from each other, the larger coordinate is changed so it's 99 plus the smaller coordinate.

not a good change imo, because
-units can only move 99 cells in a tube, but tubes can still be longer
-if the start/exit are farther apart than the number of "move direction numbers", then the unit is simply teleporting to the exit when it reached the last "move direction number"
-DTAs map Africatorial is one practical example of a map with a tunnel from 500,78 to 78,500 (and several other tunnels that make this map a "ring")

DTA used this excessively in the past to have teleporter tunnels. No "move direction numbers" just the start and exit coords, so units simply teleported between the tunnel points.

The only problem are infantry, as they leave the tunnel when the last "move direction number" is reached and they don't teleport to the exit. They just appear where they are, which can be also impassable terrain.


Suggestion:
-no limits
-when a tube has more than 99 "move directions numbers" (mdn), show the first 99 mdn in green and then draw a simple blue arrow from the last mdn to the exit, to show that this distance is being teleported by the tunneled unit (except infantry who just leave the tunnel on the last mdn and become visible regardless what kind of terrain they find there)

_________________
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
Q45
Tiberian Fiend


Joined: 28 Feb 2009
Location: Tampere, Finland

PostPosted: Sun Jul 13, 2014 12:17 pm    Post subject: Reply with quote  Mark this post and the followings unread

Ah, I wasn't aware of the teleporting. Well, I was but didn't pay attention to it before. #Tongue You got a good point there, the program should also support these longer tunnels with "teleportable" bits. In addition to what you suggested, there could also be a keyboard shortcut that whenever pressed would end the tunnel drawing progress and create a teleportable bit from the last entered node to the other entrance. So just like pressing esc but instead of removing the tunnel you'd get the teleport at the end. This way you could also create teleporter tunnels without any "move direction numbers".

I could raise the max limit to 1024 or something larger, but then the way the grid is drawn should be redesigned. Otherwise the grid gets way too small to be usable when large coordinates are entered. Maybe the grid's size should be capped so it won't go too small, but then the tunnel entrances could go outside of the borders. There could be two arrows floating near the borders that point to the entrances so you can navigate to them using the arrow keys. I don't know... #Tongue

_________________

Twisted Insurrection's Lead Campaign Developer

Back to top
View user's profile Send private message Send e-mail Visit poster's website
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Mon Jul 14, 2014 7:00 am    Post subject: Reply with quote  Mark this post and the followings unread

how about limiting the visible grid size to the one you get when you set 1,1 and 50,50. This would be smallest visible grid size.

And when you draw a tunnel, the focus automatically centers around the last clicked tunnel point. This way you can still draw long tunnels as the focus is following the tunnel.

Arrows at the screenborder showing the direction to the start/exit that are outside the view, sounds good.

_________________
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
OrangeNero
Commander


Joined: 11 Jan 2012

PostPosted: Mon Jul 14, 2014 7:32 am    Post subject: Reply with quote  Mark this post and the followings unread

the irony in here from these notepad fanatics...
great tool!

_________________
Free Tibed!
EA for worst company of the decade!

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


Joined: 28 Feb 2009
Location: Tampere, Finland

PostPosted: Sun Aug 31, 2014 3:41 pm    Post subject: Reply with quote  Mark this post and the followings unread

Alright, here's another update.

v1.02:
-Entrance coordinates are now limited to values 1-1024.
-Limited the cell's size to min 10 pixels.
-When a tunnel entrance is off screen, an arrow will appear and point to its direction.
-Removed the 99 limit from the entrance coordinates, they can now be placed as far from each other as you like.
-Improved keyboard shortcuts:
   -You can now move the entrances faster by holding down the arrow keys.
   -Holding shift while pressing the arrow keys will move the entrances 5 cells instead of 1.
   -Space bar centers the view between the entrances.
   -Q and E center the view at the entrances.
   -C clears all tunnels.
   -F forces the tunnel to end at the latest node.
-Tunnel cells that exceed the 99 limit are now shown in red.
-Rewrote the instructions, not a wall of text anymore.
-Fixed a couple small bugs.

About LKO's teleport suggestion: I was going to add the "blue teleport lines", but realized that since the tunnels are created in pairs there's no good way of generating the backwards tunnel if the other pair ends with a teleport. The problem could be solved if you had to draw all 6 tunnels separately, but I don't think that's a good idea. I would've had to rewrite a large part of the program, the interface would've become more messy and more difficult and slower to use. Also, it can be argued whether or not the teleport tunnels which don't work with infantry are a good thing or not, personally I'm not a big fan of them. Rolling Eyes So I left this functionality out. I did however make navigating a bit more user-friendly by adding the shift+arrow key functionality. I also made it possible to force end the tunnel at the latest entered node by pressing F, but this only generates the tunnel in one direction and doesn't show its ending coordinates. Maybe someone finds this useful.

_________________

Twisted Insurrection's Lead Campaign Developer

Back to top
View user's profile Send private message Send e-mail Visit poster's website
Q45
Tiberian Fiend


Joined: 28 Feb 2009
Location: Tampere, Finland

PostPosted: Thu Mar 19, 2015 8:16 pm    Post subject: Reply with quote  Mark this post and the followings unread

Just made a little update to this. I noticed that copying the tunnel code with ctrl+C was buggy, so I added a copy to clipboard button next to the code to make things a bit easier.

_________________

Twisted Insurrection's Lead Campaign Developer

Back to top
View user's profile Send private message Send e-mail Visit poster's website
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Tue Aug 25, 2015 7:38 am    Post subject: Reply with quote  Mark this post and the followings unread

FinalSun shows the coordinates in the wrong order

When you enter the coordinates how you see them in FS and then notice they are in the wrong order, you have to enter them all again.
A button [Mirror Values] in the tool to simply switch the coordinates would be useful, so you don't have to enter them again. (just switch X to Y and Y to X on start and end)
Mirroring the direction of the start/end could be done in this step too.


Another tiny improvement would be to fix the Tab order.
When you are in the first value textbox and press Tab, you get the Instructions highlighted, not the second value textbox.

_________________
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
Q45
Tiberian Fiend


Joined: 28 Feb 2009
Location: Tampere, Finland

PostPosted: Wed Sep 02, 2015 11:22 am    Post subject: Reply with quote  Mark this post and the followings unread

Thanks for the feedback LKO. I updated the program, the tab order is now correct and there's a mirror X/Y button in the toolbar.

I also added a textbox next to the selected cell that shows its distance from the previous tunnel node/entrance. Press T to toggle the mode between off/absolute/relative coordinates. Very useful when counting cells, especially when making long and curved tunnels. Smile

_________________

Twisted Insurrection's Lead Campaign Developer

Back to top
View user's profile Send private message Send e-mail Visit poster's website
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Wed Sep 02, 2015 11:40 am    Post subject: Reply with quote  Mark this post and the followings unread

Excellent. Cool
Thanks for the update.
Also very nice idea about the useful distance info. Smile

I think the relative distance info should be default, since that is imo more useful than the absolute position info.

Maybe you could enhance the distance info and include a counter of the "move direction numbers".
A tunnel can be max 99 move direction numbers long and a counter for the current total tunnel length could be useful.
e.g. format like
x,y (t)
with
x,y length to last tunnel point (like now)
t total move direction numbers of current tunnel

_________________
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
TAK02
General


Joined: 28 Jun 2015
Location: It was Damascus.

PostPosted: Mon Jul 20, 2020 4:51 am    Post subject: Reply with quote  Mark this post and the followings unread

Bump: a couple of pics are missing.

Thought you ought to know.

Back to top
View user's profile Send private message Send e-mail Visit poster's website ModDB Profile ID YouTube User URL Twitter Channel URL Skype Account
TAK02
General


Joined: 28 Jun 2015
Location: It was Damascus.

PostPosted: Wed Jan 13, 2021 5:35 pm    Post subject: Reply with quote  Mark this post and the followings unread

Obligatory bump since Flash is dead:

You can still run this via Internet Explorer (apparently) or some other Flash environment.

I managed to get IrfanView to open the SWF via RMB > Open With.
But apparently this is not possible on others' machines.

Last edited by TAK02 on Sat Jan 30, 2021 9:28 pm; edited 1 time in total

Back to top
View user's profile Send private message Send e-mail Visit poster's website ModDB Profile ID YouTube User URL Twitter Channel URL Skype Account
TAK02
General


Joined: 28 Jun 2015
Location: It was Damascus.

PostPosted: Sat Jan 30, 2021 9:27 pm    Post subject: Reply with quote  Mark this post and the followings unread


_________________
One and only developer of the Command & Conquer Dune "C&C D" mod.
m7 wrote:
I tend to release things I create so that assets are never lost to hard drive problems, accidental deletion, or me having to pretend to care about rippers taking things from my project when it is done. #Tongue

Back to top
View user's profile Send private message Send e-mail Visit poster's website ModDB Profile ID YouTube User URL Twitter Channel URL Skype Account
Banshee
Supreme Banshee


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

PostPosted: Sat Apr 03, 2021 10:12 am    Post subject: Reply with quote  Mark this post and the followings unread


Back to top
View user's profile Send private message Visit poster's website Skype Account
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [25 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
Quick Reply
Username:


If you are visually impaired or cannot otherwise answer the challenges below please contact the Administrator for help.


Write only two of the following words separated by a sharp: Brotherhood, unity, peace! 

 
You can post new topics in this forum
You can 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.3309s ][ Queries: 15 (0.0145s) ][ Debug on ]