[mod] Log changes

I'll try it tonight.
 
ok I may just be stupid. But I put the files where the readme directed and now I get an error message as civ4 boots up... 'failed to load python module cvEventInterface'

any ideas on what I'm doing wrong?
 
You may be stupid, but this error is not evidence of it. :) There are a lot of things that could be causing this problem, but I'm guessing it's a path situation. Did you set the varaible "path" in autolog.py to a valid directory on your computer? (The easiest way to do this IMHO is to navigate to the directory you want to use in Windows Explorer and then select the directory tree from the address bar and copy it to the clipboard with Ctrl+C. Then paste into the correct place and add an extra backslash every place there already is one, so that it looks like "C:\\civ4" instead of "C:\civ4".) If you are absolutely certain that you have entered a correct path, try another directory -- something shorter if the path is pretty long (as the default one is). Let me know if that doesn't fix your problem.
 
I tried it out and suffered a quick lost to egypt (intential) to test this out. I guess it worked but My game's not set up to autosave every turn. Anyone know how to change that?


EDit::: it's still not working. I played another game a little longer and saw that it was autosaving and also I saved it manually a couple of times. It didn't create the log. I'm not sure what I did wrong.
 
Autosave options are in CivilizationIV.ini (in My Documents\My Games\Sid Meier's Civilization 4\). As for why it's not working, did you get the new in-game events? (city growth, for example)? Did Ctrl+E and Alt+E open popups? If not, there was a problem with the install. If so, I suspect a path problem. I just realized that python needs path variables to have two backslashes between directories. The weird thing is my default entry only has single backslashes but still works OK. Try something simple like path = "C:\\" and see if that works. If so, you should be able to make it work with the directory you want to use. If not, let me know and I'll take another look at it.
 
Guys, the idea so great! :goodjob:

After I saw it, how simple it is to make things like this, i tried to extend the eotinb's logger with the score.
My last info is that nobody knows exactly how the scoring system works, maybe it could help.

See the attached picture, it shows how game scores and victory scores change.

Diagrams like this can be easily made with the extended logger.
Note that you have to give two text file names: one for the event logger (eotinb's) and one for the score logger.

Hope it helps somebody! :crazyeye:
 

Attachments

  • zotyesz_autolog_exp.zip
    14.6 KB · Views: 250
  • Example.JPG
    Example.JPG
    41.8 KB · Views: 306
Yep, it works fine. I had the same error message the first time, but when I turned on error logging in Docs\My Games\Civilization 4\Civ4 config file, I realized that the path was not okay.
I think it ended with a '\' when I set the path first time. Maybe python didn't like it? :confused: Dunno, but now it works for me. :)
Yeah, checked it. With a '\' at the end it gives the error, must be the problem in most cases! :king:
Eotinb, if you improve your mod, what do you think, score logging can be useful?
 
I'll try this later. I have to go now.
 
Zotyesz said:
My last info is that nobody knows exactly how the scoring system works, maybe it could help.

See the attached picture, it shows how game scores and victory scores change.
Actually It isnt hard to figure out how the score system works.. its all in python code in CvGameUtils.py and CvUtil.py
 
I reinstalled civ4 to start clean. I followed instructions above. All of the pop-ups activate and I the file is created, but nothing gets added. One time the 4000BC stuff was added but nothing else.

The fact that it's adding the file tells me that the path is correct and the pop-ups are telling me that it (at least that module) loaded correctly. I'm lost. Not sure what else to do.

Any other ideas?
 
This is (potentially - will test it later) the best thing since sliced bread. My hat is well and truly off to you.
 
I think that it's working now. Apparently checking it while the game is in progress doesn't work. I just re-opened it and there were a ton of turn in there. Thanks a lot for the help :worship: .
 
Sweeeeeet! This mod will be handy for anyone who wants to annotate game turns for instruction, bragging, cooperative play or competitive play.

My suggestion was:

My idea is for you Python hackers. There is already a game log function in the UI. Perhaps someone can add a turnlog user form UI to the game for QSCs, SGs and turnlog-style storytellers. The game knows what year it is and what events are happening, so just direct the log or portions of the log (techs, religions, new cities, production, new civs met, etc.. standard QSC stuff) to a text, HTML or XML file along with (optional) freeform text input from the user for comments on that turn.

Lucky-special bonus points for:
* Integrating screenshots
* XML-XSLT translation to any or all of: HTML, text, forum vB code, OpenDocument
* Theme-able stylesheets

Here is a screenshot of the log in-game; some of the green entries were typed in by the player (from eotinb's eo2 SG):



Thanks for credit on the idea, although I'll concede it's an obvious idea for anyone who's played and SG and has an inkling of CivIV's features and programming capability.
 
Tubby Rower said:
I think that it's working now. Apparently checking it while the game is in progress doesn't work. I just re-opened it and there were a ton of turn in there. Thanks a lot for the help :worship: .
I guess I should have mentioned that -- I'll change the readme so no one else has the same problem. Sorry you re-installed. :(
 
Gyathaar said:
Actually It isnt hard to figure out how the score system works.. its all in python code in CvGameUtils.py and CvUtil.py

I saw the python code, but I was not able to tell that only population counts! If you knew, I raise my hat to you. :goodjob:

This chart shows it, I was a bit surprised. :eek:
(How can I include a pic in the message body?:blush:)
 

Attachments

  • Victory Score.JPG
    Victory Score.JPG
    27.9 KB · Views: 495
I installed and ran this afternoon; works fine (great in fact!). Only thing I had to do was verify the directory was accurate. Great work! :goodjob: :goodjob:
 
Zotyesz said:
I saw the python code, but I was not able to tell that only population counts! If you knew, I raise my hat to you. :goodjob:
This is mainly because population has a score modifier of 5000, land and tech just has 2000, and wonders just 1000.

This means that if you have max pop, max land, all techs (or enough furure techs to make up for the loss of the ones you lack from earlier ages), and all the wonders.. you can have a total of 10000 score (without the victory bonus), and half of this is from population..

However, it is much to early get a large fraction of the max score from population than for the other parts.. for a game that makes it into modern/future ages the tech part will take a good size of the score too. (ancient ages techs are worth 1 points each, classical ages ones 2 points, up to 6 points each for modern and 7 points for future techs.. up to a total of 300 points)

You also only get score for land tiles (water ones dont count), so that makes land score harder to get too.

For victory bonus, the pop part get an extra boost too because initial population is counted as 1, and initial land is counted as 21, so the ratio between max pop and initial pop much higher than max land/initial land.. and shews the calculation even further for population

All this assumes that the default values has not been modded ofcourse.
 
Top Bottom