Spacebase DF-9

Spacebase DF-9

Lua file, script modification suggestions (Mac version)
Hello all,

Usually I adopt the "lone wolf" philosophy regarding gaming, but with the issues surronding the vanilla version of Spacebase DF-9, even reclusive gamers are aiding others regarding gaming tweaks in order to make the game playable. Caesar has a good thread regarding tweaks for the Windows version and is currently attempting to have replacement files posted on a sharing site. For myself, I'm hesitant to post files for sharing until I find an acceptable host, plus I'll have to explain where the users have to place the files...and then help them should they place them in the wrong folders.

Until I figure something out, I'll list each tweak with the correct file paths and values in case tech-savvy Mac users wish to try them. I'll even delete my game and start fresh so that I'll be able to post both the before and after values in addition to testing them to ensure that they'll work.

To start: We have to find those .lua files; sure Double Fine released the script files for modding but they sure as crap didn't make them accessible. There's two ways to find them:

Option #1 - THE YE OLDE WAY (aka the STUPID WAY, which I used until I found option #2):

You can find the (well-buried) .lua files by holding down the Option key while click Go in the menu bar and following this path:

Library > Application Support > Steam > SteamApps > common > SpacebaseDF9

In the SpacebaseDF9 folder, you'll see a new icon called Space. Right-click it and select Show Package Contents.

When inside the Space folder, follow the path Contents > MacOS > Data > Scripts

or

Option #2 - The "boy I'm a true idiot!" (Quick) Method

In Steam, right-click the game and choose Properties, then choose Browse Local Files; this method brings you all the way up to the SpacebaseDF9 folder mentioned in Option #1. Follow the instructions listed after reaching this folder to finally reach the .lua files.

How to actually OPEN these .lua files to modify?

Wow, LOTS of .lua files in the Scripts folder huh? Well, how do we modify them safely without breaking the game worse than it was originally released? Well, the files, while affixed with the .lua suffix and marked as "Unix Executable Files", we can safely modify them using TextEdit. Here's how:

1. Right-click the .lua file you want, then choose Open With > Other...

2. Scroll down the list of applications and choose TextEdit

*NOTE: don't worry about the "always open with" check box, leave it unchecked. Yes, it's a nuisance using this method to open each file, but I tried the "Always Open With" option and it never remembers. Oh well...

GameRules.lua TWEAKS (Mac Version)

A. MORE STARTING MATTER

Sick and tired of racing to enclose the SEED, build an Airlock, build a life support room, and still try to save enough matter for building a refinery room so that you can quickly replenish your now-empty supply of matter? Want to get a leg up on building the base in order to keep your citizens as happy as possible? Want to place turrets almost IMMEDIATELY just oin case those freaking Raiders show up to crash the New Base party? Well, 2000 matter to start with is STUPID! So let's change it!

1. Search the .lua files in the Scripts folder for the GameRules.lua file.

2. Right-click the file and choose Open With > Other...

3. Choose TextEdit

NOTE: The text font seen here is called Menlo, and the size of the font is 11 (just an FYI).

Scroll down until you see the text "Matter Economy". It'll look like this:

-- matter economy
STARTING_MATTER = 2000,
MAT_BUILD_FLOOR = 6,
MAT_BUILD_DOOR = 12,
MAT_BUILD_AIRLOCK_DOOR = 15,
MAT_BUILD_HEAVY_DOOR = 20,
MAT_VAPE_FLOOR = 4,

See the "STARTING_MATTER = 2000" line? Well, what if we want, say 10000 matter to start with?

Highlight and change the number so that it'll look like this:

-- matter economy
STARTING_MATTER = 10000,

CLOSE THE WINDOW. DO NOT SAVE or ANYTHING. JUST SIMPLY CLOSE THE WINDOW.

Run the game as normal. When you select a new base, you'll find that instead of 2000 matter, you now have 10000. DON'T GET CARRIED AWAY WITH YOUR FIRST ROOMS until your first three colonists can breathe. I highly recommend Residence rooms after building the SEED enclosure, Airlock and Life Support rooms so that the silly colonists can put their items on shelves and dressers. Also, if you want to pair up roommates with their friends (if that's your thing), then do that too.

B. MORE MATTER FOR MINING

Notice that when you highlight a group of rocks to be mined for matter, you get a big value, but when the Miner brings the matter fragments to the refinery you get...a somewhat lesser amount? Doesn't seem fair, does it? Well, we can change that too, and it happens to be in the same .lua file!

1. Open the GameRules.lua file the same way as described above.

2. In TextEdit, you'll see the values just below the --matter economy entries; they look like this:

-- matter yield based on miner skill
MAT_MINE_ROCK_MIN = 30,
MAT_MINE_ROCK_MAX = 50,
MAT_MINE_ROCK_MIN_LVL2 = 40,
MAT_MINE_ROCK_MAX_LVL2 = 60,

The Miner ONLY gets between 30-50 matter for each piece of rock, EVEN THOUGH WHEN ORIGINALLY SELECTED, THE GAME SHOWS 180 FOR EACH PIECE? And researched mining tools only grant +10 more matter? WTH!? Okay, NOW WE HAVE TO CHEAT!

The game has been saying +180 matter for each one we highlight when assigning mining missions, so how about we GET THE MATTER WE DESERVE...AND THEN SOME! Change the values above to read like this:

-- matter yield based on miner skill
MAT_MINE_ROCK_MIN = 180,
MAT_MINE_ROCK_MAX = 250,
MAT_MINE_ROCK_MIN_LVL2 = 360,
MAT_MINE_ROCK_MAX_LVL2 = 500,

CLOSE THE WINDOW and run the game. NOW we should get the matter we deserve, which looks to be a bug that we've been suffering through since Day 1. Thanks yet AGAIN, Double Fine.

C. MORE MATTER FOR VAPORIZING OBJECTS

By default, the game grants 75% of the matter value for vaporizing objects. It's in the same .lua file (GameRules.lua), just under the --matter yield values. You'll see this:

-- % of an object's original cost you get from vaporizing it
MAT_VAPE_OBJECT_PCT = 0.75,

Personally I think 75% of the value is generous enough, except that we'll mostly be tearing down derelicts after we loot them. But hey, if you want to change it:

-- % of an object's original cost you get from vaporizing it
MAT_VAPE_OBJECT_PCT = 1.00,

CLOSE THE WINDOW and run the game.

Now you get 100% of the matter value. You can make it as high as you want, but just remember that the number MUST show as a two-decimal number (1.25 = 125% and so on).

D. MORE MATTER FROM CORPSES

By default, the game rules only give a range of 130-170 matter for every corpse (killed Raiders or colonists) delivered to a Refinery by a Doctor. The rules are listed right under the vaporizing objects percentage rule in the GameRules.lua file, and looks like this:

-- matter gained from remains
MAT_CORPSE_MIN = 130,
MAT_CORPSE_MAX = 170,

Again, I don't see this worth tweaking, but you put a lot of love and care (or contempt and headaches) in these now-dead colonists. Plus you might want just compensation for Raider bodies. I suggest this (if you want):

-- matter gained from remains
MAT_CORPSE_MIN = 200,
MAT_CORPSE_MAX = 250,

CLOSE THE WINDOW and run the game.

E. OXYGEN RECYCLER CAPACITY (RECYCLER/COLONIST RATIO)

There's one more tweak that's notable in the GameRules.lua file, and that's OXYGEN RECYCLERS (the rest of the file pertains to the tutorial, full-screen options, game rule metadata and mouse functions - LEAVE THOSE ALONE, unless you want to [for example] change the option to begin the game in a full screen or not).

But for those of you who are SICK AND TIRED of the "one recycler for every three colonists" rule, we can tweak those settings, too. Right under the "--matter gained from remains" entries, there's an entry for the default Life Support system behaviors:

-- life support system
-- (# of recyclers needed to support 1 citizen)
RECYCLERS_PER_CITIZEN = 3,

Why the code is displayed in this manner I don't know, but what it means is that each oxygen recycler placed in your base supports three colonists. Well, once you finish your starter rooms, you're at capacity - then you'll have wannabe colonists banging on your doors, some of them NOT taking "no" for an answer. So let's raise the recycler/colonist ratio to five, like this:

-- life support system
-- (# of recyclers needed to support 1 citizen)
RECYCLERS_PER_CITIZEN = 5,

CLOSE THE WINDOW and run the game.

WARNING: When I tweaked those settings, I had colonists join faster than my recyclers could acomodate. My oxygen drained VERY QUICKLY, so I would advise either NOT tweaking the recyclers until I find a solution or workaround (or just find out what the heck happened) or accept new colonists GRADUALLY. Space out your recyclers, build bigger rooms, don't let colonists congregate so much in the starting rooms (though that can't be helped).

Hope this helps. This is by NO MEANS all of the tweaks one can do in the game, just default rule changes. I plan to start a guide based on this text, and in the guide I'll include tweaks for delaying the dreaded meteor showers, the Mega Fleet attack, lessening the sadness factor when a friend is killed, and several others.

James

Last edited by 76561197991858962; Nov 15, 2014 @ 5:30pm
< >
Showing 1-1 of 1 comments
76561197991858962 Nov 20, 2014 @ 4:24am 
Just as an FYI: for more file alterations, please head over to the guide.
Last edited by 76561197991858962; Nov 20, 2014 @ 4:24am
< >
Showing 1-1 of 1 comments
Per page: 1530 50

Date Posted: Nov 15, 2014 @ 4:00pm
Posts: 1