aliens

Author Topic: remove dependency to something  (Read 2458 times)

Offline pjlasl

  • Sergeant
  • **
  • Posts: 21
    • View Profile
    • Email
remove dependency to something
« on: July 05, 2015, 08:36:42 pm »
I just started looking into modding and looking how things are done, and I wanted to know if I could remove an item's dependency for research.

In my little playground, I am trying to remove the dependency laser pistol has on laser weapons.

in my .rul file i have something like this:

research:
  - delete: STR_LASER_WEAPONS
  - name: STR_LASER_PISTOL
    cost: 100
    points: 10
    needItem: true

It isn't working...My guess it is still pulling in the dependency from the xcom1ruleset file...correct?

Any help would be greatly appreciated.

Thanks!

Offline XOps

  • Colonel
  • ****
  • Posts: 193
  • Guy who drowns first
    • View Profile
    • Email
Re: remove dependency to something
« Reply #1 on: July 05, 2015, 09:01:47 pm »
I just started looking into modding and looking how things are done, and I wanted to know if I could remove an item's dependency for research.

In my little playground, I am trying to remove the dependency laser pistol has on laser weapons.

in my .rul file i have something like this:

research:
  - delete: STR_LASER_WEAPONS
  - name: STR_LASER_PISTOL
    cost: 100
    points: 10
    needItem: true

It isn't working...My guess it is still pulling in the dependency from the xcom1ruleset file...correct?

Any help would be greatly appreciated.

Thanks!

What you did was delete the Laser Weapons research entry, not the Laser Pistol's dependencies. The Laser Pistol entry will simply amend your modifications onto the core rules while still keeping the original dependencies. Also with the Laser Pistol entry set to needItem: true, then the Laser Pistol will require you have one already in your base's storage in order to research. Try this.
Code: [Select]
  - delete: STR_LASER_PISTOL
  - delete: STR_LASER_WEAPONS
  - name: STR_LASER_PISTOL
    cost: 100
    points: 10

Offline pjlasl

  • Sergeant
  • **
  • Posts: 21
    • View Profile
    • Email
Re: remove dependency to something
« Reply #2 on: July 05, 2015, 09:30:40 pm »
What you did was delete the Laser Weapons research entry, not the Laser Pistol's dependencies. The Laser Pistol entry will simply amend your modifications onto the core rules while still keeping the original dependencies. Also with the Laser Pistol entry set to needItem: true, then the Laser Pistol will require you have one already in your base's storage in order to research. Try this.
Code: [Select]
  - delete: STR_LASER_PISTOL
  - delete: STR_LASER_WEAPONS
  - name: STR_LASER_PISTOL
    cost: 100
    points: 10

AH!. Need to delete the core entry. It worked perfectly.

Thanks!

Offline Falko

  • Commander
  • *****
  • Posts: 802
    • View Profile
Re: remove dependency to something
« Reply #3 on: July 06, 2015, 10:08:31 pm »
this
Code: [Select]
  - name: STR_LASER_PISTOL
    dependencies: []
did not work?

Offline pjlasl

  • Sergeant
  • **
  • Posts: 21
    • View Profile
    • Email
Re: remove dependency to something
« Reply #4 on: July 06, 2015, 11:37:18 pm »
this
Code: [Select]
  - name: STR_LASER_PISTOL
    dependencies: []
did not work?

I didn't try that approach. I will give it a go.