I tend to get lazy and only update mods if I'm currently playing the game. Feel free to update this mod and upload elsewhere if I haven't kept it up to date. It's a dead simple mod (provided you already know how to pack mods and such) within NMS_REALITY_GCTECHNOLOGYTABLE.MBIN * Search for text LAUNCHER_SUBTITLE.LAUNCHER_DESCRIPTION * Look for the next 'DESCRIPTION' text * Before that text, there should be a bunch of 0x00 and then an 0x01 and two bytes. Those two bytes are the IEEE 754 float value of the launch cost (note the bytes are reversed when saved in the file. e.g to save a value of 50 which has an IEEE 754 value of 0x4248, you'd need to save in to the file 48 42) * Edit that IEEE 754 float value as desired and save.
e.g. For NMS v1.52 the float value is located at offset 24432 with a value of (48 42) (50 in decimal)
Here's a python script I use to automatically make the pak files. Requires psarc.exe in the PCBANKS folder and assumes the relevant MBIN is always in the NMSARC.515F1D3.pak
import sys from subprocess import call
# Extracts latest NMS_REALITY_GCTECHNOLOGYTABLE.MBIN and creates all the # variant paks for ReducedLaunchCost and ReducedWarpCost (as well as the merged versions) # # Note: A hardcoded byte offset is used, this may change from release to release # Run in a subdir of PCBANKS
# Merges byte changes from Reduced Launch Cost and Reduced Warp Cost variants # and produces all the possible packed combinations of them (3 x 4) # Run in the PCBANKS/out folder
def check_bytes(offset, bites): with open(mbin, "r+b") as fh: fh.seek(offset) cur_bytes = bytearray(fh.read(len(bites))) for i in range(0, len(bites)): if cur_bytes[i] != bites[i]: return False return True
def write_bytes(offset, bites): with open(mbin, "r+b") as fh: fh.seek(offset) fh.write(bytes(bites))
def make_mod(hc): for e in hc.entries: print 'Writing '+str([hex(c) for c in e.bites])+' to '+str(hc.offset) write_bytes(hc.offset, e.bites) file_name = '%s_%s.pak' % (hc.name, e.name) print 'Making %s' % file_name call([psarc, 'create', '-y', '-o'+file_name, mbin]) write_bytes(hc.offset, hc.orig)
extract_mbin() mods = [rlc, rwc]
for mod in mods: if not check_bytes(mod.offset, mod.orig): print mod.name + ' original bytes have changed, check the MBIN manually' sys.exit(1) else: make_mod(mod)
for l in rlc.entries: for w in rwc.entries: write_bytes(rlc.offset, l.bites) write_bytes(rwc.offset, w.bites) file_name = '%s_%s_and_%s_%s.pak' % (rlc.name, l.name, rwc.name, w.name) print 'Making %s' % file_name call([psarc, 'create', '-y', '-o'+file_name, mbin])
Keeping this mod updated (2 comments)
Comments locked
The author has locked this comment topic for the time beingIt's a dead simple mod (provided you already know how to pack mods and such) within NMS_REALITY_GCTECHNOLOGYTABLE.MBIN
* Search for text LAUNCHER_SUBTITLE.LAUNCHER_DESCRIPTION
* Look for the next 'DESCRIPTION' text
* Before that text, there should be a bunch of 0x00 and then an 0x01 and two bytes. Those two bytes are the IEEE 754 float value of the launch cost (note the bytes are reversed when saved in the file. e.g to save a value of 50 which has an IEEE 754 value of 0x4248, you'd need to save in to the file 48 42)
* Edit that IEEE 754 float value as desired and save.
e.g. For NMS v1.52 the float value is located at offset 24432 with a value of (48 42) (50 in decimal)
import sys
from subprocess import call
# Extracts latest NMS_REALITY_GCTECHNOLOGYTABLE.MBIN and creates all the
# variant paks for ReducedLaunchCost and ReducedWarpCost (as well as the merged versions)
#
# Note: A hardcoded byte offset is used, this may change from release to release
# Run in a subdir of PCBANKS
# Merges byte changes from Reduced Launch Cost and Reduced Warp Cost variants
# and produces all the possible packed combinations of them (3 x 4)
# Run in the PCBANKS/out folder
mbin = "METADATA/REALITY/TABLES/NMS_REALITY_GCTECHNOLOGYTABLE.MBIN"
mbin_pak = '../NMSARC.515F1D3.pak'
psarc = "../psarc.exe"
class HexEntry:
def __init__(self, name, bites):
self.name = name
self.bites = bites
class HexChange:
def __init__(self, name):
self.name = name
self.offset = 0
self.entries = []
self.orig = None;
rlc = HexChange('ReducedLaunchCost')
# 0x24432 148530
rlc.offset=148530
rlc.orig = bytearray([0x48, 0x42])
rlc.entries.append(HexEntry('50', bytearray([0xC8, 0x41])))
rlc.entries.append(HexEntry('25', bytearray([0x48, 0x41])))
rlc.entries.append(HexEntry('0', bytearray([0x00, 0x00])))
rwc = HexChange('ReducedWarpCost')
# 0x245AE 148910
rwc.offset=148910
rwc.orig = bytearray([0x80, 0x3F])
rwc.entries.append(HexEntry('2', bytearray([0x00, 0x40])))
rwc.entries.append(HexEntry('4', bytearray([0x80, 0x40])))
rwc.entries.append(HexEntry('8', bytearray([0x00, 0x41])))
rwc.entries.append(HexEntry('16', bytearray([0x80, 0x41])))
def extract_mbin():
call([psarc, 'extract', '-y', '--to', '.', '--input', mbin_pak, mbin])
def check_bytes(offset, bites):
with open(mbin, "r+b") as fh:
fh.seek(offset)
cur_bytes = bytearray(fh.read(len(bites)))
for i in range(0, len(bites)):
if cur_bytes[i] != bites[i]:
return False
return True
def write_bytes(offset, bites):
with open(mbin, "r+b") as fh:
fh.seek(offset)
fh.write(bytes(bites))
def make_mod(hc):
for e in hc.entries:
print 'Writing '+str([hex(c) for c in e.bites])+' to '+str(hc.offset)
write_bytes(hc.offset, e.bites)
file_name = '%s_%s.pak' % (hc.name, e.name)
print 'Making %s' % file_name
call([psarc, 'create', '-y', '-o'+file_name, mbin])
write_bytes(hc.offset, hc.orig)
extract_mbin()
mods = [rlc, rwc]
for mod in mods:
if not check_bytes(mod.offset, mod.orig):
print mod.name + ' original bytes have changed, check the MBIN manually'
sys.exit(1)
else:
make_mod(mod)
for l in rlc.entries:
for w in rwc.entries:
write_bytes(rlc.offset, l.bites)
write_bytes(rwc.offset, w.bites)
file_name = '%s_%s_and_%s_%s.pak' % (rlc.name, l.name, rwc.name, w.name)
print 'Making %s' % file_name
call([psarc, 'create', '-y', '-o'+file_name, mbin])