JESTER (V 2.2) & Forthwind (V 2.1)

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
screamingkoos
Forumer
Posts: 41
Joined: Wed Feb 05, 2020 6:27 pm

JESTER (V 2.2) & Forthwind (V 2.1)

Post by screamingkoos »

Hi everyone, I have decided to update the main page here, as well make an additional post when a new update has become available! Enjoy!

*The following comes from the main Jester.per file which is included in the download*

JESTER.AI Created by ScreamingKoos
Version 2.2
Release Number: 7
Release Date: January 25, 2024

;==========OVERVIEW FOR BOTH AI's:==========
- Jester & Forthwind are two separate RM (random-map) ai's created by me.
- Jester can play any civilization in the game up to "The Mountain Royals" DLC (up to Armenians & Georgians). Jester can play as or counter any of these civs.
- Forthwind can play any civilization up to "The Lords of the West" DLC. This EXCLUDES: Armenians, Bengalis, Dravidians, Georgians, Gurjaras, and Romans. Forthwind will is not optimized to play as the new civs.
- Jester is stronger, more updated, and less random than Forthwind.
- Forthwind will tower-rush, build walls, and not play as competitively as Jester. Both ai's are, however, quite silly and fun to play with.
- Both ai's can play land maps (like arabia), connected water maps (like coastal), and separated water maps (like islands). They perform best on land maps and the least on island-style water maps. They do have basic water map rules for ships & economy for compatability purposes.
- They both can also play any nomad-style maps (where there is no town-center or lumber-camp to start with and they must start from scratch).
- Please note, both ai's are not tested to play the following map-types: Migration, "Nothing" style maps (like forest-nothing), and Michi style maps.
- Both ai's are aggressive. They have many different strategies that are initially randomly generated at the game start, and improve over time as the game plays. You will experience a different game every playthrough even if they use the same civilizations. You never know what to expect!
- Both ai's are fun to play with as allies, enemies, or even just spectating them fighting other custom created ai's.
- Jester gets his name from having a humorous twist on all things he does! (Forthwind is humorous too).
- Jester & Forthwind are only tested on and work for Age of Empires 2 Definitive Edition (No wololo-kingdoms, or HD editions sadly).
- I am not currently working on new updates for Forthwind (but may in the future), so for this reason the following below is mostly referring to Jester, although many of it still applies to Forthind:

;==========DID YOU KNOW? (quick facts)==========
- Jester can play nomad style maps (land or water just not migration-types), and has rules to always prioritize either a lumber-camp, mule-cart, or town-center when his last tc is destroyed (or the game starts without one!)
- Jester will automatically sling extra resources to any allies that are low on resources. You can still use taunts 3 - 6 for a more manual way to ask for resources (player or computer allies).
- Jester will always mirror your diplomatic stance. Comes along with some chats for every type of stance change during the game. There is NO tricking this guy! ;)
- Jester responds to several taunts in the game and depending on the age may respond differently. Most taunts work when Jester is set as an ally. Taunts are listed below:

;==========;TAUNTS:==========;
; Use taunts 3 - 6 to ask for resources.
; Taunt 31 - Attacks immediately if he is able to (not under attack and has reasonable military).
; Taunt 32 - Pursue default aggressive strategy for current age (dependent on civ-selected).
; Taunt 33 - Pursue economy strategy for current age (boom).
; Taunt 36 - Disable attacking rules (use taunt 31 to re-enable afterwards).
; Taunt 37 - Build a wonder (imperial-age only)
; Taunt 43 - Current strategy information.
; Taunt 44 - Current resources & population information.
; Taunt 45 - Temporary retreat back to main town-center.
; Taunt 50 - flare a location on the map and send this taunt for a chance of Jester to build a tower, donjon, krepost, or castle at the location.
; Taunt 52 - flare a location on the map and then send this taunt for a chance Jester will build a market at the flared location.
; Taunts 61 - 68: Jester will temporarily target the numbered player (this taunt now works as intended, only resets if Jester is under attack or the target-enemy dies).
; Taunt 69 - Deletes the object at the flared location (works now as of this update).
; Taunt 72 - Pursue militiaman-line (infantry) strategy.
; Taunt 73 - Pursue melee cavalry units strategy. (knights, shrivamsha-riders, savars, battle-elephants, steppe-lancers, camels, etc.). This is dependent on the current civilization and only works for that current age. Use these in imperial-age for a more permanent strategy.
; Taunt 74 - Pursue archer-line strategy (foot archer only).
; Taunt 76 - Drush the enemy (must be early dark-age to work).
; Taunt 104 - Fully turns off all resign rules (when taunting either enemy or ally Jesters).
; Taunt 105 - Revert back to default resign rules after taunt 104 was issued.
; Taunt 150 - Resign immediately (when spectating as Jester, useful for casting games).
; Taunt 151 - Resign immediately (when taunted to an ally or enemy Jester, useful for a stubborn opponent or casting games).
; Taunt 250 - Chats current Jester version.
; Taunt 251 - Chats certain testing strategic-numbers (I use this for testing Jester, but feel free to use it too lol).
; Jester also responds to some other taunts, but not in a way you would expect! (example: Taunt 69).

;==========UPDATES for Jester Version 2.2:==========
- The time has finally come. I have decided to add a few more basic DUC (Direct Unit Control) rules for Jester! Version 2.2 is noticeably more DUCCY than ever before! Please note these rules are very new and bugs may be expected (although I have tried my absolute best to prevent them).

;----------The following includes some of the new micro/DUC rules for Jester:----------
- 1a: Fine tuned all pre-existing DUC rules with new lessons learned to prevent DUC leaks, save physical performance where possible, and existing rules are much more optimized than ever before!
- 1b: This includes improved dodging arrows from fortifications, sheep-micro in nomad games, gurjara Jesters milling their initial starting sheep, starting scouts gathering sheep etc... Now for the new rules:
- 1c: Jester now attempts to dodge arrows from multiple buildings of the same type, no longer just the first enemy fortification built. Includes most buildings that shoot arrows (town-centers, watch-towers, donjons, castles, kreposts etc).
- 1d: Along with dodging arrows from up to 10 of each of these buildings, Jester attempts to retreat from the actual arrow fire by retreating at an angle to the fortification to better actually dodge arrows.
- 2: Jester now has improved retreat rules and uses DUC to prevent units getting lured from his town when not attacking (NICE TRY MICRO GODS!)
- 3: Villagers no longer idlely standby as battering rams and armored-elephants smash their homes to rubble! Villagers actively target battering rams and armored-elephants inside their town with renewed vigor!
- 4: General backup market rules have been improved with more reasonable distances, and Jester now attempts to use the power of DUC to place markets a little better! (still a WIP)
- 5: Jester now slowly circles enemy fortification buildings (any building that fire arrows) when dodging arrows to eventually make his way into the back of his enemies bases! Has seen great results in the early games, especially while drushing!
- 6: Aweful early lumber and mining camp placements have been greatly improved. Jester uses the holy powers of DUC to actively delete bad lumber and mining camp placements. Jester then retargets the LOGGY BOYS & POINTY FELLAS better than ever! What a great guy!
- 7: The first Georgian mule-cart now uses DUC to attempt to find the closest forest in the beginning of the game instead of boosting the straggler trees like a total noob.
- 8: Jester now uses improved split-rule-goals, up-jump rules, and timers to help prevent your pc from melting into a pool of lava! Make sure to say thanks by sending Jester a Christmas card next year!

- All jokes aside, just adding these few additions/improvements took a monumental amount of time to learn, add, fail, test, fail, relearn, fail, redo entire sections just to get basic functions to even fire, and so on.
- Jester uses minimal micro when compared to many other ai's, but I hope you come to appreciate I always attempt to thoroughly test/optimise Jester's script with even the most basic rules before releasing an update.
- I hope to keep learning new ai techniques and implementing them furociously into future updates. With the new year (2024) the updates will definitely be less often, but we carry on! For now, this is all you get ;)
- A very special thanks to the whole aiscripters community! Thanks so much guys for your knowledge!
- NOW ONWARDS! TO THE GENERAL UPDATES!
;----------END OF DUC UPDATES----------

;----------START OF GENERAL UPDATES:----------
- - Fine tuned many gathering rules across all ages. Jester now gathers more efficiently based on strategy which leads to improved age up times (and military production) for flushing and fast-castle strategies. The following are some examples of what this means:
- 1: When Jester pursues a scout or skirmisher rush he delays gathering gold for much longer and instead focuses on heavy food & wood gathering, which allows for more units much quicker.
- 2: Jester uses less gold villagers instead of 3 or 4 when going for fast-castle, and the extra wood or food villager makes a difference.
- 3: Jester is better now at deciding when to buy & sell resources, or even to drop stone for castle-age up after long feudal-age times.
- 4: Jester takes into account when going archer-rush to not gather as much gold whenever he needs to add counter skirmishers to the flush.
- 5: When Jester is under heavy pressure in early feudal, he focuses on food & wood longer before going for more gold or stone for defence.
- 6: Fixed a serious but rare bug where Jester's feudal economy would stop adapting and he would stockpile too much of the same resources (when attack and defence strategy for feudal were both activated at the same time).
- Improved farming rules in all ages - especially in feudal-age where Jester would sometimes take a very long time building more than 8 farms often affecting age-up times.
- All ages now have improved + backup farming rules so Jester should never just stop producing farms for a long time.
- - Improved town-size rules so Jester gets stuck less often when attempting to place new buildings. Fixed a bug where Jester would not increase town-size at all when under attack for a long time. Still 1 bug where sometimes town-size gets too large too fast (WIP).
- Improved lumber and mining-camp rules to be more efficient and build more often needed camps compared to Version 2.1. This is in addition to the early game micro camps mentioned above ^
- When Jester loses his only town-center, he now deletes all farms, mills, lumber-camps, mining-camps, and mule-carts so he can relocate his base more safely without constantly sending all vills to their deaths at his old base (helpful in long games).
- Tweaked some building-placement rules that use up-set-placement-data to be more reliable.
- Jester no longer builds bombard towers. Instead he builds the watch-tower-line when under pressure in the mid to late game. I was finding the bombard towers rarely hit their target, and don't really damage rams all that much, so #watchtowergang is where we are at now!
- Added back in outpost building rules! Maybe militia rush in imperial-age rules next? (just kidding!)
- Pocket Jesters now have their own attack rules, they are in general much more aggressive & have more influence added to not sit at home!(not perfect, but better!)
- Military level counting is now more dynamic. Jester is more aggressive against smaller military-population enemies, but is much more conservative when attacking target-enemies who have larger armies.
- Fixed nomad rules including DUC rules for nomad sheep gathering, when to place a lumber-camp, mule-cart or town-center first, as well as prioritizing the correct resources for building a town-center as soon as possible. (NOTE: villager scouting appears to be bugged in current game version).
- Fixed a bug that would prevent Jester from rebuilding his town after his last town-center was destroyed in the mid to late game.
- Fixed max-dropsite gathering rules to influence Jester not to walk across the map for resources (usually in enemy bases) when he still has resources nearby.
- When going for a feudal-age rush (flush), Jester holds his units in their buildings before attacking to help hide unit composition from enemy scouts.
- Refurbished focus-player & target-player rules so Jester has more clear conditions on which enemy to target and when to change targeting tactics (generally closest enemies but taunts improved too).
- Jester can now properly research ri-supplies & ri-gambesons.
- Bohemian Jesters now take advantage of training many more monks after completing their unique upgrade that turns monks gold cost into food.
- Jester better balances out economy population when constructing multiple feitorias as portuguese.
- Slightly improved resign rules depending if Jester is alone or on a team. Jester can sometimes be stubborn or resign too easily, so remember you can always use the taunts above to control resigning!
- Identified that Jester has not been explicitly countering any unique-units. Temporary rules have been added so Jester now produces basic counters to MOST enemy unique units. Better counters for these units will definitely come in a future update (see WIP section below for more info).
- Taunt 69 now works as expected (delete the object at the flared location) for allied Jesters, as well as taunts 61 -68 (targeting a specific enemy player, only works on enemies, has been fixed).
- NEW CHATS: Changed out/tweaked many chats Jester sends to enemies and allies throughout the game. This includes NEW resign chats, NEW "Banter-Chats", and a NEW under attack chats system! Jester now harrasses you at the start, middle, and end game!
- Many more smaller bug fixes/improvements/updates but at this point I don't remember them all! Thanks for reading though!
;----------END OF GENERAL UPDATES:----------

;==========KNOWN ISSUES/WIP:==========
- 1: Jester will break easily against tower rushing or castle drops, There are basic defence rules against this but they are not as intuitive yet. (WIP - this is only really possible with DUC, with the level I'm at now, I may be able to implement defence rules soon! - fixes to come)
- 2: Jester sometimes under reacts or overreacts to some unit compositions (sometimes trains no skirmishers against longbowmen or way too many when enemy is making cavaly). (WIP - problem recently identified - some temporary rules have been added, but I will be replacing many
sections of code to fix this. The issue is obvious especially with "my-unique-unit-line" since it only work with my-player-number, NOT target-players.
Essentially, each unique unit (UU)/unit-line needs to be either counted with up-get-fact or an easier way is using "players-unit-type-count target-player <unit-line>."
So for now, Jester is not as optimised for countering enemy unique-units as well as knight-line, or archer-line but will try. (fixes in-progress)
- 3: Sometimes Jester gathers way too much gold or stone in the feudal-age when under attack. This can lead to very long up-times to castle. (COMPLETE - further improvements made in this update from gathering rules)
- 4: Jester on water maps in general, I'd like to improve the water rules more in the future :) (WIP - recently identified many bugged rules, but Jester still plays half decent on water maps - fixes to come)
- 5a: Attacking rules are sometimes too aggressive in some situations to the point Jester throws all of his military units away. (MOSTLY FIXED - added a dynamic military level system that treats small enemy threats differently to large enemy threats).
- 5b: Also split military-level rules between flank & pocket Jesters, so flanks are slightly more defensive, and pockets are more aggressive.
- 6: Jester will have more variety in imperial-age strategies in a future update. (WIP - needed fixes identified - still prioritizing other issues first)
- 7: Mule cart logic may need DUC rules to fix the mid to late game of them bunching up together with no resources around them. (WIP - on hold - new DUC logic may come in handy for this down the road)
- 8: Jester creating too many different units at once (typical ai unit compositions). (This update, V 2.2, along with recent past updates have greatly improved this to a level I'm satisfied with for now. Will improve further over time but not prioritizing now)
- 9: DUC leaks/errors: I should have added this in before, but I am fairly confident this current update fixes many of the previous versions issues. New leaks/errors will likely happen again, but I am much better at identifying and preventing them now :)
- 10: Prioritizing civ bonuses to be taken into account more often! (with upwards of 40+ "playable" civs in this game now for Jester, I plan on accounting for more specific civ bonuses to make them "optimal" and not just playable!
;==========The following are some of the already implemented civ bonuses with Jester:
- Bohemian castle-age hand-cannoneer rush, Gurjaras milling their starting sheep and having the chance to go "camel-scout" rush, Malay creating a few more villagers before clicking up to the next age faster, Burgundians researching techs an age before, Cumans building 2 town-centers & siege in feudal-age, Goths + Huns + Sicilians + and Bulgarians creating units in either their barracks, stables, donjons, or kreposts, the best imperial-age unit strategies for each civ by default etc...
- I will be working on incorporating more of these civ bonuses into Jester for future updates! (in-progress).
- 11: Removed Jester's rules for helping allies for now as they were full of bugs and I could not fix them after many hours of troubleshooting. They have been removed completely from this update. For now Jester does not help allies until I can come up with some new rules for this (WIP).

;==========CONCLUSION:==========
- Jester can be a fun ai to play with or against in team games, use in custom games (scenarios), or is commonly used for testing against other ai's.
- It is by no means a perfect ai, sometimes has bugs, and uses minimal DUC. But Jester has been an amazing project to work on for many years at this point (since the AOE II HD days).
- Please leave a comment of your experience on the ai scripters website, AOK Heaven website, or in the ai scripters discord group about your experience and if there is anything you'd like to see added/improved or just your general experience!
- Thank you for playing with Jester! GL & HF!!!
Your Pal, ScreamingKoos

;==========INSTALLATION:==========
- Simply download & unzip the Jester V 2.2.zip file and drag and drop everything into your AOE2 DE ai folder (the .ai file, the .per file, and the Jester folder).
Attachments
JESTER V 2.2.zip
JESTER - Version 2.2 (NEW)
(162.26 KiB) Downloaded 96 times
JESTER V.1.1.zip
JESTER - Version 1.1 (OLD)
(130.45 KiB) Downloaded 368 times
FORTHWIND V.2.1.zip
FORTHWIND - Version 2.1 (OLD)
(133.82 KiB) Downloaded 454 times
Last edited by screamingkoos on Thu Jan 25, 2024 10:58 am, edited 34 times in total.

User avatar
wattle
Swami
Posts: 194
Joined: Fri Aug 15, 2014 1:06 pm
Location: Germany

Re: Forthwind.AI (Version 1.2)

Post by wattle »

Hi :)
Nice to have yet another DE AI. Maybe that could also take part in Esty's DE AI tournament when it happens.

I watched a couple games on extreme difficulty of your AI vs the Beginner AI and the DE AI.
It had some trouble with Beginners aggressive style (I'm not sure if the default Beginner does cheat on extreme).
It did hold not too bad vs the DE AI until late castle age.
While I'm not a great player, it seemed to me, that Forthwind did lure its boars mostly rather late. Sometimes at pop 27, is that intended.
Do maps influence its playstyle/early build apart from nomad start and watermaps?
It has the normal sheep killing behavior, where it kills multiple sheep under the TC. I guess it requires DUC to eat only one sheep at a time, do you have that on your list maybe?
I liked it milled the shorefish in a small pond, don't know if that is default AI behavior (I'm no AI scripter myself).
Nice to see it can handle nomad start.

Good readme, btw I wouldn't mind if you include some of the key info in your first post.

Did you consider/try to upload Forthwind as a DE AI mod, so more people may find it?

I assume you are not in the AIscripters discord, or are you? If not you may want join that, since it is more active than the forum, esp. for quick feedback. https://discord.gg/5Zea68s
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.

screamingkoos
Forumer
Posts: 41
Joined: Wed Feb 05, 2020 6:27 pm

Re: Forthwind.AI (Version 1.2)

Post by screamingkoos »

Hey Wattle,

Thanks for the feedback! AI tournaments? That would be fun! Initially Forthwind was not created to be competitive, but rather just most compatible with newer versions of the game for "semi-noob" human sort of performance. I would create maybe a seperate AI file if I ever were to submit him into a competitive AI competition.

Yes, so AI's like beginner and even the extreme DE will have no issue eventually out microing my ai, but on some maps Forthwind will never just "bug out" kind of thing (like on nomad or megarandom maps and is compatible with all civs currently now). There are many details I could include about what makes up Forthwind, I just didn't want to fill my first post with too many words lol!

Haha, yes you're not wrong for pointing out the bad boar rules. It used to have some actually pretty decent boar rules but while further testing them awhile ago I accidentally messed them up and just haven't got around to fixing them. I literally just learned what DUC (direct-unit control) was the other day so I'm quite new to some of the userpatch (UP) features. I've been slowly adding in more userpatch features for Forthwind as I test them and find they are stable enough for a release. So yes, DUC is on the list.

For the milling, yes I have it programmed currently to build a max of 2 mills. The first mill is built near a stable source of food (like berries), and a second is usually built by food that is a little further away (example: a mill near the deer on arabia-type maps). There is also an "emergency mill" rule that fires if Forthwind hasn't found any food at all and thinks he needs farms.

I'm not aware of where that is, but I will certainly look into it (about the DE AI mod).

I truly appreciate all of your feedback and for sure I'll check out the discord! Thanks wattle!

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

Re: Forthwind.AI (Version 1.2)

Post by marathon »

I ran into issues with constants. I use WK (Userpatch 1.5) but the issues were unrelated.
I believe I can easily make this AI compatible with UP and WK, so that I can test it.

Welcome to the world of :head
(although you are an oldie, as it seems, but a proper welcome is imperative)

screamingkoos
Forumer
Posts: 41
Joined: Wed Feb 05, 2020 6:27 pm

Re: Forthwind.AI (Version 1.2)

Post by screamingkoos »

Oh man, the legend himself! (hint: marathon) ;)

Thanks for the welcome! I haven't played WK before but if you are able to get it up and running then by all means! For now I'm only testing Forthwind on DE as that's what I play.

(I've been around for a bit but was a fly on the wall simply observing for a long time, now I'm hoping to be more involved)

I'm very excited about the continuous :head it's what I'm here for, lol.

User avatar
wattle
Swami
Posts: 194
Joined: Fri Aug 15, 2014 1:06 pm
Location: Germany

Re: Forthwind.AI (Version 1.2)

Post by wattle »

I forgot to mention, I noticed Forthwind walls at some point (not sure if always) and it can lead to hurting itself (which is ofc why many AI don't do it), but also it happend to send vills to its death, because it was stubborn to try complete its wall, while the enemy was in full charge. Also it even walled on arena, which was kinda funny :) like double wall arena 11, but that cost it many vills. At least for arena should be disabled.
I guess you use the default wall building method (like aoc/petersen AI), using UP features for defining wall and gate position is probably not too easy.

https://www.dropbox.com/s/kpuclvq3aq3vz ... d_wall.png

Btw did you base your script on something existing like the petersen AI or create it from scratch?
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.

screamingkoos
Forumer
Posts: 41
Joined: Wed Feb 05, 2020 6:27 pm

Re: Forthwind.AI (Version 1.2)

Post by screamingkoos »

Hey Wattle!

I'm not sure how to @ you (if that's possible on this site, I really don't know).

But yes Forthwind does wall, he builds on the "perimeter 2" wall (so the outer wall when compared to perimeter wall 1). There are several rules regarding when he specifically walls. For one, he walls when he senses his military is outnumbered by a decent amount. There is no timer or anything regarding these rules. For actually building the walls there are like 10 to 15 rules affecting walling. I know what you mean though by how he kills himself, it's because the wall foundation is placed and Forthwind is extremely stubborn about building it at all costs. There are a few strategic numbers that come to mind that I may change in a future update (i.e., setting dynamic values for sn-percent-building-cancellation depending on enemy strength etc) to counter this behaviour.

I know there must be a way to sense these situations (vils under attack while building a wall) and then canceling the foundations by using UP commands, I just don't know UP commands well enough yet. Once I can figure something out though (including for other buildings) I will incorporate it into Forthwind. Currently when Forthwind is under attack he "pauses" wall building, but by that time there are already 10+ wall foundation tiles placed down, so he continues heading out to them.

You're right! I need to actually change some of the wall rules too now (they are from a long time ago like a year or more lol). I'll figure out how to disable wall building on "wall maps" once I sit down and revise the rules.

Honestly I don't know who or what peterson AI is, but I built my script and files from scratch. There are certainly bits and parts that have been influenced from other AI's, but I have been working on Forthwind for over like 2 years (very casually, on and off). I started from the bottom and I'm happy I could finally share Forthwind with other people (or even AI's to fight).

Thank you Wattle for your feedback and any questions at all are more than welcome! I could go on all day about AI theory ;)

User avatar
wattle
Swami
Posts: 194
Joined: Fri Aug 15, 2014 1:06 pm
Location: Germany

Re: Forthwind.AI (Version 1.2)

Post by wattle »

screamingkoos wrote:
Wed Feb 03, 2021 11:27 pm
I'm not sure how to @
I don't know either, assume it is not possible here, but on discord it is.
edit: Apparently if you quote me/someone it should send a notification.

Thx for your detailed reply and I like it walls only in specific situations. For AI vs AI it might overall be stronger to not wall, but I imagine against human player there are some that even prefer to have a walled AI.

I think the default aok/aoc AI is often here referred to as petersen AI because it's been scripted by Sandy Petersen iirc.
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.

User avatar
Leif Ericson
Waheguru
Posts: 1422
Joined: Wed Dec 09, 2009 8:15 pm
Location: United States

Re: Forthwind.AI (Version 1.2)

Post by Leif Ericson »

Yeah, Petersen is just the CD version AI.

For your current experience level, if you want your AI to build walls then your walling rules may make sense. Making walls with UP commands is a lot harder. You could try adding in (up-assign-builders c: stone-wall-line c: 0) whenever your AI is under attack and setting it back to a number higher than 0 when the town is safe. You can also use this to assign more than one builder to the walls. https://airef.github.io/commands/comman ... n-builders

For detecting wall maps you can simply use
#load-if-not-defined ARENA-MAP
#load-if-not-defined FORTRESS-MAP

...add walling code here

#end-if
#end-if

screamingkoos
Forumer
Posts: 41
Joined: Wed Feb 05, 2020 6:27 pm

Re: Forthwind.AI (Version 1.2)

Post by screamingkoos »

Hey Wattle,
wattle wrote:
Thu Feb 04, 2021 12:02 am
screamingkoos wrote:
Wed Feb 03, 2021 11:27 pm
I'm not sure how to @
I don't know either, assume it is not possible here, but on discord it is.
edit: Apparently if you quote me/someone it should send a notification.
Is this how you quote someone?

Yeah I agree! Forthwind does like to get stuck once in awhile with lumberjacks when the wall is between a lumbercamp and a forest. Forthwind has always originally been able to wall and I guess I kept it that way cause it's nostalgic a bit. Most AI's don't wall so I enjoy it that mine does.

OH. Haha. I had no idea that was the aok ai! To answer your question from before (does my ai use the default method) then yes it does, using perimeter wall and such, but the rules implement a few goals as checks and balances (I'm also improving them before I release version 1.3).

Hey Leif,

Thank you for your comment! Forthwind builds palisade walls and gates + stone walls and gates depending on different criteria. I am currently updating the rules so they are more clean as well I I will incorporate both of your ideas here! When I was trying to define which maps NOT to build on I was having trouble getting (map-type hideout) and (map-type hillfort) to work, so using the #LOAD-IF-NOT-DEFINED commands will be super useful.

Also I found a command called up-reset-placement. Would this command be useful for temporarily resetting the wall-class and gate-class placement? I'll run some tests, and thanks for the feedback!

Really appreciate both of your replies Wattle and Leif!

Post Reply