Author Topic: How do I edit battlescape item recovery values?  (Read 5720 times)

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1510
    • View Profile
How do I edit battlescape item recovery values?
« on: December 11, 2015, 10:36:37 am »
I want to change how many alien alloys or elerium I get back from a mission. I know that each elerium unit is recovered for 50 elerium, and each alien alloy tile (on a UFO) is recovered for 1/10th of an alien alloy. How do I edit these values, say, to make power sources give 25 elerium, and alien alloy tiles recover for 1/5th of an alien alloy?

Offline SIMON BAILIE

  • Commander
  • *****
  • Posts: 673
    • View Profile
Re: How do I edit battlescape item recovery values?
« Reply #1 on: December 12, 2015, 04:15:07 am »
Just checked nightly 2015_12_10 and within STANDARD\XCOM1\vars.rul you'll see the default elerium value = 50, so you can edit that value with say notepad++. As for the alien alloys I'm not sure but someone on the forum will know better than me. One final point though, some of the bigger expansions for example Hardmode expansion by Hellrazor over rides the xcom1 value in the vars part of that mod's ruleset folder so if using that mod then you'll need to edit that file instead.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11502
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: How do I edit battlescape item recovery values?
« Reply #2 on: December 12, 2015, 12:39:12 pm »
One final point though, some of the bigger expansions for example Hardmode expansion by Hellrazor over rides the xcom1 value in the vars part of that mod's ruleset folder so if using that mod then you'll need to edit that file instead.

You mean when the user uses two mods which change vars.rul?
There's a problem only if both change exactly the same thing. Otherwise you just add the lines which you want to change, for example turnAIUseGrenade, and both mods will do their thing.
It's the same as adding a couple new weapon mods: each of them adds to the items.rul, yet all are present.

Offline SIMON BAILIE

  • Commander
  • *****
  • Posts: 673
    • View Profile
Re: How do I edit battlescape item recovery values?
« Reply #3 on: December 12, 2015, 01:35:40 pm »
My mistake, what I meant in the previous example was that the value in STANDARD/XCOM1/vars.rul is unimportant as the computer will take the value from a mod loaded after xcom1. If the only time the elerium value was stated was in the xcom1 vars.rul file then you would need to edit that value instead. Sorry for not being clear.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11502
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: How do I edit battlescape item recovery values?
« Reply #4 on: December 12, 2015, 01:39:31 pm »
If the only time the elerium value was stated was in the xcom1 vars.rul file then you would need to edit that value instead.

Thanks, but I still don't understand why you would edit xcom1 vars.rul instead of making a mod. Why would anyone ever edit xcom1 vars.rul? :)

Offline SIMON BAILIE

  • Commander
  • *****
  • Posts: 673
    • View Profile
Re: How do I edit battlescape item recovery values?
« Reply #5 on: December 12, 2015, 01:55:09 pm »
Laziness and in my current game I found it was a quicker, albeit dirtier, solution for changing a few things like craft speed, craft weapon(fusion balls to 6 from 2) or making the motion scanner take very little time to use(how long can it take you to look at your wrist anyway?). However you have made me think and maybe I'll come up with a mod that does all these changes, hopefully won't be too difficult.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11502
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: How do I edit battlescape item recovery values?
« Reply #6 on: December 12, 2015, 02:01:32 pm »
Laziness and in my current game I found it was a quicker, albeit dirtier, solution for changing a few things like craft speed, craft weapon(fusion balls to 6 from 2) or making the motion scanner take very little time to use(how long can it take you to look at your wrist anyway?). However you have made me think and maybe I'll come up with a mod that does all these changes, hopefully won't be too difficult.

No, just copy the edited line to a new file. For vars, you don't even have to make sure you define the section, as they have no section attached.

Modifying xcom1 rulesets only works until the next nightly update. :)

Offline Cristao

  • Colonel
  • ****
  • Posts: 405
    • View Profile
Re: How do I edit battlescape item recovery values?
« Reply #7 on: December 14, 2015, 04:18:28 pm »
^true. Using a mod makes things infinitely easier.

Offline hellrazor

  • Commander
  • *****
  • Posts: 2015
  • Deep Ruleset Digger & Bughunter
    • View Profile
    • Github Account
Re: How do I edit battlescape item recovery values?
« Reply #8 on: December 14, 2015, 04:36:52 pm »
I want to change how many alien alloys or elerium I get back from a mission. I know that each elerium unit is recovered for 50 elerium, and each alien alloy tile (on a UFO) is recovered for 1/10th of an alien alloy. How do I edit these values, say, to make power sources give 25 elerium, and alien alloy tiles recover for 1/5th of an alien alloy?

Those are easy to accomplish task, first since it is easier Elerium-115
Create file called vars.rul, insert:
Code: [Select]
alienFuel: [STR_ELERIUM_115, 25]
Done.

Controlling the amount of Alien Alloys from UFO Recoveries is currently not such a easy task.
You currently can not increase the amount of Alioen Alloys from UFO's without adding additional tiles.
The divisor of 1/10th is a fixed constant. Nevertheless, you can actually reduce the amount of Alien Alloys.

See attached modified U_EXT02 files.

What i did was to remove the Alien Alloys Special ability from one of the most used Groundtiles, which results in a average reduction of ~36% in alien Alloys recovered.

It would be much much easier, to just have a variable like for the Elerium-115 to influence this, and then also increases would be easily possible.

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1510
    • View Profile
Re: How do I edit battlescape item recovery values?
« Reply #9 on: December 14, 2015, 06:11:09 pm »
Why would anyone ever edit xcom1 vars.rul? :)
One of my mods has an edit to the initial funding in vars. It only changes where the graph line starts and doesn't actually affect the gameplay in any way, but it was one of those little details that mattered.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11502
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: How do I edit battlescape item recovery values?
« Reply #10 on: December 14, 2015, 08:13:31 pm »
One of my mods has an edit to the initial funding in vars. It only changes where the graph line starts and doesn't actually affect the gameplay in any way, but it was one of those little details that mattered.

I meant the file, not the data in it... Nevermind.