Jump to content
Sign in to follow this  
tupolov

Boat/Ship Builders! New wiki entry...

Recommended Posts

Good thing someone starts writing down some of the boatspecific kinks. Thumbs up for that.

I have a critique though: Why are the parts that are universal to vehicles mentioned in there as well? E.g. the model.cfg. There is nothing boatspecific in it. It might confuse people to think they need all of what you wrote in there. Same about hitpoints. It works exactly the same like for every other vehicle, so why mention it specifically? I don't think quoting the model cfg of the sample is usefull, especially since it might change in the future.

As i see it the important boat specific things to have is:

The size issue, and it's problems/ possible workarounds. Engine config parameters, Leakiness and similar parameters, and the Buyoncy LOD. There is also one difference in the Resolution lod's which is the "anti water" body, which just has the texture "a3\boat_f\data\antiwater_ca.tga" and blocks water rendering in the boats hull. Can be found in the A3 boat sample.

Imo the rest would just confuse, as those seperate parts have their own entries.

Edited by Fennek

Share this post


Link to post
Share on other sites

I'll clean it up, feel free to add to it. Can you provide guidance on PhysX LOD vs Buoyancy LOD? Also where to place this anti-water rvmat?

Share this post


Link to post
Share on other sites

Good job ;)

Also my team are working on a little ship (B.A.M) which take part of a "big pack" of ships of the Spanish Navy containing LPDs, LHDs and some frigates. I think it's closer to get it finished so probably we will update the wiki on whatever we think it will be useful for the community.

And for surely this will help all addon makers trying to get a ship working ... because right now It's extremely hard find a good documentation about this (and his limits).

Edited by Mickyleitor

Share this post


Link to post
Share on other sites

Thank you! Great to see so many people providing input.

I'm adding to it as I get info, so keep checking. :)

And feel free to update and add to it!

Share this post


Link to post
Share on other sites

Good on you Tupolov! This will no doubt be useful to me and I'll be sure to contribute anything I can. Thanks!

Share this post


Link to post
Share on other sites

the "antiwater" rvmat just goes into each resolution lod where you need it (see boat sample)

Physx is for collision between physx entities. Should be as low poly as possible (just like with any other object/vehicle).

Buoyancy i have no real experience with.

Rifles also have buoyancy btw.

Edited by Fennek

Share this post


Link to post
Share on other sites

Updated Fenneck. Please guys contribute to the page :)

Share this post


Link to post
Share on other sites

Alot of thanks for this page! Working on a couple of ships but only have modelling experience, so this will be very useful! Just a question, what kind of problems should I expect with ships longer than 60 meters? Only the inability for infantry to walk on it?

Share this post


Link to post
Share on other sites

If you're just after a 'large' Physx boat and not walking about and the like, then really the only issue per say might be with weighting things. While you can have fairly large sized Physx LODs, you may still be limited by the Geometry LOD (where mass is applied) with the size restrictions. Which might make weighting something challenging/interesting. Although I have not explicitly tested having 'mass' objects (not necessarily 'components') far from origin in a model. I suppose there is a chance it might work. In which case, probably nothing really major to worry with.

Depending on the size of vessel, you may still have a need to cut things up. But not something I would label as an 'issue'.

---------- Post added at 12:27 ---------- Previous post was at 12:17 ----------

On a side note, for those playing with relative things:

https://www.youtube.com/watch?v=BOEty-nRh6M

Share this post


Link to post
Share on other sites

After some tries I have finally devised a way for making VLS missiles.

Jut put the beg and end points for the missile turret in a vertical axis in the memory LOD.

Set also those points as the Turret axis The other axis (elevation one) must be set as normally..

Both axes must be correctly set in the model.cfg and in the cfgammo you must also change the missile locking cone angle

for example

missileLockCone = 180;

With this the missiles will be launched vertically and will change trajectory after launch.

IMPORTANT

You must use a Turret with either

primarygunner=1;

or

primaryobserver=1;

otherwise the turret won't be able to lock. And... if you have set a mixed turret that uses more than one type of weapons (for example a gun and missiles) the vertical spawning point of the missiles will move WITH the turret axis of the turret you have set in the config.cpp so the spawning point for the missiles won't remain in the same place.

I will post some examples with source files if I can.

Share this post


Link to post
Share on other sites

Following up on the video above regarding Roadways, it is still broken as illustrated. However, I have fallen back to utilizing the 'attachTo w/memPoint' method of hooking the Roadway LOD to the main model. For all intensive purposes this is functional, as generally speaking the issue with 'attachTo' is the floating point maths precision in the MP environment. Given the fact that we can't currently walk on vehicles while they are moving (without scriptfu anyway), they need to be stationary for usage in that manner. Which mostly negates issues around the Roadway LOD being out of position, relative to the collision/resolution LODs.

The other piece that is annoying with 'attachTo' is when the same occurs with Resolution LODs. Thankfully Roadways are not visible, so this also becomes a non-issue. Hopefully that helps some of you that are wanting to do these things.

A couple technical notes:

This means there is no roadway in the main model, or any proxy reference to a roadway. Instead the roadway is a model unto itself. And contains only a Roadway LOD. The main model also contains a memory point for usage with the 'attachTo' command. You will notice that I have an offset, this was not expected honestly (thought it would place 0,0,0 on 0,0,0 ... but no.) ... but it seems to function properly and consistently. More feedback on the topic would be great, if you are trying it. Relative pieces below, obviously edit the pathing/naming to fit your project.

config.cpp

class CfgVehicles
{
// don't forget your inheritence!!
class ASDG_MKVSOC: ASDG_Ship
   {
   class EventHandlers
       {
           init = "[_this select 0] execVM 'ASDG\mkvsoc\scr\init.sqf'";
       };
   };
class Land_MkV_Roadway: Land_PierLadder_F
   {
       //scope = 1;
       //scopeCurator = 2;
       //vehicleClass = "Misc";
       displayName = "(MKV) Roadway";
       model = "\ASDG\mkvsoc\hull_roadway\hull_roadway";
    };
};

init.sqf

_asdg_mkvsoc = _this select 0;
_rw = "Land_MkV_Roadway" createVehicle [0,0,0];
_asdg_mkvsoc disableCollisionWith _rw;
_rw attachTo [_asdg_mkvsoc, [0,-1.46,-1.82], "mP_origin"];
_rw setDir 180;
_rw setPos getPos _rw;

Additional Topic:

Regarding having 'mass' objects far from origin, it seems to work. Not sure if/when it breaks, but I currently have a version of the carrier running under Physx (335m total length), hopefully post a video this evening showing it in action. Still sorting a couple technical things with the script foo that is required to make it visually and physically correct for flight operations. Is still quite the circus act all in all, but it is functional. The network environment might still kill it though, we'll see.

Oh, and...

http://feedback.arma3.com/view.php?id=21113

Edited by Hatchet_AS

Share this post


Link to post
Share on other sites

Additional follow-up on the Roadway debacle with the ShipX vehicles. Unfortunately the whole FPS destruction issue is currently limited to the ShipX vehicle class. Hopefully BIS can sort this, maybe just some background calculation that can be shut down perhaps. I'm hoping it's not overly complicated anyway. :hmmm:

https://www.youtube.com/watch?v=91zbc2vT3lY

Edited by Hatchet_AS
grammatical

Share this post


Link to post
Share on other sites
After some tries I have finally devised a way for making VLS missiles.

Nice one ManKyle! Thanks for sharing.

Feel free to update that wiki topic. I'm new to boat/ship building, so please add your wisdom if you get a chance :D

Share this post


Link to post
Share on other sites
After some tries I have finally devised a way for making VLS missiles.

Jut put the beg and end points for the missile turret in a vertical axis in the memory LOD.

Set also those points as the Turret axis The other axis (elevation one) must be set as normally..

Both axes must be correctly set in the model.cfg and in the cfgammo you must also change the missile locking cone angle

for example

missileLockCone = 180;

With this the missiles will be launched vertically and will change trajectory after launch.

IMPORTANT

You must use a Turret with either

primarygunner=1;

or

primaryobserver=1;

otherwise the turret won't be able to lock. And... if you have set a mixed turret that uses more than one type of weapons (for example a gun and missiles) the vertical spawning point of the missiles will move WITH the turret axis of the turret you have set in the config.cpp so the spawning point for the missiles won't remain in the same place.

I will post some examples with source files if I can.

What I have done for VLS (or any other missile launcher turret you wish to have on a ship) is to make a fake turret/gun into my gunner lod in model, as shown in this screen http://prntscr.com/59bjlo

The upper part (cylinder) supposed to be the turret and the lower (sphere) is the gun. these two parts can be placed somewhere hidden into a ship tower or static antenna (at highest ship point possible).

Now into the memory lod I've placed the axis points for this turret/gun plus a "gunnerview" point infront of them but outside of any ship structure ... this "gunnerview" named point must be linked with both turret and gun axis as it controling the actual gunner optics movement.

I've set my turret into my model.cfg using these parts mentioned above and their axis aswell.

On my ship I've placed two points as you did for missiles beg and end.

CAUTION: especially for non VLS missile turrets, into your config.cpp turret you must leave empty the "body" and "gun" values otherwise the missile will always follow the direction that your gunner looking at. Leaving these two values with "" your missile will always use its "end" - "start" points as fired position and direction.

Now despite gunner optics movement ... the missile exit point will be the missile beg point in memory lod.

You can use the same system for multiply turrets firing missiles using different points on the ship and with various missile capabilities.

I also agree about the rest of your remarks about this subject.

Edited by Aplion

Share this post


Link to post
Share on other sites

Some very interesting developments in this thread and great to see the knowledge being shared. In my own tests/frustrations with my Arleigh Burke class destroyer, to simulate a VLS, I had an invisible turret on top of the mast, which fired the missile (with auto-lock config) and a fired eventhandler captured the direction of the missile, before tilting it near verticle and placing it under one of the VLS flaps (which then sprung open) and then used a script function to gradually tilt the missile horizontal after launch.

The major problems were a show-stopping FPS hit (down to zero) and I was unable to config the missiles to engage at any decent range beyond default BIS missiles on the OPFOR plane.

I might look into scripting the missile system anyway, as the default BIS system results in missile spam. Does anyone know if a trigger can be "attachto" a vehicle?

Love your work fellas. I might dust off my own project again now!

Share this post


Link to post
Share on other sites

I'm going to post more examples about the VLS system

These are the entries of the VLS animations set in my LCS 2. They work so this piece of code has been confirmed that it works

Model cfg animations

class MainTurret
		{
			type="rotationY";
			source="mainTurret";
			memory=1;
			animPeriod=0;
			selection="vls_trav";
			axis="vls_trav_axis";
			minValue="rad -360";
			maxValue="rad 360";
			angle0="rad -360";
			angle1="rad 360";
		};
		class MainGun: MainTurret
		{
			type="rotationX";
			source="mainGun";
			memory=1;
			animPeriod=0;
			selection="vls_elev";
			axis="vls_elev_axis";
		};
		class IRST_Turret : MainTurret
		{	
			selection="IRST_Turret";
			axis="IRST_Turret_axis";
		};
		class IRST_Gun: MainGun
		{
			selection="IRST_Gun";
			axis="IRST_Gun_axis";
		};

So. in this case we have TWO turrets. The main one and the secondary one, which is the one that moves with the sensor, IRST turret or whatever where the optics point of the turret is located.

Both of them use the same turret source but different axes so they move when you move the turret.

class VLSTurret : NewTurret {

			stabilizedInAxes = 4;
			body = "MainTurret";
			gun = "MainGun";
			animationSourceBody = "MainTurret";
			animationSourceGun = "MainGun";
			gunnerAction = "driver_boat01";
			gunnerGetInAction = "GetInMedium";
			gunnerGetOutAction = "GetOutMedium";
			ejectDeadGunner = false;
			outGunnerMayFire = true;
			inGunnerMayFire = true;
			soundServo[] = {"A3\sounds_f\dummysound", db-45, 1.0};
			missileBeg = "NLOS_beg";	// endpoint of the gun
			missileEnd = "NLOS_end";	// chamber of the gun
			weapons[] = {"missiles_SSM","Laserdesignator_mounted"};
			magazines[] = {"16Rnd_SSM_missiles","Laserbatteries"};
			gunnerName = "VLS Operator";
			memoryPointGunnerOptics = "IRST_view";
			gunnerOpticsModel = "\A3\weapons_f\reticle\Optics_Gunner_02_F";
			gunnerOpticsEffect[] = {"TankCommanderOptics1", BWTV};
			turretInfoType = "RscOptics_crows";
			gunnerForceOptics = false;
			startEngine = false;

			commanding = -2;
			primaryGunner = 1;
			proxyIndex = 3;

			memoryPointsGetInGunner = "gunner3_pos";
			memoryPointsGetInGunnerDir = "gunner3_dir";


			threat[] = {0.5,1,0};

			LODTurnedIn = 1100;
			LODTurnedOut = 1100;
			usePip = 1;
			minElev = -15;
			maxElev = 40;
			initElev = 5;
			minTurn = -160;
			maxTurn = 160;
			initTurn = 0;				


			class ViewOptics : RCWSOptics {};

			class ViewGunner : ViewOptics {
				initAngleX = -15;
				minAngleX = -45;
				maxAngleX = 45;
				initFov = 0.9;
				minFov = 0.42;
				maxFov = 0.9;
				visionMode[] = {};
			};
		};

See that in this turret we don't make any mention to the secondary turret, the IRST Turret. This would make both the IRST turret and the VLS turret react independently but in the same way to movements of the turret. The optics point, "IRST_view", should be set in the memory LOD as part of the IRST_Gun selection. And for the missiles to be launched vertically we should set bot missile points

missileBeg = "NLOS_beg";	// endpoint of the gun
			missileEnd = "NLOS_end";	// chamber of the gun

as independent points not forming part of the VLS_trav or VLS_elev selections. They should just be a pair of points set vertically, one above the other.

With that, we whould have a turret that launches missiles vertically and after being launched, missiles would turn to follow the target.

Edited by mankyle

Share this post


Link to post
Share on other sites

@mankyle ... I thought that VLS is used mainly for aerial threats ... am I wrong on that ?

Is it also possible to post your weapon - mag and ammo values you are using for this ? in my case (very similar to your setup above) I can't lock aerial targets using the VLS system (it seems that it is locking only ground targets).

Thanks in advance.

Share this post


Link to post
Share on other sites

If you want to find out much more about how to fix similar things with missiles,I suggest you check out th Swedish mod ,there you can see a fully working RB15 system of the gunboat/missile boat.

They fly Far out to sea,they also have a point and click system,similar to F-18 Wasp GPS.A Bofors Gun too.That may come in handy for you.

There is a Hawk System,and a SAM RBS-70 too.

This might help with stuff in tubes,too.

You know what,it would be cool with a Phalinx/Goalkeeper Gun,"R2D2", with a IR-Camera that can see incomming missiles,and automatically show them to the player,and track and destroy them.

Or some Crane/hoist that Sling loads a SDV sub overboard.

May be Zeus Protector RC Gunboat or MK50 Boat .

Edited by Teddybear1

Share this post


Link to post
Share on other sites

I don't know if that post fits here but I believe that I found a bug relative with our subject ...

In case I want to have on my ship two turrets ... one front gun turret and one AA gun turret (VLS or anything fires AA missiles) ... in case I'll use an "autocannon" (default or inheriting) as front gun there is no issue ... but ... if I'll use any of "Cannon 105mm" - "Cannon 120mm" - "Cannon 155mm" default game weapons or making anything inherits by these (weapons - magazine - ammo) ... then any AA gun on the ship is unable to lock on target.

Share this post


Link to post
Share on other sites

maybe a config value of these weapons is responsible for that? at least that would seem the most logical explanation to me.

Share this post


Link to post
Share on other sites
maybe a config value of these weapons is responsible for that? at least that would seem the most logical explanation to me.

These are default ArmA 3 weapons ... so in case of some config value issue ... BIS is responsible for that and I doubt if will fix that also.

The fact is that this stopped me from my ships addon completion ...

Share this post


Link to post
Share on other sites

No they wont change their weapons because they dont produce problems for their vehicles. But it would be good to know which config value can cause this problem, so you/we can either avoid it, or fill out a proper bug report if it turns out to be an actual bug.

All it needs is a comparison of the complete config of one of the bohemia weapon, and your weapon. This way you can find the main differences and try out if adding a different value from the vanilla config to your own config will break your multi turret ship.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×