Transforming units into new units

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

Re: Transforming units into new units

Postby stardust » 01 Jul 2018, 19:04

Dang.

Getting back to my original post, I have no idea what I am missing.I've resized the sub (I think) and set the build layer to be true for AIR and false for SEA, but it doesn't even build now, and I'm at a loss to explain this. I figure once I get it to fly, I can start tinkering with changing out weaponry, but this is really slowing me down :P

I've attached the BP file for any wizards out there to decrypt.
Attachments
URA4411_unit.bp
(16.2 KiB) Downloaded 161 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 » 02 Jul 2018, 01:00

Hello Stardust,

can you post a zip of the full URA4411 unit folder ?

We can't find errors just by viewing the blueprint file.
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 » 11 Jul 2018, 22:20

https://www.dropbox.com/sh/2pm8ai8pgubs ... zT6Xa?dl=0

Does this dropbox link work for you?
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 » 19 Jul 2018, 01:04

Hello stardust,

yes the link worked.

I changed some lines inside the blueprint.
You can now build the unit as space ship.
Weapons will not work because of wrong model-bones.

URA4411BlueprintOnly.zip
(3.21 KiB) Downloaded 156 times


Changelog:

Added "Air" Table
Added missing comma between weapon tables; changed from } to },
Removed IdleEffects for Sub / Water layer
Removed MotionChangeEffects for Sub / Water layer
Changed icon froom Sea to Air
Changed TechLevel from RULEUTL_Basic to RULEUTL_Secret (Experimental)
Added CatchUpAcc, DragCoefficient, Elevation to physics table
Added MotionType = 'RULEUMT_Air', to physics table (Unit can't move if you don't set it)
Changed StrategicIconName from icon_sub2_antinavy to icon_experimental_generic
Changed FireTargetLayerCapsTable from 'Air|Land|Sea', to 'Air|Land|Seabed',
Changed Weapon muzzles to prevent load errors, but weapons will not work
(Turret weapons needs a turret and turret bones, but the model has none)
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 » 24 Jul 2018, 23:34

Oh wow, awesome, that works nice! Much obliged, Uveso! I fixed the elevation so it's about on the same level as the Czar. *pats self on back for figuring that out*

Now to ARM this thing. I'd LIKE to have beam turrets like the Reaper escort cruiser, pulse weapons like the T2 Cerberus gun tower, and perhaps a missile system. I can edit what layers they can fire at, as well as weapon ranges, but copy-pasting weapon code into the blueprint and script files doesn't do anything. I suspect that that's due to the bones of the model and of the weapon turrets I am trying to make use of? Does that make sense? And if so, how do I take a ground or sea based weapon and tack it onto an airborne unit? Or is that possible?
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 » 25 Jul 2018, 00:28

Because the engine has real physics calculations, you need a real (simulated^^) weapon that can pitch and yaw and has a muzzle.

If your model has not such bones, you can't attach a weapon to it that needs pitch/yaw etc.

If you can't aim with your weapon to the target, then you can't shoot at the target.
Makes sense, right ? :)

If your model has no bones, then you can only use weapons that don't need aiming like flares, torpedos, charges, etc.

If you want to the see the bones of an unit ingame, press [ALT]+[v] while playing.
Now if you press [ALT]+[b] then you can also see the bone-names.

Maybe this can help :)
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 » 25 Jul 2018, 02:55

Oh, fascinating!

Is it not possible to add a weapon without necessarily having a turret? I remember a couple units - the Seadragon Mk2 dreadnought and a Cybran experimental transport, that did not have turrets for a light beam weapon. Tried copying those too, but to no avail. But then again I have no idea how to associate a given weapon with a given bone... is there a trick to it? And I imagine adding MORE bones involves the use of 3D modeling programs?
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 » 25 Jul 2018, 05:40

There is no trick, only the bonnames inside the blueprint and model must match.

You could first build a T1 point defense, display the bones and bonenames and compare them with the blueprint entries.
There you can see where or how yaw/pitch bones look like.

And yes its right, to add new bones or to add a weapon turret you need a 3d modeling program.
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 » 26 Jul 2018, 00:40

Shoot. The only bones inside my prototype spaceship (in the blueprint file) is that of the Cybran Barracuda - on which it is based. Enlarged and made into an air unit, thanks to Uveso showing me what needed to be added/removed from the game code. But the trick with viewing the bones shows a few different things, meshpoints for weapon fire effects... do I add a given weapon or turret under the blueprint's bones? I'm trying to understand this, cuz if I can make this work with one unit, I can do the same with about six others I have in mind.
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 » 26 Jul 2018, 02:39

The bone names are defined inside the model. (UnitID_LOD0.scm)

Names inside the blueprints reflect the same bones from the model.

If you model has a bone called "TORPEDO_FRONT" then you need to add this name inside the weappon table from your weapon.
So the LUA code knows, this weapon is anchored at bone "TORPEDO_FRONT".
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

PreviousNext

Return to Contributors

Who is online

Users browsing this forum: No registered users and 1 guest