Uh, I still have that problem on the previous page that I can't get solved.
Someone help me, please?
It has been explained fairly well how to do it and I'm not sure anybody can write anything to help you anymore than what has already been written. The only solution I can think of is you uploading your entire mod and then somebody else figures out how you messed up.
With dll for 50 regular players + 1 barbarian = 51 total players, i will want to have 50 regular player + 3 barbarian players = 53 total players (If this is possible). One more thing this new Barbarians(i will call them ALIENS and INDEPENDENTS) will not spawn like regular barbarian, they will spawn throw some special events, like capturing capitals in destabilization your empire will split and some of your cities will join to INDEPENDENTS, if your neighbor lose capital too their cities will also join to INDEPENDENTS. One more thing INDEPENDENTS, ALIENS and BARBARIANS are in war with all players and in war between each other, and there is no DIPLOMACY with them, they are all some kinds of barbarians. How to add INDEPENDENTS and ALIENS ? Some idea ? Maybe to use code from FFH2 ?
You change MAX_PLAYERS in the dll (it's a define in a header. CvDefines.h or something). In theory the max is 64, but it seems that the actual max is a bit lower than that. Search around for the limit for MAX_PLAYERS. There is one you can set with a single line change and some people claim there is an even higher limit if you mod multiple lines.
The ideal solution would be to have one barbarian for each city as that would create complete anarchy with everybody attacking everybody, like the civil war in China 1800 years ago (the romance of the 3 kingdom event). However that would be quite advanced, if not impossible to implement.
I'm not sure what it takes to make a civ into a barbarian. Somebody else will hopefully know more on this topic.
threading is an advanced topic and I would stay well clear of it in your first programming attempts.
I generally have bad experience with threading. A thread can only use one CPU core, which mean the normal single threaded program like the civ4 DLL will only use one. To use all cores in a modern CPU, you will have to use multiple threads. However the threads runs in parallel and you have to keep them in sync and this thread control have a tendency to make multi threaded applications slower than if all were done in a single thread with no overhead. The exception is when you really know what you are doing.
My experience tells me that using one thread for each CPU core have a strange tendency to spend around the same time as the singlethreaded approach. I tried handling CvPlot::doTurn() in 8 threads and I cut 0.4 seconds away from a 60 second next turn delay and I made bug hunting much harder in the process. This example is surprisingly ideal because I managed to use all shared memory as read only, hence minimal overhead, but the OS level overhead still killed the gain. I even used
ThreadPool 0.2.3 (newest compatible with boost from civ4) to minimize overhead when moving on to the next plot. I think I had to compile the thread boost dll before I could use it, which in itself is quite tricky.
I agree with Archid. Threads is for people who know what they are doing. I would say kind of the same about making a game from scratch. Modding is fairly easy (relatively speaking) because somebody wrote the game engine for you. If you make your own game, you need to handle all the code where you draw on the screen and stuff. If you really want to make your own game, start by looking for an engine you can use. You can even find some, which are free for non-commercial use. Even with an engine, making a game from scratch sounds.... tricky for somebody who doesn't know the difference between an object and a thread.