• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Upgrades/Research Approach

Status
Not open for further replies.

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,183
I am currently developing a Castle Fight AI system on request, the AI is supposed to automatically build whatever happens to counter the enemy.
I have successfully done this part for buildings but I need to do the same for upgrades and research.

Is there a decent lib to make such an approach easier?
I imagine a function for getting all current upgrades of a player could be handy.
And a function to check if a player owns a building which can research a specific upgrade

The system is done in jass but if you got ideas/suggestions in GUI I will probably be able to convert them to jass.
 
Level 18
Joined
Nov 21, 2012
Messages
835
why not save researches as parent key in hashtable with building(s) allowed to make given research? also you can try order given building to make research after increasing gld/lumber to huge amount, then if succeed order to cancel after 0sec timer and set resources back, but this won't take into account research' requirement, so writeing to hash is fine option in my opinion
 
Status
Not open for further replies.
Top