Advertisement
Civilization Fanatics' Center  

Welcome to Civilization Fanatics' Center.

You are currently viewing our site as a guest which gives you limited access to our site features. By joining our free community, you will be able to participate in the discussions, search the forum, send private messages, vote in polls, upload your own screenshots to the gallery, and access many other special features. Registration is fast, simple and absolutely free, so sign up today! If you have any problems with the registration process or your account login, please contact support.

Go Back   Civilization Fanatics' Forums > CIVILIZATION IV > Civ4 - Macintosh

Notices

Reply
 
Thread Tools
Old Sep 01, 2006, 01:51 AM   #1
Skippy_Kangaroo
Prince of Denmark
 
Skippy_Kangaroo's Avatar
 
Join Date: Jul 2006
Location: Sydney
Posts: 255
Civ4lerts: Polling python pokers please

The Civ4lerts mod looks like it might be really useful. But it gives a number of python errors on loading that look to be related to Windows specific assumptions. (For example, the errors are that it fails to load the _winreg module, because it doesn't exist.)

Would any of the python experts here be able to look at it to see if there is a reasonably easy fix to make this mod Mac compatible?
__________________
"Imperious Cæsar, dead and turned to clay,
Might stop a hole to keep the wind away."
Skippy_Kangaroo is offline   Reply With Quote
Old Sep 01, 2006, 04:10 AM   #2
AlanH
Mac addict, php monkey

 
AlanH's Avatar
 
Join Date: Jan 2003
Location: England
Posts: 25,243
Images: 1
I can have a look later.

The first thing - maybe the main issue - is that it uses that CivPath.py library I mentioned a few weeks ago elsewhere. It provides the directory locations for various parts of the Civ4 installation, and relies on the Windows Registry to provide information.

Looking at the code we could replace the paths it returns with absolute values, but that would not be a universal solution as people have the game installed in different top level folders.

A better way would be to change the CvPath.py code to detect which OS it's running in and, on a Mac, work out how to get the actual paths from OS X's /Library/Receipts info. If we can get this done then we *might* fix a variety of mods in one go.

I'll take a look later today.
AlanH is offline   Reply With Quote
Old Sep 01, 2006, 04:37 AM   #3
Skippy_Kangaroo
Prince of Denmark
 
Skippy_Kangaroo's Avatar
 
Join Date: Jul 2006
Location: Sydney
Posts: 255
Quote:
Originally Posted by AlanH
A better way would be to change the CvPath.py code to detect which OS it's running in and, on a Mac, work out how to get the actual paths from OS X's /Library/Receipts info. If we can get this done then we *might* fix a variety of mods in one go.

I'll take a look later today.
Sounds like that is the first priority.

I'm still busy getting the hang of basic civilization to be too worried about using lots of mods; so there isn't any hurry as far as I'm concerned.
__________________
"Imperious Cæsar, dead and turned to clay,
Might stop a hole to keep the wind away."
Skippy_Kangaroo is offline   Reply With Quote
Old Sep 01, 2006, 01:05 PM   #4
lateralis
Warlord
 
lateralis's Avatar
 
Join Date: Sep 2002
Posts: 203
this thread seems a perfect place to ask this:

the new GOTM supports the hall of fame mod, which I believe has this mod included. obviously, we can't install the HOF mod as is as it's an exe but I was wondering if we can install there various parts separately and if it will work.

given that this mod doesn't work on mac, I'm wondering if others suffer this fate as well and whether to even bother with the other peices.
__________________
"As far as I'm concerned, humans have not yet come up with a belief that's worth believing." -- George Carlin
"Faith is believing in something you know isn't true" --Mark Twain
www.modernatheist.com
lateralis is offline   Reply With Quote
Old Sep 01, 2006, 02:09 PM   #5
AlanH
Mac addict, php monkey

 
AlanH's Avatar
 
Join Date: Jan 2003
Location: England
Posts: 25,243
Images: 1
Sorry, no, you can't install any component parts that involve changing the XMP or Python assets. You have to install the complete HoF Mod, or the GOTM start file for HoF will throw an error.

The problem of Mac incompatibility is one of the key reasons we kept the HoF Mod optional.
AlanH is offline   Reply With Quote
Old Sep 01, 2006, 02:20 PM   #6
lateralis
Warlord
 
lateralis's Avatar
 
Join Date: Sep 2002
Posts: 203
ok

but seriously, what are you people trying to do to us newbies? IMMORTAL??!!? I couldn't even win the emperor on adventurer!
__________________
"As far as I'm concerned, humans have not yet come up with a belief that's worth believing." -- George Carlin
"Faith is believing in something you know isn't true" --Mark Twain
www.modernatheist.com
lateralis is offline   Reply With Quote
Old Sep 01, 2006, 03:32 PM   #7
AlanH
Mac addict, php monkey

 
AlanH's Avatar
 
Join Date: Jan 2003
Location: England
Posts: 25,243
Images: 1
Hey! The newbies in the Mac forum are in a very small minority. Most of the GOTM players have been around for a while! I didn't even see the requisite 10 Mac players sign up to force me to play the last one
AlanH is offline   Reply With Quote
Old Sep 01, 2006, 08:18 PM   #8
AlanH
Mac addict, php monkey

 
AlanH's Avatar
 
Join Date: Jan 2003
Location: England
Posts: 25,243
Images: 1
[Update]

I've worked out a change to CvPath.py that appears to get Civ4lerts working.

See this post in the original mod thread for details and to grab a copy of the modified file. Please let me know if it works OK for you.
AlanH is offline   Reply With Quote
Old Sep 01, 2006, 10:00 PM   #9
Skippy_Kangaroo
Prince of Denmark
 
Skippy_Kangaroo's Avatar
 
Join Date: Jul 2006
Location: Sydney
Posts: 255
Seems to work for me.

No errors in the python log file and alerts on gold per turn available for trade. I haven't seen all the other alerts but thought I'd give you the quick feedback.

Thanks!

(Assuming no errors are found, it would seem best to post the Mac version - i.e. with your modified CivPath file - in the Mac mods thread here rather than making people collect it from two places and combine themselves. But I'll leave that to your discretion.)
__________________
"Imperious Cæsar, dead and turned to clay,
Might stop a hole to keep the wind away."
Skippy_Kangaroo is offline   Reply With Quote
Old Sep 02, 2006, 03:18 AM   #10
AlanH
Mac addict, php monkey

 
AlanH's Avatar
 
Join Date: Jan 2003
Location: England
Posts: 25,243
Images: 1
I wanted to give the feedback to the developer on CvPath.py, as it's used on multiple mods, I believe. I too only checked as far as the gpt trade options in a late game and so it also needs more testing. I'll do some more testing and then post a "how to" here.
AlanH is offline   Reply With Quote
Old Sep 03, 2006, 05:38 PM   #11
Skippy_Kangaroo
Prince of Denmark
 
Skippy_Kangaroo's Avatar
 
Join Date: Jul 2006
Location: Sydney
Posts: 255
Some further feedback.

The mod seems to be working properly. I have seen pretty much all of the alerts and editing the ini file to change alert thresholds. I haven't tried turning alerts on and off.

And in terms of the user experience I find it to be very useful warning me about unhappiness and who has lots of gold available for trade. (I tend to ignore unhealthiness.)

Note for people who might wonder: Put the Civ4lerts.ini file at the top level of your Custom Assets folder. (What happens if you don't?)
__________________
"Imperious Cæsar, dead and turned to clay,
Might stop a hole to keep the wind away."
Skippy_Kangaroo is offline   Reply With Quote
Old Sep 03, 2006, 07:36 PM   #12
AlanH
Mac addict, php monkey

 
AlanH's Avatar
 
Join Date: Jan 2003
Location: England
Posts: 25,243
Images: 1
Have you had any occasions when the correct text for a city growth event was replaced by a tag value, with no city name or population figure? It seems to do this intermittently for me.
AlanH is offline   Reply With Quote
Old Sep 03, 2006, 07:44 PM   #13
Skippy_Kangaroo
Prince of Denmark
 
Skippy_Kangaroo's Avatar
 
Join Date: Jul 2006
Location: Sydney
Posts: 255
Quote:
Originally Posted by AlanH
Have you had any occasions when the correct text for a city growth event was replaced by a tag value, with no city name or population figure? It seems to do this intermittently for me.
This hasn't occurred to me so far.

The game I have been playing has been mostly peaceful - could razings or other war related events be causing some confusion with the internal data structures?
__________________
"Imperious Cæsar, dead and turned to clay,
Might stop a hole to keep the wind away."
Skippy_Kangaroo is offline   Reply With Quote
Old Sep 03, 2006, 08:04 PM   #14
AlanH
Mac addict, php monkey

 
AlanH's Avatar
 
Join Date: Jan 2003
Location: England
Posts: 25,243
Images: 1
Nah! I don't actually have time to *play* this game! This is within about 20 turns of the start - early growth events in my first town.
AlanH is offline   Reply With Quote
Old Sep 03, 2006, 10:35 PM   #15
Skippy_Kangaroo
Prince of Denmark
 
Skippy_Kangaroo's Avatar
 
Join Date: Jul 2006
Location: Sydney
Posts: 255
Another oddity that may just be the way it works.

It doesn't seem to cache the XML involved in the mod. That is, on every startup I get the delay while it goes through XML (uncached). Previously I found Civ only did this for the first startup and then managed to cache everything and speed the startup. Does this happen to others? Should I check my access privileges?
__________________
"Imperious Cæsar, dead and turned to clay,
Might stop a hole to keep the wind away."
Skippy_Kangaroo is offline   Reply With Quote
Old Sep 04, 2006, 03:26 AM   #16
AlanH
Mac addict, php monkey

 
AlanH's Avatar
 
Join Date: Jan 2003
Location: England
Posts: 25,243
Images: 1
Yes, I get that now as well. I can't see how your privileges could be wrong, or could affect it, though. Maybe it never caches mods? Maybe worth asking Dr Jiggle whether this is how it works on a PC.
AlanH is offline   Reply With Quote
Old Sep 04, 2006, 08:20 AM   #17
lateralis
Warlord
 
lateralis's Avatar
 
Join Date: Sep 2002
Posts: 203
I don't know if this will help anyone but I remember reading that holding shift while starting up would cause the XML to go from cached to uncached. back when we were trying to eek every last bit of performance from civ 4, I tried this and ever since, civ4 seems to just randomly decide whether to be cached on uncached with no rhyme or reason. sometimes cached, sometime no.

no idea why.
__________________
"As far as I'm concerned, humans have not yet come up with a belief that's worth believing." -- George Carlin
"Faith is believing in something you know isn't true" --Mark Twain
www.modernatheist.com
lateralis is offline   Reply With Quote
Old Sep 05, 2006, 09:21 AM   #18
lateralis
Warlord
 
lateralis's Avatar
 
Join Date: Sep 2002
Posts: 203
question for the python people:

I'm trying to merge ci4lerts into a custom assets folder which apparently already has some modified files that would be replaced: specifically see below:

Code:
import CvUtil
import CvCustomEventManager
from CvPythonExtensions import *

normalEventManager = CvCustomEventManager.CvCustomEventManager()

def getEventManager():
	return normalEventManager

def onEvent(argsList):
	'Called when a game event happens - return 1 if the event was consumed'
	return getEventManager().handleEvent(argsList)

def applyEvent(argsList):
	context, playerID, netUserData, popupReturn = argsList
	return getEventManager().applyEvent(argsList)

def beginEvent(context, argsList=-1):
	return getEventManager().beginEvent(context, argsList)
Code:
import CvCustomEventManager

# **********************************
# GJD modifications start here
# **********************************

customEventManager = CvCustomEventManager.CvCustomEventManager()

def getEventManager():
    return customEventManager

# **********************************
# GJD modifications end here
# **********************************

def onEvent(argsList):
    """Called when a game event happens - return 1 if the event was consumed."""
    return getEventManager().handleEvent(argsList)

def applyEvent(argsList):
    context, playerID, netUserData, popupReturn = argsList
    return getEventManager().applyEvent(argsList)

def beginEvent(context, argsList = -1):
    return getEventManager().beginEvent(context, argsList)
it looks like file #1 (current custom assets folder) has these
import CvUtil
import CvPythonExtensions Import *
whereas the second doesn't

there is then the customEventManager instead of the normalEventManager. Have I bitten off more than I can chew here? I know NOTHING about python although I do a fair bit of php and actionscript for a living so code in general is no issue, but I'm lost here.
__________________
"As far as I'm concerned, humans have not yet come up with a belief that's worth believing." -- George Carlin
"Faith is believing in something you know isn't true" --Mark Twain
www.modernatheist.com
lateralis is offline   Reply With Quote
Old Sep 05, 2006, 09:32 AM   #19
AlanH
Mac addict, php monkey

 
AlanH's Avatar
 
Join Date: Jan 2003
Location: England
Posts: 25,243
Images: 1
I reckon those two files have exactly the same results.
AlanH is offline   Reply With Quote
Old Sep 06, 2006, 01:29 PM   #20
Josh Wolf
Chieftain
 
Join Date: Jul 2006
Posts: 16
I installed this mod, with the Mac-specific CivPath.py change, and it works perfectly for me. I also have TAM installed, which may have dropped in some base libraries you're missing.
Josh Wolf is offline   Reply With Quote
Reply

Bookmarks

Go Back Civilization Fanatics' Forums > CIVILIZATION IV > Civ4 - Macintosh > Civ4lerts: Polling python pokers please

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Civ4lerts ruff_hi Civ4 - BTS Unaltered Gameplay (BUG, BAT and BULL) 45 Mar 29, 2010 05:20 PM
Annoying Civ4lerts apenpaap Civ4 - Revolution Modpack 6 Feb 06, 2009 11:33 AM
Request: Civ4lerts for BtS OneBinary Civ4 - General Discussions 4 Sep 03, 2007 02:10 PM
[BtS] [Python(?)] Taskmaster: Civ4lerts + Reminders = True Stormreaver Civ4 - SDK/Python 1 Jul 26, 2007 05:39 PM
Civ4lerts: Mod Does Not Work Cervus Civ4 - Creation & Customization 2 Oct 28, 2006 07:22 AM


Advertisement

All times are GMT -6. The time now is 11:37 AM.


Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
This site is copyright © Civilization Fanatics' Center.
Support CFC: Amazon.com | Amazon UK | Amazon DE | Amazon CA | Amazon FR