• 🏆 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!

[AI] AI gets stuck when it should build custom mine buildings and doesn't really use them

Status
Not open for further replies.
Level 25
Joined
Feb 2, 2006
Messages
1,686
I have created custom AI scripts for my map: tdauth/wowtsr
At the part:
Code:
// **********************************
    // *      Building Strategy         *
    // **********************************
    // Tier 1 Buildings
    call SetReplacements( 1, 2, 3 )
    call SetBuildUnit( 1, NECROPOLIS_1 )
    call SetBuildUnit( 1, UNDEAD_MINE )
    call SetBuildUnit( 6, ACOLYTE )
    call SetBuildUnit( 2, CRYPT )
    call SetBuildUnit( 5, GHOUL )
    call SetBuildUnit( 2, UNDEAD_CITIZEN_MALE )
    call SetBuildUnit( 3, ZIGGURAT_1 )
    call SetBuildUnit( 3, UNDEAD_HOUSING )
    call SetBuildUnit( 3, UNDEAD_MINE )
...

It gets stuck at the line with the UNDEAD_MINE.
And if the mines are build they aren't really used. How can I achieve that it doesn't get stuck, how can I achieve that custom mines are used by more workers and how can I really debug an AI to get some errors/know why it got stuck?

Do the custom mines have something to do with an exe option that the player uses more than one goldmine?
 
Level 12
Joined
Feb 5, 2018
Messages
521
And if the mines are build they aren't really used. How can I achieve that it doesn't get stuck, how can I achieve that custom mines are used by more workers and how can I really debug an AI to get some errors/know why it got stuck?

Well not sure how many things you tried so far, but I remember in the past having issues with the AI not really getting enough resources to expand their base, so did you try with greedisgood already?

Is the AI making enough workers that are supposed to mine from the new gold mine? Or does it just make workers that are afk at the main and/or expanded base?

I would try at first to change
Code:
call SetBuildUnit( 3, UNDEAD_MINE )
to
Code:
call SetBuildUnit( 1, UNDEAD_MINE ) 
call SetBuildUnit( 5, ACOLYTE )

I have used custom gold mines in the past and I don't think that is the problem, but you never know :p
 
Status
Not open for further replies.
Top