General Information
Register Time: 8 Sep 2013, 22:10 PM
Last Visit Time: 19 Oct 2023, 20:27 PM
Youtube: https://www.youtube.com/user/eliw00d
Steam: 76561197964578176
Birthday: 1984-03-05
Residence: United States
Nationality: Finland
Timezone: America/Chicago
Game Name: eliw00d
Most Player abilities are unlocked via Commander, but you can actually just add them to the Player directly using the army category, as long as the requirements are met. To add them above, just change the ui_group of the ability to group_secondary.
1. Your for loop is handling that just fine. If there are 3 players, your loop executes 3 times.
2. You should always use the BP_* functions to get the actual ability.
3. Unfortunately, there is no Command Point cost modifier for abilities. There is an Action Point cost modifier, though, that you would need to create your own function for. The best thing would be to create a Tuning Pack to adjust costs.
4. The best way would be to edit the abilities in a Tuning Pack. Otherwise, you would have to use a Game Event like GE_AbilityExecuted to catch when the ability is used, and then disable it after that using Player_SetAbilityAvailability.
What would you say is lacking in that documentation?
There are two icons, one is the 64x64 icon that shows in the inventory. The other is the preview image (icon_secondary). You need to use the ModIcons_<ModID>_<Icon> format for referencing them.