Zechnophobe
Strategy Lich
I'm making a mod, and want to put functions, and functionality, in seperate files from those python files currently located in the game. For instance, a file of ScenarioFunctions that are specific to the mod I'm working on.
I'm not incredibly fluent in python yet, so I'm constantly worried that is where I've made mistake.
This is how I've startded off the file, and I believe it should be accessible from other files by
import ScenarioFunctions
and perhaps doing something akin to
sf = ScenarioFunctions.ScenarioFunctions()
which I've seen in other code, and I'm assuming that calls a default constructor of the class to get a reference to a new one.
Problem is, any of the py files I even import my new class into stop working. What am I doing wrong?
I'm not incredibly fluent in python yet, so I'm constantly worried that is where I've made mistake.
Code:
from CvPythonExtensions import *
import CvUtil
import Popup as PyPopup
import PyHelpers
import CvScreenEnums
gc = CyGlobalContext()
class ScenarioFunctions:
This is how I've startded off the file, and I believe it should be accessible from other files by
import ScenarioFunctions
and perhaps doing something akin to
sf = ScenarioFunctions.ScenarioFunctions()
which I've seen in other code, and I'm assuming that calls a default constructor of the class to get a reference to a new one.
Problem is, any of the py files I even import my new class into stop working. What am I doing wrong?