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 Sat Apr 20, 2024 6:14 am
All times are UTC + 0
Side specific harvesters and the AI
Moderators: Global Moderators, Tiberian Sun Moderators
Post new topic   Reply to topic Page 1 of 1 [12 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
SuperJoe
Commander


Joined: 03 Sep 2009

PostPosted: Sat Jan 09, 2010 4:11 pm    Post subject:  Side specific harvesters and the AI Reply with quote  Mark this post and the followings unread

I've read the tutorials on how to make side specific harvesters, and how to get the AI to actually harvest with them (involving self-destructing buildings with FreeUnit key). Despite making the AI able to build harvesters even without a warfactory, this method seems good enough for me. However I am wondering, how close can this method be used to make the AI build and use harvesters effectively? Can you for example control how many harvesters the AI should build at a time, and make them rebuild lost harvesters? Or is there another completely different way to get side specific harvesters to work with the AI?

It's kind of annyoing how side specific harvesters for AI are fuggled up by the fact purchased harvesters do not automatically begin to harvest. Are there any .exe hacks to correct this? Would be useful even for a human player, so you don't have to babysit your harvesters.

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Sat Jan 09, 2010 4:41 pm    Post subject: Reply with quote  Mark this post and the followings unread

i don't think there is any perfect solution for this problem
though i once had the idea to let the warfactory productionanim spawn tiberium around the warfactory.
If this is done right, the harvester leaves the WF and instantly stands on a patch of tiberium, which starts its auto-harvest-loop. For that you could even use one of the unused tiberium types and give it an invisible image for the first tiberium patch stage and a value of 0, so it can't be abused to gain money.

The dummy building with freeunit is imo no good solution as the AI never stops building them and there is afaik no way to control the number of built buildings for only one special building.
That's why i think it's best to add some new AI trigger in ai.ini and/or use the warfactory with spawning tiberium.

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
SuperJoe
Commander


Joined: 03 Sep 2009

PostPosted: Sat Jan 09, 2010 5:19 pm    Post subject: Reply with quote  Mark this post and the followings unread

Thats a pretty good idea. I had no idea harvesters begin to harvest automatically when they are on tiberium. Just so happens my mod actually already has a building that spawns tiberium only 1 square away from the building at a slow rate. Would the harvester begin to harvest if the square was initially empty, but later tiberium would appear on it (under the harvester)? Think it might be a problem if the tiberium was spawned too fast, then it would become an endless resource gathering place for the AI, as the harvesters would go for the closest tiberium patch.

Also this method I think it would be best to make a seperate warfactory that only the AI builds (with Techlevel=-1 and AIBuildThis=no keys), so human players can't exploit the free tiberium. You could capture them with engineers, but it would be a very small downside for working side specific harvesters.

EDIT: Ahh right you were going to use the productionanim for the spawning. Guess that would keep the spawning somewhat more under control. My spawning building has it set as the activeanim.

EDIT: If you created the seperate warfactories for human and AI players, you could use the PrerequisiteGDIFactory= and PrerequisiteNodFactory= keys in firestrm.ini to include both of these buildings? That way all units would be accessible for both the humans and the AI?

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


Joined: 07 Apr 2005

PostPosted: Sat Jan 09, 2010 6:08 pm    Post subject: Reply with quote  Mark this post and the followings unread

I still cant find what it is that YR has that makes them auto harvest, my hacks have just caused the harvester to get frozen.

Back to top
View user's profile Send private message
SuperJoe
Commander


Joined: 03 Sep 2009

PostPosted: Mon Jan 11, 2010 9:32 am    Post subject: Reply with quote  Mark this post and the followings unread

I tried the productionanim spawning tiberium method and it works pretty flawlessly. Even when theres a hill right next to the warfactory door the tiberium will spread on it, at least on all the main directions (north, south etc). It won't spawn on hills pointing northeast, northwest, etc. But I'm not sure if that would ever be a problem.

However there is still a slight problem. If all refineries get taken out, the harvesters who were back on their way to the refinery will stop moving in a location with no tiberium. When you build another refinery, they won't start harvesting again. The harvesters that were on their way back to a tiberium field or were harvesting usually end up staying on tiberium anyway, so they get back onto harvesting.

To correct this I tried using LargeVisceroid=yes tag on the harvester. They will randomly move about and hopefully move to a tiberium field and resume harvesting. If they get damaged below 50% health they will automatically drive to a tiberium field and start harvesting. I was wondering if this could be somehow used to make them always head out to tiberium fields when not under orders to harvest? However the tag causes another small problem. When a harvester gets damaged below 50% health, they won't empty their load at the refinery, instead they head out to the tiberium fields until they are again above 50% health (luckily harvesters have automatic healing to 50% health). This could be exploited by human players by firing a harvester enough to make it return to the field constantly and never empty its load. At this point I don't think the benefits of the visceroid tag are worth the problems it can cause. If you don't use it though, some of the AI harvesters will end up doing nothing if they lose all the refineries at the same time... Mad

Back to top
View user's profile Send private message
Askhati
Jumpjet Infantry


Joined: 22 Dec 2009

PostPosted: Mon Jan 11, 2010 1:03 pm    Post subject: Reply with quote  Mark this post and the followings unread

Well, that visceroid tag is useful to know about, especially if you are making some mutant lifeforms - fiend and friends - that like tiberium. Never knew that, thanks! (I'm doing a mutant mod atm, so this will be helpful) Does that tag work with infantry too?

_________________
Adapt or die

Back to top
View user's profile Send private message
SuperJoe
Commander


Joined: 03 Sep 2009

PostPosted: Mon Jan 11, 2010 2:27 pm    Post subject: Reply with quote  Mark this post and the followings unread

After a quick test, no, LargeVisceroid does not work with infantry. However theres another key, Doggie=yes, that works on infantry. The tiberium fiend uses this. It makes the unit lie down once it's on tiberium, and also makes the unit run to tiberium when it is badly damaged (red) and there is tiberium close by. I'm doing a mutant mod as well, and have used the Doggie and LargeVisceroid keys on some of the mutant units. I don't recommend using SmallVisceroid, as it can cause 2 of the units to merge into a large visceroid. It also seems to randomly make the unit explode once it's under fire.

Back to top
View user's profile Send private message
SuperJoe
Commander


Joined: 03 Sep 2009

PostPosted: Mon Jan 11, 2010 2:33 pm    Post subject: Reply with quote  Mark this post and the followings unread

For the original topic, the northwest / northeast / southwest / southeast facing hills can cause problems with the productionanim method if the warfactory is placed next to a hill. The LargeVisceroid key would help resolve this, as the unit would be likely to move onto a square nearby that has tiberium. Better to make the productionanim spawn tiberium in a large area, something like 3x3, to make sure it will move to a square that has tiberium. If you decided to use the visceroid tag, its best to make another version of the harvester (that has the LargeVisceroid=yes) and refinery (that has FreeUnit=HARV_AI) that only the AI is able to build. The visceroid tag would be quite annoying for harvesters that are under human player's command.

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


Joined: 07 Apr 2005

PostPosted: Mon Jan 11, 2010 2:52 pm    Post subject: Reply with quote  Mark this post and the followings unread

LargeVisceroid & SmallVisceroid only look for UnitTypes.

Back to top
View user's profile Send private message
Ordosherrscher
Commander


Joined: 20 Nov 2007
Location: Germany, Berlin

PostPosted: Mon Jan 11, 2010 2:59 pm    Post subject: Reply with quote  Mark this post and the followings unread

CCHyper wrote:
LargeVisceroid & SmallVisceroid only look for UnitTypes.

Can it be changed? Since it would be cool for some Lifeforms, acting like viscs, but having some abilities of inf...
Another thing: is the visc logic hard-coded...? It would be cool if there are sperate tags for moving and looking for tiberium...

_________________

Think of me as Nordos, 'cause Banshee wouldn't rename me

Back to top
View user's profile Send private message Skype Account
Orac
President


Joined: 11 Jul 2008
Location: New Zealand

PostPosted: Mon Jan 11, 2010 9:44 pm    Post subject: Reply with quote  Mark this post and the followings unread

Stop adding things for Hyper to do! #Tongue

Back to top
View user's profile Send private message
SuperJoe
Commander


Joined: 03 Sep 2009

PostPosted: Tue Jan 12, 2010 4:57 pm    Post subject: Reply with quote  Mark this post and the followings unread

Another major setback for tiberium spawning method. In maps with pavement on the ground (like cities) the tiberium will not spawn at all if the warfactory is placed on pavement. This method might be a little too restrictive and there are some scenarios where it will not work.

I'll try to work out some other way with the FreeUnit tag to make it work. Maybe hand a harvester with every obelisk the AI builds (increase price accordingly), or make a similar new base defence structure that the AI does not build all too often. It's better to make them build excessive amount of harvesters than too few I think.

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [12 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.1505s ][ Queries: 11 (0.0077s) ][ Debug on ]