Could someone help a noob?

strykerfett

Chieftain
Joined
Dec 19, 2010
Messages
25
Hi guys, I'm currently trying to add Afforess's Advanced Diplomacy modcomponent to a mod I'm working on. The link to this modcomp is: http://forums.civfanatics.com/showthread.php?t=373463

Some of the files in this modcomp are python files I already have in another mod. I was wondering how I could "merge" or "mesh" the 2 files, and if I need any program to combine them.

Also, in the modcomp, there are text files for a CvGameCoreDLL, but I already have a CvGameCoreDLL in my mod. (The mod I'm editing is an old version of Rise of Mankind, 2.4 I believe) Besides allowing 32 civs, I have no idea what else is in it)

Basically my 2 questions are:
How can I add the content from the python files to my mod?
and
How do I compile a DLL from Civ 4 BTS source code and Afforess's that is in his Modcomp (that still lets me have 32 civs)?

Thanks in advance for any help!
 
@python:
Python files are text files, so you can open them with a normal text editor like Wordpad, Notepad or something similar.
I'd recommend downloading python itself, because it uses another editor (idle), which is probably the only editor which is able to display the python files totally correctly. Because you have to know that tabs and whitespaces matter for python (so if you copy stuff from one file to another, then you have to copy all whitespaces + tabs too), and the other editors often display that stuff a bit strange.


@dll: Asaf just wrote a new tutorial, see here.
 
thank you, I'm downloading python as I speak. Thanks for the tutorial, too. Hopefully I will be able to sort this all out!
 
I'd recommend downloading python itself, because it uses another editor (idle), which is probably the only editor which is able to display the python files totally correctly. Because you have to know that tabs and whitespaces matter for python (so if you copy stuff from one file to another, then you have to copy all whitespaces + tabs too), and the other editors often display that stuff a bit strange.
I'm actually having an issue with IDLE because it always (?) uses blank space for indentation - while most CivIV modules use tabs. So I'm actually editing things like CvEventManager and CvGameUtils in a regular text editor in order not to mess up the indentation. Because the only setting I can find in IDLE is how many blank spaces to use for each indentation level - not whether or not I wanna use blank space or not.

On merging Python: This is somewhat difficult and if one of the mods uses BUG as a base and the other doesn't, then you've got a problem. :p You should look into the BUG documentation for instructions on any Python work - if BUG is used with any of the mods in question.
 
alright, thanks Baldyr! Would you be able to possibly look over the files I'm trying to merge and tell me if it's atleast doable for a noob like me?
 
Sure, but if its "doable" then I might just do it. Because it would be about 50 times more time efficient than to tell you how to do it. (That time could instead be invested into learning Python - and then you'd be able to do these things yourself.) No promises, however...

Do you have the links?
 
alright thanks
 

Attachments

  • advanced_diplomacy.zip
    2.1 MB · Views: 39
  • mymod.rar
    689.9 KB · Views: 35
It looks like there is no merging of code required, whatsoever. Both mods use the BUG mod as a base, so all you need to do is copy the AD files into your mod's Python folder and replace whatever it is that will get replaced. According to the readme file you do however need to change the name of BUG_CvMainInterface.py to CvMainInterface.py - otherwise it won't work.

I didn't try this myself so no warranty included.
 
Well thank you very much, Baldyr! This saved me A LOT of trouble. I'm going to try it out, I just need to do some DLL compiling
 
Is your mod boasting SDK changes? :confused: Well good luck with that! :p
 
yeah :p The modcomp has a DLL needed, but I have one that has changes already in my mod, so I need to combine them. and thanks! I'm learning how to compile the DLL right now =)
 
Top Bottom