Need Help My SDK Modding

os79

Deity
Joined
Mar 14, 2009
Messages
3,095
Location
Eastern USA Coast
Hello,

First off, I complied the vanilla BtS CvGameCoreDLL as a practice with the PDF instruction given out in Modiki (with 3.19 makefile, of course). It worked just fine.

However, the problem came when I tried to compile a new DLL.

1. I copied the RevDCM sources over to my fresh copy of BtS sources (of course, I DO NOT use the original ones in BtS's directory and I'm glad I did that!). I overwrote when asked for. I just assumed that RevDCM already had all changes needed so I did not merge RevDCM to vanilla BtS sources.

2. I merged CAR sources to the working folder. I'm fairly confident I merged correctly. However, there were two files that gave me a little trouble for a while because CAR's changes and either Better AI or Revolution changes conflicted. But I figured out he workaround for that.

3. Now I followed the rest of PDF instruction.

4. I complied the project. I got errors and fiatal errors.

The problem is when I complied just vanilla sources, I get the SAME DLL file that works in vanilla BtS/Assets but when I merged CAR to RevDCM sources copied over vanilla BtS sources, I get the errors and failed build.

Can you help out here please?
Thanks.

My question is: was I wrong to copy over vanilla BtS sources with RevDCM sources in the first place?
 
I think the order should be as follows. Create a New Folder for your SDK.

  1. Copy over all the BTS Vanilla SDK Files from CvGameCore.
  2. Then copy your RevDCM Sources overtop of the vanilla sources (As there was a few files RevDCM did not include nor modify)
  3. and then merge the Car files into that new folder.

At least, that's what I would do.
 
I think the order should be as follows. Create a New Folder for your SDK.

  1. Copy over all the BTS Vanilla SDK Files from CvGameCore.
  2. Then copy your RevDCM Sources overtop of the vanilla sources (As there was a few files RevDCM did not include nor modify)
  3. and then merge the Car files into that new folder.

At least, that's what I would do.

That is what I described in OP.

But I now suspect my error. When I "Add Existing Items" I included the makefile file in the selected list. I re-compiled the vanilla BtS sources recently and it was a success.

So my next step is do as I and you said and re-compile without including makefile file in "Add Existing Items". If I still get failed build, I will definitely update this thread with my BuildLogs in case it may help you help me.
 
You need the makefile, you can't make the dll without the makefile (I don't know why, I just know it needs to be there). I am new to SDK modding too, so a pointer from me to you is-- start small. Get yourself used to looking at the code by just adding small, specific changes. You want RevDCM, well start out by doing just DCM or just Super Spies, peeling it out, you won't be able to WinMerge it out, so meticulously find the right spots for the changes and individually code them into the Vanilla BTS SDK. I have recently gotten Notepad++ and have found that it is endlessly more helpful than WinMerge. I know it sounds like a lot of work just to play what you want, but if you take your time, you'll see that you are teaching yourself the code. Also, as you have already realized, there are many people here who will help. Good luck, I hope this helps.
 
Here is the BuildLog so you can see where I went wrong.
Thank you.
 
Here is the order I would recommend:

  1. Copy BtS Source to a new directory
  2. Obey the PDF and compile base BtS DLL
  3. Put the damn PDF away. You are done now.
  4. Copy RevDCM folder's files over your own files in the new folder, but ONLY the .cpp and .h files
  5. Compile again. Just open your compiler and tell it to do a clean rebuild
  6. Verify that you now have a working RevDCM DLL
  7. Merge the Car source with your RevDCM source
  8. Compile without errors

Add Existing Items for the base BtS source should cover you for RevDCM completely. Unless they are already using WoC base, then they have more files in their source, but the probably distribute a MakeFile in that case, so you would ONLY IN THAT CASE, need to follow the PDF instructions all over again, starting basically from scratch in a new folder. And yes, whenever following the PDF, make sure that the folder only contains what the PDF says it should (cpp, h, 2 other files whose shared extension was wierd, and 2 folders)


Basically, once you have followed the PDF instructions, you are golden for 90% of all mods out there to just dump their cpp/h files over your copy of the base BtS ones and hit compile. The only time you need to take special actions would be if the mod you are working with has added files to the DLL.


EDIT: Looking at your build log, RevDCM already uses WoC, so you have to follow the PDF instructions from the start, use the MakeFile which RevDCM provides you instead of the one which the PDF gives you, and whenever the PDF mentions base BtS files, instead use the base BtS files after having been copied over by the RevDCM files.
 
Here is the order I would recommend:

  1. Copy BtS Source to a new directory
  2. Obey the PDF and compile base BtS DLL
  3. Put the damn PDF away. You are done now.
  4. Copy RevDCM folder's files over your own files in the new folder, but ONLY the .cpp and .h files
  5. Compile again. Just open your compiler and tell it to do a clean rebuild
  6. Verify that you now have a working RevDCM DLL
  7. Merge the Car source with your RevDCM source
  8. Compile without errors

Add Existing Items for the base BtS source should cover you for RevDCM completely. Unless they are already using WoC base, then they have more files in their source, but the probably distribute a MakeFile in that case, so you would ONLY IN THAT CASE, need to follow the PDF instructions all over again, starting basically from scratch in a new folder. And yes, whenever following the PDF, make sure that the folder only contains what the PDF says it should (cpp, h, 2 other files whose shared extension was wierd, and 2 folders)


Basically, once you have followed the PDF instructions, you are golden for 90% of all mods out there to just dump their cpp/h files over your copy of the base BtS ones and hit compile. The only time you need to take special actions would be if the mod you are working with has added files to the DLL.


EDIT: Looking at your build log, RevDCM already uses WoC, so you have to follow the PDF instructions from the start, use the MakeFile which RevDCM provides you instead of the one which the PDF gives you, and whenever the PDF mentions base BtS files, instead use the base BtS files after having been copied over by the RevDCM files.

Yay! Your instructions plus edited one works! Now off to merge in CAR changes.
One thing you said puzzles me:
You said to use "Rebuild Clean Solution" when there is no such thing like that. There is "Rebuild Solution" however. So I'm assuming you mean that.

Thanks again! :goodjob: :D
 
Yes, what Rebuild Solution does is first it cleans the solution (deletes all the .obj files) then it builds the solution. I just forgot precisely how the name was written :)

VOILA!

Finally got CAR merged into RevDCM and playtested it by AutoPlay for 100 turns and it works!

Thank you for your assist, man! :goodjob:!
 
Top Bottom