Hey everyone, this is a project I've been thinking about for a while.
A lot of work goes into making a script, a good portion of which is just generic code that every AI has in some form. Scripters often have to work a long time figuring out this stuff before going on to the stuff that makes a script fun and unique, and I want to reduce that if possible. I hope to upload some examples of generic scripts that do basic functions, with the goal of either saving scripters time to work on their own unique ideas or helping newer scripters learn how to use DUC and other important scripting skills.
Feel free to study/modify these examples and use them in your AI's, hope this saves someone some
If you have any requests for things to add or have a suggestion, let me know
Contents: Boar Hunting, Deer Luring, TC Garrisoning, Claiming Sheep, Food Forcedrop, First Houses, Ranged Group Micro, Integer Gathering System(by Marathon)
IMPORTANT NOTE: the trickiest part of using these is probably getting the defconsts at the beginning right. It is crucial that the ID's of the goals and timers in these examples aren't the same numbers as any other goals/timers in your script as this would most likely cause the code not to work. In the files you will have to adjust the defconsts before the code will work.
P.S. This list of constants needs to be somewhere in your script for these to work.
Snippets
- FireBall37
- Swami
- Posts: 191
- Joined: Sat Aug 22, 2020 10:49 pm
Snippets
- Attachments
-
- Snippets 2.zip
- (20.72 KiB) Downloaded 385 times
Last edited by FireBall37 on Tue Nov 12, 2024 2:45 pm, edited 33 times in total.
- FireBall37
- Swami
- Posts: 191
- Joined: Sat Aug 22, 2020 10:49 pm
Re: Snippets
Hey everyone--added a snippet on deer luring! Let me know how it works
- MrElephant
- Swami
- Posts: 125
- Joined: Sun Dec 20, 2020 6:28 am
Re: Snippets
Wow, this is incredible Fireball. Will surely help everyone in their AI projects.
Author of Charon, Reactionary, Ahulane, and BlackKnight!
-
- Swami
- Posts: 100
- Joined: Sat Oct 02, 2021 5:56 pm
Re: Snippets
I made some changes so it fits my AI but overall, deer luring is great, thanks!
- Attachments
-
- deer.PNG (529.33 KiB) Viewed 5118 times
- FireBall37
- Swami
- Posts: 191
- Joined: Sat Aug 22, 2020 10:49 pm
Re: Snippets
Glad it helps you guys
- FireBall37
- Swami
- Posts: 191
- Joined: Sat Aug 22, 2020 10:49 pm
Re: Snippets
Added code for garrisoning the town center to shoot enemy units and changed the defconst format for the others.
- FireBall37
- Swami
- Posts: 191
- Joined: Sat Aug 22, 2020 10:49 pm
Re: Snippets
added snippet on first two houses
- FireBall37
- Swami
- Posts: 191
- Joined: Sat Aug 22, 2020 10:49 pm
New Snippets
Hey guys, added some new stuff here.
--Added precise control for deer luring
--Added some small stuff for the boar lure
--Added a failsafe if one of the first houses is obstructed
--Added a new snippet on force-dropping food from Arandi (thanks Arandi )
--Added a new snippet on claiming sheep with the scout
Enjoy!
--Added precise control for deer luring
--Added some small stuff for the boar lure
--Added a failsafe if one of the first houses is obstructed
--Added a new snippet on force-dropping food from Arandi (thanks Arandi )
--Added a new snippet on claiming sheep with the scout
Enjoy!
- FireBall37
- Swami
- Posts: 191
- Joined: Sat Aug 22, 2020 10:49 pm
Group Micro Snippet
Added a snippet on group micro for ranged units, currently supports either a full skirm army or full archer army. It has pretty decent micro, hopefully this will open some doors to those who've wanted to make this but didn't know how. I hope I've done a good job in summarizing and explaining what goes into group micro and that you can learn from and use this in your AIs. There are improvements to be made, but it's a start
- FireBall37
- Swami
- Posts: 191
- Joined: Sat Aug 22, 2020 10:49 pm
Small update
Reuploaded, with some small changes to the group micro script, including a fix for a pretty major issue in DE and more explanations and many more things to adjust with defconsts.