Transforming units into new units

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

Transforming units into new units

Postby stardust » 02 Jun 2018, 01:57

So I've always liked the looks of the factions' subs - particularly the Cybran T2 barracuda sub-killer and T3 strategic missile sub, as well as the UEF T3 nuclear sub and the Aeon T3 nuclear sub and sub-hunter. Been toying with the idea for some time of resizing them and turning them into giant air units with a variety of weapon systems akin to the Czar and Flying Fortress. I've read through a few walkthroughs on unit creation and am more than a bit confused. Still, looking at a unit's BP file, it seems fairly straightforward, but I must be missing something.

I started with the Cybran Barracuda. I renamed it and changed all the instances so they use the new unit name, edited some tags, removed the submerge and surface options, and changed a few things around. I borrowed the weapon code for what I THINK is the beam weapons on the T4 Cybran Gargantua air transport from Blackops Unleashed temporarily, until I am savvy enough to code something in properly. And yet... it is completely MIA. I've attached the unit file here, if anyone is able to look it over and see what I'm doing wrong or not doing? Cheers!

EDIT: I may have fixed one problem, but now my errorlog says there's a problem with the line (below) about the build icon sort priority. Says unexpected symbol near the equals sign and fails to load my new unit. Any thoughts?


Buffs = {
Regen = {
Level1 = 2,
Level2 = 4,
Level3 = 6,
Level4 = 8,
Level5 = 10,
},
},
BuildIconSortPriority = 20,
Categories = {
'PRODUCTFA',
'SELECTABLE',
'BUILTBYTIER3COMMANDER',
'BUILTBYTIER3ENGINEER',
'CYBRAN',
'MOBILE',
'AIR',
'EXPERIMENTAL',
Attachments
URA4411_unit.bp
(16.2 KiB) Downloaded 159 times
User avatar
stardust
Avatar-of-War
 
Posts: 56
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 CookieNoob » 02 Jun 2018, 21:19

you close a bracket too much in line 43 of the blueprint
Check out the next level of maps: viewtopic.php?f=53&t=13014
For adaptivity, customizability and less clutter in the vault.
User avatar
CookieNoob
Priest
 
Posts: 477
Joined: 02 Aug 2014, 17:07
Has liked: 65 times
Been liked: 249 times
FAF User Name: CookieNoob

Re: Transforming units into new units

Postby Uveso » 02 Jun 2018, 22:18

As always, we need the full unit folder with script file and model for debugging.

Errors so far:

Code: Select all
        TargetBones = {
            'URA4411',
        },
Did you changed the bonename inside the model file (URA4411_LOD0.scm) ?
If not then you should use the old bonename "XRS0204"
--------------------------------------------------------------------------------------------------------

Code: Select all
            Bank = 'XRS',
            Cue = 'URA4411_Move_Loop',
Did you add a new sound file to the XRS Sound file ?
If not, then use the old sound "XRS0204_Move_Loop"
(check all audio Cue)
--------------------------------------------------------------------------------------------------------

Code: Select all
    Description = '<LOC URA4411_desc>Space Battlecruiser',
Did you add translation strings for URA4411_desc ?
If not, just use the name without LOC tag:

Code: Select all
    Description = 'Space Battlecruiser',
--------------------------------------------------------------------------------------------------------

Code: Select all
                        Bones = {
                            'URA4411',
                        },
Same here, if you didn't renamed the bones inside the model, use "XRS0204" as bone like it was before.
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: Transforming units into new units

Postby stardust » 03 Jun 2018, 00:56

Wow, looks like I changed a few things I shouldn't have!

Okay, made some corrections as per Uveso's suggestion, but now looking at the script file and the BP file... the weapons are now totally different/wrong.

Okay, I've attached the script and BP files for peeps' perusal. Still getting that strange error message about some weird typo around an equals symbol. Can't figure that one out. I'm looking at these files in notepad+ which indicates where the opening and closing brackets are for a given segment of code.
Attachments
URA4411_unit.bp
(16.18 KiB) Downloaded 154 times
URA4411_script.lua
(1.01 KiB) Downloaded 162 times
User avatar
stardust
Avatar-of-War
 
Posts: 56
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 » 03 Jun 2018, 05:20

I am in my weekend now, i only viewed the blueprint and don't test it.

But in line 44 is a 2nd bracket. Delete it.

And in line 50 (49) is a semicolon missed after the bracket. write ")," instead of ")"
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: Transforming units into new units

Postby stardust » 03 Jun 2018, 16:41

AHA, thanks for that, Uveso.

Curious. Now I get no errors in the log... but it just doesn't build. I don't even get the green hologram to try to build it, like with everything else. I click it, and... nothing.

Heh... anyone want to make a little moneys?
User avatar
stardust
Avatar-of-War
 
Posts: 56
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 » 05 Jun 2018, 02:40

In URA4411:

Remove bracket "}," from line 44

Add a semicolon in line 50 after the bracket "},"

Add 'NEEDMOBILEBUILD', to the Categories array

Change bones from URA4411 back to XRS0204

Use this for LODs settings, it will load mesh, textures etc from the original game directory.You can delete those files from the mod/unit/URA4411/ directory:
Code: Select all
            LODs = {
                {
                    MeshName = '/units/XRS0204/XRS0204_lod0.scm',
                    AlbedoName = '/units/XRS0204/XRS0204_albedo.dds',
                    SpecularName = '/units/XRS0204/XRS0204_specteam.dds',
                    NormalsName = '/units/XRS0204/XRS0204_normalsTS.dds',
                    LODCutoff = 100,
                    Scrolling = true,
                    ShaderName = 'Insect',
                },
                {
                    MeshName = '/units/XRS0204/XRS0204_lod1.scm',
                    AlbedoName = '/units/XRS0204/XRS0204_lod1_albedo.dds',
                    SpecularName = '/units/XRS0204/XRS0204_lod1_specteam.dds',
                    NormalsName = '/units/XRS0204/XRS0204_lod1_normalsTS.dds',
                    LODCutoff = 215,
                    ShaderName = 'Insect',
                                                               
                },
            },


Add Skirt size and offset to the physics array:

Code: Select all
        SkirtOffsetX = -2.5,
        SkirtOffsetZ = -15,
        SkirtSizeX = 8,
        SkirtSizeZ = 32,


Change selection size and Hitbox size:
Code: Select all
    SelectionSizeX = 4.0,
    SelectionSizeZ = 19.0,
    SelectionThickness = 0.20,
    SizeX = 7.5,
    SizeY = 3.0,
    SizeZ = 28,


There are also some bones inside the weapons array that are not present in the model.

Available model bones:
Torpedo_Muzzle01 (front middle)
Torpedo_Muzzle02 (front left)
Torpedo_Muzzle03 (front right)

Flare_Muzzle01 (midship top)
Flare_Muzzle02 (midship top)
Flare_Muzzle03 (midship top)
Flare_Muzzle04 (midship top)
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: Transforming units into new units

Postby stardust » 08 Jun 2018, 02:19

Now it's gone completely! *is confused*
User avatar
stardust
Avatar-of-War
 
Posts: 56
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 » 08 Jun 2018, 16:11

I patched all changes to the blueprint:
URA4411.rar
(3.49 KiB) Downloaded 164 times


You still need to configure the weapons.
But you are using turret weapons and the model has no turrets.

The model has 3 torpedo tubes on the front and 4 flare launchers midship top.
You can't use turret weapons there.
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: Transforming units into new units

Postby stardust » 09 Jun 2018, 00:43

Ah, okay cool. Strictly speaking, do any weapons "need" a turret?

Also, playtesting this thing, it still only builds on water, and behaves like a ship instead of a large aircraft. I can tweak build times and movement speeds, but turning it into an aircraft, I'm missing something.

Appreciate the help, Uveso!
User avatar
stardust
Avatar-of-War
 
Posts: 56
Joined: 23 May 2018, 01:25
Location: Canada, eh.
Has liked: 3 times
Been liked: 0 time
FAF User Name: stardust2101

Next

Return to Contributors

Who is online

Users browsing this forum: No registered users and 1 guest