my English isn't much better, but I guess it would be appropriate to translate the thing to the burgeois lingua franca as well, so that the others may try
first, the code can be found here -
https://drive.google.com/file/d/1LESaQssoUXGrnqnIyGH7crIrSuDesIVh/view?usp=sharing
- I guess you know how to declare a new mod in the Package Manager, what is the meaning of resource packs (.rpk), how to choose them in the Manager
- what you want to create is a "strategic summoning spell"; you can make it from the scratch or copy an existing one
- one such spell can be found in
aow_spelltest.rpk under the Category "Specialization: Earth"
- the spell "Summon Earth Elemental" is spread over six positions or tables under the category: Summon Earth Elemental Skill, Has Summon Earth Elemental Skill, Summon Earth Elemental Spell, Summon Earth Elemental Targeter, Summon Earth Elemental Effect и Summon Earth Elemental Icon
- let's leave the icon be and copy the five important things:
- Skill: the research skill, which has to be researched to use the spell
- Has ... Skill: a property, ascribed to the player avatar after researching the skill
- Spell: the code for the spell itself
- Targeter: defines allowed targets and effects of the spell
- Effect: defines particular effects caused by the spell
- we can copy these to unused positions in the category with simple ctrl+c/ctrl+v pasting
- new tables should be renamed on you should make sure that the numeric IDs are different from the table you have copied from (especially when copying from another resource pack)
- I'd recommend to edit them in the reversed order, so effects first, then targeters, then spells etc.
- in order to create a strategic spell summoning a random Settler unit, you need to define the summoned Unit Set first
- in the same pack (aow_spelltest.rpk), choose the Category "=Summon Sets"
- like with the spell, create both new Unit Category and Unit Set
- both should have unique Names (Summon Settler Unit Category and Summon Settler Unit Set) and SetNames (SUMMONSETTLER_UNIT_CAT and SUMMONSETTLER_UNIT_SET); these should be different
- now open the new Unit Category and write into the Sets array the SetName (not Name!) of your new Unit Set (i.e. SUMMONSETTLER_UNIT_SET)
- open the new Unit Set and write into the SubSets array the codes for particular units you'd like to see, e.g.:
DRACO_SETTLER_UNIT_SET
GOBLIN_SETTLER_UNIT_SET
ORC_SETTLER_UNIT_SET
HUMAN_SETTLER_UNIT_SET
HIGHELF_SETTLER_UNIT_SET
DWARF_SETTLER_UNIT_SET
- (you should see "Lines: 6" in the field afterwards)
- these can be found under Settings/Unit Sets in the packs containing the code for the units, in this case UnitPioneer.rpk
- as you can see, the SetName works across the resource packs; the Name doesn't do
- now let's return to the "Specialization: Earth" and choose the new Summon Settler Effect
- here find the Unit Category Link field and choose the right Unit Category from the list (listed by Name, e.g. Summon Settler Unit Category)
- then open the Summon Settler Targeter, find Effects and replace the old effect with the new one (Summon Settler Effect; otherwise you'll be summoning Earth Elementals instead of Settlers)
- then open the Summon Settler Spell and do the same with the Targeters and Required Property Link
- then open the Summon Settler Skill and replace the old value under Properties
- finally, lower the Knowledge Cost and Tier (and especially Mana Cost in the Spell table: the Elemental needs 150, and you begin only with 50) for testing
- in the game, the research can be finished instantly by using a console command
leeuwenhoek
- as the number of skills in the game is horrendously big, it may take time until you receive the option to research it
- also, unless you change the Screen Name and icon, the skill/spell will appear with the Earth Elemental strings and icons in the game
enjoy and good luck with modding!