Immortal v0.10f

Upload your latest creations here.
Please note that by posting comments to posts in this forum you forfeit your personal copyright on whatever you post. AI Scripters reserves the right to re-use objective comments in script reviews without requiring the posting author's permission. Credit, where appropriate will be given in such cases.
Post Reply
User avatar
wattle
Swami
Posts: 225
Joined: Fri Aug 15, 2014 1:06 pm
Location: Germany

Re: Immortal AI help with scripting

Post by wattle »

pietro wrote: Fri Dec 20, 2024 8:39 am Hi everyone
I am having fun adding some scenario units to some factions, example
Imperial Legionary (byzantines)
Crusader Knight (Teutons)
Norse Warrior (nordic factions)
Eastern Swordsman (eastern factions)

If i use the faction, I CAN TRAIN THEM even in a normal scrim game.

-----------How do i change Immortal AI so that, if the unit is available, then the AI trains it too?
Something easy like if Norse Warrior < 30 then train Norse Warrior

Please consider i am a complete noob and i have very little knowledge of AI scripting.
Tx, cheers :)
If you open any random AI (the .per file) and scroll through it to get an idea how they look, and than you open Immortal.per and scroll through it, you'll quickly realize, even if completely unfamiliar, that there likely is code in the "normal" AIs that is roughly comprehensible, while in Immortal the code is totally incomprehensible. That's because it almost entirely uses direct unit control commands, which are advanced scripting, its full of temporary goal/variable names which are reused over and over again, and there are a LOT of jumps/redirects (3k+) in the code, because it is actually written in c++ and than converted into the aoe2 scripting language.

So in short, it's hardly possible to change Immortal in a way that makes sense. I would certainly be not the only one to be baffled, if any person is able to do so.
MangudAI-all-in (wip, to be continued, when I retire from work :P )
Btw, thank you s64 for your effort. Was a pleasure to cross your way. Have a good time.
GamesGod
Swami
Posts: 122
Joined: Fri May 20, 2016 4:01 am
Location: Russia

Re: Immortal AI help with scripting

Post by GamesGod »

pietro wrote: Fri Dec 20, 2024 8:39 am Hi everyone
I am having fun adding some scenario units to some factions, example
Imperial Legionary (byzantines)
Crusader Knight (Teutons)
Norse Warrior (nordic factions)
Eastern Swordsman (eastern factions)

If i use the faction, I CAN TRAIN THEM even in a normal scrim game.

-----------How do i change Immortal AI so that, if the unit is available, then the AI trains it too?
Something easy like if Norse Warrior < 30 then train Norse Warrior

Please consider i am a complete noob and i have very little knowledge of AI scripting.
Tx, cheers :)
U can add standart functions with standart conditions to the start file immortal ai, after define constants, I mean example for train units, and this functions will be work.

Example...
(defrule
(game-time > 600)
(can-train norse-warrior)
=>
(train norse-warrior))
:)
Developer of GamesGod AI
ElshidoBR
Forumer
Posts: 1
Joined: Sun Nov 17, 2024 1:05 pm

Re: Immortal v0.10f

Post by ElshidoBR »

Hello!

First of all: congratulations on the excellent script and algorithms of this AI. I'm having a lot of fun playing with this AI and also using it in AI vs AI matches.

I'd like to report an apparent bug that I've noticed mainly in these AI vs AI matches - It happens mainly in the late game: The military units approach to attack, but they don't hit, even the melee units that are already stuck to the enemies.

I forgot to mention that I'm playing the Definitive version of Age, and I know it has some bugs, but I don't know exactly what they are. So I apologize if this report has already been clarified before.

Cheers!
pietro
Forumer
Posts: 3
Joined: Fri Dec 20, 2024 8:33 am

Re: Immortal v0.10f

Post by pietro »

that helped a lot: i added new units to the game, and the Ai is training them
; Rule #9744
(defrule
(unit-type-count-total Poleaxe-Heavy-Infantry < 60)
(can-train Poleaxe-Heavy-Infantry)
=>
(train Poleaxe-Heavy-Infantry))
; Rule #9745
(defrule
(unit-type-count-total Ritterbruder < 60)
(can-train Ritterbruder)
=>
(train Ritterbruder))
; Rule #9746
(defrule
(unit-type-count-total Immortals-Clibanarii < 40)
(can-train Immortals-Clibanarii)
=>
(train Immortals-Clibanarii)
pietro
Forumer
Posts: 3
Joined: Fri Dec 20, 2024 8:33 am

Immortal AI need help.

Post by pietro »

I need Immortal AI to build bombard towers (ideally it would wall too, even a small wall around the core economy like Blackforce AI does).
Something VERY SIMPLE like

if you have built a castle

then

build one bombard tower to it's right and one to it's left (i want the BTW to be close to the castle)

how do i write it?
Post Reply