ylg_hke
Skirmisher
posted 09-24-18 08:23 AM
EDT (US)
251 / 406
Sorry i didnt make it clear, i meant ESO multiplayer comp stomps, they tend to be laggy by 25mins.
99% Agreed.
* Market techs asap. Scratch the cPlanProgression
==>rules for all civ's market mill farm plantation ricepaddy capitol upgrades are done. they all build market + research when they are aging up to age2.
* At most 2-3 Mills early on
==> yes! they tend to build excessive mills at early age3.
things have became a bit better since the introduction of "shoothuntable" rule though.
* 0.0 wood gatherer percentage after deforestation
==> I'm currently addressing this issue, how do we determine if all trees are gone? kbunitcount the tree number ?
It bugs me that kbBaseSetMaximumResourceDistance is actually rather stupid, i mean, what if we are dominating the map and there are many trees outside the range?
I think this issue should be handled alongside with multiple bases.
Take a look at these unused global variables, apparently ES developers planned to do the same, but eventually they rushed the production and left them untouched.
========================================================
extern int gGatherGoal = -1; // Stores all top-level gatherer data
extern int gFarmBaseID = -1; // Current operating bases for each resource
extern int gFoodBaseID = -1;
extern int gGoldBaseID = -1;
extern int gWoodBaseID = -1;
extern int gNextFarmBaseID = -1; // Overflow operating bases for each resource
extern int gNextFoodBaseID = -1;
extern int gNextGoldBaseID = -1;
extern int gNextWoodBaseID = -1;
extern int gPrevFarmBaseID = -1; // Phasing-out bases for each resource
extern int gPrevFoodBaseID = -1;
extern int gPrevGoldBaseID = -1;
extern int gPrevWoodBaseID = -1;
=========================================================
* "Protect" Factories, Banks, etc
==>Yes, but we can forget about banks (except Jap..?), they can be rebuilt and with 4000hp they are hardly 1st tier target.
* Tribute all resources to allies before giving up LOL
==> It should not exist, provided that multiple bases + switch base are done right. (if they can switch base and still cant comeback, then its hopeless anyway.)
* Fix the TownBell exploit
==> pretty much know nothing about it.
* Better handling of Naval games (?)
==> I feel like it will be our next major todo. :P
* Build Shrines near huntables, but not too far from base (?)
==> theoretically, yes, but i am not so sure now because we cant fix "shrined animal" issue.
* Handle regicide
==> IDK, haven't played regicide yet.
ylg_hke
Skirmisher
posted 09-24-18 11:17 AM
EDT (US)
253 / 406
I know what you meant. well, I mean, if NPCs are capable to switch base, it will be very different from now. ie: image what will happen if villagers flee to allies' base and rebuild, most resources will be spent on constructing new barracks stables TCs troops..etc, they are not going to resign while having like 5000+ unspent resources anymore.
So if that particular NPC can't comeback in time, then the whole team is already lost.
Instead, maybe we should make AI sending wood to the ally immediately for reconstruction?
Is there a way to assign a particular place to the gather plan?
what about we aiPlanDestroy the cPlanTownBell in age1?
ylg_hke
Skirmisher
posted 09-24-18 12:33 PM
EDT (US)
255 / 406
Good, we have to manually assign locations for late game wood income then.
hmm...make a townbell monitor for age1, mininterval 1, it should be enough?
regarding Split armies in cPlanDefend, actually, I will probably give up on defend plans, because its late-game performance on ESO has been really poor, lagged like hell even with 80 engage range.
ylg_hke
Skirmisher
posted 09-25-18 09:56 AM
EDT (US)
259 / 406
ah..too troublesome I gave up on the scenario deck.
I just went and tested my ai vs AI5 The Helot on Himalayas, expert difficulty, all homecities were lv.10, and Helot's bonus was brought back to 1.5 for the sake of fairness as well as using the very same map twice + switch sides, and my ai won all 2 matches! (sorry murdilator, i'm not being rude.)
Anyway, the TAD original ai is very very bad at resource management.(2000+food, 200+wood & gold, WTH) We have to do something about it.
ylg_hke
Skirmisher
posted 09-26-18 04:32 AM
EDT (US)
261 / 406
Thanks, WinMerge looks promising.
Escrows
==> really..? i set all food percentage to 0 in "void updateEscrows(void)", AI still gather food as usual.
===========================================================
kbEscrowSetPercentage(cEconomyEscrowID, cResourceFood, 0);
kbEscrowSetCap(cEconomyEscrowID, cResourceFood, 0);
kbEscrowSetPercentage(cMilitaryEscrowID, cResourceFood, 0);
kbEscrowSetCap(cMilitaryEscrowID, cResourceFood, 0);
===========================================================
AlistairJah
Skirmisher
posted 09-26-18 04:58 AM
EDT (US)
262 / 406
Gather? Why gather? I thought you wanted them to spend the 5000 food..?
ylg_hke
Skirmisher
posted 09-28-18 03:25 AM
EDT (US)
266 / 406
Regarding the "force balance", would it be better if we work on "void updateforecast" instead?
And it seems that different resources' gathering rates are not taken into consideration, which also affect overall resource management.
Regarding cPlanGather, I wont say its solely because of your script, but its definitely different from the original one, the reason is still unknown though:
Original + with crateMonitor disabled: AI still send most villagers to gather crates in age1, but tend to ignore crates since age2.
Original + with crateMonitor activated: villagers are overreactive in age1, ie: may steal/gather allies' crates.
your AI: Most of the time only 1 villager gather crates.
ylg_hke
Skirmisher
posted 09-28-18 05:42 AM
EDT (US)
268 / 406
Well, obviously. Crates are SubTypeEasy, so the AI treats them just like they treat all SubTypeEasy. In Age1 crates are super close, but in Age2 villagers are already (a little) far from the town...
==> Hmm...but it can't explain why newly trained villagers are not assigned to gather crates in age2, they are super super close to crates, distance is likely not the only cause.
Well the crate monitor just says "gather AbstractResourceCrate using X gEconUnit". No surprise there...
==> Sometimes, they ignore their own crates, and go gather allies' crates ....
AlistairJah
Skirmisher
posted 09-28-18 05:50 AM
EDT (US)
269 / 406
Now that's super funny XDD (but annoying at the same time... How come they ignore their own crates?)
Either way, I think the crateMonitor is completely useless...
ylg_hke
Skirmisher
posted 09-28-18 06:55 AM
EDT (US)
270 / 406
IKR
Not completely, its useful from age2 on, until we figure out why they dislike crates since age2.
AlistairJah
Skirmisher
posted 09-28-18 07:00 AM
EDT (US)
271 / 406
Just a moment ago I was working on the WoME's AI. Queries on that mod are completely screwed up... Querying AbstractVillager, returns Sufi socket. No error from me, I checked at least a thousand times... I didn't know queries can be bugged.
ylg_hke
Skirmisher
posted 09-28-18 07:45 AM
EDT (US)
272 / 406
Post that query, we will both test it on the original game. If the query works fine on the original game, it is the mod's flaw.
AlistairJah
Skirmisher
posted 09-28-18 08:04 AM
EDT (US)
273 / 406
Already done, I even did test on Wars of Liberty and Improvement Mod. It's the mod's flaws, confirmed.
None of the scripts I have been using worked properly, all had extremely annoying behavior so I made one from scratch. That's where I spotted the query problem. If I didn't make it from scratch, I probably couldn't have found the issue!
Yet the mod is just waiting for the script to be done, then it's ready for release!
Anyway... Do you plan on making your script mod-friendly?
ylg_hke
Skirmisher
posted 09-28-18 09:49 AM
EDT (US)
274 / 406
Sounds like that will be a nightmare, good luck!
I know nothing about mod, so I don't even know what makes it mod-friendly, but I intended to be compatible with those build-in(official) campaigns.
AlistairJah
Skirmisher
posted 09-28-18 10:43 AM
EDT (US)
275 / 406
It actually is XD
Well if things turn out to be unsolvable in scripts, the mod's author gotta rework some parts of its codes. I think I have some ideas but it has yet to be verified.
Well, unless you overwrite the aiMain.xs OR want scenario designers (or modders) to use your script for their scenarios, your AI will not be used for campaigns so there's no need to make it campaign-friendly. Draugur, for example, is not used in any of the campaign's AIs, so the cvOkToBuildDeck is only really useful for those who make custom scenarios using Draugur as AI script.
A mod-friendly AI should be able to play any mod without following the base game's patterns — unless the mod itself is pretty similar to the base game. That's doable with the usage of Gatherer Allocation (RGP Weight, RGP, Resource Breakdown, etc), Attack Goal (cPlanGoal, Opportunities, Missions, etc) and some Knowledge Bases (kbProto's (although many of these are not working), kbTechtree's (although there are too few of these), etc) without putting too much elements such as cCiv, cTech, cTactic, etc... cUnitType is a little different since there are Abstract and LogicalType (as long as the mod respects them too). Well there are some exceptions (mostly non-military buildings that the attack goal never builds), but apart from those, if it's possible to avoid explicit mentions, try to actually avoid that.
That makes the AI portable and generates no "compilation" errors. The script thus becomes a "template" that any modder can modify without wasting too much time on removing explicit mentions and reworking complex parts of the script... because, you know, AI scripting is among the least touched part in mods (because "it's too hard and making contents is more fun than making the computer play properly").
I had that idea, a year and half ago, but well, back then I was just starting to learn, so... Perhaps I can now rethink about it. I might need some tips from you the people here...