Thread: AI Modding 101?
View Single Post
  #3  
Old February 22nd, 2004, 11:51 AM
oleg's Avatar

oleg oleg is offline
Lieutenant General
 
Join Date: Jan 2001
Location: Oxford, UK
Posts: 2,592
Thanks: 0
Thanked 0 Times in 0 Posts
oleg is on a distinguished road
Default Re: AI Modding 101?

Quote:
Originally posted by Litcube:
...I've also managed to find out how to get the AI to design more than one types of attack ships. I still don't understand Oleg's method of using the "must have", and with my experimentatino, it doesn't work as well as I would have thought. Using boarding ships, kamakazie ships seems to work well. There's alot of hardcode in the AI. "Easy modding" my ***.

...
Yeah, my Posts may be sometimes confusing . The basic caveat of using Design Names in construvtion.txt file instead of generic types like "attack ship" is that SE keeps track the numbers of ship corresponding to "generic type", not the name listed in construction.txt. That is, when AI decides how mane "attack ship #1" to build, it check the TOTAL NUMBER of ALL "attack ships", not that particular "attack ship #1".

It is very easy to deal with this problem using "must have": For example, if you want 10 "attack ship 1" and 10 "attack ship 2", you use
must have := 10 for the first name and "must have := 20(!) for the second entry.

This way, AI build 10 a.s.1 and then 10 (!) a.s.2 since the number of "must have" corresponds to the summ of all attack ships in service.

It can be done with "planet per item" but it is more tricky. If you want say 4 a.s.1 per planet and 4 a.s.2 per planet, you must use
planet per item :=4 for first ship name and
planet per item :=2 (!) for second name.

If you use =4 in the second entry, no ships would be build since SE "thinks" the fullfilment for attack ships was satisfied by a.s.1 numbers.

[ February 22, 2004, 09:54: Message edited by: oleg ]
__________________
It is forbidden to kill; therefore all murderers are punished unless they kill in large numbers and to the sound of trumpets. - Voltaire
Reply With Quote