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


The time now is Thu Mar 28, 2024 9:03 pm
All times are UTC + 0
AI Ore Miner problem
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [9 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
iambangbang
Vehicle Driver


Joined: 20 May 2015

PostPosted: Fri Dec 04, 2015 7:04 am    Post subject:  AI Ore Miner problem Reply with quote  Mark this post and the followings unread

Can anyone enlighten me as to why the AI automatically builds a miner whenever it has a War Factory available? AI Triggers are disabled and Auto-Production isn't on. This makes some of my missions look a bit odd, as there is no ore in those maps. How do I stop the AI from doing this?

Also, why is it that this automatically-created miner doesn't mine ore, while pre-placed miners do? How might I make the produced miner mine ore?Thanks.

Back to top
View user's profile Send private message
Mig Eater
Defense Minister


Joined: 13 Nov 2003
Location: Eindhoven

PostPosted: Fri Dec 04, 2015 12:17 pm    Post subject: Reply with quote  Mark this post and the followings unread

Could be HarvestersPerRefinery=, try setting it to 0,0,0 on your map.

_________________



Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID YouTube User URL Facebook Profile URL Twitter Channel URL
iambangbang
Vehicle Driver


Joined: 20 May 2015

PostPosted: Fri Dec 04, 2015 1:51 pm    Post subject: Reply with quote  Mark this post and the followings unread

Thanks, that worked, the AI stopped building the miner.


This brings me to another problem though, how do I get the AI to automatically replace the miner whenever it is destroyed? That is, I only want one active miner per refinery at any time.


I tried setting HarvestersPerRefinery=1,1,1 then adding a miner to the map. I enabled AI Triggers, Production and Autocreate. The AI did not build a miner until I had destroyed the first miner. However, this new miner did not automatically harvest; it just sat outside the factory doing nothing. In addition, after I destroyed the miner that the AI built, the AI did not build a new miner to replace it.


Do I need to manually set up a system of teams, scripts and taskforces to make the AI build a miner whenever the previous one is destroyed, and to get it to harvest ore?

Seems a tad complicated if that's the case, is there a simpler way to get the AI to do what I want it to? That is, I want there to always be one harvester per refinery; the AI must build new miners to replace the ones I destroy, and these miners must auto-harvest.

Back to top
View user's profile Send private message
Mig Eater
Defense Minister


Joined: 13 Nov 2003
Location: Eindhoven

PostPosted: Fri Dec 04, 2015 3:34 pm    Post subject: Reply with quote  Mark this post and the followings unread

Are you using the standard RA2 miners or are you using a new custom made one? If so do the original ones act in the same manor as your new one?

If there isn't a patch of ore nearby a harvester wont activate. TiberiumLongScan= is used to control the distance a harvester will look for ore, try increasing it or moving the ore closer to your base.

Hover and flying units also wont automatically harvest and need to be manually told to start. But that is only for human players, the AI normally activates them without any problems.

To make the AI replace any harvesters consistently your need to make an AI trigger/team/script. There are already scripts in the aimd.ini for the Chrono & War Miner on medium and hard difficulties.

_________________



Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID YouTube User URL Facebook Profile URL Twitter Channel URL
iambangbang
Vehicle Driver


Joined: 20 May 2015

PostPosted: Fri Dec 04, 2015 4:49 pm    Post subject: Reply with quote  Mark this post and the followings unread

I'm using the standard miners.

Regarding the created harvester not harvesting ore, looks like the problem was that the ore field was too far away; moving it closer fixed that. Thanks for that tip!



If I'm understanding you correctly regarding the scripts in the .ini file, the existing scripts should fix my problem? (The mission is being played on hard mode, and the harvester in question is the Chrono Miner)

I'm still a little confused though. If the existing scripts should fix my problem, why is it that the AI doesn't rebuild the Chrono Miner after I destroy the first one it constructs? Or did you mean that I need to create new AI triggers altogether (and use the existing ones as a reference)?

Back to top
View user's profile Send private message
Mig Eater
Defense Minister


Joined: 13 Nov 2003
Location: Eindhoven

PostPosted: Fri Dec 04, 2015 4:54 pm    Post subject: Reply with quote  Mark this post and the followings unread

For missions you need to create new AI triggers for each map.

_________________



Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID YouTube User URL Facebook Profile URL Twitter Channel URL
iambangbang
Vehicle Driver


Joined: 20 May 2015

PostPosted: Sat Dec 05, 2015 5:52 am    Post subject: Reply with quote  Mark this post and the followings unread

I was afraid that was the case. Thanks for the assistance!

Side note: I don't suppose you know of any method to add an 'event' that has the effect of [When unit X is at 100% health]? I know that the existing trigger events have things like [First damaged/Quarter health], but I was thinking of trigger that required you to restore the health of a unit to activate an action, rather than damaging the unit. I can't use Engineers to fake this hp-restoring 'event' as the object this tag will be attached to is a unit, not a building. Is such a trigger possible?

Back to top
View user's profile Send private message
E1 Elite
General


Joined: 28 May 2013

PostPosted: Sat Dec 05, 2015 8:48 am    Post subject: Reply with quote  Mark this post and the followings unread


Back to top
View user's profile Send private message
iambangbang
Vehicle Driver


Joined: 20 May 2015

PostPosted: Sat Dec 05, 2015 9:37 am    Post subject: Reply with quote  Mark this post and the followings unread

None of those events work the way I want them to, but I eventually managed to find a satisfactory workaround for what I wanted using the PoweredUnit and PowersUnit command. I had initially wanted to be able to use the repair of a vehicle as an event, but what I found works too.

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [9 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
You cannot post new topics in this forum
You cannot 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.1475s ][ Queries: 11 (0.0087s) ][ Debug on ]