[SDK] Advanced Unit Automations

Due to Keldath and smeagolheart problems with AUA, I wanted to check if I can do merge myself. Now I see where they may had run into troubles. There are few extra missions in RevDCM from DCM and from Afforess' SDK fix for inquisition. We need to understand where to put AUA missions in. So question, Afforess, do I put your CvEvums.h code to the last of the list of relevant area? I mean one area your AUA code is beside the code for DCM and your Inquisition SDK fix, well do I put your AUA below your Inquisition mission? And apply all code additions the same, put them at the end of the list in RevDCM code?
 
The order in CvEnums isn't strictly important, it's just that whichever order you make it must be identically reflected in CIV4MissionInfos.xml.
 
I thought I finally had it merged correctly after like 7 attempts.

I had no errors on compile and the new missions were showing up in the bar for use. I clicked them and my little warrior went off to guard the border and things looked good.

However then I made a worker and he could not do anything. Couldn't build roads, mines etc.

:( Back to the drawing board...
 
I thought I finally had it merged correctly after like 7 attempts.

I had no errors on compile and the new missions were showing up in the bar for use. I clicked them and my little warrior went off to guard the border and things looked good.

However then I made a worker and he could not do anything. Couldn't build roads, mines etc.

:( Back to the drawing board...

CvSelectionGroup.cpp, yes? If yes, I noticed right away from careful comparison and found that you have to put AUA code chunk before Build mission in there. I will do my own merge and then playtest RevDCM with AUA. If my workers do fine, then I will upload the files for you to figure out :). If I fail, I give up. I'm no code guru like Afforess :lol:.
 
Afforess, I made a 7th (9th? I lost count) attempt. No luck, this time, just crashes after leaving the main menu.

Please have a look at these. While there may be other problems I think in particular cvunitai.cpp is hosed.

CvSelectionGroup.cpp, yes? If yes, I noticed right away from careful comparison and found that you have to put AUA code chunk before Build mission in there. I will do my own merge and then playtest RevDCM with AUA. If my workers do fine, then I will upload the files for you to figure out :). If I fail, I give up. I'm no code guru like Afforess :lol:.

FYI... I'm going off the beta RevDCM 2.8 code from the SVN in the code I've posted. It's "more differenter" than the one from the thread.
 

Attachments

  • CvGameCoreUtils.zip
    363.8 KB · Views: 69
I'd be happy to help, but I pretty much need access to your entire mod and source code, since the error could be XML based, and I would need to reproduce it to be sure. Can you upload it somewhere?
 
I'd be happy to help, but I pretty much need access to your entire mod and source code, since the error could be XML based, and I would need to reproduce it to be sure. Can you upload it somewhere?

If you need to download my entire mod the link is in my signature, the source code is included with it, I just uploaded it today a couple hours ago before resuming trying to work with this. The changed source codes posted above are updated from those posted with the mod and the only difference between the source code with the mod.

The xml from your modcomp don't overlap, so they can just be plunked in there except civ4missioninfos which I added the espionage sleep (to the bottom).
 
Since this is just a simple RevDCM, this should be easier to debug than a big Destiny mod :D.

Worker is not able to build a road.

Here attached are RevolutionDCM mod itself with AUA merged in, Source folder of relevant source files, and save game you can open up with that modded RevDCM to see the worker not able to build a road.

NOTICE: Not making a mod but trying to help others
 
Since this is just a simple RevDCM, this should be easier to debug than a big Destiny mod :D.

Worker is not able to build a road.

Here attached are RevolutionDCM mod itself with AUA merged in, Source folder of relevant source files, and save game you can open up with that modded RevDCM to see the worker not able to build a road.

NOTICE: Not making a mod but trying to help others

My source code adds two small things to the 2.8 revdcm, events w/ images and great generals from barbarian combat.

I tried to get the base to work with revdcm several times (without the two extra modcomps) and didn't get it working - same thing workers can't build roads or mines or anything or just crash.

@Keldath: workers can build roads and everything since you left out the spy mission bits?
 
smeagolheart,
yes indeed,

my current mod version that i released have the auto orders without the spy stuff - saw no problem, tested it.

i have the source in my mod pack your welcomed to compare it to yours.

I downloaded your overlord2.3.5-ready(fixed) mod, I didn't see the automations available there when I started a game
 
Since this is just a simple RevDCM, this should be easier to debug than a big Destiny mod :D.

Worker is not able to build a road.

Here attached are RevolutionDCM mod itself with AUA merged in, Source folder of relevant source files, and save game you can open up with that modded RevDCM to see the worker not able to build a road.

NOTICE: Not making a mod but trying to help others

I don't know what to tell you guys, but Os79's code works perfectly for me. Here is what I did:

1.) Downloaded from Os79's post.

2.) Grabbed the latest RevDCM code from it's SVN

3.) Merged the two, when code conflicted, kept os79's code

4.) Merged in missing BTS source code

5.) Compiled a dll

6.) Ran the game, not modifying any XML from the folder Os79 gave

7.) Gave myself a spy, put it in an enemy city, gave myself the ancient era techs, then a worker.

Here are screenshots of it working in RevDCM:

Spoiler :




Here is the working copy of RevDCM, with the source code included.
 
Afforess, thanks :).

Mind telling me what I did wrong, please.
 
I don't know what to tell you guys, but Os79's code works perfectly for me. Here is what I did:

1.) Downloaded from Os79's post.

2.) Grabbed the latest RevDCM code from it's SVN

3.) Merged the two, when code conflicted, kept os79's code

4.) Merged in missing BTS source code

5.) Compiled a dll

6.) Ran the game, not modifying any XML from the folder Os79 gave

7.) Gave myself a spy, put it in an enemy city, gave myself the ancient era techs, then a worker.

Here are screenshots of it working in RevDCM:

Spoiler :




Here is the working copy of RevDCM, with the source code included.

I haven't tried the code yet, I'll post when I do, but my merge had the worker showing the icons for building roads and mines, but clicking on them (or other worker missions) did nothing. Nothing happened. I ran ai autoplay and the ai was building roads, but clicking on the button did nothing.
 
Should have tested the worker too. It's bugged. One sec, I think I know where the issue is.
 
Okay, fixed it. The error is not in my code, but the merge. I can not stress how important order is, especially with switches.

code:
 
Top Bottom