1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

anyone can make a mod to make army organize into groups and auto attack?

Discussion in 'Civ6 - Creation & Customization' started by silentscience, Nov 16, 2016.

  1. silentscience

    silentscience Chieftain

    Joined:
    Oct 27, 2016
    Messages:
    41
    I have an idea, when the unit lost too much health, they run out of a certain distance towards nearest city then stop. If no enemy near , they just wait until health is full . Then keep going
     
  2. gyogen2

    gyogen2 Chieftain

    Joined:
    May 8, 2014
    Messages:
    1,201
    I just set them to goto nearest city because it was quick to code for test. I should be able to work on it more today, I'll see whet I can do.
     
  3. gyogen2

    gyogen2 Chieftain

    Joined:
    May 8, 2014
    Messages:
    1,201
    I've changed/added a few things, s you can see if this works any better. I still have to work out a method if you want them to actively track down enemy units, but you can try this for now. I tested by placing units around/near city states and declaring war, then basically hitting next turn until they conquered the city.
     

    Attached Files:

  4. gyogen2

    gyogen2 Chieftain

    Joined:
    May 8, 2014
    Messages:
    1,201
    Also, for now, until I work in a better method, non ranged units will only attack if their total strength is greater than enemy(and not too wounded)
     
  5. silentscience

    silentscience Chieftain

    Joined:
    Oct 27, 2016
    Messages:
    41
    thank you!
     
  6. silentscience

    silentscience Chieftain

    Joined:
    Oct 27, 2016
    Messages:
    41
    my army find enemy range is a little small, how can I change it larger?
     
  7. gyogen2

    gyogen2 Chieftain

    Joined:
    May 8, 2014
    Messages:
    1,201
    I haven't had time to do a proper system for finding enemies, so for right now I was just having them move to ones just out of sight range. You can change the number of tiles out with this line:
    elseif (iDist < (iSight + 3 )) then ( line 3887)

    just change the 3 to higher number
     
  8. silentscience

    silentscience Chieftain

    Joined:
    Oct 27, 2016
    Messages:
    41
    @gyogen2 do you have some time to complete this mod?
     
  9. gyogen2

    gyogen2 Chieftain

    Joined:
    May 8, 2014
    Messages:
    1,201
    sorry, I've had hectic schedule this past week, haven't been able to work on any mods. Hopefully should be slowing down a little now. How is the current part working, any problems/adjustments I would need to know about?
     
  10. silentscience

    silentscience Chieftain

    Joined:
    Oct 27, 2016
    Messages:
    41
    actually, when I use "guard " ,unit do nothing most of time.
    I set "elseif (iDist < (iSight + 3 ))" very high, they still stay there.
     
    Last edited: Dec 7, 2016

Share This Page