PDA

View Full Version : Conditional human v ai player? Help pls.



Razor1952
02-22-2005, 02:09
Is there a conditional which allows you to build troops etc depending on human player or Ai player?

Myrddraal
02-22-2005, 09:55
er, I don't really get the question?

khelvan
02-22-2005, 10:09
I think he is asking if we can set a requirement for the building of a unit based on whether or not at the time the building is controlled by a human player or an AI player. If so, I am 99% sure the answer is no.

afrit
02-22-2005, 15:47
I agree with Khelvan.

However, this can be simulated by making the units faction-specific and then changing the faction for each campaign. I did essentially that for my presto mod.

@Razor,
I'm curious to what you intend to do with such a conditional.

Myrddraal
02-22-2005, 17:28
Yes, the way to do it would be to have a seperate descr_building file for each faction, and change it depending on which faction ur playing.

Razor1952
02-23-2005, 00:06
As surmised above there would be many uses, primarily it could be used as a tool to push the ai to build and recruit things, a sort of proxy ai programming. The AI may be made to behave in ways not intended by CA..., I'm sure there are plenty of other uses I havn't thought of.


for example

recruit "egyptian peltast" 0 requires factions { egyptian, } and requires human_player

or

recruit "egyptian peltast" 0 requires ai_player


I was inspired by many of the threads on this forum and had decided on my own mod from these ideas

#1.Use Afrits unique Presto mod, but combine it with the ai getting instant or educed time unit production. (so human has normal build times unless he gets $$$ to get quicker unit building).

#2. I thought it would be cool to extend this idea to buildings

Having cogitated on #1 and #2 I thought maybe rewriting the appropriate txt files with human vs ai player conditionals would achieve the same thing.


For the record I also decided to include these ideas in my personal mod

#3. Dearmads mod where peasants and low level troops become less buildable as a city grows

#4 As discussed with Oaty give law bonuses to defenses also increase towers to +2 for all walls, hopefully this will help the ai defend against human player.

#5 A la Frog et al. give poulation bonuses to early towns/cities and reduce farm build times.


Overall human/ai conditionals would be IMHO more elegant and flexible than seperate descr_files for each faction or Afrits' Presto approach.