Merging BUG with other Mods

RevDCM has a game option where barb cities are placed on the map durring game start "Barbarian World" (ported from Fall from Heaven); also some scenario maps have barb cities included on the map, some of which are near human players. Will these things break the new fix?
 
Only when at least one barbarian unit is placed next to a human border which requires a founded human city. As long as those scenarios and scripts don't create founded human cities, it should be okay. It couldn't hurt to test, however. :)
 
I guess, this question somehow belongs to here (and it's to minor to open a thread for it):
I've adapted my modcomp to hide invisible techs to the Sevopedia (they are just skipped when the techs are cycled; the code in SevoPediaMain.py:
Spoiler :
PHP:
	def placeItems(self, widget, info):
		screen = self.getScreen()
		screen.clearListBoxGFC(self.ITEM_LIST_ID)

		screen.addTableControlGFC(self.ITEM_LIST_ID, 1, self.X_ITEMS, self.Y_ITEMS, self.W_ITEMS, self.H_ITEMS, False, False, 24, 24, TableStyles.TABLE_STYLE_STANDARD)
		screen.enableSelect(self.ITEM_LIST_ID, False)
		screen.setStyle(self.ITEM_LIST_ID, "Table_StandardCiv_Style")
		screen.setTableColumnHeader(self.ITEM_LIST_ID, 0, "", self.W_ITEMS)

		i = 0
		for item in self.list:
                        ###invisible dummy tech - sevopedia start
                        if info == gc.getTechInfo:
                                if gc.getTechInfo(item[1]).getGridX()<=0 or gc.getTechInfo(item[1]).getGridY()<=0:
                                        continue
                        ###invisible dummy tech - sevopedia end
and now somebody want's to merge it with BUG, but a small error occurs (only with BUG): When a technology after the hidden tech is selected, the selection of the technology does not appear properly. You can see it on this image here for example. Before "Kalender" there are 2 hidden techs, and now when selecting "Kalender" the second tech after it is also selected (distance of selection = number hidden techs before the selected tech).
I can see, what causes this, that somewhere else must be a function to detect the selection/count the techs before the selected one, but i can't find it.
Must be something BUG related, because it doesn't occur in the SevoPedia alone and i also can't find anything related in SevoPediaMain, so i request some help here.

Any idea, what could cause this?
Thanks in advance :).
 
I would start by moving your code to getTechList() as it's probably called elsewhere in SevoPedia, causing the problem you see.

Code:
	def getTechList(self):
		[B][COLOR="Red"]techs =[/COLOR][/B] self.getSortedList(gc.getNumTechInfos(), gc.getTechInfo)
		[B][COLOR="Red"]# remove hidden techs here
		# ...
		return techs[/COLOR][/B]
 
I just finished merging in the latest version of BUG and BULL on the SVN into RevDM, and BULL options still wol't respond. I'm not at all surprised by this, considering you said the fix was brittal, and that meeting a barbarian if you city was founded would break it. RevDCM has a few places in the python code that adds teamID and other checks to make sure -1 and such isn't passed into regular BUG code where such invalid returns are impossible. I know there are some specific differences with the barbarians as well related to these. There isn't much, probably just 2 dozen lines, and it's all stuff like just adding a if(eTeam >= 0) that RevDCM has in it that's different then BUG, but I was pretty sure a brittal fix related to the barbarians wasn't going to work when you said that was the cause.

Anyway, it's still broken :(

Can I just cut out this added barbarian check thing, if that's what is breaking it? If so how?

Edit:
If it helps at all, here is the RevDCM SVN that has the new BUG updates in it (I didn't bother putting them in the main trunk, as it's still not fixed yet, and I use this branch for most initial development):
https://revolutiondcm.svn.sourceforge.net/svnroot/revolutiondcm/branches/RevDCM%202.8/

As always, just give me some advice and direction and I'll begin work on things. I just am not sure what I should be doing. Also figured it may be easier for you to grab what's on the SVN directly, rather then directing me on what actions to take over the forums for every possible idea and test. Though getting things fixed is my top priority, and I don't expect you to fix RevDCM for us; mainly just pointing out where to grab the most recent build in case you want to work with it at all.
 
After merging BULL r171 I no longer get any bull.log file.

.. at least not immediately.. which was the whole point :hammer2:
 
You're saying that the map script creates founded human cities and then places barbarian units immediately adjacent to those cities' borders? That's the thing I was talking about above. It's possible RevDCM has some other code that's causing the same bad behavior.

Thus, I think the best solution would be to do what I wrote above: Have BUG tell BULL when it's ready. Until BULL receives that message it will use the XML/default values for options. I should be able to do that tonight or tomorrow.
 
I would start by moving your code to getTechList() as it's probably called elsewhere in SevoPedia, causing the problem you see.

Code:
	def getTechList(self):
		[B][COLOR="Red"]techs =[/COLOR][/B] self.getSortedList(gc.getNumTechInfos(), gc.getTechInfo)
		[B][COLOR="Red"]# remove hidden techs here
		# ...
		return techs[/COLOR][/B]

A thanks, that works itself, haven't tested it with BUG yet, because i had some other stupid problems with my code :blush:.
But instead i've moved the check to the generic getSortedList function, because the Sevopedia i have here (2.3.2; thought it was the most up to date version) doesn't have this function :confused:.

But again a thanks for the hint :).
 
You're saying that the map script creates founded human cities and then places barbarian units immediately adjacent to those cities' borders? That's the thing I was talking about above. It's possible RevDCM has some other code that's causing the same bad behavior.
It's not the map; I'm pretty sure it has to deal with how RevDCM handles civilizations and specifically barbarians and non existing civs. RevDCM has some different behavior here in order to populate the game with new civilizations that spawn from barbarian cities and rebellions. Like I said there is some code that works fine in BUG, but RevDCM has to add control statements to ensure the civ exists and what not. I'm fairly sure it's these differences that is causing the same issue that a founded city next to a barb would cause, even though that specifically is not occurring.

Thus, I think the best solution would be to do what I wrote above: Have BUG tell BULL when it's ready. Until BULL receives that message it will use the XML/default values for options. I should be able to do that tonight or tomorrow.
I agree, this sounds like the best solution. It's more a robust way to do it as well, and insures that this particular bug does not reappear.
 
Is it possible to use BUG and Better Bug AI with Varietas Delectat as well as the addon civs for Varietas? I would just use BAT, but I want to use the addon civs like Poland, Hungary and Italy. Thanks for any ideas.
Yes, it is, but I'm not sure how it will work with Better BUG AI. I've ported most of the Varietas Civ packs over to work with BAT, and I'm planning to release them shortly. I just have a kink or two to work out. It won't be long, though.

When they're released, Fuyu might have an idea if they will work with BBAI or not.
 
I merged RevDCM, which in turn contains BUG, with my mod. I have some issues though which I believe originate from BUG (and me modularizing RevDCM).

What defines which buttons are shown for a unit ?

I do get some wrong buttons for units. E.g. warriors have Naval Sentry rather than Land Sentry, Bombard instead of GoTo+Sentry and Inquisition in addition to the regular buttons (ok, so some of these probably originate from RevCM, but I assume the underlying cause comes from BUG).

Any idea what might cause this / what I should look into first ?

I believe this also has to do with modular loading, RevDCM, which is not modular does not have those issues. Turning it into modular XML (while leaving everything else untouched) causes the issues however.
 
Personally I think it's caused by WoC. Check with afforess and see how the RoM guys get new modular units working; never mess with the modular and WoC stuff myself for a few reasons. But afforess and some of the other RoM mod modders have alot of experience with this; if it is caused by modular loading, one of them will know.
 
I agree with phungus; I don't see how BUG could cause this. BAT includes both BUG and BULL and uses modular XML loading without these issues.

BTW, all units have the additional "Land Sentry" and "Sea Sentry" actions. They make the unit wake only when it spots that type of unit. It has nothing to do with the domain type of the unit performing the mission. This allows you to stick a sentry on a peninsula that will only awaken if it spots a sea-based unit.
 
I agree with phungus; I don't see how BUG could cause this. BAT includes both BUG and BULL and uses modular XML loading without these issues.

Afforess says this probably is an issue with the CIV4MissionInfos order, which it may be as I broke that down into modules too. I will undo that and let you know whether it makes any difference.

BTW, all units have the additional "Land Sentry" and "Sea Sentry" actions. They make the unit wake only when it spots that type of unit. It has nothing to do with the domain type of the unit performing the mission. This allows you to stick a sentry on a peninsula that will only awaken if it spots a sea-based unit.

Didn't know that. In RevDECM a warrior (or scout, the only two I tried) only has Land Sentry and Sentry, not Naval Sentry (so this would be different from what you say is true for BUG).

In my mod the warrior has Sentry and Naval Sentry (along with Barrage and Inquisition which he clearly should not have) but no Land Sentry.
 
It's possible that I'm wrong on that--I don't play with that option on because it requires recompiling the BULL DLL and I do that enough as it is. ;)
 
Ok, so MissionInfos certainly has an effect on this. When I had the non-modular version in, the buttons were changed. Unfortunately the order still was not right (I now have Land instead of Naval Sentry, Land Sentry and Sentry have switched places though, Ranged Bombard is still there, Inquisition is gone), so there must be some more to this.
 
You really need to use RevDCM's MissionInfos file, and then add your new missions to that piece by peace. That's what I'd recommend at least.

Edit: Looking at this more, all missions are hardcoded in CvEnums, and referenced in the dll quite a bit. You definitely can't just mess with these without doing some SDK modding to go along with it.
 
Sorry guys, I can't find it in this thread, is there an easy way to add a custome Civ to BAT?
It isn't hard to do, but it's best to add them as a module. I am currently working on porting over Avain's (and others) extra civs, and leader head pack for Varietas to work with BAT. It's almost complete, and when they're released, I will post some documentation on how to add extra things.

BAT is undergoing a bit of an overhaul in order to make it easier for things like this to be done, and to use EF's new framework for adding mods without breaking BUG. Currently, it's a hodge podge of cross connected XML files, etc. Basically, we want to create a standard method of adding things to make it easier for everyone.
 
I have downloaded and installed BAT 2.2 to use as a base for my mod and noticed that there appears to be duplicate functionality in CvMainInterface.py & CvMainInterface-PLE.py with the -PLE version importing PLE.py to do much of the PLE related work.

Looking in the PythonErr2.log it appears that CvMainInterface-PLE is not being loaded so I was wondering whether this is something I need to fix or intentional?

I also prefer the concept of having the PLE related code in its own module as it makes the CvMainInterface model tider and more focussed on its main purpose. Would it be possible then to remove the CvMainInterface.pl module and rename CvMainInterface-PLE.py so that it is picked up in preference...or am I totally off track here?
 
Back
Top Bottom