Author Topic: Adding to effect group  (Read 208 times)

Acuru

  • Newbie
  • *
  • Posts: 33
    • View Profile
Adding to effect group
« on: July 17, 2017, 01:43:16 am »
I'm adding new effect to effects group (let say industry_exp to effect_definitions_industry.x ml). I copied file to mod, and just added another entry and it is working smoothly. BUT! Is there a way to add just entry to effect group without coping whole file (and overriding it)? Something like push to array, not creating whole with new elements. I'm asking it for sake of compatibility with other mods, if they will also modify this file, there will be a problem :C And i don't want to create new, mod specific file (it would display badly on pilot profile).

ai_enabled

  • AtomicTorch Founder
  • Hero Member
  • *****
  • Posts: 988
    • View Profile
Re: Adding to effect group
« Reply #1 on: July 17, 2017, 03:17:22 am »
Unfortunately, we didn't implement any solution for this problem. You need to override the whole file.

Acuru

  • Newbie
  • *
  • Posts: 33
    • View Profile
Re: Adding to effect group
« Reply #2 on: July 17, 2017, 04:02:39 am »
That's sad and another reason to not make my mod modular :C Well i propably just include others mods into mine if they autors won't have any objections.

Lurler

  • AtomicTorch Founder
  • Hero Member
  • *****
  • Posts: 1023
    • View Profile
Re: Adding to effect group
« Reply #3 on: July 17, 2017, 11:32:03 pm »
Hmm. Wait. It should be possible!
Just create a new file with only that single effect. It should work perfectly.
Same for categories. Just create any new category in a new file and it will work as well.
Just make sure to follow the format as in other files.

ai_enabled

  • AtomicTorch Founder
  • Hero Member
  • *****
  • Posts: 988
    • View Profile
Re: Adding to effect group
« Reply #4 on: July 17, 2017, 11:44:04 pm »
Right, it seems to be possible to add new effects by adding new XML file with these effects (effect_definitions_YOUR_MOD_N AME.xml might be a good idea).
But adding new effect group is not so easy as there is an only single file for all the groups - effect_groups.xml - it should be overridden completely...
« Last Edit: July 17, 2017, 11:56:14 pm by ai_enabled »

Lurler

  • AtomicTorch Founder
  • Hero Member
  • *****
  • Posts: 1023
    • View Profile
Re: Adding to effect group
« Reply #5 on: July 18, 2017, 12:07:43 am »
Again, from what I understand it should be possible to do by adding a new file too :)
(the effect group)

Acuru

  • Newbie
  • *
  • Posts: 33
    • View Profile
Re: Adding to effect group
« Reply #6 on: July 18, 2017, 06:58:05 am »
Yea, adding new group was a correct way to achive what i wanted :)