[FIXED] LUA - Groups Do Not RAS to Completion Consistently

Post bug reports and ask for game support here.

Moderator: MOD_Command

Post Reply
Bashkire
Posts: 78
Joined: Mon Feb 23, 2015 6:28 pm

[FIXED] LUA - Groups Do Not RAS to Completion Consistently

Post by Bashkire »

Hello all,

One other issue I noticed while trying out some scripts I’m working on:
When I use the script found in this post to order my group units to RAS when low on fuel, all units move to the tanker but not all units completely fill up on fuel.
It’s like they begin feeling, but when the next ship enters the queue it kicks off the preceding unit then they take their place. This means that units return to formation without having fully refuelled, necessitating a second RAS to be conducted.

As with my previous post, I’m sorry I can’t post a save. My laptop just doesn’t want to work now so I need to buy a new one.

I hope this can be solved in the fullness to time, or someone can figure out where I’m going wrong.

Steps to reproduce:
1. Create a group of around 5 units - with 1 unit being a tanker,
2. Edit my script, linked above, to reflect your unit names,
3. Order the group to charge around for a few hours to use up fuel,
4. Use the script to initiate RAS,
5. Units should all proceed to the tanker and be bumped off the front of the queue as the next unit arrives, regardless of if they have a full tank or not.
User avatar
blu3s
Posts: 1091
Joined: Fri Jul 08, 2022 9:45 am

Re: LUA - Groups Do Not RAS to Completion Consistently

Post by blu3s »

I imagine that you will not have to call the next unit to refuel until the unit that is refueling is finished.

Another option is to change the RefuelUnit method so that if a unit is already refueling, the new unit is added to the refueling queue.
User avatar
Deserere
Posts: 555
Joined: Wed Oct 13, 2021 1:15 pm

Re: LUA - Groups Do Not RAS to Completion Consistently

Post by Deserere »

Logged 0014946
Si Spiritus pro nobis, quis contra nos?
Bashkire
Posts: 78
Joined: Mon Feb 23, 2015 6:28 pm

Re: LUA - Groups Do Not RAS to Completion Consistently

Post by Bashkire »

blu3s wrote: Fri Mar 24, 2023 5:07 pm I imagine that you will not have to call the next unit to refuel until the unit that is refueling is finished.

Another option is to change the RefuelUnit method so that if a unit is already refueling, the new unit is added to the refueling queue.
So this is certainly going to be my next step in terms of a work around. Interestingly all the units show as being part of the queue, so the problem doesn’t seem to me to lie there.
User avatar
blu3s
Posts: 1091
Joined: Fri Jul 08, 2022 9:45 am

Re: LUA - Groups Do Not RAS to Completion Consistently

Post by blu3s »

Bashkire wrote: Fri Mar 24, 2023 6:17 pm

So this is certainly going to be my next step in terms of a work around. Interestingly all the units show as being part of the queue, so the problem doesn’t seem to me to lie there.
Mmm it seems like a bug in the interaction btw lua and the game engine.
User avatar
michaelm75au
Posts: 12457
Joined: Sat May 05, 2001 8:00 am
Location: Melbourne, Australia

Re: LUA - Groups Do Not RAS to Completion Consistently

Post by michaelm75au »

The Lua command is just adding the ship to the REPLEN list of the tanker/mission, so it is not a Lua related issue.
If there is something wrong with the request, the ScenEdit_RefuelUnit() returns a string so you can see why it failed. Which doesn't seem to be the case if you say it shows in the tanker's list.
It may have something to with the 'how it is getting added to the queue, so I can check that.
** I can't see the ship being refueled getting bounced when the next ship comes along side. Really need a save showing the issue

Though having a save would be useful.
Michael
Bashkire
Posts: 78
Joined: Mon Feb 23, 2015 6:28 pm

Re: LUA - Groups Do Not RAS to Completion Consistently

Post by Bashkire »

michaelm75au wrote: Fri Mar 24, 2023 11:31 pm The Lua command is just adding the ship to the REPLEN list of the tanker/mission, so it is not a Lua related issue.
If there is something wrong with the request, the ScenEdit_RefuelUnit() returns a string so you can see why it failed. Which doesn't seem to be the case if you say it shows in the tanker's list.
It may have something to with the 'how it is getting added to the queue, so I can check that.
** I can't see the ship being refueled getting bounced when the next ship comes along side. Really need a save showing the issue

Though having a save would be useful.
Apologies. I’m hoping to have a temporary repair done to my laptop by Tuesday, so I’ll try and get a save uploaded then if all goes to plan.
User avatar
blu3s
Posts: 1091
Joined: Fri Jul 08, 2022 9:45 am

Re: LUA - Groups Do Not RAS to Completion Consistently

Post by blu3s »

Hi Michael and Bashkire.

I create a little test scen. The issue is that the refueling is done but not until the fuel tanks are fill. Idk if this has something to relate how IRL refueling is done but this could be the problem that Bashkire encounters. The refueling is done in a sec, idk if it could be like the AAR that takes some time.

Load scen and run in LUA:

Code: Select all

local str = ScenEdit_RefuelUnit ({side = "Royal Navy", unitname = 'D1', tanker = 'Tidespring'})

print("REFUELING 1st:"..str)
str = ScenEdit_RefuelUnit ({side = "Royal Navy", unitname = 'F1', tanker = 'Tidespring'})

print("REFUELING 2nd:"..str)
Refueling.zip
(12.6 KiB) Downloaded 11 times
User avatar
michaelm75au
Posts: 12457
Joined: Sat May 05, 2001 8:00 am
Location: Melbourne, Australia

Re: LUA - Groups Do Not RAS to Completion Consistently

Post by michaelm75au »

I see this partial fueling even if I use the UI so definitely not related to Lua.
When refueling happens it calculates the amount to transfer; you can see the numbers changing as it refuels if running at say 15secs.
Michael
User avatar
blu3s
Posts: 1091
Joined: Fri Jul 08, 2022 9:45 am

Re: LUA - Groups Do Not RAS to Completion Consistently

Post by blu3s »

Hi Michael, perhaps I thought I saw the refueling was faster than normal.

As for the tanks not filling up completely, is it a bug in the game engine? Or is there a reason for it? Maybe some devs can clarify it :) although I don't know if they will run away when they see Lua in the title ;P

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

Re: LUA - Groups Do Not RAS to Completion Consistently

Post by michaelm75au »

It has something to do with how it is handling the fuel transfer. Something is triggering it to disconnect from the tanker, though watching the 'kg to transfer' countdown on the unit panel, it does seem to transfer what it calculated??
I will update the bug ticket with these observations.
Michael
User avatar
blu3s
Posts: 1091
Joined: Fri Jul 08, 2022 9:45 am

Re: LUA - Groups Do Not RAS to Completion Consistently

Post by blu3s »

Hello Michael,

I think the problem is the ship that is refueled is not stopped. It continues to travel and a certain distance it disconnect from the refuel.

If you run the sim at 5x and zoom in the refuel zone, you could see as the ships are moving upwards while refueling and in a certain distance they "disconnect" from the refuel and then stops. This could be the issue.
User avatar
michaelm75au
Posts: 12457
Joined: Sat May 05, 2001 8:00 am
Location: Melbourne, Australia

Re: LUA - Groups Do Not RAS to Completion Consistently

Post by michaelm75au »

I have added that to the defect report. from memory the ship should be matching the tanker's speed and direction
Michael
User avatar
michaelm75au
Posts: 12457
Joined: Sat May 05, 2001 8:00 am
Location: Melbourne, Australia

Re: LUA - Groups Do Not RAS to Completion Consistently

Post by michaelm75au »

Fixed in the next build
Michael
Bashkire
Posts: 78
Joined: Mon Feb 23, 2015 6:28 pm

Re: LUA - Groups Do Not RAS to Completion Consistently

Post by Bashkire »

Sorry to revive a somewhat old thread, but has this been fixed in a beta or official patch?
I'm now working on version 1.05 build 1307.18, but I'm still getting the same problem when I order my units to RAS.

EDIT: Just found some old patch notes. It seems that this was fixed in v1.05 Build 1307.13. Can someone else confirm that this is still a problem and it's not just me doing something stupid?

EDIT 2: Scenario file attached.
Ras Test.zip
RAS Test scenario
(35 KiB) Downloaded 11 times
User avatar
michaelm75au
Posts: 12457
Joined: Sat May 05, 2001 8:00 am
Location: Melbourne, Australia

Re: LUA - Groups Do Not RAS to Completion Consistently

Post by michaelm75au »

It isn't the original issue of the units not keeping station on the AO due to speed directly.
This time the group speed appears to be the cause.
The refueling units are trying to maintain group speed AND keep station on the AO by the feel of it; eventually the group speed pulls them away from the AO.
When I lower the group speed to cruise or creep, they settle down and keep station on the AO and then resume group station when full.
Michael
Bashkire
Posts: 78
Joined: Mon Feb 23, 2015 6:28 pm

Re: LUA - Groups Do Not RAS to Completion Consistently

Post by Bashkire »

Thank you very much for sanity checking me, and thank you for coming up with the reason for this.

It looks like I'm going to have to reduce their operational speed during their transit to allow for RASing, or decrease their speed while the RAS is conducted.
Post Reply

Return to “Tech Support”