Author Topic: <solved> How do I make a mod ruleset that will erase a line in the main ruleset?  (Read 5992 times)

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1510
    • View Profile
edit: Some of the things I tried which did not seem to work before may have in fact been working solutions. I was not getting any results because I had capitalized the "r" in "research:".

edit 2: I tried to do this again with manufacture dependencies and discovered that while the [] command does clear dependencies, there seems to be no way to re-declare them afterward. Deleting the section and re-creating it works like a charm, however.

manufacture:
  - delete: STR_HOVERTANK_PLASMA
  - name: STR_HOVERTANK_PLASMA
    category: STR_HEAVY_WEAPONS_PLATFORM
    requires:
      - STR_PLASMA_CANNON
      - STR_UFO_CONSTRUCTION
    space: 30
    time: 1200
    cost: 850000
    requiredItems:
      STR_ALIEN_ALLOYS: 5
      STR_ELERIUM_115: 30



-------------------------------------------------------------------------------------------
I am trying to make the STR_NEW_FIGHTER_TRANSPORTER research only require STR_UFO_CONSTRUCTION. I can tell it to have that dependency, but it doesn't get rid of the other existing dependency: STR_NEW_FIGHTER_CRAFT.


Research:
  - name: STR_NEW_FIGHTER_TRANSPORTER
    cost: 700
    points: 30
    dependencies:
      - STR_UFO_CONSTRUCTION
  - name: STR_ULTIMATE_CRAFT
    cost: 900
    points: 30
    dependencies:
      - STR_NEW_FIGHTER_CRAFT
      - STR_NEW_FIGHTER_TRANSPORTER
« Last Edit: December 10, 2014, 08:43:20 pm by The Reaver of Darkness »

Offline Falko

  • Commander
  • *****
  • Posts: 802
    • View Profile
Re: How do I make a mod ruleset that will erase a line in the main ruleset?
« Reply #1 on: December 09, 2014, 06:12:14 pm »
it should work
my guess is that you have multiple mods activated and one of them overwrites your dependencies changes

Offline jackstraw2323

  • Colonel
  • ****
  • Posts: 206
    • View Profile
Re: How do I make a mod ruleset that will erase a line in the main ruleset?
« Reply #2 on: December 09, 2014, 07:11:16 pm »
Not entirely sure because I've had similar issues with my work.

I know you can do
someValue: []
To clear a value, but I'm not sure if you can the re-declare the value after clearing.

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1510
    • View Profile
Re: How do I make a mod ruleset that will erase a line in the main ruleset?
« Reply #3 on: December 09, 2014, 08:42:37 pm »
I checked all of the mods I have turned on; none of them have any research declarations.

Not entirely sure because I've had similar issues with my work.

I know you can do
someValue: []
To clear a value, but I'm not sure if you can the re-declare the value after clearing.
Can you give an example of how I might use this in my specific case?

Offline jackstraw2323

  • Colonel
  • ****
  • Posts: 206
    • View Profile
Re: How do I make a mod ruleset that will erase a line in the main ruleset?
« Reply #4 on: December 09, 2014, 10:23:59 pm »
I am trying to make the STR_NEW_FIGHTER_TRANSPORTER research only require STR_UFO_CONSTRUCTION. I can tell it to have that dependency, but it doesn't get rid of the other existing dependency: STR_NEW_FIGHTER_CRAFT.


Research:
  - name: STR_NEW_FIGHTER_TRANSPORTER
    cost: 700
    points: 30
    dependencies:
      - STR_UFO_CONSTRUCTION
  - name: STR_ULTIMATE_CRAFT
    cost: 900
    points: 30
    dependencies:
      - STR_NEW_FIGHTER_CRAFT
      - STR_NEW_FIGHTER_TRANSPORTER

I think you would do
dependencies:[]
In the relevant item to clear out the dependency. You might be able to then declare the item again with the new values, but not sure if the engine allows that.

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: How do I make a mod ruleset that will erase a line in the main ruleset?
« Reply #5 on: December 09, 2014, 10:30:08 pm »
didn't we add a "delete" keyword specifically for this?

Offline Falko

  • Commander
  • *****
  • Posts: 802
    • View Profile
Re: How do I make a mod ruleset that will erase a line in the main ruleset?
« Reply #6 on: December 09, 2014, 10:35:54 pm »
delete is for deleting full entries not changing things within
if  The Reaver of Darkness would post his/her full ruleset i would take a look but just guessing is not for me

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1510
    • View Profile
Re: How do I make a mod ruleset that will erase a line in the main ruleset?
« Reply #7 on: December 10, 2014, 09:25:57 am »
I posted the entirety of the change I'm trying to make. Everything else is the original ruleset.

I tried using the delete command to make a brand new entry but it did not even delete the entry in the first place.

Research:
  - delete: STR_NEW_FIGHTER_TRANSPORTER
  - name: STR_NEW_FIGHTER_TRANSPORT
    cost: 700
    points: 30
    dependencies:
      - STR_UFO_CONSTRUCTION
  - name: STR_ULTIMATE_CRAFT
    cost: 900
    points: 30
    dependencies:
      - STR_NEW_FIGHTER_CRAFT
      - STR_NEW_FIGHTER_TRANSPORT
en-US:
  STR_NEW_FIGHTER_TRANSPORT: "New Fighter-Transport"

When I run the game with my mod turned on, upon completing research on the firestorm, the New Fighter-Transporter research option pops up.

edit: I realize I should just be able to use the unlock command to do it. Problem now is that once again my ruleset changes are having no effect in-game. It's like any number of these things I have tried may have worked, but the changes I am making are being ignored by openXcom.

Research:
  - name: STR_UFO_CONSTRUCTION
    cost: 700
    points: 30
    unlocks:
      - STR_NEW_FIGHTER_TRANSPORTER
  - name: STR_NEW_FIGHTER_TRANSPORTER
    cost: 900
    points: 30
    dependencies:
      - STR_UFO_CONSTRUCTION
  - name: STR_ULTIMATE_CRAFT
    cost: 900
    points: 30
    dependencies:
      - STR_NEW_FIGHTER_CRAFT
      - STR_NEW_FIGHTER_TRANSPORTER
« Last Edit: December 10, 2014, 09:46:56 am by The Reaver of Darkness »

Offline Falko

  • Commander
  • *****
  • Posts: 802
    • View Profile

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1510
    • View Profile
Re: How do I make a mod ruleset that will erase a line in the main ruleset?
« Reply #9 on: December 10, 2014, 01:09:35 pm »
That was it! Thanks. Can't believe I missed that.

Also, using the unlock command worked perfectly. Not sure how much of the previous stuff actually worked because apparently none of it counted with that little typo present.