Modder's Documentation

I always lose this dang thread whenever I want it! So I'm posting it here to be easily found in the future - in fact, @Dancing Hoskuld : if you CAN, pls link to this on post 1 somewhere:
C2C XML Modding
There was also a great one for Python modding in C2C somewhere... will have to dredge that up and put a link to it here soon too.

And I really should write out a 'how to get setup to mod in C++ for C2C' thread here someday soon.
done
 
In the future, anyone trying to get setup to use the dll will need this file so I'm putting it here for reference:
 

Attachments

  • fastdep.zip
    100.5 KB · Views: 129
Here's an other thing I asked in QMQ but no reply:

So here's something I tried to do:

I made a barbarian UU 'Tribe', a Settler replacement. It cannot found cities; all it can do is to build a Goody Hut by consuming the unit. I have set up Buildinfos and Improvementinfos properly, so I can turn the unit into a Goody Hut; that part works. The problem is that I don't know hove to "encourage" the AI to use the unit as I want that is: when spawned in some empty area it creates more Goody Huts.
I tried both UnitAI_Settle and UnitAI_Worker but no deference.
I also tried to give Goody Hut a +10% defense bonus and place a barbarian military unit to the same tile but still nothing.

Any idea ho to make it work purely with XML modifications? (It's a modular modmod so I don't want to touch any python files or else)
I'm modding AND2 but hope that maybe you can help since it's something that you might have tried as well.
 
Here's an other thing I asked in QMQ but no reply:


I'm modding AND2 but hope that maybe you can help since it's something that you might have tried as well.
If you're not getting it to work with the worker AI, then it will probably require some code work, either python or C++ can be used. You've tried everything I would've suggested to try.
 
Here's an other thing I asked in QMQ but no reply:


I'm modding AND2 but hope that maybe you can help since it's something that you might have tried as well.
If you're not getting it to work with the worker AI, then it will probably require some code work, either python or C++ can be used. You've tried everything I would've suggested to try.
It is possible to write AI code using python. Care is needed as it is easy to make it slow. The example I have seen is from an old version of Orion Veteran's Mine mode where he provides AI for the mines to go out and plant themselves. I'll see if I can find the code.
 
Is this the right place to ask about setting up the build environment correctly? I'm a bit impatient to wait for official bugfixes to go into the SVN, so I'd like to update my own personal install in the meantime. However, when attempting to build the DLL, I get the following error:

C:\Program Files (x86)\Microsoft Visual C++ Toolkit 2003\include\memory(498) : fatal error C1204: compiler limit : internal structure overflow

What am I doing wrong here?

I'd previously tried using VS2012, but couldn't even load the project file in that.
 
Is this the right place to ask about setting up the build environment correctly? I'm a bit impatient to wait for official bugfixes to go into the SVN, so I'd like to update my own personal install in the meantime. However, when attempting to build the DLL, I get the following error:



What am I doing wrong here?

I'd previously tried using VS2012, but couldn't even load the project file in that.
Try asking @Koshling maybe. Im not very good at helping with this.
 
Ok, it looks like that error only happens when targetting a Debug build. Do y'all just not bother with debug builds for testing purposes then?

I managed to compile a Final_Release build. Is that the correct build to be targetting?
 
Ok, it looks like that error only happens when targetting a Debug build. Do y'all just not bother with debug builds for testing purposes then?

I managed to compile a Final_Release build. Is that the correct build to be targetting?
Yes but I have no problem with debug builds either so I'm not sure what's wrong on your end.
 
Hmm, i can't get the dll to build with vs2017. Couldn't find an install for VS2012 either. Anything I can do?
 
Hmm, i can't get the dll to build with vs2017. Couldn't find an install for VS2012 either. Anything I can do?
Pretty sure only 2010 or 2008 works.
 
I'm getting somewhat closer in vs2017. Getting this error now:
BetterBTSAI.cpp(22): error C3861: 'InitializeCriticalSectionAndSpinCount': identifier not found, even with argument-dependent lookup

I'm 100% sure i'm using the correct SDK and c++ libraries, as well as correct include folder locations. Not sure what else to do atm.

Edit: Oy fudge, I actually built it successfully on vs2017.
 
Last edited:
I'm getting somewhat closer in vs2017. Getting this error now:
BetterBTSAI.cpp(22): error C3861: 'InitializeCriticalSectionAndSpinCount': identifier not found, even with argument-dependent lookup

I'm 100% sure i'm using the correct SDK and c++ libraries, as well as correct include folder locations. Not sure what else to do atm.

Edit: Oy ****, I actually built it successfully on vs2017.
If you can make that sort of breakthrough then you most definitely have more programming understanding than I do. If you start making fixes to things I'm sure we would be happy to invite you to the team.
 
Yeah I'm a Senior C# dev for work. I'm pretty okay with c++, though, maybe not the old stuff pre c++11. I'm looking around the code base a bit and trying to get a handle on where things are. Is there anyone working on the DLL on the team right now?
 
Anyone know what the name of the interface is for the available building list at the bottom when a city is selected? Can't seem to find it anywhere! lol.
 
Top Bottom