Creating Ships at port...

All discussions & material related to Command's Lua interface

Moderators: RoryAndersonCDT, michaelm75au, angster, MOD_Command

Post Reply
jkgarner
Posts: 175
Joined: Thu Apr 30, 2020 12:42 pm

Creating Ships at port...

Post by jkgarner »

OK,

In the past, I attempted to create ships, and the model rejected ships that were on land. Actually, it processed the script up until it encountered a ship on land, and then stopped processing the script. I fixed that issue by ensuring that all my ships were at sea, well away from land.

Now, I want to create ships at port. (Expressly NOT at sea--not under way) Think about the Pearl Harbor Scenario... There were a bunch of ships docked at port when the Japanese attacked. Well I need to create something like that.

I want a port with a bunch of ships, but I don't want to specifically drill down and place the ships in water, using the port Lat/Lon (which may or may not be water) is good enough. Mostly because I have a number of navel ports each with a ship or two, and I already have the lat/lon pairs for the ports.

So, given a port facility is created, near the shore (maybe slightly on land), can ships be created at that port?

any thoughts?

User avatar
michaelm75au
Posts: 12464
Joined: Sat May 05, 2001 8:00 am
Location: Melbourne, Australia

RE: Creating Ships at port...

Post by michaelm75au »

Setting the 'ship.base = port' should allocate it to a dock facility in that port. Is that what you are wanting?
Michael
jkgarner
Posts: 175
Joined: Thu Apr 30, 2020 12:42 pm

RE: Creating Ships at port...

Post by jkgarner »

Probably...

Is there a constraint on the facility (base) that can be used like this?

e.g. DBID 2980 is a single unit port, I would assume a facility of this type would work, while DBID 2416 is a single unit Airfield, so I would expect that a facility of this type should not work.

On this thread, I can ONLY find DBID 2980 as a port. (and DBID 53 as a port crane.) Are there other facility types that are ports that I am missing?

Thanks
User avatar
michaelm75au
Posts: 12464
Joined: Sat May 05, 2001 8:00 am
Location: Melbourne, Australia

RE: Creating Ships at port...

Post by michaelm75au »

You can only 'dock' ships at a single-unit port, or a multi-unit port which has piers big enough to hold the ships.
[The ships will actually be assigned to the piers in the base.]
Michael
jkgarner
Posts: 175
Joined: Thu Apr 30, 2020 12:42 pm

RE: Creating Ships at port...

Post by jkgarner »

I found the single unit port. I can't find any multi-unit ports in the database. How do I create a multi-unit port (in Lua)? thanks
User avatar
michaelm75au
Posts: 12464
Joined: Sat May 05, 2001 8:00 am
Location: Melbourne, Australia

RE: Creating Ships at port...

Post by michaelm75au »

If you look at the imports, there are some ports included there IIRC. It is just a case of picking facilities you need and grouping them as a 'port'.
If you need a example, I can probably create a simple one later today.
Michael
User avatar
michaelm75au
Posts: 12464
Joined: Sat May 05, 2001 8:00 am
Location: Melbourne, Australia

RE: Creating Ships at port...

Post by michaelm75au »

Sample scenario. I imported a Japan multi-unit port.
And there is a Special Action to add ships to it.
Attachments
Shipsinport.zip
(9.41 KiB) Downloaded 30 times
Michael
jkgarner
Posts: 175
Joined: Thu Apr 30, 2020 12:42 pm

RE: Creating Ships at port...

Post by jkgarner »

Mike, thanks for the quick reply. [:)] Unfortunately, I've been slaying the data monster the last couple of weeks and got pulled off my naval base creation.[:'(]

When I went to load your scenario If got an error: Root element is missing. [:(] This is probably because I am using the pro version, and you are using the latest commercial version. (they are not cross compatible) We discovered this when one of our team members, created a scenario in his personal version and we attempted to load at the office.

Since I could not use your scenario, I created a test port through the GUI using the single unit port and add 28 hosted ships and 4 hosted submarines. (after that, it ran out of room --4 ships per pier 8 piers)

The attached inst file (txt extension added) shows my test port.

I expect that if I want a very large naval base...(larger than that) I should create a group and then add facilities (either single-port facilities or structure (pier) facilities to that group until I get the size that I want.

In all this, I still have a question: [&:] Can the single unit port be hit (or attritted) in combat? The reason I ask is that in the pro training earlier this year, we had some discussion that single unit air bases could not be hit (attritted), and that if we wanted attrition at air bases, we needed to construct the bases with the disparate facility units: hangers, rivetments, magazines, runways, etc. Does this retriction apply to naval bases and docking facilities and ships? This will impact how I plan on creating the naval bases.

In the end, what I am really driving at will be scripting the creation of these bases in Lua, but first I have to determine the type of bases that we must create in Command to get the desired functionality for the model.

thanks for all your help.[8D]
Attachments
TEST_PORT.inst.txt
(6.67 KiB) Downloaded 29 times
KnightHawk75
Posts: 1850
Joined: Thu Nov 15, 2018 7:24 pm

RE: Creating Ships at port...

Post by KnightHawk75 »

we had some discussion that single unit air bases could not be hit (attritted), and that if we wanted attrition at air bases, we needed to construct the bases with the disparate facility units: hangers, rivetments, magazines, runways, etc. Does this retriction apply to naval bases and docking facilities and ships? This will impact how I plan on creating the naval bases.

In commercial version:
Well that depends, in general yes they (airbases) can't, but you can retarget re-targetable bol weapons to them after launch if you have link (109i,158c's), you just can't then selected specific targets with-in the base so it's not as effective unless you have 100+ to throw at 3-4 runway large version. As for single-unit ports they seem to be treated as normal targetable ground facilities, such that you can launch most weapons against them agm,bombs,etc that you would expect. But again you can't select out which piers etc. Wish the su-airbases worked like that. That said unlike the airbase in my experience you can take-out a single-unit port without a ton of munitions (it has 50k dp itself) but since there are actually only a few individual objects (at like 1k a piece) you don't need all that much to render it combat dead, ie the unit may be at 5% but the piers are all destroyed and the boats they were hosting along with it.
jkgarner
Posts: 175
Joined: Thu Apr 30, 2020 12:42 pm

RE: Creating Ships at port...

Post by jkgarner »

KnightHawk:
but you can retarget re-targetable bol weapons to them after launch if you have link (109i,158c's)
Please elaborate... I am not sure I understand what you mean here. what is "link" or "bol" weapons.

If I understand you correctly, once I get some weapons to target my base, I will not see accurate attrition on my airbases from my attacks... also that my missions can not target specific elements (facilities) to achieve effect unless I build them out. So in short, to achieve more believable attrition, I need to build out the facilities. (Would this an accurate assessment?)

What if I am looking for reasonable attrition over accurate attrition... say I build an airbase (or sea port) with a single facility defining each of the main targetable areas with each having sufficient quantities to operate the base e.g.: 1 with aircraft parking, 1 with weapons storage, 1 with runways, 1 with access points, and so forth. Thus instead of having hundreds of facility units for the base, I have about a dozen. This would allow targeting of general facility types at the base , though not individual facilities (e.g. 'attack the runway access points', versus 'attack the access point at the north end of runway 10')

What kind of attrition should I expect with this type of arrangement?

KnightHawk75
Posts: 1850
Joined: Thu Nov 15, 2018 7:24 pm

RE: Creating Ships at port...

Post by KnightHawk75 »

By link I mean active communication link to the weapon that can be re-targeted, more commonly\specifically in my example comm link #134 for tomahawks, which is on b-52 or most us subs, and manually added to every b-1 I ever add to a game carrying 158c's (I think this is DB error that it's missing by default - real life or not I add it).

Say for whatever reason I have some subs with 109i's or b-1's with 158c's (both weapons have re-target and bol feature flags) and for whatever reason I want to waste 80 of them on the chance of taking out some single unit enemy airbase. I can do that. All I have to do is BOL (Bearing only Launch ctrl-f1) the missiles toward the path I want them to take toward\near the target. Then after they've all launched (or as they launch) select them all at once or in small batches and press f1 and select the single unit airbase. They will then re-target themselves toward the single-unit airbase,I cannot however control what they actually target inside that single-unit enemy unit, and in the case of a port it's a little strange that taking out a pier also destroys whatever ship was there - even if it was a beefy ship (or that's been my experience).

Basically it's hack\work-around for something they're trying to discourage (and a workaround that SHOULD imho exist, and just be an option to the user along the lines of how torpedoes while not a default do allow you use their spec'd range).

As for the targeting, what I'm telling you is if you want to be able to pick out specific targets with-in and port or airbase (ie realistic), you need to build the base such that individual components (grouped) are used. Yes you can actually mix-match things to get what you want.

Yup there are tricks I've used to keep unit count down exactly as you mention and still allow yourself to 'target' the airbase\ports key parts with normal munitions. What I do most often is take a 4x single-unit airbase (lets say I use it cause allows lots of unit storage), manually disable the runways and RAP's (or whatever inside the single-unit), then I group-in a couple of individual runways and raps. As the group now has runways and raps it will work fine as an airbase. It also allows the player to then target the key parts that you specify that can effectively disable the unit from being combat effective, in that case bomb-out the extra runways and raps and it stops working cause they were the only ones enabled in the group. One issue I had when doing this though LUA wise, and you might run into this since you (like me) want to script everything being generated from scratch is the following. I can't find a way to mark destroyed\disabled (only damaged) the single-unit airbases the way I can via the gui. Now does it really matter for a relatively short scene...no, but if weeks are involved, or faster-repair scripts, it could.

Hope that all makes sense.




Post Reply

Return to “Lua Legion”