Navy factory

Everything about mods can be found here.

Moderator: Morax

Navy factory

Postby Evildrew » 02 Apr 2019, 01:06

What causes this way point to be created when a ship leaves the factory? Is it essential? Can it be placed in a different spot or removed?
Attachments
BS.png
BS.png (404.75 KiB) Viewed 1391 times
Evildrew
Avatar-of-War
 
Posts: 248
Joined: 18 Sep 2015, 11:41
Has liked: 1 time
Been liked: 36 times
FAF User Name: Evildrew

Re: Navy factory

Postby Uveso » 02 Apr 2019, 02:13

RollOffPoint.png
RollOffPoint.png (295.73 KiB) Viewed 1383 times


The unit "RollOffPoint" is set/calculated in defaultunits.lua:
https://github.com/FAForever/fa/blob/3b73337e27608d094fba5ed20c772833c9e21d1f/lua/defaultunits.lua#L813

If you don't use it, then its possible that bigger ships get stucked while leaving the factory.
User avatar
Uveso
Supreme Commander
 
Posts: 1788
Joined: 11 Dec 2015, 20:56
Location: Germany
Has liked: 70 times
Been liked: 291 times
FAF User Name: Uveso

Re: Navy factory

Postby Evildrew » 02 Apr 2019, 07:55

Can it be moved to the side a bit?
Evildrew
Avatar-of-War
 
Posts: 248
Joined: 18 Sep 2015, 11:41
Has liked: 1 time
Been liked: 36 times
FAF User Name: Evildrew

Re: Navy factory

Postby Uveso » 02 Apr 2019, 09:28

Sure, you can change the unit RollOffPoint inside the factory blueprint:
https://github.com/FAForever/fa/blob/3b73337e27608d094fba5ed20c772833c9e21d1f/units/URB0103/URB0103_unit.bp#L204

If you change "x = -2" to "x = -3" in both arrays then you will get this:

RollOffPointFixed.png
RollOffPointFixed.png (144.42 KiB) Viewed 1365 times
User avatar
Uveso
Supreme Commander
 
Posts: 1788
Joined: 11 Dec 2015, 20:56
Location: Germany
Has liked: 70 times
Been liked: 291 times
FAF User Name: Uveso

Re: Navy factory

Postby speed2 » 02 Apr 2019, 11:08

Well it looks like some of these could be fixed generally. The units from the naval factory wont ever get that close as it is right now. It would need proper testing if the changes help tho...
User avatar
speed2
Contributor
 
Posts: 3189
Joined: 05 Jan 2013, 15:11
Has liked: 636 times
Been liked: 1119 times
FAF User Name: speed2

Re: Navy factory

Postby Evildrew » 02 Apr 2019, 11:14

Cool, I can work with that to make an improved rolloff. Is there a way to change the distance between the factory and the boat that is built while it is being constructed before rolling off?
Evildrew
Avatar-of-War
 
Posts: 248
Joined: 18 Sep 2015, 11:41
Has liked: 1 time
Been liked: 36 times
FAF User Name: Evildrew

Re: Navy factory

Postby Evildrew » 02 Apr 2019, 11:40

I managed to improve the roll of sequence for T3 ships from T3 factory with the settings below. Unfortunately it slightly increases the T2 and T1 ships rolling out of a T3 factory to reach the way point and start the next unit since T1&T2 dont get stuck and spin in circles before giving up the rolloff waypoint like T3 do in the current settings...

UEF T3:
RollOffPoints = {
{
UnitSpin = 180,
X = -8,
Y = 0,
Z = -6,
},
{
UnitSpin = 0,
X = -8,
Y = 0,
Z = 6,

Cybran T3:
RollOffPoints = {
{
UnitSpin = 180,
X = -8,
Y = 0,
Z = -4,
},
{
UnitSpin = 0,
X = -8,
Y = 0,
Z = 4,

Seraphim T3:
RollOffPoints = {
{
UnitSpin = 180,
X = 8,
Y = 0,
Z = -4,
},
{
UnitSpin = 0,
X = 8,
Y = 0,
Z = 4,

Aoen T3:
RollOffPoints = {
{
UnitSpin = 180,
X = -8,
Y = 0,
Z = -5,
},
{
UnitSpin = 0,
X = -8,
Y = 0,
Z = 5,
Evildrew
Avatar-of-War
 
Posts: 248
Joined: 18 Sep 2015, 11:41
Has liked: 1 time
Been liked: 36 times
FAF User Name: Evildrew

Re: Navy factory

Postby Uveso » 02 Apr 2019, 12:18

Just an Idea:

We could change this function to get the blueprint skirt size from the unit in case its a ship or naval factory:
https://github.com/FAForever/fa/blob/3b73337e27608d094fba5ed20c772833c9e21d1f/lua/defaultunits.lua#L757

Then we overload the function RollOffUnit with (ShipSize)
https://github.com/FAForever/fa/blob/3b73337e27608d094fba5ed20c772833c9e21d1f/lua/defaultunits.lua#L813

After this we can call the CalculateRollOffPoint also with (ShipSize)
https://github.com/FAForever/fa/blob/3b73337e27608d094fba5ed20c772833c9e21d1f/lua/defaultunits.lua#L818

If we do so, we can calculate a propper Unit RollOffPoint dependent on the ship size, no matter what techlevel it has.
User avatar
Uveso
Supreme Commander
 
Posts: 1788
Joined: 11 Dec 2015, 20:56
Location: Germany
Has liked: 70 times
Been liked: 291 times
FAF User Name: Uveso

Re: Navy factory

Postby Evildrew » 02 Apr 2019, 12:45

Uveso wrote:Just an Idea:

We could change this function to get the blueprint skirt size from the unit in case its a ship or naval factory:
https://github.com/FAForever/fa/blob/3b73337e27608d094fba5ed20c772833c9e21d1f/lua/defaultunits.lua#L757

Then we overload the function RollOffUnit with (ShipSize)
https://github.com/FAForever/fa/blob/3b73337e27608d094fba5ed20c772833c9e21d1f/lua/defaultunits.lua#L813

After this we can call the CalculateRollOffPoint also with (ShipSize)
https://github.com/FAForever/fa/blob/3b73337e27608d094fba5ed20c772833c9e21d1f/lua/defaultunits.lua#L818

If we do so, we can calculate a propper Unit RollOffPoint dependent on the ship size, no matter what techlevel it has.


Sounds good, you have 24 hours -_-

Actually I dont know what skirt size does, I experimented with it in the factory blueprint but didnt notice any change. I hope your idea works, I am doubtful we can make the way point be different for different tech level units to use my T3 boat solution. But never says never, always good to have a plan B.
Evildrew
Avatar-of-War
 
Posts: 248
Joined: 18 Sep 2015, 11:41
Has liked: 1 time
Been liked: 36 times
FAF User Name: Evildrew

Re: Navy factory

Postby ____ » 02 Apr 2019, 12:51

I have noticed that with smaller ships like frigates the unit will firstly turn its head into the naval factory and then turn again in order to move out. This whole process sometimes takes up to 5 seconds and seems to be related to this move order.

For some factions this sometimes isn’t the case, while it is particularly bad for Cybran frigates for some reason. If you try it in a sandbox it is its clearly visible and reproducible most of the time.
When I tested it with UEF factories however the issue wasn’t really present, or at least not to the same extent as with Cybran. Also, it might be related to where the factory is facing.

Actually, now that I am testing it more thoroughly, it seems like battleships are also affected pretty severely sometimes. They don’t smash their head into the naval factory, but they sometimes just randomly make 360 degree turns instead of rolling out. It only happens sometimes, and it also depends on how many engies are assisting the fac. Overall it seems to happen randomly.
____
Avatar-of-War
 
Posts: 171
Joined: 02 Feb 2018, 15:55
Has liked: 48 times
Been liked: 24 times

Next

Return to Mods & Tools

Who is online

Users browsing this forum: No registered users and 1 guest