Making It So Only The AI Can Use a Certain Component or Technology. |
Hey all Ive browsed through all the parsable text files and data files, etc... But havent been able to figure out a way to make it so only the AI can use a certain component or technology. It seems the human will also have access to it too. I know I could manually assign a racial trait to the AI when starting a game; but I dont want to do it like this I want new randomly created AI to have components and tech they can use but the human can't 
Any help is much appreciated hehe..
Re: Making It So Only The AI Can Use a Certain Component or Tech
Be sure to reference that requirement with "Requirements Evaluation Availability". That way, it won't even appear to the human player as an option.
"Only by being constantly at war with evil in all things, including yourself, can you truely know peace."
Download my mod here: GidMod

Re: Making It So Only The AI Can Use a Certain Component or Tech
Ahh, good catch. Forgot about that. I spend more time in the script docs than the mod docs.....
Re: Making It So Only The AI Can Use a Certain Component or Tech
Any luck with this? empire_is_human_controlled() seems to want the player number, but doesn't seem to want to work with [%PlayerNumber%] for me. How do I feed it the number it wants? Is the Human always player 1 in a solo game?

Re: Making It So Only The AI Can Use a Certain Component or Tech
In solo games, the human player is player 1 (unless you take control of another empire using the game master password).
[%PlayerNumber%] apparently only works in VictoryConditions.txt. You might be able to convince Aaron to make it work elsewhere if you ask him...
A trick used in the AI Campaign mod for SE4 is to create a 0-point racial trait called "AI Empire" and assign all your AI-specific techs, etc. to that racial trait, then make all your AI's take that trait and tell players not to. (You could try to penalize players who do, but I'm not sure how... maybe you could make certain things that the AI *can't* use effectively but that are beneficial to a human player require that the empire *not* have that trait?)
Of course, using the racial trait route, the "AI-ness" of the empires is locked in from the beginning of the game, so if a player drops out or a human player takes over for an AI empire, the racial traits will be wrong, but that probably beats techs mysteriously appearing for an empire as control of the empire switches around - if you research even one level in a tech, it will not disappear (if I recall correctly) even if you lose the prerequisite for it! (Try making a tech that requires that, say, physics be below level 2 to see what I mean.)
Components, though, are different - if you have a component and you lose its prerequisites, you will no longer be able to place it on new designs - though you will still be able to build ships of old designs containing that component!
~~~
The power of the ancients is now yours to command. You are truly the Master... of the obvious 




Re: Making It So Only The AI Can Use a Certain Component or Tech
I think you can use the ability formula 'empire_is_human_controlled' and just put a NOT statement in.