• Civilization 7 has been announced. For more info please check the forum here .

Questions about The BUG Mod

I guess the game does all the formatting when Sevo/Civilo-pedia is run and that is why it takes so long to open it the first time and less later.

Well, first I would like to make a printable tech tree. I am going to do this for Rise of Mankind with the modmod A New Dawn but I was told that BUG is the place to go for information on Sevopedia.

What is the main file to look at?
 
The tech tree is drawn by Assets/Python/Screens/CvTechChooser.py in the normal games assets. BUG has a tweaked version, but this isn't related to Sevopedia. Sevopedia just has the list of techs.

You may have better luck taking a bunch of screenshots and stitching them together in a paint program.
 
Is there anyway to get the left column down lower so you can see from the top to bottom, rather from bottom to NO top? Its the same for if you have alot of units also.

Please, allow me to be the first to ask the obligatory "what mod is that?" question.
 
The tech tree is drawn by Assets/Python/Screens/CvTechChooser.py in the normal games assets. BUG has a tweaked version, but this isn't related to Sevopedia. Sevopedia just has the list of techs.

You may have better luck taking a bunch of screenshots and stitching them together in a paint program.
Probably, if I just wanted to do it one time. But, AND gets updated regularly so I need to look at it long term. Time to learn Python and XML! :)
 
Rise of Mankind and alot of modmods.
Emphasis on the alot. ;)

@EmporerFool or any pyModder: What version of Python should I get? 2.6.1 is the current windows version available but I believe that Civ4 came out in 2005 and sometimes it is recommended to go with the version that the game was actually programmed in.

Thanks again for the help.
 
What version of Python should I get?

Civ4 on Windows uses 2.4. On Mac it uses 2.3. The only real difference is the set() class is build-in to 2.4 but a separate module (sets) on 2.3. BugUtil.fixSets() solves that little problem in modules that need them.

You won't be using the interpreter you download to run Civ4, so you can get any version. You might want to get the latest for the editor (unless you use a better editor such as Notepad++ or Eclipse), but make sure you don't use stuff in the language from 2.5+ (nothing jumps to mind). I have 2.4 and 2.5 on my machine, and I do occasionally use the interpreter to test out non-BTS Python stuff.
 
Hey guys!!

This may be a bit misplaced but I just installed BUG and it is working perfectly from what I can see. I am only confused about one thing. I cannot figure out how to select multiple units in one tile now. I used to just hold shift and click on the picture of the units I wanted to select, these pictures are now not there. I realize that this is probably something that is very obvious but it has been killing me since I started using this mod..

Thank you in advance..


Phad
 
Is there anyway to get the left column down lower so you can see from the top to bottom, rather from bottom to NO top?

The location of the text is driven by the EXE. You have two options: play with minimal interface (ALT + I) to drop it to the bottom of the screen or modify the DLL to limit the information shown. Clearly, that mod could benefit from having the specialists shown as "X <icon>" to reduce that one row of 3 specialists of the same type to 1 entry. I also thought of limiting the list of buildings, but which ones would I show?

I cannot figure out how to select multiple units in one tile now. I used to just hold shift and click on the picture of the units I wanted to select, these pictures are now not there.

Can you post a screenshot? The pictures should be there. Are the little dots and health bars visible with no unit icons, or is everything missing? Do you see the scoreboard? The action buttons? Your gold and advisor buttons along the top?
 
I will post a screen shot yes... (assuming I can figure that out) tee hee hee.... Is there a screenshot utility in the actual game or can I just use print screen?



edit: I am a dummy. I loaded the game and the pictures were there. I played and it seems that I had another info veiw mode(the start button) selected before. thanx guys!!!
 
You won't be using the interpreter you download to run Civ4, so you can get any version.
Thanks, I was thinking it was like compiled languages and intermediate/bytecode languages like .NET/Java.
 
Nope, each Python module is parsed and compiled when it is loaded (once per program run).
 
Are all the python scripts parsed at game startup or when needed? thanks again for the help.
 
If you look in Logs/PythonDbg.log you'll see messages for each module that is loaded (imported). The game loads a core set of modules (the ones in EntryPoints I believe). Any modules those import are loaded, and so on. Modules are imported only when the import statement is executed, so if you have an import inside an if block, it will only be loaded when that if test is executed and passes.

Most modules are imported at the top of a module so you won't need to worry too much about it. With BUG I did have to do some futzing to ensure module loading order, but I've since gotten a better handle on how BTS works with Python and don't need that as much.
 
I guess the game does all the formatting when Sevo/Civilo-pedia is run and that is why it takes so long to open it the first time and less later.

Well, first I would like to make a printable tech tree. I am going to do this for Rise of Mankind with the modmod A New Dawn but I was told that BUG is the place to go for information on Sevopedia.

What is the main file to look at?

I have a printable tech tree for AND in my sig. :p

But EF, people on the RoM forums have discussed this before. Is there a way we could use the CvGameTextMgr to output the text from the civilopedia in a more wiki-html style formatting so players could consult an out of game civilipedia online?
 
The easiest solution (though still a ton of work) would be to write some Python code that does what the Pedia does but writes to a bunch of HTML files instead of drawing on-screen. I could show someone that wanted to build such a beast how to do it, but I don't have that much free time to do it all myself.
 
The easiest solution (though still a ton of work) would be to write some Python code that does what the Pedia does but writes to a bunch of HTML files instead of drawing on-screen. I could show someone that wanted to build such a beast how to do it, but I don't have that much free time to do it all myself.

Less work that writing it all by scratch. RoM's civilopedia is 5x the size of BTS.

And I wouldn't want you take on said project, obviously it falls outside the purview of BUG. However, pointers would be appreciated.
 
First, I'd lay out some representative pages in HTML (one tech, one unit, one building, one civ, etc) just as there is one Python module per item in the pedia. Pick ones that have prereqs and other things so you know how you want to design the pages.

For the Python, everything will come from CyTranslator (localText) and the CvInfo classes. The text that you get from localText.getText() is quasi-HTML. You'll need to convert the embedded icons and links to actual HTML <img> and <a> tags, but that wouldn't be too hard in Python.

The trickier parts are where CvGameTextMgr is involved. It spits out text that has the icons already converted to Unicode characters. These can be changed to <img> tags easily enough, but references to other units, civics, etc are not links--they are just colored text. That can be handled similarly--it'll just take a bit more effort.

If you find someone (yourself?) that decides to take it on, I can go into more detail and assist with some of the tougher pieces. I'd start by doing one type of object from end-to-end: from CvFooInfo to final HTML.
 
First, I'd lay out some representative pages in HTML (one tech, one unit, one building, one civ, etc) just as there is one Python module per item in the pedia. Pick ones that have prereqs and other things so you know how you want to design the pages.

For the Python, everything will come from CyTranslator (localText) and the CvInfo classes. The text that you get from localText.getText() is quasi-HTML. You'll need to convert the embedded icons and links to actual HTML <img> and <a> tags, but that wouldn't be too hard in Python.

The trickier parts are where CvGameTextMgr is involved. It spits out text that has the icons already converted to Unicode characters. These can be changed to <img> tags easily enough, but references to other units, civics, etc are not links--they are just colored text. That can be handled similarly--it'll just take a bit more effort.

If you find someone (yourself?) that decides to take it on, I can go into more detail and assist with some of the tougher pieces. I'd start by doing one type of object from end-to-end: from CvFooInfo to final HTML.

Responding backwards,

I probably won't be involved in this project, I simply lack the time. However, I know some people who are interested, I'll make sure they see this post.
 
Top Bottom