:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::

Do you want to advertise at Project Perfect Mod. Find out how to do it HERE.

The time now is Thu Sep 24, 2020 11:11 pm
All times are UTC + 0
 Forum index » Modding Central » C&C: Remastered Collection Editing Forums
Some small TD AI improvements
Moderators: Global Moderators
Post new topic   Reply to topic Page 1 of 1 [1 Post] View previous topic :: View next topic
Author Message
EGG
Civilian


Joined: 06 Sep 2020

PostPosted: Sun Sep 06, 2020 3:44 pm    Post subject:  Some small TD AI improvements Reply with quote

I thought I'd post these here, in case they're of use to anyone else in any other mods. I've made a couple of improvements to TD AI behaviour: https://steamcommunity.com/sharedfiles/filedetails/?id=2220995241

Gunboat targeting
Gunboats will now pickup a new target each time they reverse direction down the shipping lane. Ideally they should probably pickup a new target in the same manner as normal Units, but this is a bit more complicated as they always use the Hunt AI in the campaigns, which is basically "go banzai on something", and multiple places in the code re-assign Gunboats to Hunt if they get into any other state. They're definitely more troublesome than they used to be.

Orca/Apache fly-in location
I built a rather Orca-heavy map, but whenever you built new Orca's, and they didn't have a Helipad to land on, they'd pick a random Y co-ordinate to fly in from. Which could mean they'd overfly SAM's halfway across the map. So this change is to make them fly in at the Y co-ordinate of the primary Helipad, similar to Cargo drops.

Using Orcas/Apaches in temporary Reinforcement Teams
I was trying to use Apaches in a Reinforcement Team, to have them fly in, attack some targets, then fly off map again. But instead they would empty all their ammo, then idle over the enemy base for a period, before flying back to their own base and landing in a big mess. So this sets Reinforcement Orca/Apache Teams to be "Loaner" craft if they are owned by a non-human. When they've finished using all their ammo, they'll fly-off map. It doesn't affect transports, new-build Orcas/Apaches or anything player-owned (that one Covert Ops mission where Reinforcement Apaches are used).

I suggest using "Rampage:3" or "Attack Buildings:3" on the Apaches if you want to try this. Otherwise they'll still idle over the enemy base for a bit when empty.

SAM popup logic
Lastly, I've put a short delay on SAM's before they Lock into the North position before lowering. During this time they will scan for new targets. This prevents the previous jack-in-a-box behaviour. It doesn't affect the current firing delays, either for the two-shot (~3 game ticks), or for the subsequent two-shot (~45 game ticks).

I've attached the changed code below, but I probably need to figure out how to use Git, and upload it there.

There are some other AI gremlins I'd like to look at sometime, the Ambush Mission, Engineers trying to capture turrets (which they can't) and the age-old one of AI bases getting clogged up with too many units.


AIRCRAFT.CPP
 Description:
Orca/Apache Reinforcement teams (enter_idle_mode)

Download
 Filename:  AIRCRAFT.CPP
 Filesize:  155.53 KB
 Downloaded:  0 Time(s)


REINF.CPP
 Description:
Orca/Apache Reinforcement teams (do_reinforcements)

Download
 Filename:  REINF.CPP
 Filesize:  26.77 KB
 Downloaded:  2 Time(s)


BUILDING.H
 Description:
SAM lowering delay (int definition)

Download
 Filename:  BUILDING.H
 Filesize:  11.15 KB
 Downloaded:  0 Time(s)


BUILDING.CPP
 Description:
Orca fly-in location (exit_object)
SAM lowering delay (mission_attack)

Download
 Filename:  BUILDING.CPP
 Filesize:  225.77 KB
 Downloaded:  0 Time(s)


UNIT.CPP
 Description:
Gunboat fix (per_cell_process)

Download
 Filename:  UNIT.CPP
 Filesize:  187.04 KB
 Downloaded:  0 Time(s)


Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [1 Post] View previous topic :: View next topic
 Forum index » Modding Central » C&C: Remastered Collection Editing Forums
Jump to:  
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
Quick Reply
Username:


If you are visually impaired or cannot otherwise answer the challenges below please contact the Administrator for help.


Write only two of the following words separated by a sharp: Brotherhood, unity, peace! 

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 0.4366s ][ Queries: 12 (0.1126s) ][ Debug on ]