:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: 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 Wed Nov 22, 2017 3:08 pm
All times are UTC + 0
 Forum index » Modding Central » Red Alert 2 Editing Forum » Ares (Unofficial Forum)
AI and units with TechLevel=-1
Moderators: Ares Support Team at PPM, Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [8 Posts] View previous topic :: View next topic
Author Message
Ich-Henker
Rocket Infantry


Joined: 06 Aug 2015
Location: Germany/Austria

PostPosted: Mon Oct 10, 2016 3:33 pm    Post subject:   AI and units with TechLevel=-1 Reply with quote

Hey,

so I cloned an IFV and gave it an initial passenger. I put it in the vehicle list and gave it Image=FV and TechLevel=-1.

Now I found out, that the AI will not build units with TechLevel-1 - is this correct with you, what were your solutions for I do not want the cloned FV to be buildable for the human player?


Thanks!

Last edited by Ich-Henker on Mon Oct 10, 2016 4:40 pm; edited 2 times in total

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


Joined: 13 Nov 2003
Location: Eindhoven

PostPosted: Mon Oct 10, 2016 4:13 pm    Post subject: Reply with quote

Yes units with TechLevel=-1 can't be built by the AI.
To get around this use a normal tech level but add a dummy building that the player cant build to the Prerequisite= (which the AI ignores).
_________________

Back to top
View user's profile Send private message Visit poster's website
PePsiCola
Stealth Laser Trooper


Joined: 28 Dec 2010
Location: The United States

PostPosted: Mon Oct 10, 2016 10:36 pm    Post subject: Reply with quote

I have dozens of cloned units and/or other units and structures for AI only. I've never heard of the AI not building units with TechLevel=-1. As long as they are part of a taskforce/team/AITrigger (as with any unit), and the TechLevel isn't above the max (like 11), the AI will build them. And of course, TechLevel=-1 disallows player construction, so that should give you the outcome you want.

This is more clear:
http://modenc.renegadeprojects.com/TechLevel#Limitations_of_this_system
_________________
Tiberium Uprising (a few missions for TS): http://www.ppmsite.com/forum/viewtopic.php?t=31029

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


Joined: 13 Nov 2003
Location: Eindhoven

PostPosted: Tue Oct 11, 2016 8:06 am    Post subject: Reply with quote

I've been using TechLevel=-1 to specifically stop the AI building units in D-day for a decade :/ It works differently for buildings BTW, where you can use TechLevel=-1 & AIBuildThis=yes to make a structure only be built by the AI.
_________________

Back to top
View user's profile Send private message Visit poster's website
E1 Elite
Laser Commando


Joined: 28 May 2013

PostPosted: Tue Oct 11, 2016 9:32 am    Post subject: Reply with quote

Another method is to use BuildLimit=0 on the unit, so as to not allow human player
to build but allow AI to build when using buildable techlevels. I may not know if there
is any side effect as I have used it in a very few places.

@PePsiCola:
ModEnc is ambiguous on this. Limitations_of_this_system table is for structures not
for units. AI doesn't build techlevel -1 units. Also when ModEnc says -1 or below,
it is incorrect, as TechLevel like -2 or -3 is buildable by both human and AI in both
YR and TS.

Back to top
View user's profile Send private message
PePsiCola
Stealth Laser Trooper


Joined: 28 Dec 2010
Location: The United States

PostPosted: Tue Oct 11, 2016 6:48 pm    Post subject: Reply with quote

I knew it felt weird that I thought I actually had something right, I always miss something. It appears only a few of my AI-only units had TechLevel=-1, and although I thought so, I just tested and they in fact do not build them. But yes TechLevel=-1 and AIBuildThis=yes has always worked for buildings.

So as it turns out, what I actually did was clone particular buildings (each faction's Advanced Tech Centers in my case) and made it so the AI-only units (which are just clones of super units that have no build limits).

An example from Allied's faction super
Code:
From the regular, player-buildable version:
Prerequisite=GAWEAP,GATECH,GAATEC

From the AI only clone:
Prerequisite=GAWEAP,GATECH,GAATEC2
Prerequisite.Negative=GAATEC


GAATEC is the Advanced Tech Center for players, which has AIBuildThis=no

GAATEC2 is a clone of the Advanced Tech Center for the AI, which has AIBuildThis=yes, but TechLevel=-1. The player can't build it, but the AI still can.

For the unit, the AI version requires the AI Advanced Tech Center, which the player cannot build. Having Prerequisite.Negative=GAATEC means that having the player advanced tech center prevents construction of the unit. Of course, you would have to add Capturable=false to the GAATEC2 (AI version) to prevent the player from capturing it and gaining access to the AI version of the unit, which in my case would be unfair, since it's a super unit with no BuildLimit (I haven't actually done this, but posting this made me realize it's a good idea).

@E1 Elite: I wasn't aware of that ambiguity, thanks. I've noticed a lot of people have pointed out mistakes on ModEnc, but I'm surprised no one has gone and fixed them, or at least updated it. It's still quite a valuable resource.
_________________
Tiberium Uprising (a few missions for TS): http://www.ppmsite.com/forum/viewtopic.php?t=31029

Back to top
View user's profile Send private message
EVA-251
General


Joined: 20 Feb 2005
Location: Somewhere in Michigan, I suppose.

PostPosted: Sat Oct 15, 2016 6:11 am    Post subject: Reply with quote

I never actually knew that the AI was blocked from building units with TechLevel -1. Assumed from its use with factory clones that it just stopped human players from doing so.

Generally used TechLevel=11 for anything I didn't want built
_________________
ORA/YR modder/artist, DOOM mapper, aka evanb90
Project Lead Developer, New-Star Strike (2014-), RA Tweaked (2015-)
Former Project Lead Developer Star Strike (2005-2012), Z-Mod (2006-2007), RA1.5 (2008-2013), The Cold War (2006-2007)

Back to top
View user's profile Send private message Send e-mail Visit poster's website
G-E
General


Joined: 09 Feb 2015

PostPosted: Sat Oct 15, 2016 7:08 am    Post subject: Reply with quote

I'm using BuildLimit=0 on my cloned factories...

As an aside, using Owner= with RequireHouses= works well to prevent one house from building something the rest of the same side can, and vice versa.
_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [8 Posts] View previous topic :: View next topic
 Forum index » Modding Central » Red Alert 2 Editing Forum » Ares (Unofficial Forum)
Jump to:  
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

Wildcard SSL Certificates
[ Time: 0.1110s ][ Queries: 12 (0.0068s) ][ Debug on ]