[MODCOMP] Great Generals From Barbarian Combat Mod

OK, here's my attempt at making this mod BtS 3.17 compatible. As far as I can tell, I've done everything right. Except for one thing:

It doesn't work. :cry: And, I have no idea why. :wallbash:

So, if someone else could take a look-see, I would VERY MUCH appreciate it!!!

View attachment 187453

I don't know the mod but CvUnit.cpp seems to be merged wrong to me. You merged in combat experience where flanking strikes / damage should be done if I see it right.
 
Thomas, thanks once again. Here is a copy of TheLopez's original CvUnit.cpp. I remember being confused about seeing the bit referring to flanking, but I waved it off as a difference between BtS & Warlords...

I'll look again at CvUnit, make sure I didn't get the insertion point wrong. Thanks for the review.

View attachment cvunit.txt
 
Thomas, I did get the insertion point wrong. I've posted my discovery here. Turns out I didn't pay enough attention to what was nested where.

It would seem that a major reconstruction of CvUnit was done by Firaxis between Warlords v2.0.8.0 & BtS v3.17. The entire section where TheLopez made his additions was been cut... So, I haven't a clue. I can't even read the SDK language (XML & Wiki mark-up are my limits), let alone decpher where to go from here...

Any help, as usual, will be greatly appreciated... I'm gonna go :wallbash: of learning C++...
 
Thomas, I did get the insertion point wrong. I've posted my discovery here. Turns out I didn't pay enough attention to what was nested where.

It would seem that a major reconstruction of CvUnit was done by Firaxis between Warlords v2.0.8.0 & BtS v3.17. The entire section where TheLopez made his additions was been cut... So, I haven't a clue. I can't even read the SDK language (XML & Wiki mark-up are my limits), let alone decpher where to go from here...

Any help, as usual, will be greatly appreciated... I'm gonna go :wallbash: of learning C++...

It's done. I've merged this mod into CCV. The compiler is runing at the moment. If you want to try it again have a look at resolve combat that is where the part from update combat has gone. And be careful. Even Firaxis added a tag for barbarians!!! This new. You must set if from !xybarbarian() to true if I'm right.

I'll test my merge at night. Have got to work now. ;)

€: Testing was easy - it's working fine. Should I update this mod?
 
Posting an update to TheLopez's mod right here was what I was going to do, but I couldn't get it working...

If you could post an update for just this mod, I think that would be phenominal. Thank-you so much Thomas, you're a genius! I took a look at CCV, but it's a huge over-haul. Although I will play it eventually, just the seperated code changes for Great Generals from Barbs would be greatly appreciated.

Thank-you again!
 
You must place the folder Great Generals From Barbarian Combat Mod in ...\Beyond the Sword\Mods. It's not possible to rename the folder! And of course you must now load the mod called Great Generals From Barbarian Combat Mod. That's it. :)
 
Thanks Thomas, this is awesome.

I tried it last night and I have a few questions.

1. When I started a new game I no longer saw the scores of the other civs I encountered in the lower right. Is this part of this mod or is it a bug?

2. With this mod I was no longer able to rename any unit. Is this supposed to happen?

This is the only mod I have loaded and besides a few XML tweaks to generate more barbarians and allow you to retain more XP from them and upgrading I haven't touched anything else. With just my XML tweaks I didn't see any of these issues.
 
I did a standard merge and a recompile, no problem. I merged the python in and then had to add some of the python as the merge had BUG which has a modified event handler. According to my python trace log file the module loaded correctly, but in a test of going into worldbuilder and putting 20 barbarian warriors vs 1 tank. i did not get any GG exp.

Is there any way I can find out if it is loaded and firing correctly?


load_module CvGreatGeneralsFromBarbarianCombatEventManager
load_module CvConfigParser
load_module ConfigParser
load_module CvPath
01:32:23 BUG: adding event 'PreGameStart'
01:32:23 BUG: adding event 'BeginActivePlayerTurn'
01:32:23 BUG: adding event 'LanguageChanged'
PY:OnInit
load_module CvAppInterface
load_module xmllib
 
Thanks Thomas, this is awesome.

I tried it last night and I have a few questions.

1. When I started a new game I no longer saw the scores of the other civs I encountered in the lower right. Is this part of this mod or is it a bug?

2. With this mod I was no longer able to rename any unit. Is this supposed to happen?

This is the only mod I have loaded and besides a few XML tweaks to generate more barbarians and allow you to retain more XP from them and upgrading I haven't touched anything else. With just my XML tweaks I didn't see any of these issues.

Sorry. I've got no idea what's going on. On my computer is every thing fine. And of course nothing like that should happen.
 
I did a standard merge and a recompile, no problem. I merged the python in and then had to add some of the python as the merge had BUG which has a modified event handler. According to my python trace log file the module loaded correctly, but in a test of going into worldbuilder and putting 20 barbarian warriors vs 1 tank. i did not get any GG exp.

Is there any way I can find out if it is loaded and firing correctly?

Oh, be careful. It's not so easy to merge BUG with other mods!!! Both mods call information from a .ini. But only the ini that is called like the mod folder will be detected. And where did you look for the GG points? The status bar of BUG in the main screen won't show the points in time. Go with the mouse over the status bar or go into a city or do a turn - something like that to see the right points.
 
Oh, be careful. It's not so easy to merge BUG with other mods!!! Both mods call information from a .ini. But only the ini that is called like the mod folder will be detected. And where did you look for the GG points? The status bar of BUG in the main screen won't show the points in time. Go with the mouse over the status bar or go into a city or do a turn - something like that to see the right points.


I have both INI files in the mod directory, in theory the mod parser you are using and the one that bug is using are functioning correctly.

Is there a console command I can hit to get it to tell me if the value is true or false i know you exposed some of that to python, but can I call it from the console... (how do you bring up the console again anyway..lol
 
If unit is attacked between turns than it updates fine. If a unit is attacked during the player turn it does not update
 
@ DaddyHolby, it's working ok for me too. I know you haven't made any other changes except some minor XML stuff, but just for laughs, try loading without the mod, and make sure everything goes back to rights... If it does, you'll know for positive that it is the GGfBC mod, and if things are still screwy, you'll know that something else is going on...

@ Ket, this'll sound stoopid, but are you forwarding through to the next turn after being attacked? It sounds from what Thomas said that the BUG GG Counter only updates when a turn cycles.

So, for example:
- You have your turn, no attacks. GG Counter is at 3. <Enter>
- While the PC goes thru its [X number] of turns, you are attacked twice, and survive each.
- Your 2nd turn begins, GG Counter now at 5.
- You attack twice, and win each. GG Counter still at 5. <Enter>
- The PC does its stuff, and doesn't attack you.
- Your 3rd turn begins, GG Counter now at 7.

It's possible that the Python (I assume) code that generates the BUG GG Counter only updates when the turn cycles, and isn't dynamic during the player's turn. Or rather, more specifically, it is no longer dynamic during the player's turn, due to Python changes made by this mod.

@ Thomas, thank-you again. It is so nice being able to get GG points from Barbs again!! :goodjob:
 
I have both INI files in the mod directory, in theory the mod parser you are using and the one that bug is using are functioning correctly.

Sorry, but you can't have two parsers. That won't work. And with two ini files you will get trouble.
 
Sorry, but you can't have two parsers. That won't work. And with two ini files you will get trouble.

You can have as much parsers as you like, as long as they are using different procedure files.
And with the ini files: How is BUG then able to use its roundabout ten ini files?

With other words: BUG and another mod work well together.
 
@ DaddyHolby, it's working ok for me too. I know you haven't made any other changes except some minor XML stuff, but just for laughs, try loading without the mod, and make sure everything goes back to rights... If it does, you'll know for positive that it is the GGfBC mod, and if things are still screwy, you'll know that something else is going on...

Ok, I'll try it again tonight and see if I can get it working.
 
You can have as much parsers as you like, as long as they are using different procedure files.
And with the ini files: How is BUG then able to use its roundabout ten ini files?

With other words: BUG and another mod work well together.

No, that's not true. You will have to rework the links in the files. And if you got two times a file with the same name you can expect trouble.
 
Top Bottom