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

Not exactly sure if I understand what you're asking. Are you wanting combat units to basically auto attack if enemy comes near, or are you wanting them to actively seek out enemies (sorta like auto-explore but for combat)?

both of all

and want to make some units into a group, easy to control for combat
 
Not sure about doing all that currently without mod tools, especially the grouping part. Might could do the auto-attack, similar to way I currently do the fortified alert, but would have to happen at turn begin or end. Also, running a check of all combat units against all other units in range might slow turns down a bit, especially in later game and on larger maps.
 
Not sure about doing all that currently without mod tools, especially the grouping part. Might could do the auto-attack, similar to way I currently do the fortified alert, but would have to happen at turn begin or end. Also, running a check of all combat units against all other units in range might slow turns down a bit, especially in later game and on larger maps.

Thank you! Auto-attack is very well , maybe you can do this! I think you don't need to make it prefect ,you can revise auto-explore become auto-attack for one step. Then you can reduce check of all combat units against all other units in a small compass
 
The game developers struggled to do this with the AI. Look at how bad they are at fighting? Are you sure you want your units to be so brain dead?

In theory it should be possible to use the existing AI that the computer uses and just apply it to your own forces. Almost certainly not with current tools though.
 
That is the part I am worried about. Until I look into it farther and test out, my first thought was to run a check against combat odds and if it was better than a certain threshold then issue attack command, but there is definitely no way I could currently (or probably ever) allow for all the factors a human would take into consideration for when to attack.
 
That is the part I am worried about. Until I look into it farther and test out, my first thought was to run a check against combat odds and if it was better than a certain threshold then issue attack command, but there is definitely no way I could currently (or probably ever) allow for all the factors a human would take into consideration for when to attack.

That is great idea! you can do step by step. if units HP lost (50%) ,then stop or escape.
 
The game developers struggled to do this with the AI. Look at how bad they are at fighting? Are you sure you want your units to be so brain dead?

In theory it should be possible to use the existing AI that the computer uses and just apply it to your own forces. Almost certainly not with current tools though.


in the later stage, you may have lots of units , and you control one for one is so boring

and sometimes, your army is leader than AI's army
 
There was something like this in Civ4 mods. If this will be possible it will be after the mod tools are released.

Though the points brought up earlier;

The game developers struggled to do this with the AI. Look at how bad they are at fighting? Are you sure you want your units to be so brain dead?

In theory it should be possible to use the existing AI that the computer uses and just apply it to your own forces. Almost certainly not with current tools though.

That is the part I am worried about. Until I look into it farther and test out, my first thought was to run a check against combat odds and if it was better than a certain threshold then issue attack command, but there is definitely no way I could currently (or probably ever) allow for all the factors a human would take into consideration for when to attack.

....is worth thinking about.
 
Well, just messing around a little I found I can get units to auto attack. I haven't applied any conditions to it yet, so they are basically just attacking enemies within movement range until one dies, or the other moves out of range, but at least I know some type of auto-attack will work.

I basically just used the code I had for guard, and instead of waking the unit, set it to attack an enemy, then go back into fortify until it can attack again.
 
I had a little time to look at it today, and it's nowhere near complete, but here is a little test mod if you want to test it out. You use the guard button in action panel(or G) and units will fortify until they see an enemy, then they will attack if within range as long as their strength is greater, or health not too low. If their strength is low they will head to nearest city. Of course, all hopefully.
 

Attachments

  • AttackTest.zip
    31.1 KB · Views: 98
I had a little time to look at it today, and it's nowhere near complete, but here is a little test mod if you want to test it out. You use the guard button in action panel(or G) and units will fortify until they see an enemy, then they will attack if within range as long as their strength is greater, or health not too low. If their strength is low they will head to nearest city. Of course, all hopefully.

Thank you very much, I will test it!
 
I had a little time to look at it today, and it's nowhere near complete, but here is a little test mod if you want to test it out. You use the guard button in action panel(or G) and units will fortify until they see an enemy, then they will attack if within range as long as their strength is greater, or health not too low. If their strength is low they will head to nearest city. Of course, all hopefully.

I only use this mod, units can auto attack army when they near.when the health is low, you can control it. But they can't move, just stay where they are
 
This was just to test the attacking call. The units will only move if they can attack other unit, ranged units will attack if in range. I still have to work on the health bit, I have to work tomorrow, but will have time Wednesday.

I commend your efforts to keep creating these little mods/tweaks ect. :hatsoff:
 
This was just to test the attacking call. The units will only move if they can attack other unit, ranged units will attack if in range. I still have to work on the health bit, I have to work tomorrow, but will have time Wednesday.

okay,i think health lost value can custom is better
 
I commend your efforts to keep creating these little mods/tweaks ect. :hatsoff:
Thank-you. I got burned out with modding working on a humongous mod for civ v(something like 5,000 files--Not all me had been a community project), so I'm trying to keep it simple for a while.

okay,i think health lost value can custom is better

One problem was I had it checking health only if a unit was in range, I changed that so it'll check before.
 
Last edited:
Top Bottom