2 Questions: 1.How I can edit in-game world map border sizes? 2. Is it possible to create curved ferry lines?

Modding school: Learn it from the masters
Post Reply
User avatar
EG0611
Moderator
Posts: 1410
Joined: 27 Apr 2016 08:53

12 Jun 2018 06:37

Hello, I have 2 questions in my mind that I couldn't find any solutions around SCS forum and here.

First question is: How I can edit in-game world map border sizes? So let's say I build an island on West of UK, in middle of Atlantic Ocean. However on in-game World Map I cannot see that island so I need to change border sizes of World map. I know it is possible since Promods and Rusmap use it but I wonder in which .sii file's which line it is made.

Second question is: Is it possible to create curved ferry lines? I want to make curved ferry lines around mainland like how Scandinavian countries have. Is it possible and if yes, how?

Thank you in advance.
-EG
Image
Image
Image

User avatar
Vøytek
Developer
Posts: 10276
Joined: 05 Jan 2014 19:38
Location: Prague, Czech Republic
Contact:

12 Jun 2018 11:10

1. Look at the bottom of this post: viewtopic.php?f=42&t=14523
Does that answer your question?

2. Look at some of our ferry files, for example def/ferry/connection/belfast_douglas.sii
MandelSoft knows more about it but maybe you can figure it out yourself. The biggest problem? You have to load the game everytime you adjust it, so it takes some time to achieve a desired result.
Image
Currently working on: various stuff
#1 forum spammer
Enjoying PM since 1.52
YouTube channel [PL]: http://youtube.pl/vooytek

User avatar
EG0611
Moderator
Posts: 1410
Joined: 27 Apr 2016 08:53

12 Jun 2018 11:57

Thank you so much Voytek.

I figured our zoom issue. When I get home I will take care of it. I looked at ferry files of Promods. Here is bergen_hirsthals.dlc_north.sii ferry connection file. It has double nodes than 1 node you exampled as belfast_douglas.sii

Code: Select all

connection_positions[0]: (-3026603, 0, -13823474)
connection_positions[1]: (-3021603, 0, -10696108)

connection_directions[0]: (-0.871513, 0.000000, 0.490373)
connection_directions[1]: (0.733087, 0.000000, 0.680135)

I noticed that it is basically a ferry node point on map. I can get coordinates easily. But I don't understand connection_directions[] line. What is it, what does it do and how I can find correct values.
Image
Image
Image

User avatar
MandelSoft
Lead Developer
Posts: 3835
Joined: 08 Aug 2013 10:48
Location: Delft [NL]

12 Jun 2018 13:10

Well, you may have picked one of the ferry lines where I didn't write comments in. The DEF for the link between Hirtshals and Seyðisfjörður is as follows:

Code: Select all

SiiNunit
{
ferry_connection : conn.hirtshals.seydisfjord{
	price: 3230
	time: 2730
	distance: 1777

 # NODE POSITIONS ########   x*256  , 0,  z*256
 connection_positions[0]: ( -2272404, 0, -10723390)
 connection_positions[1]: ( -9405763, 0, -17735767)
 connection_positions[2]: (-12587853, 0, -22374825)

 # NODE ROTATIONS ########  -sin(jaw), 0.0, -cos(jaw)
 connection_directions[0]: (-0.860000, 0.0, -0.500000)
 connection_directions[1]: (-0.707000, 0.0, -0.707000)
 connection_directions[2]: (-0.860000, 0.0, -0.500000)

}
}
Now here you can see what math is behind it all. Do note that each pair of position and direction correspond to one intermediate point on the ferry (the start and end point are automatically determined in the game) and will be added to the ferry route in this order. Also, note that the direction is an angle conversion from degrees to co-ordinates on the unit circle.

Mathematics intermission: the co-ordinates (-0.707000, 0.0, -0.707000) corresponds to a 45° angle, since the X and Z co-ordinates are the same. The value may look familiar, because it's actually -½√2. One property of co-ordinates on a unit circle is that if you try to calculate the distance from the center of the circle (0,0) to any point on the unit circle, the distance is always exactly 1, and because of Pythagoras theorem, this has to mean that √(x² + z²) = 1. In this example:


√( (-½√2)² + (-½√2)² ) = √( 2 * (-½√2)² ) = √( 2 * ¼ * 2 ) = √1 = 1

Isn't mathematics beautiful?

To do the same for the route in the other direction, simply flip the signs on the directions and reverse the order of both the positions and directions.
Your daily dose of wisdom!
╔═══╗────╔═╗╔═╗────╔╗
║╔═╗║────║║╚╝║║────║║
║╚═╝╠═╦══╣╔╗╔╗╠══╦═╝╠══╗
║╔══╣╔╣╔╗║║║║║║╔╗║╔╗║══╣
║║──║║║╚╝║║║║║║╚╝║╚╝╠══║
╚╝──╚╝╚══╩╝╚╝╚╩══╩══╩══╝
Don't ask us for a release date; we don't know either.



Post Reply

Return to “ProMods Academy”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 8 guests