Haarbal
Prince
- Joined
- Nov 8, 2005
- Messages
- 401
woodelf said:...
It seems like the 1st era is mostly about using the Moon for Earth's purposes.
...
this sounds very nice to me. this way (well to me

haarbal
edit: You've got mail, woodelf
woodelf said:...
It seems like the 1st era is mostly about using the Moon for Earth's purposes.
...
Belizan said:I'm going to need a much better description of the turret before I can say whether I can code it. The big limitation is likely to be what the AI will utilize.
Falkonite said:If anyone's done that yet, I'd need a file with the preferences and new traits.
Sorry for not being that much online, school is killing me![]()
woodelf said:I was thinking it was a non-movement defender that protected the cities. It has garrison promotions. And with the proper advisor, like Military, and weight of AI choices the AI will build them. Think of non-movable archers.
The coding part will be making it so each city only can have one at a time and to make sure they automatically upgrade when the next tech is researched. This should ensure that AI cities will always get one good defender that can't be tricked into leaving the city.
Belizan said:Fulfilling that description is easy, but, the AI will keep building them even after he has one with that description. Better to make a Turret Defense building, which programmatically causes the turret to be built, that way the computer understands that he can only have one.
Kael said:I would think doing it through a building is gonna make it hard when the first turret dies. Does the building monitor every turn to see if one exists, and if idt doesn't it makes a new one? Does it count for a few turns and then make one?
Most likely you will want to be able to build a new one like other units. Which means you are probably best off to block in the CannotTrain function. The CannotTrain function is passed the pCity so it would be enough to scan the units in the city and see if a turret was already there. If it is, then block the build.
You should be able to do this with a single check in CannotTrain, and wouldn't need a building for it.