Posted: Mon Oct 10, 2016 3:33 pm Post subject:
AI and units with TechLevel=-1
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 QUICK_EDIT
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). _________________
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.
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. _________________
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. QUICK_EDIT
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 QUICK_EDIT
Also Known As: evanb90 Joined: 20 Feb 2005 Location: o kawaii koto
Posted: Sat Oct 15, 2016 6:11 am Post subject:
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 _________________ YR modder/artist, DOOM mapper, aka evanb90
Project Lead Developer, New-Star Strike (2014-)
Former Project Lead DeveloperStar Strike (2005-2012), Z-Mod (2006-2007), RA1.5 (2008-2013), The Cold War (2006-2007) QUICK_EDIT
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