You must be logged in to post messages.
Please login or register

AI & RM Scripting
Moderated by Leif Ericson

Hop to:    
Welcome! You are not logged in. Please Login or Register.4 replies
Age of Kings Heaven » Forums » AI & RM Scripting » Ai's for New civs
Bottom
Topic Subject:Ai's for New civs
Steve444
Squire
posted 09-08-18 10:42 AM CT (US)         
Hi guys. Can someone help me?

I want to make the computer research the new techs and unique unit that I made when playing with my new civ. I know it has something to do with AI, but I'd like to know if there's any step-by-step guide to that. I also wanted to know if I just need to change the .bina files in gamedata or I have to add a new one. Thanks for advance.
AuthorReplies:
Vardamir
Huskarl
posted 09-09-18 10:05 PM CT (US)     1 / 4       
For a basic operation of a new civ, make sure the unique units and techs are set correctly in the mod xml. After that, add a civ load for the new civ to 60011 in gamedata_x1, which should be enough if you're following the basic pattern of an ES civilization.

AoK: Realms
Adds Armenians, Balts, Bamars, Bohemians, Bulgars, Burgundians, Chimus, Dutch, Helvetians, Jurchens, Khmers, Malays, Mandinkas, Moors, Muisca, Tamils, Tufans, Turcomans, and Viets

Genie Converter - an AKX installer for modern times
Steve444
Squire
posted 09-11-18 00:25 AM CT (US)     2 / 4       
Thanks for the reply, Vardamir. I did what you said, but for some reason the new civ doesn't create its unique unity.
Vardamir
Huskarl
posted 09-11-18 12:17 PM CT (US)     3 / 4       
What does your civ load look like?

As a random example from my mod, it should look something like this:
#load-if-defined BAMAR-CIV

(defrule
(goal combat-arm NOTICE)
=>
(set-goal monk-rating GOOD)
(generate-random-number 24)
(set-goal castle-attempt NO)
)

(defrule
(goal combat-arm NOTICE)
(random-number == 1)
=>
(set-goal combat-arm INFANTRY)
)

(defrule
(goal combat-arm NOTICE)
(random-number == 2)
=>
(set-goal combat-arm CAVALRY)
)

(defrule
(goal combat-arm NOTICE)
(random-number >= 3)
(random-number <= 4)
=>
(set-goal combat-arm LIGHTCAV)
)

(defrule
(goal combat-arm NOTICE)
(random-number >= 5)
(random-number <= 11)
=>
(set-goal combat-arm ARCHER)
)

(defrule
(goal combat-arm NOTICE)
(random-number >= 12)
(random-number <= 13)
=>
(set-goal combat-arm CAVARCHER)
)

(defrule
(goal combat-arm NOTICE)
(random-number >= 13)
=>
(set-goal combat-arm UNIQUE)
(set-goal castle-attempt YES)
)

(defrule
(goal combat-arm UNIQUE)
(current-age == feudal-age)
(not (goal pre-unique-arm ARCHER) )
=>
(set-goal pre-unique-arm ARCHER)
)

(defrule
(goal combat-arm UNIQUE)
(building-type-count castle == 0)
(current-age >= castle-age)
(not (goal pre-unique-arm ARCHER) )
=>
(set-goal pre-unique-arm ARCHER)
)

#end-if

AoK: Realms
Adds Armenians, Balts, Bamars, Bohemians, Bulgars, Burgundians, Chimus, Dutch, Helvetians, Jurchens, Khmers, Malays, Mandinkas, Moors, Muisca, Tamils, Tufans, Turcomans, and Viets

Genie Converter - an AKX installer for modern times
Steve444
Squire
posted 09-11-18 05:25 PM CT (US)     4 / 4       
It is a civ of elephants archers, like the Indians of the HD version. I did something similar to your example: I copied an existing one and modified it. However, my new civ continues without creating his unique unit.

I noticed that other .bina files like 60002, 60003 and 60011 also show something related to civs. I've added the constants of the new unique unit and research into one of these, but I have no UU sign.

Are there any other files besides those that need to be modified?
You must be logged in to post messages.
Please login or register

Hop to:    

Age of Kings Heaven | HeavenGames