Snippets

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.
arandi
Swami
Posts: 102
Joined: Sat Oct 02, 2021 5:56 pm

Re: Snippets

Post by arandi »

Oh no, more ranged units AIs incoming ;)

kunyi
Guru
Posts: 759
Joined: Tue Mar 21, 2006 7:48 am

Re: Snippets

Post by kunyi »

Gj :dance
in ranged micro missing

(defconst goal "xy")

User avatar
FireBall37
Swami
Posts: 191
Joined: Sat Aug 22, 2020 10:49 pm

Re: Snippets

Post by FireBall37 »

Alright, reuploaded again, fixing more mistakes and adding a new script from Marathon! :dance I decided to start numbering these for you guys because of how many mistakes I've missed and thanks Kunyi for pointing out the missing defconsts for the goals :head :rolleyes:

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

Re: Snippets

Post by wattle »

I added the sheep claim and the first houses to "my" Mangudai AI and I love the sheep claim <3. The second house gets placed but the dumb vill next to it ignores it and moves else where. Need to unnoobyfy a bit more probably :lol:
Thanks MrElephant for setting me up ofc :rolleyes:
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
wattle
Swami
Posts: 218
Joined: Fri Aug 15, 2014 1:06 pm
Location: Germany

Re: Snippets

Post by wattle »

Randomly thinking about what snippets would be great to have for a lazy noob.
- Retreat from TC, tower, castle
The ranged mirco snippet has that for TC and towers, but not for castles and well its for ranged micro ofc.

- Vill defense vs rams
It often bothers me to see when a (lonely) ram attacks a TC or tower and the vills auto-garrison into TC, being idle and ineffective vs the ram, while some good AIs let them hop out and make short work of the ram.

I think these snippets also can serve as a help to understand how this scripting can be done, ideally lowering the barrier to more complex parts and leaving room for improvements, so people are encouraged to pick up from there.
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.

SuperSkurken
Forumer
Posts: 5
Joined: Thu May 02, 2024 11:29 am

Re: Snippets

Post by SuperSkurken »

Thanks a lot for sharing these snippets! They really helped me getting started on scripting. I am still using my own variants of the first houses snippet and the deer pushing snippet. They are so good. How you would like to be attributed? Is a "thank you" in the source code sufficient? I had a longer message in the chat, but it felt out of character for my AI. :rolleyes:

User avatar
FireBall37
Swami
Posts: 191
Joined: Sat Aug 22, 2020 10:49 pm

Re: Snippets

Post by FireBall37 »

Yep just a note in the code is fine. Glad you’ve been able to use it!

Post Reply