pisskop / PKs_Rebalancing

Pisskop's Rebalancing Mod for Cataclysm: Dark Days Ahead
https://discourse.cataclysmdda.org/t/pks-rebalancing/15301
19 stars 25 forks source link

Martial arts perks #13

Closed Blank99 closed 7 years ago

Blank99 commented 7 years ago

When selecting the martial arts perks, the selection menu shows every MA twice, IE: a) karate b) judo c) aikido d) Tai Chi e) Taekwondo f) karate g) judo h) aikido i) Tai Chi j) Taekwondo

While on that.. is there a reason why the mod overrides every mutation there is on pk_mutation_override? even the ones it does not touch at all?

pisskop commented 7 years ago

UI issues are coregame, afaik.

I dont modify martial arts in any way.

mutations are all copied because 90% of them are changed. does this obstruct something?

Blank99 commented 7 years ago

I do not believe this is an UI issue, but one of the game appending instead of overriding the list when loading the data. The martial arts perks. As in, "shaolin adept" lets you take one of the shaolin styles, but with this mod, they appear twice. They do not appear twice without this mod.

I believe that what is happening is that in this line:

"initial_ma_styles": [ "style_karate", "style_judo", "style_aikido", "style_tai_chi", "style_taekwondo" ],

instead of redefining the perk's "initial_ma_styles" list, the game is appending instead. If you look at, say, "Medieval Stuff", when it adds Pankration (and Medieval Swordsmanship), it does this:

    {
        "type" : "mutation",
        "id" : "MARTIAL_ARTS",
        "name" : "Martial Arts Training",
        "points" : 3,
        "description" : "You have received some martial arts training at a local dojo.  You start with your choice of Karate, Judo, Aikido, Tai Chi, Taekwondo, or Pankration.",
        "starting_trait" : true,
        "initial_ma_styles" : [ "style_pankration" ],
        "valid" : false
    }

but if you add the perk at chargen, you get to select from any of the perk's original styles plus Pankration instead of only Pankration.

I've seen similar behavior in mods adding professions to scenarios, tho that was a while ago.

Apart from that and possibly similar issues spawned from weird behavior from the game appending things instead of overwriting, long file makes it hard to untangle what the mod tries to do with what it wants to leave alone. This could cause problems if mutations are changed in the base game, and it does make it trickier to work out just what needs to be changed to ensure nothing breaks when using this mod and the mutations one in the forums.

pisskop commented 7 years ago

I can remove martial arts. Its there simply because Ive already overwritten 4.725 lines in the code, and thus is a matter of expedience.

pisskop commented 7 years ago

Here is the diff https://github.com/pisskop/Cataclysm-DDA/pull/1/commits/ef74e6ff93fbd1b5e409be057e5fdb08ca62e203