Auto-translated
So far, I’ve only managed to implement this idea on a limited scale, using the most essential creatures as an example. Since I’m not very good at coding, I often have to avoid loops and tables, but here the amount of data is such that it’s impossible to avoid iterating through the table elements using a loop. Here’s what I don’t understand:
1. In addition to creating a table for the creatures, I need to create a table for the conversion cost, which includes gold and other resources. How can I ensure that the values from the first table correspond to the values from the second table, and combine all of this within a loop? Or is there a function that returns the necessary resources for purchasing a creature?
2. How can I implement the ability to select the creature that will be obtained as a result of the conversion? I had the idea to use the GetObjectArmySlotCreature function, but as it turned out, it doesn’t work on my exe.
In short, I would like to see this script working with a few creatures as an example.