Jump to content

gromit190

Members
  • Posts

    167
  • Joined

  • Last visited

Posts posted by gromit190

  1. On 6/9/2023 at 7:55 AM, UltraTopSecret said:

    Does anyone have a fix for troops getting stuck near bridges instead of advancing to their capture zone?

    Hi, can you share a screenshot of the route the unit(s) get? I am wondering if there is something wrong with the assigned route (generated by the script), or if the route is okay but DCS is the problem.

  2. I got some messages about the list of unit types that was generated in this project.

    I couldn't quite remember how I compiled the list but I created a python script that reads all data from the "C:\Program Files\Eagle Dynamics\DCS World OpenBeta\Scripts\Database\db_countries.lua" file. I don't know how useful it may be but anyways I thought I'd share it 🙂

    https://github.com/birgersp/dcs-gws/blob/master/unit-types/unit-types-all.txt

    • Thanks 1
  3. On 11/26/2021 at 6:33 PM, Jaakov said:

    Only thing that I not okay with is that they started collecting money and hyping with videos and then failed to deliver. If they said it in the beginning of the october and started preorder now it would be whole different story. Its obvious that they actually knew, because of only one wags video posted after preorder trailer... 

    Woah, woah. Are you trying to say that people shouldn't preorder games?

    Cbs Reaction GIF by The Late Late Show with James Corden

  4. Attached is a version where deactivated units will be ignored.

     

    But there's a catch 🙂

     

    I've been working on renaming the project and it is easier for me to implement this fix in the renamed project. So to use this version you'll have to change the "autogft" prefix in your script to "gws".

     

     

    e.g. you'll need to change your lua mission script from this:

     

    autogft_Setup:new()
      :addBaseZone("BLUE_BASE1")
      :addControlZone("CONTROL1")

     

     

    To this:

     

    gws_Setup:new()
      :addBaseZone("BLUE_BASE1")
      :addControlZone("CONTROL1")

     

    gws-1_19.zip

  5. 19 hours ago, gunterlund21 said:

    Ah so spawn them into the BASEZone correct?

     

    Maybe. Depends what it is that you want to do. You can spawn them in to the base zone later in the mission, to use as reinforcements if you invoked useStaging().

     

    Are you using useStaging()?

     

     

    19 hours ago, gunterlund21 said:

    This worked. Is speed in KM or MPH?

     

    I think it is km/h, but honestly I am not sure. It is not converted in my code, so it is the same as it is in the mission editor/DCS internal scripting engine.

  6. Hey guys,

     

    Sorry for being so afk. Been really busy lately with house remodeling and taking care of my kid.

     

    On 6/19/2021 at 5:58 AM, xXMustangXx said:

    can you expand a little bit more on the Link option?

    
    
    ---
    -- Linked bases example
    -- Base zone "BASE1" will be linked to the group "BASE1_BUILDINGS"
    -- When (if) the units (buildings) in BASE1_BUILDINGS group are destroyed, the base zone "BASE1" will be disabled and units won't spawn there anymore
    -- Note that this only applies for the task force/setup where this is enabled. Other task forces/setup will still use the base zone
    
    autogft_Setup:new()
      :addBaseZone("BASE_1")
      :linkBase("BASE_1", "BASE1_BUILDINGS")
      :addControlZone("OBJECTIVE_2")

     

    What kind of units do you put in base1_buildings to be destroyed?

     

     

     

    I guess in theory it could be anything, but when testing this I used a couple of buildings.

     

     

    On 6/24/2021 at 6:20 AM, gunterlund21 said:

    Gromit starting to work with this again. Question. Will the system pick up units after the mission has started. So for instance if I spawn in units during mission play into the base will they be included in the attack

     

     

    Short answer: no. Long answer: it depends. Usually (unless you scripted otherwise), "scanUnits" is triggerred on mission start. So only the units that are present when that happens will be used. But for staging, you could send units to the staging area and they will be used if they match the type that is used for reinforcements.

     

     

    On 6/24/2021 at 7:11 PM, gunterlund21 said:

    Hey Gromit... looks like :setspeed() is being ignored. Have you noticed that?

     

    No. Keep in mind that you need to use setSpeed before using addControlZone etc. Maybe you could post your script where the error occurs?

     

     

    On 6/25/2021 at 5:56 AM, gunterlund21 said:

    Hi Gromit... the function ScanUnits is picking up deactivated units as well. Any way to prevent that?

     

    That should be an easy fix. I didn't consider that when I coded scanUnits. Will fix this.

  7. Great :)

      

    On 5/4/2021 at 1:46 AM, gortex said:

    @gromit190With the new polygonal zones we have in 2.7, I am very confident that autogft does not see them.  Instead, autogft just looks at the radius as if it were still a circle.

     

    This is true. I seem to remember that autogft just uses the origin point of the zone (idk what that would be in a polygon but for circles its the center) and looks at units within the zones radius. Added fixing this to the issue list: https://github.com/birgersp/dcs-autogft/issues/123

     

    Also keep in mind its the same when a unit goes to "capture" a zone. It will use the radius.

     

    So currently I guess autogft really only has support for circle zones.

  8. Since you didn't specify any units, autogft will scan "BlueSpawn1" on mission start to see what units it should be using. if there are no units on mission start (which I guess there aren't since you spawned them perhaps later) then autogft thinks there are no units. Perhaps this is what happened 🙂

  9. 4 hours ago, gortex said:

    So, about driving on roads...  With this the units move:

    
    autogft_Setup:new()
      :addBaseZone("BlueSpawn1")
      :setSpeed( 10 )
      :setAdvancementTimer( 60 )
      :setReinforceTimer( 1800 )
      :addControlZone("BlueZone5")
      :addControlZone("RedZone5")
      :addControlZone("RedSpawn1")

     

    But with this they are permanently stuck:

    
    autogft_Setup:new()
      :addBaseZone("BlueSpawn1")
      :startUsingRoads() 
      :setSpeed( 10 )
      :setAdvancementTimer( 60 )
      :setReinforceTimer( 1800 )
      :addControlZone("BlueZone5")
      :addControlZone("RedZone5")
      :addControlZone("RedSpawn1")

     

    I tried have the units spawn on a road and not spawning on a road, it makes no difference.  Thanks for your help!

     

    I'll take a look 🙂

  10. On 4/9/2021 at 9:40 PM, gortex said:

    @gromit190Please let us know if anything changes.  At some point whatever change they made will push to the stable branch, no?  2.7 is around the corner.

     

     

    For those interested, there is something mentioned regarding a "script API" change here:

     

    Quote

    As of 2.5.6 a new parameter of airborne has been added to the root tasking for a flight. This is so the game knows that the aircraft group you are assigning a bunch of aircraft specific waypoint information is in fact being assigned to an aircraft group. This parameter is required if the group is assigned the task after spawn they are spawned in. This fixes a long standing bug where AI would ignore waypoint information and default to "Fly Over" waypoint type or airport Id if it was different from where it took off from"

     

    I would guess the implementation of this (during development, beta versions you know) was the cause of the error. Anyways it should be working now for both stable and open beta.

    • Like 1
  11. It seems like the problem was that the function was called too soon (immidiately) after mission start.

     

    This is a working script:

     

    local waypoints = {}
    local function addWaypoint(x, y)
      waypoints[#waypoints + 1] = {
        x = x,
        y = y,
        speed = 20,
        action = "Cone"
      }
    end
    
    local function foobar()
      env.info("WAYPOINT TEST")
      local group1 = Group.getByName("Group1")
      local group1Pos = group1:getUnit(1):getPosition().p
      addWaypoint(group1Pos.x, group1Pos.z)
      addWaypoint(group1Pos.x + 2500, group1Pos.z)
      addWaypoint(group1Pos.x + 2500, group1Pos.z + 2500)
      addWaypoint(group1Pos.x, group1Pos.z + 2500)
      addWaypoint(group1Pos.x, group1Pos.z)
      local task = {
        id = "Mission",
        params = {
          route = {
            points = waypoints
          }
        }
      }
      log(group1:getController())
      group1:getController():setTask(task)
    end
    timer.scheduleFunction(foobar,nil,5)

     

  12. Hi,

     

    I am trying to understand how to assign a task (route of waypoints) to a group. I want this to be a "vanilla" script (no script tools/mods).

     

    In my attempt, I am simply trying to make the unit go from its current position to a point 200 units away. But the unit does not move.

     

    Can someone please point at what I did wrong here?

     

    local function foobar()
      env.info("WAYPOINT TEST")
      local group1 = Group.getByName("Group1")
      local group1Pos = group1:getUnit(1):getPosition().p
      local waypoints = {}
      waypoints[1] = {
        x = group1Pos.x+200,
        y = group1Pos.z,
        speed = 20,
        action = "Cone"
      }
      local task = {
        id = "Mission",
        params = {
          route = {
            points = waypoints
          }
        }
      }
      group1:getController():setTask(task)
    end
    foobar()

     

    I am checking the logs, and I see that the info message "WAYPOINT TEST" is written.

     

    Furthermore, I am certain that the group is found and that the position data is really retrieved because I tried printing them to log too. I see that the data exists (is not nil).

     

    So I am not sure why this doesn't work.

  13. Hi,

     

    I want the MFCD to be visible on-screen, but obviously only when I need to see it. I know how to make it visible in the multi-monitor setup lua, but is it possible to hide it with a key press?

     

    (I am refering to the shkval as "mfcd" here because that's how it is named in the lua. And my question is really about viewports in general and not really only about the KA-50)

     

    MFCD visible:

    image.png

     

    I press a key, and this is what I want to happen:

     

    image.png

     

    Can somebody help me?

  14. Hi,

     

    No, sorry. I probably won't spend time on investigating this further. I don't use the beta, so I am not really that dedicated to debugging it.

     

    But when I checked, the error was that assigning waypoints in lua does not work the same way as it did before. So the scripting docs (what little there is) doesn't correctly explain how to create routes. (Unless they changed it since I last checked).

     

    Whoever wants to investigate the bug, feel free. I and others would really appreciate it 🙂

  15. Hi all,

     

    I just tested the Steam version, non-Steam version and open beta.

     

    Steam version and non-Steam version works with autogft 1.18. I just tested a basic example and the example mission (which uses a lot of various features of autogft).

     

    Open beta does not work. I don't know why, but there is some kind of bug where only the second waypoint of a two-point route will work.

     

    For those of you that experience an error, please state what version of DCS World you are using.

     

    Download autogft here.

  16. Been trying to solve this. Honestly, there must be some kind of bug with DCS. I can't explain it any other way. For some reason it seems that the unit is only moved to the first waypoint in the route. But only if the route has more than 1 waypoint (?). This is the same case even when I script some route "manually" (not using autogft) for the units.

     

    For those of you that have the bug, what DCS version are you using?

     

    Please keep your eyes and ears open if anyone else has this bug. I tried asking on the mission editor channel on ED discord, but it seems idle.

  17. Okay. I did just to a quick test before generating 1.17 so I might have missed something. Will keep trying to solve it.

     

    One thing I struggled with yesterday was creating a simple script that just gives a group some simple task (route). Because that would really help me debug this error, by comparing the task data that autogft generates with raw task data that is manually made and works. Will continue fixing this later.

     

    BTW I am using the open beta version now for testing.

  18. While I investigate how to properly fix this bug, you can probably use this version with a temporary workaround: https://github.com/birgersp/dcs-autogft/releases/tag/1.17

     

    This might be a bit buggy, especially considering running on roads. But give it a go if you want.

     

    Also if you have any information that would help me identify what has changed on the DCS scripting engine. Tried looking at the hoggit wiki but it gave no answers to why the autogft logic stopped working.

  19. I've isolated the problem at least.

     

    What autogft does is it creates 2-6 waypoints (depending on the setup and how far it is until the next objective).

     

    It will appear like the unit does not move at all but actually the first waypoint is just really close to the unit position. So it moves just a couple of meters to get to it in the beginning of the mission and then it stops.

     

    For some odd reason, DCS only moves the units to the first waypoint and stops at it. It just ignores the next route waypoints.

     

    Has anyone heard of other scripts experiencing a similar problem? Right now I'm going to test a regular route with 2 waypoints to see if that works.

×
×
  • Create New...