(39) 's Extra Blueprint Nodes for You as a Plugin, No C++ Required!

Hi - I think it would be handy for built applications to have some kind of handle on where the .exe file is, then you can either build a path relative to that. I tried to make a python script which did that and wrote it to the game.ini file but it didn’t seem to write it in a format which your INI reader liked - it couldn’t find either the section or the var - I don’t know which. Here’s my python code (which I was going to turn into an exe which ran in a bat)



#!/usr/bin/env python

import os
import ConfigParser
here = os.getcwd()

qDir = here + "\Questions"
inFile = here + "\Tower_A\Saved\Config\WindowsNoEditor\Game.ini"

print qDir
print inFile

config = ConfigParser.SafeConfigParser()
config.add_section('QuestionPath')
config.set('QuestionPath','questionFolder', qDir)

with open (inFile, 'wb') as configfile:
    config.write(configfile)


Like i said - it works but the ini reader doesn’t like it (I only had a quick go at it)