[PYTHONCOMP] Civ4lerts: Alert messages about in game events

Ok step one, I have it pointing to a hard coded ini file correctly now and its working....

Its not working with the CvModName Stuff.....
BUT! I think I can get that to work real quick.... I think there is a secondary issue with one of my ini files...


Ok I see the issue there its the comments.... I think I've got it...

What the hell was the root cause of all this mess?.... the reg key?
 
Houston we have another problem....

These lines are added into the ini file of the mod when the mod is launched if I remove them just put them back my work around was to edit them to have the # as the comment tag, but this could give molders fits later on down the road.
Also the file you sent me did not have these lines so they where added in...
So well you will see what i mean...

Code:
; Skip Main menu
SkipMainMenu = 0

; Custom Art from user folder is not loaded
NoCustomArt = 0

; Custom XML and Python from user folder are not loaded
NoCustomAssets = 0

; No Custom Scenario option in main menu
NoCustomScenario = 0

; No team play allowed
NoTeams = 0

; Always start in the standard era
ForceStandardEra = 0

; Scenario file (Single player)
ForceScenario = 0

Obviously the work around is to change the ; into a # but it could pop back up down the road...

None the less though its a much lower severity issue than the one we have been dealing with... ITS WORKING!!!!! :goodjob:
 
Yes, the reg key was the main reason it failed on your end. Also, I misunderstood what you had posted a bit earlier, thinking that you wanted the INI file to go inside CustomAssets/Assets rather than next to it.

The new ";" comments get added by Civ4 and will break how we load the INI file. Just change them to "#". When I post a new BUG version, I'll include a newly-checked INI file that has all the needed sections (missing sections cause the options screen to not close) and Civ4 BtS variables.

Phew! Glad it's working though. It's much easier to modify a working version to tweak exactly how it should work.
 
Sweet! :goodjob:

When I get some FreeTime(tm) I'll see about making configobj.py handle ";" comments. However, I think new versions of BtS are unlikely to add more variables, so we should be good until the next expansion. :)
 
Well this now makes it a must have framework mod as well as its initial goals so I think the day we spent bashing our heads into the computer was good.

I'm very happy its working.

So we have a .6a on both of our machines that work we should prob release it to the group.... Almost in time for source control YAY! :)
 
Indeed, and thanks for your help. :goodjob:

Is this going to work for others that have Civ 4 Gold now, or do we need to include instructions for modifying the registry key value specified in CvPath.py?

New version is released in BUG thread for anyone curious.
 
Our changes to the initial changes should cover it.....
 
I still have no idea how to use the bloody thing. Your all the classic example of a computer geek, now excuse me as I've had a few beers, but stop showing how f@#$ing clever you are and tell me how to load the flippen thing in warlords.
 
I've been doing some tests and there is a easy way to get the install directory other then using the reg key.

Code:
def _getInstallDir():
    civ4Dir = os.getcwd()
    return civ4Dir

os.getcwd() will return the directory that the main program file is run from, which in the case of civ is the install directory.

So
Code:
os.path.join(_getInstallDir(), "Mods")
Would give you the mods directory and you could then join the mod name from CvModName.py to that and bam there is your config.ini file and no worries about regkeys. :)
 
Just FYI, if you avoid using registry keys you are more likely to make a mod that works on a Mac as well.

os.getcwd() works fine, and I've used it myself to adapt mods to run the Mac.
 
Can anyone tell me what folder u put it in in BTS. i heard u can play it on BTS and i put it in the custom assets folder but it doesn't work
 
I've used this mod component for a long time, but editing the Civ4lerts.ini file doesn't seem to work as it should. I can't seem to change the various settings so that the game alerts me at other moments then the standard values in the ini-file.

Can someone help me to get this to work as intended?
 
There is no BtS release for the Mac yet, and there's been no announcement since Firaxis said they intended to negotiate a Mac port during an early chat conference. Is BUG capable of being used with vanilla and/or Warlords?
 
No Mac version yet? That's a mighty big user base that Firaxis is ignoring. I don't think it's compatible with either version because of the new features of BTS. Thanks for the reply though!
 
I don't know if they are ignoring Mac users, though they *are* pretty good at making their software difficult to port. As I said, they did state their intention of making BtS available for Mac OS.

Maybe they can't reach a deal with Aspyr, the publishers of the other versions. Or maybe they have reached a deal, but Aspyr aren't ready to announce it yet. :shrug:
 
I've used this mod component for a long time, but editing the Civ4lerts.ini file doesn't seem to work as it should. I can't seem to change the various settings so that the game alerts me at other moments then the standard values in the ini-file.

Can someone help me to get this to work as intended?

I'm still having problems changing the settings of this mod in the Civ4lerts.ini file. If you change the values in the ini-file, then this seems to have no effect at all on the warnings the modcomponent gives you in a game. For instance, I changed the values of [Gold Trade] and [Gold Per Turn Trade] to Enabled = False, but I still get messages in the game when someone has a lot of gold or gold per turn available for trading. Is the link between the ini-file and the rest of the mod not working properly? Can someone help me to let this work as intended?
 
Download BUG guys. You can set up the INI through options within the game, even set up alerts for Gold and GPT not to trigger unless they are of a certain amount.

Just follow the link in my sig.
 
Back
Top Bottom