• Our friends from AlphaCentauri2.info are in need of technical assistance. If you have experience with the LAMP stack and some hours to spare, please help them out and post here.

Quick Modding Questions Thread

I have several times thought about writing a string guide, partly for reference for myself. Most modders are only using the tip of the iceberg because there are so many poorly documented features, if documented at all. There are stuff like text color and size, pedia links, plural (1 ship, 2 ships, where ship is the word written with a singular/plural [ ]) word gender and likely more. The problem is that with this massive amount of options, I can't remember how to use half of them without research even though I used them before. This really calls for a guide. The problem is that writing a proper guide is not a 5 minute job.
God Emperor wrote a start to that sort of thing and I think there's a link to it on the first post of the modder's documentation in the C2C forum. I'll have to check. There's obviously a lot more to detail than what he did but I've found it helpful now and then.
And you should post listing your likes in the forum forum. I would like your post to show support. It sounds useful
I agree. Been meaning to for a while now.
 
GREAT post! I'd love to keep this post in a reference library. I was hoping that the 'like' feature on the forum would help me to build such a library but I can't see a way to get a list of all MY likes. I can see a list of all the likes on the posts I've made but what about the likes I'VE made? :( Maybe eventually eh? lol

Anyhow... great info! Thanks!
We actually have that in one of the documents in the Caveman2Cosmos forum. The one for modders, I think I even linked to the correct post in the OP index but I may not have. It was provided by God_Emperor if I remember correctly
 
We actually have that in one of the documents in the Caveman2Cosmos forum. The one for modders, I think I even linked to the correct post in the OP index but I may not have. It was provided by God_Emperor if I remember correctly
That's right but this added to that. Can we add a link to nightinggale's post here in the modder's documentation main post?
 
If my post is to be preserved for future reference, then I guess better make a better written one, which also doesn't leave out the advanced features.

That's right but this added to that. Can we add a link to nightinggale's post here in the modder's documentation main post?
I must be blind. I can't find the documentation you talk about. Can somebody please link to it. It sounds interesting.
 
How Pedia Links work is partly dll and partly python.

You will find a link section in CvPediaMain, where there is one whole chunk of for loops, through buildings, units, concepts etc.
For every item in each for loop, a isMatchForLink check is done to determine whether this item is the one you just clicked on, by checking the type tag "UNIT_LION" or the name "Lion".

Type tag is almost always unique, while names can be duplicated. Such as a unit called "Lion" and a resource called "Lion". Hence, when linking is done with type tags, it will almost always link to the correct pedia page. But if it is done with names, it will depends on which for loop is arranged on top in that python section. So instead of going to the unit lion page, it can bring you to the resource lion page.
 
@Nightinggale
THX for the detailed answer.
But how do I put a specific resource or religion icon into a text?
The code has to be setup to convert the appropriate icon slot in the gamefont chart to a referenceable Icon. He quoted where that's taking place IN the code, or at least a part of it. AKA, if not referring an automatic method to apply the kind of icon you're talking about through a reference to the state religion or something along those lines, it's probably going to take a little DLL work.

I could be wrong on this though.
 
The code has to be setup to convert the appropriate icon slot in the gamefont chart to a referenceable Icon. He quoted where that's taking place IN the code, or at least a part of it. AKA, if not referring an automatic method to apply the kind of icon you're talking about through a reference to the state religion or something along those lines, it's probably going to take a little DLL work.

I could be wrong on this though.
Ohh, now I get it.
Thanks!
 
I wanted to merge some of Platyping's stuff (Natural Wonders, limited movement, etc) with AND2 but failed of course. Somewhere I read that merging with BUG is different than vanilla BTS. Is there a tutorial for merging with BUG?
 
I wanted to merge some of Platyping's stuff (Natural Wonders, limited movement, etc) with AND2 but failed of course. Somewhere I read that merging with BUG is different than vanilla BTS. Is there a tutorial for merging with BUG?

Yes in the BUG documentation. It is fairly detailed too.

I have done his Natural Wonders in C2C but we have a different take on them. You might be able to use that as an example. 2 files in Python/Platying/ name starting NaturalWonders, plus the folder Modules/Natural_Wonders, plus the Config/ file NaturalWonders.xml
 
Being send here from the general quick questions thread with the following.

I got a save file from which I want to extract the map from. So I can use the map with other settings in a new game. Been told so far that it's a bit of an involved process. Is there a tool for this around somewhere?
 
I have done his Natural Wonders in C2C but we have a different take on them. You might be able to use that as an example. 2 files in Python/Platying/ name starting NaturalWonders, plus the folder Modules/Natural_Wonders, plus the Config/ file NaturalWonders.xml
Well... It didn't work. No NW was created in the 1st, second or later turns :(
Are you sure those are the only needed files?
Yes in the BUG documentation. It is fairly detailed too.
I haven't found it yet. Most mods have some BUG docs in their Docs folder but those tell me nothing about merging :(
 
Ah, that is right we do the natural Wonder placement differently as well. I think there may be a bit extra in the map generation code in CvMapGeneratorUtil.py.

The BUG documentation can be found in the BUG mod thread. They have a wiki or something similar.

I am in hospital at the moment with terrible connection to the internet. Getting out very soon after a successful op, just waiting for the Dr to say "go home";)
 
Do you mean this: http://bug-mod.blogspot.hu/ ?
No matter where I click it always send me to sourcefourge :undecide:
I was truly googling A LOT for "CIV4 BUG MOD tutorial/documentation/etc" but found nothing useful. So if anyone has that tutorial, please send me a copy. THX!

Get better DH!
 
Dear all! :)
I merged some heavy mod components and created my own (SDK+Python) mod for BTS to play with friends. I works normally in singleplayer, but in multiplayer we have OOS error every time units compat. It is very difficult to test mod in multiplayer without console, worldbuilder and hotkeys.
So, the question: How to unlock the debug mode in MULTIPLAYER Civilization IV, using SDK or Python?
P.S: searching the Internet shows nothing.
 
Last edited:
Dear all! :)
I merged some heavy mod components and created my own (SDK+Python) mod for BTS to play with friends. I works normally in singleplayer, but in multiplayer we have OSS error every time units compat. It is very difficult to test mod in multiplayer without console, worldbuilder and hotkeys.
So, the question: How to unlock the debug mode in MULTIPLAYER Civilization IV, using SDK or Python?
P.S: searching the Internet shows nothing.
OOS errors are one of the toughest things in the game to find and fix. PM me and we can talk through some things on that front but I warn it's going to likely take you months of dedication.
 
So, the question: How to unlock the debug mode in MULTIPLAYER Civilization IV, using SDK or Python?
Thank you for understanding, but the question stays... :)
The next one: Do you know any mod, that logs reasons of OOS? Or modder must guess the error's line.
And the last one: Python mods are easy to merge for me. I know python better, than C++. Are python mods less stable in multiplayer then SDK ones?
 
Is there a way to change the Golden Age requirements so that you don't need different types of GP to trigger them?

(IE using two Great Prophets instead of one Prophet and one other type)
 
Back
Top Bottom