Cruzada

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
Campeador
Waheguru
Posts: 1340
Joined: Mon Nov 01, 2010 8:11 am
Location: Spain

Cruzada

Post by Campeador »

[IGNORE THE REST. THE SCRIPT WORKS NOW]

For the moment Cruzada can just advance to feudal hunting boars very nice, like if I had taken code from The Horde. :rolleyes:

I'll add a build order for feudal and next ages in next versions. For the moment I will just can work on it at weekends, and not all of them.



Another reason to create this thread is to write here my doubts. Here is the first. I know how to compare the value of a goal with a constant number, it's evident with up-compare-goal, but... How can I do it between two goals? I want something like:
(up-compare g-goal-1 > g-goal-2)
Attachments
Cruzada Maya 25DEC2015.rar
(59.5 KiB) Downloaded 416 times
Cruzada Maya 24DEC2014.7z
(27.2 KiB) Downloaded 346 times
Cruzada Maya 13DEC2014.rar
(37.68 KiB) Downloaded 325 times
Last edited by Campeador on Fri Dec 25, 2015 3:51 am, edited 16 times in total.

User avatar
Promiskuitiv
Waheguru
Posts: 1364
Joined: Thu Nov 10, 2011 1:07 pm

Re: Cruzada

Post by Promiskuitiv »

Nice to see you scripting again! :)
Campeador wrote:(up-compare g-goal-1 > g-goal-2)
That's (up-compare-goal g-goal-1 g:> g-goal-2). Use c: for a constant (c: isn't needed since it's the default anyway though), g: for a goal and s: for a strategic-number. That and more UP scripting information is in here: http://forums.aiscripters.com/viewtopic.php?f=3&t=2591 (you can find the c:/g:/s: stuff specifically in the "Rule Operators" part).
Stuff like this is also described in Lazarus' UP guide here: http://forums.aiscripters.com/viewtopic.php?f=3&t=2834.

User avatar
Campeador
Waheguru
Posts: 1340
Joined: Mon Nov 01, 2010 8:11 am
Location: Spain

Re: Cruzada

Post by Campeador »

Thanks for the info. I'll use it in next weekends. :D

scripter64
Waheguru
Posts: 5891
Joined: Fri Jan 16, 2009 8:36 pm

Re: Cruzada

Post by scripter64 »

Cruzada! :) :)

cakemaphoneige
Guru
Posts: 811
Joined: Wed Feb 13, 2008 6:50 pm

Re: Cruzada

Post by cakemaphoneige »

:devil
I like the name man.

Need a little Motivation? Dont we all... Here's some:
https://www.youtube.com/watch?v=mgmVOuLgFB0

User avatar
Campeador
Waheguru
Posts: 1340
Joined: Mon Nov 01, 2010 8:11 am
Location: Spain

Re: Cruzada

Post by Campeador »

Cruzada is the Spanish word for Crusade. I've even thought to call it "Croada", which is, in theory, the Valencian word for it, but I think that Cruzada sounds better because its "z" is a really smart letter. And because Valencian people also say Cruzada instead of Cruzada even when they speak their regional language despite to know that Croada is the correct word. Most Valencians don't even know that the word Croada exists. :P

In any case I'm glad you like the name. :D


That video is quite fine, Cake. I really had ideas to improve a lot Crusade a couple of years ago, but I didn't implement them just for lazyness and lack of time, but Conquerors is my favourite videogame again and I can script a little, although I'll only have time in weekends.


Script progress. It can now advance to imperial, training archers from feudal, a couple of rams and a couple of monks. It can defeat Standard AI, but nothing more. I'm implementing now an UP TSA. My current problem:

Mining camps. I can just build one of them in early game. When it builds more it's because gold is being exhausted in the map and then Cruzada spams camps with no sense. The mining camp rules are in the General Economy File. The required taunt is sent in the Mayan Flush file.

User avatar
Campeador
Waheguru
Posts: 1340
Joined: Mon Nov 01, 2010 8:11 am
Location: Spain

Re: Cruzada

Post by Campeador »

TSA and other additions and optimizations have improved enough Cruzada to defeat StrongBow or ATE. But it's still too incomplete and buggy to defeat AIs with strategies that counter archers, like Eagles Revenge, or modern UP AIs, it doesn't matter their strategy. So no ready yet for the Ladder.

I still have the mining camp bug, so I'll have to see UP sns for camps. I also have a new bug, probably in my Gatherer Percentages file, which makes Cruzada mine gold in late dark age, before to feudal advance.

Well, I'll have that work in next weekends, I have to go to bed now. At least I have a new AI ready to fight strong 1.c AIs or even a few ones from the very first times of the UP.

New version uploaded. Good night! B)

scripter64
Waheguru
Posts: 5891
Joined: Fri Jan 16, 2009 8:36 pm

Re: Cruzada

Post by scripter64 »

Downloadable! Thanks, Campeador!

User avatar
marathon
Waheguru
Posts: 1984
Joined: Fri May 14, 2010 2:30 pm

Re: Cruzada

Post by marathon »

In the video, right before 1:30, I think that runner that got advandage of the falling girl is a Greek olympic champion... and this is how she won lol.
I would not watch further though, too "american" for me.
We all look forward for your second major AI, Campeador, a UP this one. Tip: you can use debug chat that tells you the values of some SNs.

User avatar
Campeador
Waheguru
Posts: 1340
Joined: Mon Nov 01, 2010 8:11 am
Location: Spain

Re: Cruzada

Post by Campeador »

I've added a force drop system. I still haven't credited it to Archon and Scripter64, but I'll do before to upload it to AoKH and the Ladder.

Changes:
- Stronger. It has beaten even Boss and Chameleon. Still vulnerable to AIs able with counter systems or just many skirms or eagles.
- Gold problem resolved in early game. Still spam a lot of camps once gold is finished in the map.

A doubt:

Code: Select all

(defrule
	(true)
=>
	(up-get-focus-fact unit-type-count-total archery-class g-threat-archer)
	(up-get-focus-fact unit-type-count-total cavalry-class g-threat-cavalry)
	(up-get-focus-fact unit-type-count-total monk-set g-threat-monk)

	(up-get-focus-fact unit-type-count-total spearman-line g-threat-spear)
	(up-get-focus-fact unit-type-count-total eagle-warrior-line g-threat-eagle)
)

(defrule
	(taunt-detected my-player-number 2)
=> 
	(up-chat-data-to-player my-player-number "g-threat-archer %d" g:< g-threat-archer)
	(up-chat-data-to-player my-player-number "g-threat-cavalry %d" g:< g-threat-cavalry)
	(up-chat-data-to-player my-player-number "g-threat-monk %d" g:< g-threat-monk)
	(up-chat-data-to-player my-player-number "g-threat-spear %d" g:< g-threat-spear)
	(up-chat-data-to-player my-player-number "g-threat-eagle %d" g:< g-threat-eagle)
	;(up-chat-data-to-player my-player-number "Deer-Distance: %d" g:< g-deer-distance)
	;(up-chat-data-to-player my-player-number "Gold-Distance: %d" g:< g-gold-distance)
	(acknowledge-taunt my-player-number 2)
)
This says 0 archer-class enemy units even if dozens of skirms detected. Do skirms belong to archer-class type of units? Is the mistake in a different place? Well, after to see Crusa you know that I only make big AIs if I have to add them a counter system, and I've thought about a different one based in percentages using new UP features.

Post Reply