View Full Version : BTS Unaltered Gameplay Project
alerum68 Aug 02, 2007, 08:11 PM The BUG Project
(http://sourceforge.net/project/platformdownload.php?group_id=202755)
BTS Unaltered Gameplay, or BUG, is a modification code for Civilization IV: BTS. CIV is a very easy game to modify, but not all modifications are compatible with each other. In an effort to combines these many different Mods from the Civ community, into one concise program, the BUG project was born.
BUG combines mods that do not change the basic game play of CIV, while adding flavor and ease of use. Some aspects that we feel are within this criteria are Advisor Screens, City View Screen, the Main View Screen, the Civopedia, as well as the way units may look but not the way they play. Also, any addition or changes made, will not provide any information that cannot be figured out within the game itself.
We feel this MOD is safe for use in any Succession Games, even if the Succession Game being played is running off another Mod. If you find any changes within the code that modify games play, please post a message to us here, or on the Project Development link listed below, and we will make it of the utmost important to fix the problem.
If you would like to have your Mod added, please visit the Project Development page on SourceForge.
Current version: 0.15
Current Flavor version: 0.05
Download Here (http://sourceforge.net/project/platformdownload.php?group_id=202755)
Project Development Page: http://sourceforge.net/projects/civ4bug/
MODs added:
•Option Switching Core by ruff_hi and EmperorFool.
•Main Screen Interface
*Not Just Another Game Clock TheLopez
*Remove Dead Civs from Score by TheLopez
*Power rating in Score by EmperorFool
*Attitude Icons by Porges
•Pop-up Game Messages
*Civ4lerts by Dr. Elmer Jiggle
*Reminders by Eotinb
*Autologger by Eotinb
*Extended Colors by SimCutie
•Advisor Screens
*Better Espionage Screen by Almightix
*Sevopedia by Sevo
*Great Person Tech Preferences by ruff_hi
*Custom Domestic Advisor
•City Screen
*Specialist Stacker by TheLopez
*Raw Commerce by Sevo
*Raw Production by EmperorFool
•Flavor Modifications:
*Ethnically Diverse Units & Cities
*Better Ship Scale
*Better Diplomacy Text
Current Todo List:
Python to Add
1a) Cammango's 30 pages of menus for CDA
2) Enhanced Military Advisor *Or devise our own improved Military Advisor*
3) ShowInfo MOD
4) (Renaming Mod)Real Military Ranking
5) Snippets from Plot List Enhancment
6) Unit Renaming by TheLopez
i.Roman Numeral Naming by sen2000
ii.City Naming by Porges
iii.Random Names by TheLopez
iv.City Naming and Numbering Porges
v.Borg Naming by ruff_hi
XML to add:
1) Civ Based Great Person MOD - Removed until updated to Python.
2) Hints & Tips
Ideas for improvements:
1) Combat Experience Counter
2) Hall of Fame win / lose
3) Adding Notes to Units
4) Alert when a AI goes "we have enough on our hands"
5) Making tabs inside Options screen CDA text file placed in Custom Assets Directory.
6) Page up/down, extra info in Glance Page
7) Develop FAQ
8) Give Options for how many Civs are displayed in score.
9) Updating Alerts to include SG events of interest.
10) Add Mac fix
11) Add Rival EP in Espionage Screen
12) After Build Calculator
13) After Revolution Calculator
Devlopers:
Alerum68 (http://forums.civfanatics.com/member.php?u=40475)
Cammagno (http://forums.civfanatics.com/member.php?u=74513)
EmperorFool (http://forums.civfanatics.com/member.php?u=111657)
Ket (http://forums.civfanatics.com/member.php?u=96357)
NikNaks93 (http://forums.civfanatics.com/member.php?u=96170)
ruff_hi (http://forums.civfanatics.com/member.php?u=64034)
alerum68 Aug 02, 2007, 08:21 PM I think the most important thing we need to start with is making a core MOD that will allow us add on to it. I have been out of the loop for so long that I'm not sure if this has been done yet, but if everyone built off my MOD then it's a very loose group of MODs that fit together about as well as a round hole and an oval peg... need to pound it really hard.
As Ket said, I think having optional features is not just nice, but it will be essential. As long as we do that, I don't see why we can't add EVERY MOD that doesn't change gameplay, even ones that may do opposite things. This was my original dream for my MOD, but didn't have the coding Skills. With EF in the mix, we should be able to do this no problem. I like the INI Parser, but from what I remember it was Somewhat buggy. Has that been smoothed out?
Alright, so it's time to start searching for forums for ALL the MODs that will fit into the following criteria: Changes cannot be made that will make game play vary from BTS Vanilla. Other then that, all is fair game.
Now the Core... EF, could you code this yourself to fit our needs, or do you think there is a way to use somethnig already out?
If anyone wishes to contact me, my username on AIM is a-l-e-r-u-m-6-8 without the dashes.
ruff_hi Aug 02, 2007, 08:33 PM I've had YES from Ket, Alerum and EmperorFool.
I PM'd thunderfall and asked for a folder under the Civ4 - Project & Mod Development (http://forums.civfanatics.com/forumdisplay.php?f=215) folder, no answer yet. We should probably move this thread there but also have a bunch of other threads to discuss various options.
I build my v2 from scratch with the aim of making things optional (as much as possible). I think that the first thing we should do is list all the mods that we could add. There are some that Warlords has superceded (unit wrap on the main interface being one) that we probably don't need.
The ini file is probably the best place to start ... I would suggest Gaurav's mod to my mod that allowed for the mod to be placed anywhere. We should lift the core system from there.
ruff_hi Aug 02, 2007, 08:35 PM Do we need a name for this mod? How about ... BtS Unaltered Gameplay Mod. That way we can call it the BUG mod! One question: what do we do about DLL changes that people want to add (better AI, Unit Stats, etc).
alerum68 Aug 02, 2007, 08:43 PM I like BUG.;) I don't want this mod to have any elements that will change stats, or better AI, or anything like that. It has to stay 100% unaltered gameplay. Even a +1 increase on a stat will ruin the aim here.
Another thing... what version will we work off of BTS? I think it should be the original version for at least 3-4 months. By then a patch should be out that will stick around for a while, instead of patches every few weeks.
ruff_hi Aug 02, 2007, 09:01 PM I don't want this mod to have any elements that will change stats, or better AI, or anything like that. It has to stay 100% unaltered gameplay. Even a +1 increase on a stat will ruin the aim here.Totally agree. However, some bright spark will ask about this and that and we should be able to test / comment on compatibility.
alerum68 Aug 02, 2007, 09:04 PM http://forums.civfanatics.com/showthread.php?t=234499&highlight=Beyond+the+Sword
humm... this is a script that updates VinCiv4 mods to BTS.
alerum68 Aug 02, 2007, 10:02 PM A list to get us started....
http://forums.civfanatics.com/showthread.php?t=157141 - Python utility Library. Another good option to start work from. I think it's more basic then the Great Options MOD, and will not have as many options not used as with the first.
+http://forums.civfanatics.com/showthread.php?t=144623 - Autolog and Reminders
+http://forums.civfanatics.com/showthread.php?t=157088 - Civ4 Alerts
http://forums.civfanatics.com/showthread.php?t=167023 - Dead Civ Scoreboard
http://forums.civfanatics.com/showthread.php?t=158137 - Not Just Another Game Clock
+http://forums.civfanatics.com/downloads.php?do=file&id=523 - Customizable Domestic Advisor
+http://forums.civfanatics.com/showthread.php?p=3499585#post3499585 - Cammango's 30 pages of menus for CDA. May not use all of them, but is a great core to take from regardless.
-http://forums.civfanatics.com/showthread.php?t=169549 - Enhanced Military Advisor
http://forums.civfanatics.com/showthread.php?t=169549 - Sevopedia * This will be a big project since I think we're going to have to update alot of information to make up for the BTS changes, but is a must have.
http://forums.civfanatics.com/showthread.php?t=234523 - (BTS Already) Better Espionage Screen
http://forums.civfanatics.com/showthread.php?t=158002 - Raw Commerce City Display (If this give info that can't be figured out by searching around and doing alot of adding, we shouldn't add it.)
http://forums.civfanatics.com/showthread.php?t=202050 - Great Person MOD
http://forums.civfanatics.com/showthread.php?t=164589 - ShowInfo MOD
http://forums.civfanatics.com/showthread.php?t=204073 - unit Formations
http://forums.civfanatics.com/showthread.php?t=181857 - Diplomacy Text
http://forums.civfanatics.com/showthread.php?t=149572&page=11 - Plot List Enhancement
http://forums.civfanatics.com/showthread.php?t=144612 - Reminder MOD
The next three should be made as a combined MOD that lets you pick the option you want:
http://forums.civfanatics.com/showthread.php?t=161132 - Random Unit Names
http://forums.civfanatics.com/showthread.php?p=3878311#post3878311 - Rename Units after City
http://forums.civfanatics.com/showthread.php?t=168074 - Roman Numerals
http://forums.civfanatics.com/showthread.php?t=184037 - Not a MOD yet, but a good suggestion on renaming units using Unit Rankings. Maybe we can expand on this one to have Ranks for different civs. If someone could code it, I would be fine with searching around and finding proper ranks to use.
http://forums.civfanatics.com/showthread.php?t=158636 - Tech Window Enhancement.
http://forums.civfanatics.com/showthread.php?t=147308 - SimCuties extended colors.
http://forums.civfanatics.com/showthread.php?p=3848052#post3848052 - Turns to Complete Culture and GP.
http://forums.civfanatics.com/showthread.php?t=161368 - Better Ship Scale
http://forums.civfanatics.com/showthread.php?t=167352 - Attitude Icons (How could I forget this one?? I think I was the one who requested it in the first place!)
I didn't include the UN one because it would confuse SGers.
Also I think we should include a link to the Blue Marble texture as well.
I'm going to be trying to test these MODs over the next few days. I'll put an + before each one I test and is working and - for each one that isn't working. It's been so long since I've done python coding I hope I can remember what to do.:p Keep adding MODs that should be added. EF, would you mind taking a look at our options for the core, and maybe give us some feedback on what you feel would be the best option to give the user flexibility? I would really like to be able to choose from the option screen to turn off all options without having to restart the program, but is probably a pipe dream.
Any others that should be added that I'm missing?
EmperorFool Aug 02, 2007, 10:44 PM Good list to start from. I've basically been pulling links to all those from your guys' existing modpacks. :)
Raw Commerce only does the addition of known information for you, so it's kosher.
BtS includes the Exotic Foreign Advisor already, but it needs the fixes I made for scenarios where you have a known set of civs to play (when you take any but the first civ).
BtS has formations, unless I don't understand what the mod does. When you select more than one unit, they spread out into formations in BtS. Is this what the mod does?
BtS also includes the turn number. NJAGC adds more (total turns and percentage), so ya probably just include it as well.
BtS uses smaller specialist icons, but I suppose it's still possible to have too many to fit.
BtS also includes the turns to complete culture expansion and great person birth.
I thought Great Options Mod was just The Lopez's modpack of all his modcomps. I'll check it out again; maybe I missed something.
Ruff, in your code you use RuffMod to access options (on/off switches for various features). I assume this is something you built, and we'll definitely want to use it.
I'd like to add these:
Attitude Icons (http://forums.civfanatics.com/showthread.php?t=167352) - Adds a face next to each AI civ in the scoreboard showing their attitude towards the player.
Dawn of Man (http://forums.civfanatics.com/showthread.php?t=180638) - Enhanced popup when you start a game.
(removed TechWindow and PLE as Alerum added them above)
And yes, Sevopedia is a must-have but will require a bit of work.
alerum68 Aug 02, 2007, 10:52 PM I added the suggestion you gave for MODs to add, and had already added a few that I missed on my first edit of the post.
Formations - I didn't realize that the formations were as expanded as this MOD could make it. I was thinking of maybe giving this options on how many units it'll display as well.
Specialist Stacker - You're right, they were smaller. Just added it because it was so useful in past versions and didn't think about it.
Great Options - Was just giving suggestion on different way to give the options from the menu... I didn't realize it was Ruff who came up with the one he uses in his MOD.
EmperorFool Aug 02, 2007, 10:56 PM I would really like to be able to choose from the option screen to turn off all options without having to restart the program, but is probably a pipe dream.
I feel this is important as well, especially with so many modcomps packaged together. I'll start poking around Ruff's options code and see what I can grok. TheLopez's Great Options mod was never updated to Warlords from what I just read in that linked thread.
alerum68 Aug 02, 2007, 10:58 PM What about that python script that's supposed to help update Civ4 Mods to BTS? I didn't look at the script to much, but it seems like it would update everything you'd need.
EmperorFool Aug 02, 2007, 10:59 PM Formations ... Specialist Stacker
We may still want to include those. I haven't used either, so I don't know if BtS's solutions are as good. When you check if they work, see if you think they are worth it still.
Great Options ... I didn't realize it was Ruff who came up with the one he uses in his MOD.
I assume it was him from the code I read. I just see that he access a class called "RuffMod" so it's an assumption on my part, and you know how much they're worth. ;)
EmperorFool Aug 02, 2007, 11:03 PM What about that python script that's supposed to help update Civ4 Mods to BTS? I didn't look at the script to much, but it seems like it would update everything you'd need.
Naw, it only updates XML files with new attributes that BtS added, but it won't touch any of the Python code.
alerum68 Aug 03, 2007, 12:17 AM Found another I think we should add:
http://forums.civfanatics.com/showthread.php?t=234268 - Ethnic Art Styles
Ket Aug 03, 2007, 12:27 AM WOW! You Guys Type a lot...
Ok, Im not sure how many of you remember Unaltered With Flavor...
But one of the key parts of the mod was the enhanced formations. I think its a good place to go for this.
Ethnic Art Styles works VERY well and have it released in my other mod already.
Great person's mod is also another good choice as a starting base.
My strength b.t.w. is architecture orginization and merging.
alerum68 Aug 03, 2007, 12:41 AM hehehe... got alot of time while my girl is on vacation.:p
The last time I was using the Great Person MOD I was getting a ton of conflicts, and I think I read somewhere that it was resolved, but not sure if we should make this our core. Anyway, going to be starting testing tonight. Once we get a list of what is working and what isn't, you and myself can start merging working MODs together while EF and ruff see if they can find some ways to fix the broken code of the others.
alerum68 Aug 03, 2007, 01:20 AM hum... it looks like the Dawn of Man MOD is already included in BTS.
EmperorFool Aug 03, 2007, 01:29 AM WOW! You Guys Type a lot...
One of the few high school classes that has paid off over and over again. 90 wpm ftw! :scan:
Ok, Im not sure how many of you remember Unaltered With Flavor...
This name sounds just like the idea I was thinking when I came here to post. It dovetails off Alerum's post immediately above.
How about a core mod that is just interface niceties and a "flava" mod that adds art/quotes/names/etc? This clearly adds more work on our part, but I suspect it's not that much more. I would hope that they would not share any files in common, so they could be installed one right over the other.
My main reason for this is that -- again just my assumption -- you can't easily make XML and art-type changes dynamic (i.e. disable via INI and certainly not in-game). Most of the code-based mods can be toggled in-game except perhaps Sevopedia and the various screens.
I'm sure you guys are more familiar with that aspect since I have zero knowledge of it. Well, I suppose you could know just as little as me. :p
alerum68 Aug 03, 2007, 02:17 AM The Enhanced Military Adviser comes up just fine, but no units are display. The Menu is 100% operational.
EmperorFool Aug 03, 2007, 04:18 AM I've begun by porting some infrastructure from Ruff's mod:
Dr. Elmer Jiggle's CustomEventManager
configobject (INI files)
RuffModControl (wrapper for configobject)
RuffModOptions
Civ4lerts
MoreCiv4lerts (from HOF I think)
Reminders
Raw Commerce
Attitude Icons
Limited testing shows that they work. The last two I had added earlier and aren't hooked up to the INI options yet.
I'll look over Great Options Mod to see how TheLopez handles configuration. Ruff's works, and it seems pretty straight-forward, so maybe there's no need.
ruff_hi Aug 03, 2007, 06:42 AM Some comments on the above ...
the mod control thing is a direct lift from the HOF people. Suggest we use something similar but call it BUGModControl (etc)
I have enhanced logger a lot and reminder (some) so I suggest we lift the code from my mod for these two
scoreboard: I added the ability to see leader name and / or country name - check my mod for code
military advisors - there are at least two out there but I hated them ... they are slow and show LESS than the standard advisor (cannot see AI units)
great person mod has already been added to warlords (that is, the small mod to the XML that adds the type of GP to the message)
showinfo and alerts are two ways of doing almost the same thing - one is user initiated (show info) and one is automatic (alerts)
proper score graph has already been included in all versions of the game
disable intro movies is now an option in civ4.ini file (assuming this is designed to stop the first 3 or 4 movies at the start of the game
plot list enhancements - this code is AWFUL and some of these features are already in warlords (stacked units). I added the unit features 'promotion' and 'action' as stand alone items in my mod. Note: this mod re-writes some significant sections of code, not least the 'unit selection' part
my mod has most of the unit renaming features alerum mentioned. I also added 'borg names'
Here are some others that we might want to look at from jrayUGH Unaltered Gameplay Hodgepodge (http://forums.civfanatics.com/showthread.php?t=204958)
combat experience counter
hall of fame win / loss
A friend of mine asked for the ability to add notes to units, cities or tiles (similar to excel notes). I think this is doable with an input box but don't know about the length of the string that you can add.
I have also been thinking about a mod that shows the techs that a GP will lightbulb as well as the techs the GP will lightbulb if we tech the current techs we know. I will try and post a fake screenshot to illustrate what I mean.
ruff_hi Aug 03, 2007, 06:50 AM It sounds like we are jumping in here without much discussion of version control or similar. There are some files that multiple people will be working on so we need some way of knowing this and controlling it.
Also, if we really want to be able to turn these things off and on, then we need to work out the config code first and build that into each change that we make.
alerum68 Aug 03, 2007, 08:38 AM Some comments on the above ...
[QUOTE] military advisors - there are at least two out there but I hated them ... they are slow and show LESS than the standard advisor (cannot see AI units)
I hate the default military advisor as much as you hate the MODs. I think we should include them in the pack, or at least see if we can improve on it. That is the worst adviser in the game, IMO.
great person mod has already been added to warlords (that is, the small mod to the XML that adds the type of GP to the message)
This one should include the artwork with the Great Person pop-up message.
showinfo and alerts are two ways of doing almost the same thing - one is user initiated (show info) and one is automatic (alerts)
This should be one of those then are either/or options then.
proper score graph has already been included in all versions of the game
Removed.
disable intro movies is now an option in civ4.ini file (assuming this is designed to stop the first 3 or 4 movies at the start of the game
Removed.
plot list enhancements - this code is AWFUL and some of these features are already in warlords (stacked units). I added the unit features 'promotion' and 'action' as stand alone items in my mod. Note: this mod re-writes some significant sections of code, not least the 'unit selection' part.
There are alot more options in this little bit then just the promo and action buttons. Is there a way to clean up the code a bit? This is a very useful MOD.
my mod has most of the unit renaming features alerum mentioned. I also added 'borg names'
I didn't include the Borg one just for the fact that I'm a Star Wars fan.:p I really like the ranking system and want to get this one added to the ones we have already... including the Borg one.... may Darth Maul take you!
A friend of mine asked for the ability to add notes to units, cities or tiles (similar to excel notes). I think this is doable with an input box but don't know about the length of the string that you can add.
Fo Shure!
I have also been thinking about a mod that shows the techs that a GP will lightbulb as well as the techs the GP will lightbulb if we tech the current techs we know. I will try and post a fake screenshot to illustrate what I mean.
I think I understand what you mean, and think this would be a great addition.
It sounds like we are jumping in here without much discussion of version control or similar. There are some files that multiple people will be working on so we need some way of knowing this and controlling it.
Yes, I saw the need for this last night too. Was trying to convince a friend of mine if he'd be willing to keep track of this, but not got a reply back from him saying yes or no.
Also, if we really want to be able to turn these things off and on, then we need to work out the config code first and build that into each change that we make.
Is what I mean by the "core" needing to be done first. This isn't going to be my strong point, so I'm leaving this to you and EF....
EmperorFool Aug 03, 2007, 08:43 AM Yes, we will definitely want to use version control (sourceforge? or is someone running a cvs/subversion repo?). I jumped in and started trying stuff out simply to build some momentum (plus I wanted those things in BtS for my regular play :)), but we can add structure at any time.
Regarding PLE, I had figured you used an earlier version of it in your mod, thus the difference from the screenshots for it. Your explanation makes much more sense. Did you feel the buttons for selecting various units in the stack was not useful? I haven't tried the full PLE yet ... maybe I will just to see, but I'd like to adopt as little messy code as possible. :crazyeye:
I'm starting to think about how to provide a unified config setup. The way that Civ itself is coded makes what I'd normally do more difficult. I see in one case (CvMainInterface) you have a bunch of globals that the options screen sets, and in all other cases the classes themselves grab the options out of RuffMod. I'll probably go the latter route unless there's a technical reason not to.
When you say you've added to civ4lerts and reminders, are they all in your published version, or are these private additions? I took the ones from your latest mod as my base.
I did see the civ name / leader name options and will merge those in when I add DeadCivScoreboard.
EmperorFool Aug 03, 2007, 08:53 AM I hate the default military advisor as much as you hate the MODs.
Honestly, 9 out of 10 times that I hit F5 . . . it's to see how many experience points I am from my next GG.
The notes on units/cities should be pretty easy, but how would you display it? There needs to be some sort of visual indicator so you can find the notes later.
I posted the start of an idea for displaying which GPs pop which techs based on your current known techs to the thread about GP tech preferences. It wasn't much, but a couple other people also posted their ideas and minimods for putting the info on the tech graph.
BtS now tells you which type of GP will pop a tech when you hover over it. However, there's no way to see the preferences between techs for a single GP. This would be very handy, though. Good luck coming up with something meaningful -- you'd be an instant hero to many people!
EmperorFool Aug 03, 2007, 08:57 AM Quick note to say that when I am modifying existing Python files, I'm putting code changes between comments (as usual with other modpacks). I started using this format, what do you think:
# BUG submod <<
blah blah
# BUG submod >>
Where "submod" names the modcomp (Raw Commerce, Dead Civ Scoreboard, etc) or subsystem (Options). Is this too terse?
ruff_hi Aug 03, 2007, 09:17 AM Yes, we will definitely want to use version control (sourceforge? or is someone running a cvs/subversion repo?). I jumped in and started trying stuff out simply to build some momentum (plus I wanted those things in BtS for my regular play :)), but we can add structure at any time.I've used sourcesave a little (less than 10 times) so I am familiar with this but not very experienced. Is there a free web based version?
Regarding PLE, I had figured you used an earlier version of it in your mod, thus the difference from the screenshots for it. Your explanation makes much more sense. Did you feel the buttons for selecting various units in the stack was not useful? I haven't tried the full PLE yet ... maybe I will just to see, but I'd like to adopt as little messy code as possible. :crazyeye: I think we should look at the features of this mod and select what we want to add then code those in.
I'm starting to think about how to provide a unified config setup. The way that Civ itself is coded makes what I'd normally do more difficult. I see in one case (CvMainInterface) you have a bunch of globals that the options screen sets, and in all other cases the classes themselves grab the options out of RuffMod. I'll probably go the latter route unless there's a technical reason not to.Ruffmod usually went back to the ini file (this was prob slow) but some features (scoreboard) used globals. Prefer globals but need to remember to set them after exiting the Alt-J option screen.
When you say you've added to civ4lerts and reminders, are they all in your published version, or are these private additions? I took the ones from your latest mod as my base.Not civ4lerts, but did make significant changes to the logger.
Honestly, 9 out of 10 times that I hit F5 . . . it's to see how many experience points I am from my next GG.Check my post above - this is a small mod that adds that info to the main screen.
The notes on units/cities should be pretty easy, but how would you display it? There needs to be some sort of visual indicator so you can find the notes later.No idea - need to test this a little.
Quick note to say that when I am modifying existing Python files, I'm putting code changes between comments (as usual with other modpacks). I started using this format, what do you think:
# BUG submod <<
blah blah
# BUG submod >>
Where "submod" names the modcomp (Raw Commerce, Dead Civ Scoreboard, etc) or subsystem (Options). Is this too terse?Good. How will you handle ... ie where will you put the comments.
if BUG mod option is true then
modified code
else
original code
endif
Also, if the additions span more than one location, should include (1 of 2, etc).
alerum68 Aug 03, 2007, 09:20 AM I like the "BUG submod" idea, maybe add start and end to it. EF, would you mind uploading what you've done so far, so I can get an idea on what I we're going to be working with? At least until we get Subversion set up?
ruff_hi Aug 03, 2007, 09:31 AM I've lifted the following from 12monkey's thread about plot list enhancements (http://forums.civfanatics.com/showthread.php?t=149572). This should help us get a feel for what this mod does.
============
Features :
============
The features are devided into the following chapters :
1.) Enhanced unit buttons in the plot list
2.) Mouse over info pane of the unit buttons in the plot list
3.) Unit/group selection in the plot list
4.) Plot list display modes
5.) Plot list unit filters
6.) Plot list grouping modes
7.) Plot list uprade View
8.) Plot list promotion View
9.) Move highlighter
10.) Configuration
Here are the details to those chapters:
1.) Enhanced unit buttons in the plot list
Each unit button provides you now with some additional information. This makes it easier to determine what status a single unit has, without selecting it first. Following information is implemented :
a.) Health Indicator :
the colored spot in the upper left corner is displayed in a darker color, as soon as the unit is wounded. This feature can be switched off in the ini-file.
b.) Health Bar :
At the top of each unit button, a vertical stacked bar is displayed. This stacked bar indicates the remaining health points of the unit in percent. The colors of that bar can be configured in the ini-file, as well as the display itself. The default colors are green and red.
c.) Move Bar :
At the top of each unit button, below the health bar, another vertical stacked bar is displayed. This indicates the remaining movement points of the unit in percent. The colors of that bar can be configured in the ini-file, as well as the display itself. The default colors are blue and yellow.
d.) Mission Indicator :
in the lower right corner, the units actual mission is disaplyed. The following mission types are indicated :
FORT (blue) -> unit is fortified
PAT (light blue) -> unit is at air patrol
GOTO (light green) -> unit has a goto command.
EXP (dark green) -> unit is at exploring mission
HEAL (light red) -> unit is in healing mode
SEN (yellow) -> unit is in sentry mode
SKIP (light gray) -> unit is skipped in current turn
AUT-B (orange) -> worker is automized
AUT-C (orange) -> worker is automized for a city
AUT-N (orange) -> worker is automized for building a trade network
The display of this mission indicator can be switched off by ini file.
e.) Promotion Indicator :
A unit which can be promoted, is displayed with a light blue frame in the plot list. This indicator can be switched on/off in the ini file.
f.) Upgrade Indicator :
A unit which can be upgraded to any other unit, will get a small orange up-arrow in the lower left corner of its unit button. The arrow is displayed regardless if you have the money for the upgrade or not. This indicator can be switched on/off in the ini file.
2.) Mouse over info pane of the unit buttons in the plot list
When you move the mouse over any unit button in the plot list, an info pane is displayed on the left side of the screen. This Info pane has been been modified in the following places :
a.) Remaining movement points :
The remaining movement points of the unit are displayed as a floating value with 1 decimal
b.) Strength + Turns-To-Heal
The current unit strenght is displayed as a floating value with 1 decimal. In case the unit is wounded a third value is displayed in brackets. This number indicates the number of rounds the units need to heal completly under the current circumstances. This circumstances takes consideration of city building (like hospital), the unit's promotion (Medic, or any other promotion with self heal abailites) the promotions of units on the same or adjacent tiles, the territory the unit is on.
c.) Specialties
The special abilites a unit gains due to a promotion are displayed in a different color than the specials it gains due to its unit type. The color can be modified in the ini file, the default color is light gray.
d.) Experiance
The unit's experience points are displayed in the following format : <curr-exp>/<needed-exp>. Where <curr-exp> is the units current experience points and <needed-exp> is the units needed experience points to get the next higher level. Both values are only displayed if the unit has an experience value > 0.
e.) Level
The unit's level is displayed in the following format. : <curr-lev>/<possible-lev>. Where <curr-lev> is the unit's actual level and <possible-lev> is the level the unit could have due to its expereience points. In other words : the first value shows the number of promotions the unit already has, the second value shows the number of promotion the unit could have. Both values are displayed, as soon as one of the values is > 0.
Because this info pane has to be reprogrammed completely new, the layout differs slighly from the built-in one. There may also be soe differences in the infromation I haven't documented herer. If so, please contact me.
3.) Unit/group selection in the plot list
The selection in the plot list has also been improved by eliminating some bugs of the Civ4 standard verion :
a.) Civ4 bug : when selecting a unit on the very right the plot list is rebuild so that the selected unit is at position 10 in the plot list -> fixed
b.) Civ4 bug : under some special circumstances the scroll arrows did disappear -> fixed
c.) Civ4 bug : when selecting a unit with Alt-key pressed, all units should be selected. Because it is not possible to put units with different domain type into one group, always the first domain in the plot list is selected. -> fixed. All units with the same domain type as the selected unit will be put together into a group.
The rest of the selection method is pretty much the same as before :
- Shift : to add single units or their groups to the selected group
- Ctrl : to select all units of the same type
- Alt : to select all units of the same domain type.
Remark:
The main problem of the complete mod was to modify the unit selection in the plot list. The existing API function CyInterface.selectUnit() and CyInterface.selectGroup() are quite a mess. You have no chance to create a selection group without the function CyInterface.selectGroup(). The problem with that is, that this function doesn't have a any parameter for a unit. It directly checks the existing units on the plot and takes it decisions, so that you don't have any influence to it. Because I want that the selection groups doesn't select any unit which is not disaplyed due to one of the display filter, I had to make several crazy program climbs (you can watch them in the selectGroup() function in the PLEMainInterface.py). Main method to avoid those things is to temporarily move away (with CyUnit.setXY()) those units I don't want to be added to the group, create the group witht CyInterface.selectGroup() and then move back those "parked" units.
Due to that changes it might be possible, that there are some error in I havn't catched so far. Also, the behavior of the complete selection functionality could be slightly different to that you know. If you found any problems, just inform me, please.
4.) Plot list display modes
To improve the display of a large ampunt of units on one plot, I added some disaply modes :
a.) Standard mode :
The units are displayed in one vertical line with scroll buttons on the right side. As already mentioned in chapter 3., the bothering bugs with the display have been eliminated.
b.) Multiline mode :
All units are disaplyed in several lines, so that there is no scrolling needed. The display starts in the lower left corner. Using this view, no scroll buttons are needed, except you have so much units on one plot, that the screen height is not enough to display them in multi line view. In this case, vertical scroll buttons (up and down arrow) are disaplyed.
c.) Vertical stacks :
Dependant on the grouping mode (see chapter 6.) some units are disaplyed in vertical stacks. You can scroll left an right with the scroll buttons. In the unit type grouping mode, units of the same type are displayed in a vertical stack, in the selection group grouping mode selection groups are displayed in a vertical stack.
d.) Horizontal stacks :
Pretty much the same as the vertical stacks with the only difference, that the stacks are horizontal oriented. You may now ask what that is for. Two reasons. First: because of the different screen ratios this option may be better than the vertical stacks (you have smaller stacks, but more lines). Second : it was fun to do it ;)
5.) Plot list unit filters
There are several unit filters added. You find them next to the display mode buttons. The following filters have been implemented (the button in brackets) :
a.) Wounded untis (red cross)
b.) Healthy units (green cross)
c.) Domain filter air units (plane)
d.) Domain filter sea units (ship)
e.) Domain filter land units (car)
f.) Domestic units (house)
g.) combat units (tank)
h.) player units (green flag)
i.) foreign units (red flag)
An active filter is displayed with a red frame. By default all filters are inactive (-> no frame). Also all filters are EXCLUSIVE filters. That means, if you press a filter button the belonging units are NOT displayed.
6.) Plot list grouping modes
There are two groping modes implemented. The grouping modes have influence in the order the units are disaplyed. If a stack display mode (vertical or horizontal) is selected it also have influene, to what is displayed in a stack :
a.) Unit type grouping (the button with the 3 squares which are behind each other) default grouping mode) :
In simple words : the units are sorted as in Civ4 Standard. When the display mode is a stack mode, then units of the same type are put into one stack.
In more complex words :
The grouping is done by unit type. That means that the untis are sorted by the following order :
- Player. Order : player units, then all other players in the order of their player id.
- Domain. Order : sea, air, land
- Combat strength. Descending order(-> means strongest first)
- Unit type. Order by unit type id, descending
- Unit level. Order descending.
- Unit experience. Order descending.
- Unit ID. Order ascending. This is just added to get a reproducable sorting in case anything else isn't unique.
ATTENTION :
There is one exception for the sorting : cargo'ed units. As soon as a unit is cargo of another unit, the cargo unit is always displayed BEHIND its transporting unit. Within the cargo units, the sorting is as mentioned above. This is as in Civ4 standard, but has some effects to the stacked views modes : cargo units are displayed together with their tranport unit in the same stack, where the cargo units are on top off their transport unit.
b.) Selection group grouping (the button with the square and the triangle in brackets) :
In simple words : the units which are in the same selection group are displayed together. Also the selection groups are displayed right most wihtin their domain. When the display mode is a stack mode, then units within the same selection group are put into one stack.
In more complex words :
The above grouping is slightly changed :
- Player. Order : player units first, then all other players in the order of their player id.
- Domain. Order by sea, air, land
- Selection group : Ascending order by their internal group id.
- Combat strength. Descending order (-> means strongest first)
- Unit type. Order by unit type id, descending
- Unit level. Order descending.
- Unit experience. Order descending.
- Unit ID. Order ascending. This is just added to get a reproducable sorting in case anything else isn't unique.
Again, cargo units are displayed together with their transport units. This view is ideal to create complex selection groups.
Tip : try the "Group" grouping and create selection group by selecting single units holding the shift key down. Looks funny ;)
7.) Plot list uprade view
The upgrade view (button with the up-arrow) can be used, to get a clear overview about the units which can be upgraded. It also provides a simple method to upgrade a bunch of units without selecting each unit first.
When you press the button only units which can be upgraded are displayed in one line. If you also have a stack view active (important!!!), above each unit its possible upgrades are dispalyed. The upgrade buttons are disable (displayed, but you can't push them) you don't have enough money to perform the upgrade.
By pressing one of those upgrade buttons, the belonging unit is upgraded to that type. Usually that results in that the unit disappears from the view, because in ost cases only one upgrade is possible. If you press the ctrl-key when pressing an upgrade button all units on that plot are upgraded, when pressing the alt-key all player units are upgraded. If you run out of money during those multi upgrades, it simply stops doing it (as it is now in Civ4).
By moving the mouse over an upgrade button, a special info pane is displayed on the left side of the screen. It provides you with the unit type related info of the upgrade and with three values in brackets, seperated by a slash. The three values have the following meaning:
- costs to upgrade one unit
- costs to upgrade all units on the plot (hold down ctrl-key)
- costs to upgrade all play units (hold down alt-key)
If one of the values exceeds your current budget, it is displayed in red, otherwise in green. The colors can be modified in the ini-file. Of course, those multi-upgrades only upgrades the units of the same unit type. eg. all bombers or all german tanks.
8.) Plot list promotion view
This view (button with the "star" on it) is very similar to the upgrade view. It displayes only units which can be promoted. If a stack view is active, above each unit its possible promotions are displayed. By pressing such a promotion button, the promotion is performed and the display is refreshed. This could result in that the unit disappears from list because there are no more promotions possible, or that new promotions are displayed if the experience points of the units does allow that.
You can use the "level" in the unit info pane to check how much promotions are possible. (see chapter 2.)
9.) Move highlighter
When you hold down the alt-key, hover the mouse over a plot list button, the plots the unit can reach with its remaining movement points are highlighted. For that I implemented my Move Highlighter mod. Remark : the standard version of the move highlighter which highlights the move area when you select a unit is NOT implemented. THis can be done seperatly. Refer to the related thread for that, please.
10.) Configuration
The PLE come now with a INI-file. Several above mentioned features can be switched on/off in this ini file. Also some colors can be adjusted and some key parameters of mouse over info can be changed. Just have a look in the file, everything is documented.
Summary
1.) Enhanced unit buttons in the plot list - I lifted promotions and actions and added these to my mod
2.) Mouse over info pane of the unit buttons in the plot list - is this an improvement?
3.) Unit/group selection in the plot list - already in warlords to some extent
4.) Plot list display modes - never used any of the filters - are they any good?
5.) Plot list unit filters
6.) Plot list grouping modes
7.) Plot list uprade View
8.) Plot list promotion View
9.) Move highlighter - there is a move highlight mod 12m mentions - we should maybe look at that (thread (http://forums.civfanatics.com/showthread.php?t=162649) - looks good). It sounds interesting - highlight a unit and the tiles it can reach are highlighted.
10.) Configuration - yes, got it.
alerum68 Aug 03, 2007, 09:44 AM What I'll do is take a look at the latest version that came out, and see how it compares to BTS. I'll then go over what I think we should add, and you guys can go from there. Since it's configurable I'd like to add all options, and let the player choose if they want to use it or not, but if it'll make things too messy, we can always pick and choose.
Impaler[WrG] Aug 03, 2007, 10:21 AM I think you guys could consider making this mod under the WoC umbrella, It aims to make a flexible mod package that can be switched between different states easily. These states would be as varied as any current mod and a common pool of modular goodies would be shared by all with each team able to cherry pick the bits it likes along with 'core' assets of its own. The Dll will be based on CCCP with all effects latent until explicitly activated. It would be quite easy to create an unaltered game play mod out off this and you guys could bring your own extensive skills in Python UI moding and in game option controls to the project, a win win situation.
ruff_hi Aug 03, 2007, 10:56 AM ;5770434']I think you guys could consider making this mod under the WoC umbrella, It aims to make a flexible mod package that can be switched between different states easily.Sorry for being a bit slow, but what is WoC?
Impaler[WrG] Aug 03, 2007, 12:17 PM World of Civilization its a new project lead by by TAFireHawk, mrgenie and myself, I added a reference in my sig, theirs also our new site which will use the issue and bug tracker that Visa mod has.
http://www.worldofcivilization.com/ The site
http://worldofciv4.proboards57.com/index.cgi Forum
EmperorFool Aug 03, 2007, 05:02 PM Here (http://forums.civfanatics.com/uploads/111657/CustomAssets.zip) is what I have so far, and keep in mind the core will be redone. This is just to test out that some of the mods work fine in BtS. Also, some options aren't hooked up to the options screen.
Just unzip the file (ignore the file comment if you see it) and place into your My Games\BtS directory. You should rename your existing CustomAssets directory. The INI file should live in the same directory, sibling to CustomAssets.
ALT-K brings up the options screen. I was thinking of making that Alt-O to match civ's style of ctrl/alt relatedness.
EmperorFool Aug 03, 2007, 05:10 PM Impaler, I read over the site and it looks like a great ambitious project! The main thing that stuck out to me is that WoC is about gameplay mods (not that it has to be) -- modding the XML and SDK.
Our project is specifically about keeping the core gameplay the same -- modding only the interface via Python and art (in a separate mod?). There would be no real need to attach options to saved games, and I'd really prefer the options screen to be in the game rather than outside it (a necessity for WoC).
All that doesn't mean we couldn't do as you propose, of course.
The main sticking point is that the way the Python code is written by Firaxis makes modularity pretty much impossible. The code for Dead Civs Scoreboard and Attitude Icons modify the block of code in MainInterface. Sure, they don't touch the same lines, but they are but 2 of probably 10 or so other mods that touch CvMainInterface.py. I don't see a realistic way to make them each modular.
Instead, our idea is to add all of them in, and make them individually enabled in the options screen. Having said that, I guess that's pretty much what WoC is doing. You'd download one installer with all the content for ViSa and WWI SF&B (just examples) and then select which are used when you run the game.
Yeah, I guess that is pretty much the same end-goal. The tricky part is that with Python everyone's touching the same files whereas with WoC everyone creates their own XML files that remain separate. Am I understanding correctly?
EmperorFool Aug 03, 2007, 05:56 PM I'll replace "<<" and ">>" with "start" and "end". However, while having "1/2" would be truly excellent, this is prone to error when making updates and might cause further bugs because you thought you had every change. Using a common tag at the start makes doing search really easy.
I'm going with
# BUG - mod - start
# BUG - mod - end
and always putting the comment at the far left column. When it needs to optionally replace existing code, I'll do it how Ruff showed.
EmperorFool Aug 03, 2007, 06:07 PM This idea (http://forums.civfanatics.com/showthread.php?t=235647) was just suggested, so I added it. It may make the scoreboard too cluttered.
ruff_hi Aug 03, 2007, 06:10 PM ALT-K brings up the options screen. I was thinking of making that Alt-O to match civ's style of ctrl/alt relatedness.Alt-O is taken "ALT+O = Change perspective". What was wrong with Alt-J :rolleyes:
ruff_hi Aug 03, 2007, 06:14 PM This idea (http://forums.civfanatics.com/showthread.php?t=235647) was just suggested, so I added it. It may make the scoreboard too cluttered.Is that info available on some other screen? If not, then it is additional info.
I would also like to include an alert when a AI goes "we have enough on our hands already" - this is an indication that the AI is going to war. You gather that info when you ring up the AI and ask it for something - one of the red messages is "we have enough on our hands already". Can you pick that info up with python?
EmperorFool Aug 03, 2007, 07:10 PM Alt-O is taken "ALT+O = Change perspective". What was wrong with Alt-J :rolleyes:
O as in Options, and in civ ctrl and alt with the same letter/action are usually related. That's my only reason, but since Alt-O is taken (wow that looks bizarre!), I withdraw my statement.
Is that info available on some other screen? If not, then it is additional info.
Yes, on the graph (demographics) screen, you can see the power of civs with whom you have enough espionage points. While you can't see the actual number, it's a graph and so you can get close. We could normalize it, meaning show % of your score, but that's basically the same thing.
Better I think would be to show the ranking -- #1 #2 #3, etc. -- rather than the power number. That assumes the AI's only take rank into consideration.
I would also like to include an alert when a AI goes "we have enough on our hands already" - this is an indication that the AI is going to war.
Yes! I thought of this the other day and forgot about it. Thanks. It would make a great alert. The information is probably semi-available. You should certainly be able to check if they'll trade "go to war...", but I don't know what kind of answer the API gives you -- probably just "no".
BOOL canTradeItem(PlayerType eWhoTo, TradeData item, BOOL bTestDenial)
However, maybe you can get the reason as a string some other way. I don't see it, though. You could at least have an alert to tell you when one AI will agree to a war with another, or revokes the ability. That's not exactly what you wanted, but it's still something.
EmperorFool Aug 03, 2007, 07:21 PM I spoke too soon. It looks like the reason is available on CyPlayer:
DenialType getTradeDenial(PlayerType eWhoTo, TradeData item)
DenialType has value DENIAL_TOO_MUCH which sounds promising.
To do this, you'd have to check each AI against some other AI on each onBeginGameTurn. So far, whenever I see an AI that has too much on its hands, it says the same thing for a war against every other AI, so you shouldn't have to check them all.
ruff_hi Aug 03, 2007, 07:38 PM Great - that sounds like something we should add to civlerts. Maybe with a special pop-up box option. Normally civlerts puts the alerts into the info pane but that gets boring having to scroll thru them. We might want to add the option to have the alerts come up as dialog boxes. In this way, alerts could be 1 of 3 states (OFF, Info, Dialog).
EmperorFool Aug 04, 2007, 07:55 PM I looked over ConfigObj and your use of it in RuffModControl. It doesn't go back to the file after reading it once, so it should be very fast setting/retrieving options. Given that, I'm inclined to start with that as a base.
What I've done so far is create a wrapper class (Facade in Design Patterns terms) around RuffModControl, just as RuffModControl wraps ConfigObj. Each facade will group access to related options. Here's the one for the scoreboard options.
class BugScoreOptions(BugOptions):
def isHideDeadCivs(self):
return self.config.get_boolean('Dead Civ Scoreboard Mod', 'Hide Dead Civilizations', False)
def isShowDeadTag(self):
return self.config.get_boolean('Dead Civ Scoreboard Mod', 'Show Dead Tag', False)
def isGreyOutDeadCivs(self):
return self.config.get_boolean('Dead Civ Scoreboard Mod', 'Grey Out Dead Civilizations', False)
def isShowPower(self):
return self.config.get_boolean('Scoreboard', 'Power', False)
def isShowAttitude(self):
return self.config.get_boolean('Attitude', 'Enabled', False)
def getShowNameEnum(self):
"""0 = Leader, 1 = Civ, 2 = Both"""
return self.config.get_int('Dead Civ Scoreboard Mod', 'Show Name', 1)
def isShowLeaderName(self):
return self.getShowNameEnum() != 1
def isShowCivName(self):
return self.getShowNameEnum() != 0
def isShowBothNames(self):
return self.getShowNameEnum() == 2
Then to use it, CvMainInterface does things like
import BugScoreOptions
BugScore = BugScoreOptions.BugScoreOptions()
...
if (BugScore.isShowAttitude()):
...
If later we decide to replace how we store options, the facades won't change and thus CvMainInterface won't have to be changed.
Did any of you have some other idea in mind? If not, we could start adding together the mods we want using this scheme.
The next task for me is to make the options screen itself more easily extensible, but Ruff's done a good job with it, and I don't want to duplicate effort that works. My main idea is to break out the different tabs into separate classes (and thus modules) so they're easier to edit by multiple people.
EmperorFool Aug 04, 2007, 08:08 PM Oh yeah, I added a feature to Raw Commerce so you can toggle between it and Raw Production on the city screen. The only sticky point is the production multiplier.
The only Commerce multiplier in the epic game is 50% for Capital under Bureaucracy. If you are running that civic, your capiltal always gets that modifier.
Production is different. Specifically, some units and buildings receive modifiers depending on your leader traits and civics. What this means is that the total modifier for any given city depends on what you're building.
What I have so far ignores those extra modifiers, since I'm trying to show "Raw Production," meaning what you'll get no matter what you build. This means that the total may differ from that shown in the production bar. Will this be too confusing?
25 [-------102/120--------]
Plots: 13
Specialists: 2
Buildings: 2
Total: 17 + 4 = 22 ( != 25 b/c +25% for building under religion not included)
In the case above, you're building a building, running OR, and have the state religion in that city. The city also has a forge. Thus, you get a +25% for the forge and a +25% for OR. The "Total" line excludes the OR bonus b/c it depends on what you build. I can include it, but that makes the values difficult to compare between cities.
Here (http://forums.civfanatics.com/uploads/111657/CustomAssets.zip) is the latest version of it so you can try it out yourself. See if you can figure out how to switch views. I'm hoping it's obvious. I may need to reverse the button.
EmperorFool Aug 04, 2007, 09:45 PM Any thoughts on releasing split-out versions of the various mods we port to BtS? For example, YAGCM will require a lot of work as much of it is included in BtS already. Do we release a BtS version of YAGCM separate from BUG?
I'm inclined to say no simply because of the extra work involved. If someone wants to extract it from our code, they're welcome to do that. As long as we mark the sections with comments consistently, it shouldn't be too hard.
ruff_hi Aug 04, 2007, 10:15 PM I looked over ConfigObj and your use of it in RuffModControl. It doesn't go back to the file after reading it once, so it should be very fast setting/retrieving options. Given that, I'm inclined to start with that as a base.
If it doesn't re-read the ini file, how do any of the alt-j (option screen) changes that get written to the ini file get back to the game?
What I've done so far is create a wrapper class (Facade in Design Patterns terms) around RuffModControl, just as RuffModControl wraps ConfigObj. Each facade will group access to related options. Here's the one for the scoreboard options.
That is simply beautiful! Very elegant. I guess you get paid the big bucks for these types of ideas. Me - I'm just a hack.
Oh yeah, I added a feature to Raw Commerce so you can toggle between it and Raw Production on the city screen.I sometimes wonder why I want to know raw commerce as it depends upon the tiles currently being worked. Ditto with raw production. What I would like to know is how to look at a group of 21 tiles and think GP Farm, Production powerhouse or commerce. If we can add a raw production column to the F1 screen, I will be happy (help me decide where to put the production multipliers).
Any thoughts on releasing split-out versions of the various mods we port to BtS? For example, YAGCM will require a lot of work as much of it is included in BtS already. Do we release a BtS version of YAGCM separate from BUG?I say NO - lets minimize the work we have to do and let the smuck that wants this stand alone feature do their own laundry.
alerum68 Aug 04, 2007, 10:23 PM Haven't had a change to look at what you upload today yet, but will look at it now.
As for releasing the different mods on their own, I think that would be biting off more then we can chew for now. I'm sure someone will use BUGS and want to change something about an individual mod, and will put it out anyway. With the naming scheme we decided on, it should be fairly easy for people to pull out the mods they want.
Let me take a look at what you put together so far. We really need to figure out some sort of task system guys, so we're not all adding the same things.
And what have we decided on the PLE additions? There are a few that I find are critical. Anyway, going to take a look at what EF has put together so far.
ruff_hi Aug 04, 2007, 10:31 PM Let me take a look at what you put together so far. We really need to figure out some sort of task system guys, so we're not all adding the same things.Well - that is easy for me. I am currently doing NUTTIN because I don't have BtS. Ok, I am doing something - throwing in ideas.
And what have we decided on the PLE additions? There are a few that I find are critical. Anyway, going to take a look at what EF has put together so far.I like the 'highlight unit with promotions available' and 'unit actions'. I would also like to be able to highlight units that are injured (easy to see when really injured, harder to see if only slightly injured), but apart from that, I can live without the other PLE items.
On the other hand, highlight movement range might be nice.
alerum68 Aug 04, 2007, 10:38 PM Just took a look at it... Beautiful! I think we have it.:)
The only thing I think we should do is expand the menu options. Instead of just having one MOD to pick, can we have multiple ones? An example would be using CivAlerts or ShowInfo, instead of having both. Or being able to choose your advisor. You seem to like the Special Domestic Advisor, while I like the Custom Domestic Advisor. This way we won't have to pick and choose which mods are added, but can add them all and let the player choose.
Any news on getting the subforum?
EmperorFool Aug 04, 2007, 10:47 PM If it doesn't re-read the ini file, how do any of the alt-j (option screen) changes that get written to the ini file get back to the game?
ConfigObj holds all of the INI file's values in a dictionary in memory. When you change an option, that dictionary is changed. When you close the options screen, the dictionary is written to the INI file. This is very efficient.
That is simply beautiful! Very elegant. I guess you get paid the big bucks for these types of ideas. Me - I'm just a hack.
:blush: Thanks! Hack or not, you essentially did the same thing by wrapping ConfigObj with RuffModControl. Give yourself some credit, too!
I sometimes wonder why I want to know raw commerce as it depends upon the tiles currently being worked.
It helps me to see the breakdown to decide whether or not a harbor is useful yet, for example. Or how much I'll lose by switching out of Bureauracracy.
Ditto with raw production.
For production, I'm always wanting to know what the base production is (ignoring chops and overflow) to determine whether or not it's worth it to build a forge/factory yet.
What I would like to know is how to look at a group of 21 tiles and think GP Farm, Production powerhouse or commerce. If we can add a raw production column to the F1 screen, I will be happy (help me decide where to put the production multipliers).
These civ-wide decisions are best done in the DomAdv as you say. SpecDomAdv had a base production column you can turn on, and we'll definitely want to include it. HoF mod is released for BtS, and they punted on SpecDomAdv for now, likely because it's going to take the most work to port to BtS.
I'm definitely in agreement about not releasing separate updated mods. Since I'm new to the mod community, I wanted your guys' take on it to make sure we don't step on toes. I'm very glad to hear it's cool to leave it to others. :)
ruff_hi Aug 04, 2007, 10:47 PM The only thing I think we should do is expand the menu options. Instead of just having one MOD to pick, can we have multiple ones? An example would be using CivAlerts or ShowInfo, instead of having both. Or being able to choose your advisor. You seem to like the Special Domestic Advisor, while I like the Custom Domestic Advisor. This way we won't have to pick and choose which mods are added, but can add them all and let the player choose.Agreed.
Any news on getting the subforum?No. Have sent follow up PMs to moderators and told to give thunderfall a week-ish to respond. I will look a bit more at the other sub-forums and make some suggestions on the threads we start / sticky.
ruff_hi Aug 04, 2007, 10:49 PM ConfigObj holds all of the INI file's values in a dictionary in memory. When you change an option, that dictionary is changed. When you close the options screen, the dictionary is written to the INI file. This is very efficient.Sure - no prob with that. However, when maininterface wants an ruffmodoption after exiting the option screen, does it know that the ini file has changed? I thought that you implied that it kept all of that stuff in memory.
:blush: Thanks! Hack or not, you essentially did the same thing by wrapping ConfigObj with RuffModControl. Give yourself some credit, too!Hey - I stole it from the HOF guys and wasn't 100% sure what it was actually doing. It worked so that was good enough for me.
EmperorFool Aug 04, 2007, 10:51 PM The only thing I think we should do is expand the menu options.
Agreed. Keep in mind that I lifted the option screen straight from Ruff's mod and haven't changed anything in it yet. I just wanted to verify that I could still change the options and see the results. Some of course require refreshing the screen (open a city screen, close it to see any scoreboard changes). I think I can find a simple workaround for that so the user sees the changes immediately.
Any news on getting the subforum?
News to me, so I hope you weren't asking me. ;) That would be very handy!
EmperorFool Aug 04, 2007, 10:57 PM However, when maininterface wants an ruffmodoption after exiting the option screen, does it know that the ini file has changed?
The new options are in memory. The problem is that the screen doesn't know to redraw itself. I can add a workaround as I did for the Commerce/Production toggle button. Basically, if any MainInterface options change, the screen will be forced to redraw when the options screen closes. Hackish, but maybe I can make it less so. :)
Since the MainInterface is the only screen that can be open when the options screen is brought up (because it's always open), only this screen needs to be told to redraw.
Hey - I stole it from the HOF guys and wasn't 100% sure what it was actually doing.
Fair enough. You did a great job packaging all that stuff together. I'm curious, what is your previous programming experience? I can't imagine jumping in to Python in this context without my background. It's hard enough trying to figure out what the Firaxis code is doing, let alone code written by many different people of varying skillsets.
EmperorFool Aug 05, 2007, 07:51 AM I have ported Not Just Another Game Clock. This makes the list of complete (minus cleanup of options) ports:
NJAGC
Dead Civs on Scoreboard
Attitude Icons
Power Score
Better Espionage Screen List
Raw Commerce
Civ4lerts and More Civ4lerts
Reminders
Next up: AutoLogger?
EmperorFool Aug 05, 2007, 09:38 AM I'd also like to fix the Foreign Advisor's Glance page, add page up/down buttons to its Tech and Resource pages, and add the little additions on the Info page that I had put into Ruff's mod (shows and * when you have same religion and/or favorite civic of other civs).
The bug happens whenever you play a map with setup civs and pick any but the first civ. It draws the rows and columns incorrectly, making it impossible to see the attitude of the first civ and the attitudes of the other civs toward the first civ. This isn't really mod territory, but since it's a bug in a mod they incorporated, I figure what the heck. As long as I'm adding a minimod to it (page up/down, extra info), might as well fix a bug!
alerum68 Aug 05, 2007, 10:22 AM I hate to sound like an idiot here, but would it be to much work to give me an overview of how to add mod options to the BUG Options menu? Remember, I'm not a coder really. If you can give me some before and after snippets I can probably figure it out though.
OR, I could add the MODs and let you guys put the options in... but I'd rather be able to do it myself.
And we really need some kind of file repository guys... CVS or Source Forge? edit - Alright, so I registered on Source Forge, just because I know that better. I'm setting up the project, and want to just set the Unix name as civ4bug. (bug is taken) Is that cool with you guys? Also, I'm going to put it under GNU... is everyone okay with that?
EmperorFool Aug 05, 2007, 10:52 AM civ4bug is fine with me. Thanks for taking care of that. Here (http://forums.civfanatics.com/uploads/111657/CustomAssets_0.4.zip) is the latest so far.
I have yet to make the changes I'd like to the options screen itself, so if you're okay with changing options through the INI file for now, I can describe here how to use BugOptions.
Each logical group of options go into a single BugOptionsFoo file, similar to grouping items into [sections] in an INI file. So far I have
BugNJAGCOptions
BugCityScreenOptions
BugScoreOptions
Take one of those files and make a copy. Rename as you like (BugFooOptions.py) and make sure to change the "class BugFooOptions" line.
Remove all the existing functions from the class and add the ones you want. My convention is that boolean options start with "is" and others start with "get".
Then to use the options, import the module into your mod file and create an options object.
# MyMod.py
import BugFooOptions
BugFoo = BugFooOptions.BugFooOptions()
... later in your code ...
if (BugFoo.isSomeOptionEnabled()):
...
I've been dropping the Options for the name of the object to keep it different from the module name and to shorten the code where you use it.
Finally, add the values to the INI file. If you're unfamiliar with INI files, ask and I'll describe them. Google should be able to give you the score as well as they're pretty standard.
alerum68 Aug 05, 2007, 08:01 PM http://forums.civfanatics.com/showthread.php?t=199344 - A new Great Person MOD. Names the GP based on Civ specific name conventions. That way Mohammed (pbuh) won't be born as an Inca.;)
ruff_hi Aug 05, 2007, 08:41 PM BTW - we could use Ctrl-Alt-O to open our option screen. Just used the bAlt, bShift and bCtrl keyboard variables.
Ket Aug 06, 2007, 07:28 AM I'm Falling WAY behind on things here...
I merged in a few interface changes to neverminds mash up and impalers originals.
The thread is located here: http://forums.civfanatics.com/showthread.php?t=235834
Use WinRar... Its not a zip just a renamed rar
alerum68 Aug 06, 2007, 09:00 AM When you merge it in Ket, you used the 0.4 version? And I'm feeling guilty here... haven't yet merge anything in. isa, I'll try to get some in today. Been trying to fix an error in the CustomDomAdvisor that doesn't allow it to work properly in the main screen. Once that is done, I can really start to merge things in.
Guys, besides dropping a few additions that they already added with BTS, is the list we have on the front page good with everyone? If so, I think we should break the MODS apart between us, then to make sure we don't double on work let that person be the only person merging/coding until they upload. Sourceforge is going to take almost a month to approve the project, so until then I can't see a way to make sure we're not stepping on toes.
EF, you've done the most so far... would you mind making a list of the MODs you've added so far? No need to put up urls.
As for the Alt-O option... that would be perfect! And is there a way to code a button for just OUR options?
ruff_hi Aug 06, 2007, 09:34 AM I heard back from Thunderfall and he said ...
Let me know how it goes... Once you have a team formed, and have done some initial development/planning on the forums, we certain could consider making a forum for the project.
I PM'ed him back with a link to this thread.
I've also looked at the other projects there and would suggest that we have (at least) the following threads stickied ...
Welcome
Screenshots
FAQ
Known Bugs
Members
Included Mods
Suggest a Mod
Latest Version
Feedback
Care to suggest any others?
ruff_hi Aug 06, 2007, 09:37 AM As for the Alt-O option... that would be perfect! And is there a way to code a button for just OUR options?Alt-O is taken but Ctrl-Alt-O isn't. There are also some Ctrl-Shift options that are taken but only if you have the cheat code in your ini file.
@Alerum - we could put a button somewhere on the screen for our options but the screen is fairly buttoned up as it is. HOF added their options to the Option tab from the menu but I preferred a stand along screen.
ruff_hi Aug 06, 2007, 09:47 AM civ4bug is fine with me. Thanks for taking care of that. Here (http://forums.civfanatics.com/uploads/111657/CustomAssets_0.4.zip) is the latest so far.Emp - I think you should take a look at what Gaurav did with my mod so that it can work as a customasset mod, under the mod directory under my games or under the mod directory under prog files. See his uploaded version of my mod (http://forums.civfanatics.com/downloads.php?do=file&id=4155) that also includes Sevopedia updated to version 2.2a. In particular, look at his changes of RuffModControl and CvPath.
EmperorFool Aug 06, 2007, 10:21 AM Alerum, see post 56 (http://forums.civfanatics.com/showpost.php?p=5777942&postcount=56) for the list of what I've included so far. A month for SF to approve the project? Since when did you need to apply to SF? I thought you could just create a new project and get started. That's a bit distressing as we really need a repo. Does anyone know any other free repos online?
Ctrl-Alt-O sounds good to me. Heh, we'll have our own three-fingered salute. :cool: And that list of forum topics sounds good. The only thing is that none jumps out at me for "Installation". There's latest version and FAQ, so maybe that covers it.
Ruff, I've downloaded Gaurav's version and will take a look at those files. I'm just ZIPping my CustomAssets directory for now, but I thought we can't put stuff into a mod because that would break sharing saved games with people who weren't using the mod? I'm thinking SGs here.
I haven't added anything since 0.4 as I've been working on the GP TechPref code. Blame Ruff for inspiring me with another fun coding challenge. ;)
ruff_hi Aug 06, 2007, 10:31 AM Ctrl-Alt-O sounds good to me. Heh, we'll have our own three-fingered salute. :cool: And that list of forum topics sounds good. The only thing is that none jumps out at me for "Installation". There's latest version and FAQ, so maybe that covers it.
Ruff, I've downloaded Gaurav's version and will take a look at those files. I'm just ZIPping my CustomAssets directory for now, but I thought we can't put stuff into a mod because that would break sharing saved games with people who weren't using the mod? I'm thinking SGs here.I thought of installation but then thought that would be covered in FAQ and latest version. Maybe FAQ will also cover some of the other topics (eg suggest a mod). On the other hand, installation is a biggie. I still get questions about that with my mod.
I would like code that could be used as a mod. My mod is only viable under customassets and it doesn't work for some people's set up. Not saying that we should all put it under a mod ... just having the option is nice.
Also, there is nothing wrong with forcing those lazy SG people to play the game with a mod, especially if it is our mod!
alerum68 Aug 06, 2007, 01:33 PM SGers were the ones who inspired the UAGP mods in the first place. It's very important to me that this MOD won't affect SG play at all, including requiring people who are in the same SG to use our mod. No, this needs to be 100% acceptable for both HoF games, as well as SG games.
Maybe when we get done with this version, we can see about branching off to an Altered Gameplay mod.
alerum68 Aug 06, 2007, 03:25 PM Question... how do I use the above method to code the options to add XML?
EmperorFool Aug 06, 2007, 03:47 PM As far as I know, there is no way to use Python to control which XML gets loaded. That's the main reason I suggested having a "flavor" mod that has all the artwork, GP names, etc.
This is where the project Impaler mentioned comes in. They intend to build an external config application. I'm guessing it will move the XML files into place for the mods you've chosen.
ruff_hi Aug 06, 2007, 05:07 PM SGers were the ones who inspired the UAGP mods in the first place. It's very important to me that this MOD won't affect SG play at all, including requiring people who are in the same SG to use our mod. No, this needs to be 100% acceptable for both HoF games, as well as SG games.Don't get me wrong - I am not suggesting that we produce a game that affects SG play. However, what I am saying is that we need to code the mod so that it can sit under customassets as well as under either of the mod directories. At least one person couldn't use my mod because they had a non-standard my docs location. I think that the code I mentioned above overcomes that issue.
Question... how do I use the above method to code the options to add XML?
As far as I know, there is no way to use Python to control which XML gets loaded. That's the main reason I suggested having a "flavor" mod that has all the artwork, GP names, etc.
This is where the project Impaler mentioned comes in. They intend to build an external config application. I'm guessing it will move the XML files into place for the mods you've chosen.
For XML, I think that we should have the standard python install files and separate install files for any XML additions. You install the standard python files and then install the XML files that you want to add. If there are python additions in the XML files they will get added to the python directories (or over-write selected files).
alerum68 Aug 06, 2007, 05:36 PM was searching on Google and found this about Python and XML.
http://pyxml.sourceforge.net/topics/
Haven't looked through it yet, but there maybe something we can use in this for switching XML inside of python.
EmperorFool Aug 06, 2007, 10:51 PM The problem has nothing to do with Python but rather how the game loads. When you start up the game, it reads in all of the XML files into internal structures. Only then does it load the Python and build the main interface.
The only way I can see to intervene would be at the DLL level, and even then I don't know that we can override which files to load. Probably so, since that's what Impaler's modular XML loading system did, and IIRC it was a DLL mod.
alerum68 Aug 06, 2007, 11:26 PM Didn't want to hear that.:p A good majority of the MODs I was hoping to add are XML rather then Python. Flavorful version and Functional version it's going to be I guess.
Going to take a look and divide the MODs into which is which.
Edit: Updated the front page. Going to try and get the Custom Domestic Advisor put in tonight.
EmperorFool Aug 07, 2007, 01:33 AM You can add the GP Tech Prefs (http://forums.civfanatics.com/showthread.php?t=226287) mod to the list of completed Python inclusions. Ruff is working on an expanded screen as a second tab to F6 as well.
Okay, I'll put that down for now (I'm so easily distracted!) and get back to the options screen. Oooh look, blinky lights! *scampers off*
alerum68 Aug 07, 2007, 02:00 AM Found another one I want to toss in.
http://forums.civfanatics.com/showthread.php?t=222334
Also, I'm adding some options to the Misc screen instead of giving them their own menu... Will do it with the above mod, as well as the CustomDomesticAdvisor.
alerum68 Aug 07, 2007, 06:26 PM I can't figure out why the Custom Domestic Advisor won't draw properly. I've merged it in just fine, but troubleshooting this is beyond me. I've tried looking for differences in the code between the new domestic, and the custom, and still can't get it to work. It draws the domestic advisor box, and I updated it to resize based on the current window size, but still can't figure it out.
EmperorFool Aug 07, 2007, 06:44 PM If you post up or PM me what you have, I'll take a look at it when I get back tonight (4 hours or so). Debugging is a PITA. I've found the console helpful sometimes, but less so with screens.
Thornburgh Aug 07, 2007, 11:12 PM Well, the Warlords version required a modified cvgamecore.dll. Could that be incompatible? Vanilla didn't require this. I hope you can fix it -- I really like that one.
I can't figure out why the Custom Domestic Advisor won't draw properly. I've merged it in just fine, but troubleshooting this is beyond me. I've tried looking for differences in the code between the new domestic, and the custom, and still can't get it to work. It draws the domestic advisor box, and I updated it to resize based on the current window size, but still can't figure it out.
ruff_hi Aug 08, 2007, 04:16 AM I can't figure out why the Custom Domestic Advisor won't draw properly. I've merged it in just fine, but troubleshooting this is beyond me. I've tried looking for differences in the code between the new domestic, and the custom, and still can't get it to work. It draws the domestic advisor box, and I updated it to resize based on the current window size, but still can't figure it out.Do you guys use the logger? Turn it on via the ini file and check the files in the log directory.
alerum68 Aug 09, 2007, 08:23 AM Alright, this is just driving me insane. I don't want the DLL on there, and it doesn't matter because the Warlords version doesn't work.... EF, you asked me to upload what I done? hehehehe... trust me, you don't want to see the mess I made of this file.:p I'll upload a clean version for you guys to look at, but you'd laugh at what I have. Think we could just try to update the Vanilla version of CDA to BTS instead of messing with the one with the DLL?
As for SoureForge... I misread something. It takes 3-4 weeks to pick up an abandoned project. We should be approved by the end of the week, isa.
EmperorFool Aug 09, 2007, 09:20 AM It sounds like it would be much easier to go from the Vanilla version. Do you have any idea from reading the code why the DLL changes were needed for Warlords? Does it include the C++ files that were changed, or just the DLL?
It sounds like we should just wait on SourceForge then. CVSDude only allows two accounts for free, and the other one is $7 per month after a week.
Ket Aug 09, 2007, 09:20 AM Ok I have a .04 with diplomacy text, EDU/Artstyles and some of impaler's compiled changes (like the buttons to move cities) as well as the last cut of the tec h screen changes... What should I do with this file?
EmperorFool Aug 09, 2007, 10:42 AM Right now I'm overhauling the options screen, and this will at least take today and maybe tomorrow. I'm gone for the weekend, so I hope to get this completed before I leave.
In the meantime, feel free to post it, but until we have SF.net set up, I'd recommend that we avoid doing merges -- especially within the same files.
ruff_hi Aug 09, 2007, 10:53 AM impaler's compiled changes (like the buttons to move cities)Are we making changes to the DLL? No problem if we are, just as long as they don't change the 'rules'. Also, what buttons? Do you have link?
Ket Aug 09, 2007, 11:00 AM No changes to the dll at all. That goes beyond the scope of the mod I assume.
http://forums.civfanatics.com/showthread.php?t=235834 would be the thread that the changes where in, both neverminds interface changes which is a compilation of stuff. And Impalers which is also a compilation.
EF are the options functional at .04?
FeedBack Aug 09, 2007, 11:32 AM Customer's comment: ;)
Are you guys already accepting orders? :mischief:
I'd really like to use the autologger again... And Ruff's is the best one out there... Could you please move it to the top of the "to merge" list? :please:
If you guys need some beta testers, I think I can provide you some FeedBack!
EmperorFool Aug 09, 2007, 12:19 PM Ket: 0.4 uses Ruff's RuffModScreen to set the options, and the mods I've merged into 0.4 use their own classes to read those options. In that sense, they are hooked up.
What I'm doing now is to replace RuffModScreen with a new screen that will make adding options and their screens. If you haven't added any options, hold off until I finish this. If you have, porting to what I'm doing should be fairly straightforward.
Feedback: Ruff's AutoLogger is at the top of my list of mods, but I have to finish what I'm currently doing first. If someone wants to take it on, feel free. And I'm sure we'll gladly welcome beta-testers. :goodjob:
Ket Aug 09, 2007, 01:51 PM Ok, no problem holding for 0.4 the reason i asked is i tested 0.4 and did not get any results from clicking around the rufmodscreen... Although i tested rather quickly....
EmperorFool Aug 09, 2007, 02:36 PM IIRC, I hooked up Raw Commerce, Scoreboard, and NJAGC options. In some cases you need to force the screen to redraw, e.g. open and close any city screen to get scoreboard/clock to redraw.
It looks like my rework of the options screen is working nicely. I have the above options all ported to the new code and am doing civ4lerts next. If all goes well, I'll post 0.5 so you guys can see how it works.
EmperorFool Aug 09, 2007, 07:40 PM The Options code seems to be behaving, so here is version 0.5 (http://forums.civfanatics.com/uploads/111657/CustomAssets_0.5.zip). The new options screen is accessed via Ctrl-Alt-O.
The options code consists of a few new modules and classes.
BugOptions Module
This is the main module for accessing options. It contains four important classes:
Option and OptionList Classes
This new class holds the metadata for a single option: name, INI section and key, title, tooltip, and default. OptionList adds values and format string for float dropdowns to Option. All the classes tie everything together internally using "name" while the INI file uses section/key.
BugOptions Class
This new class holds all of the Options metadata objects, provides access to the values, and reads/writes the INI file. You shouldn't use this class directly.
OptionsFacade Class
This was the old BugOptions class and fulfills the same role as before: a facade to be used as a base class for creating your own option sets.
An example is BugScoreOptions. Each subclass's module should now provide a getOptions() top-level function (at the bottom of the file). To use one, it's similar to before:
# top of module
import BugScoreOptions
BugScore = BugScoreOptions.getOptions()
...
# throughout module as necessary
if (BugScore.isShowDeadCivs()):
...
BugInitOptions
This is a new module that simply imports all the specific option group modules (see above) in one place to set them up properly. If you create a group of options, add it to this module.
Building the Options Screen
This next group of modules is responsible for building the BUG options screen (Ctrl-Alt-O) and saving the settings.
BugOptionsScreen Class
This class puts together the frame of the options screen: a TabControl consisting of any number of Tabs for grouping options. When you add a Tab, add it to this module.
Tabs don't have to relate one-for-one to option groups. The idea is for option groups to provide mod-specific granular access to options. Groups with few options will probably be put onto a single Tab (like Misc or General).
BugOptionsTab Class
This is the base class for all of the Tabs that make up the screen. It provides functions for building the Tab visually: adding boxes, separators, labels, checkboxes, dropdowns, and edit boxes. Screen layout is a PITA in most all windowing toolkits, and BtS's is no exception. I tried to provide some basic building blocks that will allow the most common layouts to be created easily. See the example Tabs, but be forewarned that they probably won't be enough.
When you want to create a new Tab, you'll extend this class (see BugScoreOptionsTab as an example).
CvOptionsScreenCallbackInterface Module
The callbacks for handling events in the options screen are at the end of this file. Unfortunately, I cannot figure out how to get BtS to allow me to use a separate file for this. :( You shouldn't need to use this module directly.
Examples
Working Options with Tabs:
NJAGC
Scores
Alerts - Civ4lerts, reminders
ruff_hi Aug 09, 2007, 08:03 PM The callbacks for handling events in the options screen are at the end of this file. Unfortunately, I cannot figure out how to get BtS to allow me to use a separate file for this.I couldn't do it either. I had everything looking right but it simply would not call any other file.
Ket Aug 09, 2007, 08:24 PM Ok to start getting a version control and readme system in place.
Is there anything else in .05 that is functional
From Options
NJAGC
Scores
Alerts - Civ4lerts, reminders Python Added:
* NJAGC
* Dead Civs on Scoreboard
* Attitude Icons
* Power Score
* Better Espionage Screen List
* Raw Commerce
* Civ4lerts and More Civ4lerts
* Reminders
* GP Tech Prefs
Is there anything else in there that is not listed or is not actually in.
EmperorFool Aug 09, 2007, 08:37 PM Readme, excellent idea! :goodjob:
That list looks complete.
alerum68 Aug 09, 2007, 10:08 PM Front Page updated. Tell me what you guys want included in the ReadMe file, and I'll have one by tomorrow, isa.
And.... I have some good news for you gentlemen.
The Bug Project SourceForge home page. (https://sourceforge.net/projects/civ4bug)
If you already have a SF user name, let me know and I'll add you.
:)
Ket Aug 10, 2007, 02:11 AM .05 has an issue.....
It seems like what you click and un-click in the settings menu is not saved.
It also means that the game does not dynamically change the settings.
Steps To Reproduce
1) Open Options Screen (CTRL+ALT+O)
2) Click "NJAGC"
3) Click Exit
Observe No Change
4) Re-enter Options Screen
Observe tick mark is reverted back to what it was originally.
5) Force Screen Redraw By Going Into City
Assumptions:
I am running the game out of a mod directory with no other python changes. This is in my My Documents My Games Beyond The Sword Mods Folder.
ruff_hi Aug 10, 2007, 04:07 AM I am running the game out of a mod directory with no other python changes. This is in my My Documents My Games Beyond The Sword Mods Folder.This could be the problem. Move it to customassets and test again.
Ket Aug 10, 2007, 04:24 AM Hmmm, Ok but I allways believe you should let the user back out there changes to go completely to default a modified custom assets is not a great way of doing that. Plus when we start to add other things for flavor we really want this in a mod.
ruff_hi Aug 10, 2007, 04:34 AM Hmmm, Ok but I allways believe you should let the user back out there changes to go completely to default a modified custom assets is not a great way of doing that. Plus when we start to add other things for flavor we really want this in a mod.Agreed. There are some code changes that EF knows about that should allow this mod to sit anywhere.
Ket Aug 10, 2007, 05:12 AM Not being much of a python addict, I assume its something to do with building the path to the ini file and mod directory from Elmer's old code for this.
activeModName = None
try:
import CvModName
activeModName = CvModName.modName
except:
pass
userDir = _getUserDir()
userAssetsDir = os.path.join(userDir, "CustomAssets")
userModsDir = os.path.join(userDir, "Mods")
userActiveModDir = None
userActiveModAssetsDir = None
installDir = _getInstallDir()
installAssetsDir = os.path.join(installDir, "Assets")
installModsDir = os.path.join(installDir, "Mods")
installActiveModDir = None
installActiveModAssetsDir = None
assetsPath = [userAssetsDir, installAssetsDir]
if (activeModName != None):
userActiveModDir = os.path.join(userModsDir, activeModName)
userActiveModAssetsDir = os.path.join(userActiveModDir, "Assets")
installActiveModDir = os.path.join(installModsDir, activeModName)
installActiveModAssetsDir = os.path.join(installActiveModDir, "Assets")
assetsPath.insert(0, userActiveModAssetsDir)
assetsPath.insert(1, installActiveModAssetsDir)
pythonPath = []
for dir in [os.path.join(d, "Python") for d in assetsPath]:
for root, subdirs, files in os.walk(dir):
if (len(files) > 0):
pythonPath.append(root)
def _test():
print "activeModName = " + str(activeModName)
print "userDir = " + userDir
print "userAssetsDir = " + userAssetsDir
print "userModsDir = " + userModsDir
print "userActiveModDir = " + str(userActiveModDir)
print "userActiveModAssetsDir = " + str(userActiveModAssetsDir)
print "installDir = " + installDir
print "installAssetsDir = " + installAssetsDir
print "installModsDir = " + installModsDir
print "installActiveModDir = " + str(installActiveModDir)
print "installActiveModAssetsDir = " + str(installActiveModAssetsDir)
print "assetsPath = "
for dir in assetsPath:
print " " + dir
print "pythonPath = "
for dir in pythonPath:
print " " + dir
if __name__ == "__main__":
_test()
and the cvmodname workaround...
I tried to hardcode my way into the mod directory but that did not work at all. I get the screen to pop but exit does not seem to work LOL, ill wait for EF to take a look into it.
In totally unrelated good news, it seems that lunar mongoose and crew in the sevopedia thread have made major progress.
I also have regiments "modualized" if we want to use the extended formations.
ruff_hi Aug 10, 2007, 06:39 AM This issue has been solved by someone else. We just need to lift the code.
Ket Aug 10, 2007, 07:56 AM Are you referring to jeckels code in the elmer thread?
ruff_hi Aug 10, 2007, 08:11 AM no. Look at this mod (http://forums.civfanatics.com/downloads.php?do=file&id=4155) that was uploaded by Gaurav. He modified the way that the mod locates the ini file so that it (the mod) can be placed in either of the mod directories or the customassets directory.
EmperorFool Aug 10, 2007, 08:36 AM I've taken that code and put it into BUG and am testing it now. Unfortunately I need to step out for a few hours, but I'll finish it up when I return. Actually, I'll upload it now so you guys can see if it works for you. My saved game starts up fine, and options are set. Try it in different (mod) locations, please.
Here ya go: Version 0.6 (http://forums.civfanatics.com/uploads/111657/CustomAssets_0.6.zip)
Note that there's a file, CvModName.py, in DrEJlib folder that you'll need to edit so it matches the name of the mod as you set it up.
#CvModName.py
modName = "BUG Mod 0.5"
Ket Aug 10, 2007, 08:57 AM .06 Placed in My Documents My Games Beyond The Swords Mods
With the CVModName Changed does not work.
Or I'm too alseep to be testing but I think its a matter of it not working. :)
Ket Aug 10, 2007, 09:01 AM Ok yea theres an issue with the directory walking.
Its leaving a null file named BUG Mod.INI
in C:\Documents and Settings\Seth\My Documents\My Games\Beyond the Sword
So its looking at the wrong directory still.
Yea I validated this by dropping in a non null version of BUG Mod.Ini to the my documents my games beyond the sword directory and it works (partially I have a list of ticks that seem to do nothing but till I get a working version no reason to open up other bugs right... I'll regress it when we get this issue fixed cause chances are i'm walking into development area's that have not been hooked up)
ruff_hi Aug 10, 2007, 09:13 AM Its leaving a null file named BUG Mod.INI
in C:\Documents and Settings\Seth\My Documents\My Games\Beyond the Sword
So its looking at the wrong directory still.Where do you think it should be looking?
EmperorFool Aug 10, 2007, 09:31 AM If you install it as a mod in your My Games folder, it should probably look inside the mod folder for the INI file. What about when you install it as a mod under the main install folder? The CvPath module seems like it should allow us to do any combos. I don't know if you can tell the difference between main install and user folder when it's a mod (or even when custom assets).
In that sense, perhaps looking where it is makes the most sense. Given that the INI is named for the mod, there won't be any conflicts with other mods.
Ket Aug 10, 2007, 10:01 AM Ok, the .ini folder should be in the mod directory. Anywhere else is just asking for errors when the user installs it. Plus if this mod is picked up by other mods (which it already is, for example i'm using it in the composite) it will make the matter much much worse.
The thing is, this was working for warlords, it would do a directory walk looking for the file, and use the last one it see's while there could be a conflict if they had the mod installed in multiple places for the most part that did not happen.
Theres been so many changes done to the ini file routines that its tough for me to determine where the error is. In the Civ Alerts Thread they supposidly have this working I'm not sure what we are doing to break it. But in the ruffmodcontrol.py file it seems like it does another walk, although that may tie in from the DEJ stuff....
Ill pour through the code and see what I Can do...
EmperorFool Aug 10, 2007, 10:07 AM Shoot, I missed a file when I did the merge. I gotta jet, but hopefully replacing RuffModControl.py with the following should fix the issue and make it walk the tree. Sorry about that.
## RuffModControl.py - used to control access to RuffMod ini file.
## modified from HOF MOD V1.61.001
## Hall of Fame Mod Context
## Used to access Mod Ini file
import os
import os.path
from types import *
from configobj import ConfigObj
import CvUtil
import CvPath
from CvPythonExtensions import *
def get_AutoLog_Path():
try:
AutoLogPath = RuffModConfigFile['AUTOLOG']['AutoLogPath']
except:
AutoLogPath = CvPath.userDir + '\AutoLog'
if (AutoLogPath == 'Default'):
AutoLogPath = CvPath.userDir + '\AutoLog'
if not os.path.isdir(AutoLogPath):
os.makedirs(AutoLogPath)
return AutoLogPath
def read_ConfigFile():
return ConfigObj(FileName)
def write_ConfigFile():
RuffModConfigFile.write()
return
FileName = CvPath.get_INI_File("RuffMod_2w.ini")
RuffModConfigFile = read_ConfigFile()
##----------------------------------------------------------------
class RuffModConfig:
def __init__(self):
pass
## Private Functions
def __get_keyvalue(self, section, key, default):
try: keyvalue = RuffModConfigFile[section][key]
except: keyvalue = default
return keyvalue
def __set_keyvalue(self, section, key, keyvalue):
RuffModConfigFile[section][key] = keyvalue
return
def __get_boolkeyvalue(self, section, key, default):
try: keyvalue = RuffModConfigFile[section].as_bool(key)
except: keyvalue = default
return keyvalue
## Get Functions
def get_int(self, section, key, default):
keyvalue = self.__get_keyvalue(section, key, default)
try: keyvalue = int(keyvalue)
except: keyvalue = default
return keyvalue
def get_str(self, section, key, default):
keyvalue = self.__get_keyvalue(section, key, default)
if not isinstance(keyvalue, StringTypes) : keyvalue = default
return keyvalue
def get_boolean(self, section, key, default):
keyvalue = self.__get_boolkeyvalue(section, key, default)
if keyvalue == False :
return False
elif keyvalue == True :
return True
else :
return default
def get_float(self, section, key, default):
keyvalue = self.__get_keyvalue(section, key, default)
try: keyvalue = float(keyvalue)
except: keyvalue = default
return keyvalue
## Set Functions
def set_int(self, section, key, keyvalue):
self.__set_keyvalue(section, key, keyvalue)
return
def set_str(self, section, key, keyvalue):
self.__set_keyvalue(section, key, keyvalue)
return
def set_boolean(self, section, key, keyvalue):
self.__set_keyvalue(section, key, keyvalue)
return
def set_float(self, section, key, keyvalue):
self.__set_keyvalue(section, key, keyvalue)
return
alerum68 Aug 10, 2007, 10:48 AM Alright, I should have SourceForge up and running with Subversion as the method I'm picking for version posting. I'll set it up with v 0.6, with the above code added. I'm changing version numbers on there slightly to allow for more beta version before release. 0.5 is now 0.05 and 0.6 will be 0.06. I'm sure we're not going to have 99 beta version, but I think this is probably going to go beyond 9 before a full release is made.
Some of the things that Sourceforge offers that we can use for free: Home Page, Forum, Newsletter, task list, and documentation. Since XML isn't being added yet, and my python skills are laughable, I'll work on this the next couple of days, and isa, I'll have it up and running.
https://sourceforge.net/docs/B01/en/#cvs_client - These are the programs you'll need. They'll allow you to retrieve the code, and easily write to the code on the repository. This will make sure we're not writing over each others code.
As soon as I get 0.06 upload with the most current code changes, then PLEASE start using it for code changes... I know it'll be a bit of a PITA at first, but once you get the hang of it, it'll become second nature.
Ket Aug 10, 2007, 10:53 AM I highly recommend using tortoise which allows full CVS control under windows native with right click check out and submits...
http://tortoisesvn.tigris.org/
Ket Aug 10, 2007, 11:28 AM Initial Testing Shows no Interface with the above added into
Yes I changed the FileName = CvPath.get_INI_File("RuffMod_2w.ini") line to match the ini file name of the mod.
load_module CvModName
Traceback (most recent call last):
File "<string>", line 1, in ?
File "<string>", line 52, in load_module
File "CvEventInterface", line 13, in ?
File "<string>", line 52, in load_module
File "CvCustomEventManager", line 24, in ?
File "<string>", line 52, in load_module
File "CvEventManager", line 12, in ?
File "<string>", line 52, in load_module
File "CvScreensInterface", line 3, in ?
File "<string>", line 52, in load_module
File "CvMainInterface", line 16, in ?
File "<string>", line 52, in load_module
File "BugNJAGCOptions", line 5, in ?
File "<string>", line 52, in load_module
File "BugOptions", line 5, in ?
File "<string>", line 52, in load_module
File "RuffModControl", line 11, in ?
File "<string>", line 52, in load_module
File "CvPath", line 116, in ?
File "CvPath", line 98, in _getUserDir
File "CvPath", line 106, in _getInstallDir
File "CvPath", line 86, in __getRegValue
WindowsError: [Errno 2] The system cannot find the file specified
load_module CvAppInterface
I thought I had found the error, chances are this needs to be changed as well though...
In CV Path
The function GetInstallDir is looking for warlords and should be
def _getInstallDir():
civ4Dir = __getRegValue(_winreg.HKEY_LOCAL_MACHINE,
r"Software\Firaxis Games\Sid Meier's Civilization 4",
"INSTALLDIR")
civ4Dir = os.path.join(civ4Dir,"Beyond the Sword")
return civ4Dir
Just for craps and giggles I put this in my [INSTALL DIRECTORY] Beyond The Sword Mods Folder and tried to load it there...and it does not work either.
Ok further investigation the registry location that jeckel posted the fix for may be incorrect its actually Sid Meier's Civilization 4 - Beyond the Sword
def _getInstallDir():
civ4Dir = __getRegValue(_winreg.HKEY_LOCAL_MACHINE,
r"Software\Firaxis Games\Sid Meier's Civilization 4 - Beyond the Sword",
"INSTALLDIR")
civ4Dir = os.path.join(civ4Dir,"Beyond the Sword")
return civ4Dir
Testing now....
Dammit to hell...
That gets me past load without errors now it blows up sky high when i go into the options and try to do anything.
Traceback (most recent call last):
File "CvOptionsScreenCallbackInterface", line 509, in handleBugCheckboxClicked
File "BugOptions", line 60, in setBoolean
File "RuffModControl", line 93, in set_boolean
File "RuffModControl", line 48, in __set_keyvalue
|