miki151 / keeperrl

Source code of KeeperRL
GNU General Public License v2.0
871 stars 111 forks source link

Add custom E++ tribes and summoning of members of specific tribes #1808

Open giovinazzo-kevin opened 3 years ago

giovinazzo-kevin commented 3 years ago

Currently, TribeIds are hardcoded and can only be accessed on the C++ side. Would it be possible to offload them to a tribes.txt file? I can imagine it having a structure along the lines of:

"MY_TRIBE" {
    name = "My tribe"
    diplomatic = true
    enemies = {
        "TRIBE_ELF"  "TRIBE_DWARF"
    }
}

Then, SummonEnemy could be refactored to take in an additional TribeId parameter, allowing summoning of non-hostiles and allowing richer tribe dynamics in mods.

miki151 commented 3 years ago

Unless I'm missing some solution, tribes need to be hard coded due to loading retired dungeons with differing mods.