Seite 1 von 1

Re: KI in die Feudalzeit bringen

Verfasst: Montag 25. Juni 2007, 21:28
von Günter
Hier ist meine Lösung (braucht zwar auch 10 min. hat aber am Ende 15 Dorfis :D ...):
<pre>
#load-if-defined BRITON-CIV
(defconst DARK_AGE 1)
(defconst FEUDAL_AGE 2)
(defrule
(current-age equal dark-age)
=>
(set-goal 1 DARK_AGE)
(chat-to-all "DARK AGE RULES" )
(disable-self)
)
(defrule
(current-age equal feudal-age)
=>
(set-goal 1 FEUDAL_AGE)
(chat-to-all "FEUDAL AGE RULES" )
(disable-self)
)
(defrule
(goal 1 DARK_AGE)
=>
(set-strategic-number sn-total-number-explorers 1)
(set-strategic-number sn-number-explore-groups 1)
(set-strategic-number sn-minimum-explore-group-size 1)
(set-strategic-number sn-maximum-explore-group-size 2)
(set-strategic-number sn-camp-max-distance 15)
(set-strategic-number sn-mill-max-distance 15)
(set-strategic-number sn-percent-civilian-explorers 0)
(set-strategic-number sn-percent-civilian-builders 20)
(set-strategic-number sn-percent-civilian-gatherers 80)
(disable-self)
)
(defrule
(goal 1 DARK_AGE)
(unit-type-count villager less-than 15)
(can-train villager)
=>
(train villager)
(chat-to-all "TRAIN VILLAGER" )
)
(defrule
(sheep-and-forage-too-far)
(idle-farm-count less-than 1)
(can-build farm)
=>
(build farm)
(chat-to-all "BUILD FARM" )
)
(defrule
(goal 1 DARK_AGE)
(housing-headroom less-than 4)
(can-build house)
=>
(build house)
(chat-to-all "BUILD HOUSE" )
)
(defrule
(goal 1 DARK_AGE)
(wood-amount greater-or-equal 200)
=>
(set-strategic-number sn-maximum-food-drop-distance 10)
(set-strategic-number sn-maximum-wood-drop-distance 0)
(set-strategic-number sn-maximum-gold-drop-distance 0)
(set-strategic-number sn-maximum-hunt-drop-distance 0)
(set-strategic-number sn-maximum-stone-drop-distance 0)
(set-strategic-number sn-food-gatherer-percentage 100)
(set-strategic-number sn-wood-gatherer-percentage 0)
(set-strategic-number sn-gold-gatherer-percentage 0)
(set-strategic-number sn-stone-gatherer-percentage 0)
(disable-self)
)
(defrule
(goal 1 DARK_AGE)
(not (can-research feudal-age))
(wood-amount less-than 175)
=>
(set-strategic-number sn-maximum-food-drop-distance 10)
(set-strategic-number sn-maximum-wood-drop-distance 10)
(set-strategic-number sn-maximum-gold-drop-distance 0)
(set-strategic-number sn-maximum-hunt-drop-distance 0)
(set-strategic-number sn-maximum-stone-drop-distance 0)
(set-strategic-number sn-food-gatherer-percentage 80)
(set-strategic-number sn-wood-gatherer-percentage 20)
(set-strategic-number sn-gold-gatherer-percentage 0)
(set-strategic-number sn-stone-gatherer-percentage 0)
(disable-self)
)
(defrule
(goal 1 DARK_AGE)
(can-research feudal-age)
(wood-amount less-than 175)
=>
(set-strategic-number sn-maximum-food-drop-distance 10)
(set-strategic-number sn-maximum-wood-drop-distance 10)
(set-strategic-number sn-maximum-gold-drop-distance 0)
(set-strategic-number sn-maximum-hunt-drop-distance 0)
(set-strategic-number sn-maximum-stone-drop-distance 0)
(set-strategic-number sn-food-gatherer-percentage 70)
(set-strategic-number sn-wood-gatherer-percentage 30)
(set-strategic-number sn-gold-gatherer-percentage 0)
(set-strategic-number sn-stone-gatherer-percentage 0)
(disable-self)
)
(defrule
(goal 1 DARK_AGE)
(resource-found food)
(building-type-count mill less-than 1)
(can-build mill)
=>
(build mill)
(chat-to-all "BUILD MILL" )
)
(defrule
(goal 1 DARK_AGE)
(resource-found food)
(building-type-count mill less-than 1)
(can-build mill)
=>
(build mill)
(chat-to-all "BUILD MILL" )
)
(defrule
(goal 1 DARK_AGE)
(resource-found wood)
(building-type-count lumber-camp less-than 1)
(can-build lumber-camp)
=>
(build lumber-camp)
(chat-to-all "BUILD LUMBERCAMP" )
)
(defrule
(unit-type-count villager greater-or-equal 10)
(can-research feudal-age)
(can-build barracks)
=>
(research feudal-age)
(build barracks)
(research ri-loom)
(chat-to-all "BUILD BARRACKS" )
(chat-to-all "RESEARCH FEUDAL AGE" )
)

#end-if

</pre>
___________________________________________________________

Re: KI in die Feudalzeit bringen

Verfasst: Montag 25. Juni 2007, 21:32
von Henning
:eek: :confused: Also, da habe ich 'ne andere Lösung!? Ich muss mich leider noch ein wenig gedulden, bis ich wieder ein spielbares AoK hab ... Dann werde ich sie mal testen . Und wenn's nicht hinhaut, werde ich nie wieder ein Wort darüber verlieren ... :D ;)

Re: KI in die Feudalzeit bringen

Verfasst: Montag 25. Juni 2007, 21:48
von Günter
Poste es halt einfach mal rein ...

PS:
(die Smilies ;) gehören natürlich nicht dazu..., das schreibt das Forum-Programm immer nach einem & q u o t ; )
oder

Code: Alles auswählen

&quot; )
[/b] :D

Edit : Garnicht :( so was doofes.

Re: KI in die Feudalzeit bringen

Verfasst: Montag 25. Juni 2007, 21:49
von Henning
Und wo unterscheiden die sich jetzt??

Re: KI in die Feudalzeit bringen

Verfasst: Montag 25. Juni 2007, 21:59
von Günter
Ein Anführungszeichen oben heißt in der HTML-Zeichenreferenz & q u o t ; (natürlich zusammen geschrieben). Dadurch entsteht bei Anführungszeichen mit abschließender Klammer zu eben dieses Smilie.

Man könnte dagegen schon etwas tun.
Allerdings scheint dieses Forum in dieser Beziehung weder einen HTML CODE-Befehl noch einen TBB Code-Befehl zu kennen, sondern zieht dem einen Smilie vor. :(
Komischerweise ist das in der Beitragsvorschau noch nicht so. :rolleyes:

@aMa
da sollte etwas geändert werden ...

Edit : habe nun oben Leerzeichen eingefügt ...