Transforming units into new units

Post here if you want to help developing something for FAF.

Re: Transforming units into new units

Postby Uveso » 09 Jun 2018, 07:22

Yes, you need turrets inside the model.
The bullet can only fly in the direction of the weapon muzzle.
So the model need moveable bones for the turret pitch and yaw.

I didn't checked it but these lines are not correct for a air unit:

Category = 'Submarine',
Classification = 'RULEUC_MilitaryShip',
RULEUCC_Dive = true,
LAYER_Air = false,
LAYER_Sub = true,
MotionType = 'RULEUMT_SurfacingSub',

IdleEffects based on surface and submerge:
Code: Select all
        IdleEffects = {
            Sub = {
                Effects = {
                    {
                        Bones = {
                            'Torpedo_Muzzle02',
                            'XRS0204',
                        },
                        Type = 'UnderWater01',
                    },
                },
            },
            Water = {
                Effects = {
                    {
                        Bones = {
                            'XRS0204',
                        },
                        Scale = 0.4,
                        Type = 'SeaIdle01',
                    },
                },
            },
        },

MotionChangeEffects for surface and submerge:
Code: Select all
        MotionChangeEffects = {
            SubBottomUp = {
                Effects = {
                    {
                        Bones = {
                            'XRS0204',
                        },
                        Type = 'Surface01',
                    },
                },
            },
            WaterTopDown = {
                Effects = {
                    {
                        Bones = {
                            'XRS0204',
                        },
                        Type = 'Submerge01',
                    },
                },
            },
        },

MovementEffects based on surface and submerge:
Code: Select all
        MovementEffects = {
            Sub = {
                Effects = {
                    {
                        Bones = {
                            'Flare_Muzzle04',
                        },
                        Scale = 2,
                        Type = 'BackWake',
                    },
                },
            },
            Water = {
                Effects = {
                    {
                        Bones = {
                            'Torpedo_Muzzle01',
                        },
                        Scale = 0.7,
                        Type = 'LeftFrontWake',
                    },
                    {
                        Bones = {
                            'Torpedo_Muzzle02',
                        },
                        Scale = 0.7,
                        Type = 'RightFrontWake',
                    },
                    {
                        Bones = {
                            'Flare_Muzzle04',
                        },
                        Offset = {
                            0,
                            0,
                            -0.3,
                        },
                        Scale = 0.5,
                        Type = 'BackWake',
                    },
                },
            },
        },
User avatar
Uveso
Supreme Commander
 
Posts: 1201
Joined: 11 Dec 2015, 20:56
Location: Germany
Has liked: 45 times
Been liked: 178 times
FAF User Name: Uveso

Re: Transforming units into new units

Postby stardust » 10 Jun 2018, 01:46

I was wondering about that this entire time. If I remove it... it seems to break it. Ditto swapping several lines from the Czar for this thing, so it flies instead of swims.

I didn't realize this had this much stuff to change out! I'm not discouraged, just impressed.
User avatar
stardust
Avatar-of-War
 
Posts: 53
Joined: 23 May 2018, 01:25
Location: Canada, eh.
Has liked: 3 times
Been liked: 0 time
FAF User Name: stardust2101

Re: Transforming units into new units

Postby stardust » 21 Jun 2018, 03:31

On a different thought, what setting puts a given unit in the ALT+F2 unitlist to spawn units?
User avatar
stardust
Avatar-of-War
 
Posts: 53
Joined: 23 May 2018, 01:25
Location: Canada, eh.
Has liked: 3 times
Been liked: 0 time
FAF User Name: stardust2101

Re: Transforming units into new units

Postby Sprouto » 21 Jun 2018, 05:35

All units are automatically available thru Alt-F2 menu - BUT - many do not classify properly due to the Unit ID that some unit use.
Sprouto
Priest
 
Posts: 338
Joined: 08 Sep 2012, 05:40
Has liked: 53 times
Been liked: 71 times
FAF User Name: Sprouto

Re: Transforming units into new units

Postby stardust » 22 Jun 2018, 00:57

I see. And what might one do to correct that?
User avatar
stardust
Avatar-of-War
 
Posts: 53
Joined: 23 May 2018, 01:25
Location: Canada, eh.
Has liked: 3 times
Been liked: 0 time
FAF User Name: stardust2101

Re: Transforming units into new units

Postby Uveso » 22 Jun 2018, 07:11

Hey stardust,

you can always change it by yourself.

This file has the function for the [ALT]+[F2] window:
https://github.com/FAForever/fa/blob/eb7c51f0ff647dbed415c61d4fd6e90f9ae6e985/lua/ui/dialogs/createunit.lua

And here are the unit filter functions for the [ALT]+[F2] window:
https://github.com/FAForever/fa/blob/develop/lua/ui/dialogs/createunitfilters.lua

You could change it directly in the repository, or use the files to make a mod.

[Edit] You can also change the functions and post the new scripts here in the forum.
I / we will merge it into the game then.
User avatar
Uveso
Supreme Commander
 
Posts: 1201
Joined: 11 Dec 2015, 20:56
Location: Germany
Has liked: 45 times
Been liked: 178 times
FAF User Name: Uveso

Re: Transforming units into new units

Postby stardust » 22 Jun 2018, 23:17

Sprouto wrote:All units are automatically available thru Alt-F2 menu - BUT - many do not classify properly due to the Unit ID that some unit use.



Just figured it out. In the search function of ALT+F2, punch in the unit ID, like BRS0304 for the Reaper battlecruiser. Learned something new today!

Also, Uveso, thanks for those links. Those are quite informative!

Another small texture-related issue I've stumbled across. A couple of Aeon units I have don't seem to render properly. Their textures are mostly red. Their faction color works, but instead of white, its this bright red. Couple spots also look green/teal-ish. Anyone have any thoughts? Need a screenshot?
User avatar
stardust
Avatar-of-War
 
Posts: 53
Joined: 23 May 2018, 01:25
Location: Canada, eh.
Has liked: 3 times
Been liked: 0 time
FAF User Name: stardust2101

Re: Transforming units into new units

Postby Uveso » 23 Jun 2018, 00:59

stardust wrote:Just figured it out. In the search function of ALT+F2, punch in the unit ID, like BRS0304 for the Reaper battlecruiser. Learned something new today!


Well sorry. Yes, that's how we use this :)

I created a small mod with the ALT+F2 script files. I already fixed most of the buttons.
If you like play around with it:
http://faforever.uveso.de/forum/ALT+F2_MenuFix.zip

In case you fixed / checked all buttons, send the mod back and we will merge it into the maingame next patch.

[EDIT]
If you need a unit tooltip where you can see the UnitID, use my privat Unit Tooltip mod:
http://faforever.uveso.de/forum/SmartUnitTooltipV2.zip
(Needs option "Show Armament Build in Factory Menu" enabled)
User avatar
Uveso
Supreme Commander
 
Posts: 1201
Joined: 11 Dec 2015, 20:56
Location: Germany
Has liked: 45 times
Been liked: 178 times
FAF User Name: Uveso

Re: Transforming units into new units

Postby stardust » 23 Jun 2018, 17:02

Thanks Uveso, not sure what I'm looking at in these, but I'll see if I can figure it out!

Anyone have any thoughts on why the textures for these two units are so different? Before is from Total Mayhem, After is when I pulled them into my little personal naval mod project. I've got all the files, and corrected any and all links and pointers...
Attachments
AFTER2.jpg
AFTER
AFTER2.jpg (646.08 KiB) Viewed 452 times
BEFORE2.jpg
BEFORE
BEFORE2.jpg (738.57 KiB) Viewed 452 times
User avatar
stardust
Avatar-of-War
 
Posts: 53
Joined: 23 May 2018, 01:25
Location: Canada, eh.
Has liked: 3 times
Been liked: 0 time
FAF User Name: stardust2101

Re: Transforming units into new units

Postby Uveso » 24 Jun 2018, 04:25

I have no clue :(
User avatar
Uveso
Supreme Commander
 
Posts: 1201
Joined: 11 Dec 2015, 20:56
Location: Germany
Has liked: 45 times
Been liked: 178 times
FAF User Name: Uveso

PreviousNext

Return to Contributors

Who is online

Users browsing this forum: No registered users and 1 guest