From 9c920eb34be55a69c751cf5e725516a1ab2c6205 Mon Sep 17 00:00:00 2001 From: wts42 <36044012+wts42@users.noreply.github.com> Date: Wed, 4 Apr 2018 14:48:31 +0200 Subject: [PATCH] Added BizhawkDir variable Added BizhawkDir variable to config for easier setup. Changed absolute paths (C:/Users/..) to use BizhawkDir from config file. --- neat-mario/config.lua | 11 ++++++++++- neat-mario/mario-neat.lua | 4 ++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/neat-mario/config.lua b/neat-mario/config.lua index 011199f..4aa6012 100644 --- a/neat-mario/config.lua +++ b/neat-mario/config.lua @@ -1,8 +1,17 @@ local _M = {} +-- +-- Change BizhawkDir to your BizHawk directory. +-- +--_M.BizhawkDir = "C:/Users/mmill/Downloads/BizHawk-2.2/" +_M.BizhawkDir = "X:/BizHawkLab/BizHawk-2.2.2/" + +_M.StateDir = _M.BizhawkDir .. "Lua/SNES/neat-mario/state/" +_M.PoolDir = _M.BizhawkDir .. "Lua/SNES/neat-mario/pool/" + _M.NeatConfig = { --Filename = "DP1.state", -Filename = "C:/Users/mmill/Downloads/BizHawk-2.2/Lua/SNES/neat-mario/pool/DP1.state", +Filename = _M.PoolDir .. "DP1.state", Population = 300, DeltaDisjoint = 2.0, DeltaWeights = 0.4, diff --git a/neat-mario/mario-neat.lua b/neat-mario/mario-neat.lua index bfe579c..fefd4a2 100644 --- a/neat-mario/mario-neat.lua +++ b/neat-mario/mario-neat.lua @@ -969,7 +969,7 @@ function flipState() end function loadPool() - filename = forms.openfile("DP1.state.pool","C:/Users/mmill/Downloads/BizHawk-2.2/Lua/SNES/neat-mario/pool/") + filename = forms.openfile("DP1.state.pool",config.PoolDir) --local filename = forms.gettext(saveLoadFile) forms.settext(saveLoadFile, filename) loadFile(filename) @@ -1001,7 +1001,7 @@ function onExit() forms.destroy(form) end -writeFile("C:/Users/mmill/Downloads/BizHawk-2.2/Lua/SNES/neat-mario/pool/temp.pool") +writeFile(config.PoolDir.."temp.pool") event.onexit(onExit)