Advertisement
Civilization Fanatics' Center  

Welcome to Civilization Fanatics' Center.

You are currently viewing our site as a guest which gives you limited access to our site features. By joining our free community, you will be able to participate in the discussions, search the forum, send private messages, vote in polls, upload your own screenshots to the gallery, and access many other special features. Registration is fast, simple and absolutely free, so sign up today! If you have any problems with the registration process or your account login, please contact support.

Go Back   Civilization Fanatics' Forums > CIVILIZATION IV > Civ4 - Creation & Customization > Civ4 - Project & Mod Development > Civ4 - BTS Unaltered Gameplay (BUG, BAT and BULL)

Notices

Reply
 
Thread Tools
Old Mar 29, 2010, 03:21 PM   #2361
EmperorFool
Deity
 
EmperorFool's Avatar
 
Join Date: Mar 2007
Location: Mountain View, California
Posts: 9,624
Great. I'll take a look when I get home tonight.
__________________
Monkeys killing monkeys killing monkeys over pieces of the ground.
Silly monkeys, give them thumbs they make a club and beat their brother down.


BUG Mod - BTS Unaltered Gameplay
[ Forum | Download | FAQ | Known Issues | Troubleshooting | Modding Tutorial ]

BAT 3.0.1 QuickFix™ released Oct 24th
EmperorFool is offline   Reply With Quote
Old Mar 29, 2010, 09:05 PM   #2362
Lemon Merchant
Ignore List Citizen
 
Lemon Merchant's Avatar
 
Join Date: Jun 2008
Location: Red Sector A
Posts: 3,224
Images: 2
Quote:
Originally Posted by Stein M View Post
This is the save I made the same round that I took the screenshot that I posted:
Thanks for the quick reply btw
I had a go at the save this evening and played about 50 turns. It didn't happen for me. How about you, EF?
Lemon Merchant is offline   Reply With Quote
Old Mar 30, 2010, 12:33 AM   #2363
Stein M
Chieftain
 
Stein M's Avatar
 
Join Date: Oct 2008
Location: Trondheim, Norway
Posts: 10
Tried a new game, same settings. Happend again, after about 40 rounds.
I'll try and reinstall BAT.
Attached Thumbnails
Click image for larger version

Name:	Civ4ScreenShot0035.JPG
Views:	40
Size:	341.6 KB
ID:	248004  
__________________
"That is not dead which can eternal lie,
Yet with strange aeons even death may die."
Stein M is offline   Reply With Quote
Old Mar 30, 2010, 04:33 AM   #2364
Stein M
Chieftain
 
Stein M's Avatar
 
Join Date: Oct 2008
Location: Trondheim, Norway
Posts: 10
Reinstalled BAT. Same thing happens. I played a while longer on my ovn save, and the same ting happens with other units.
__________________
"That is not dead which can eternal lie,
Yet with strange aeons even death may die."

Last edited by Stein M; Mar 30, 2010 at 05:38 AM. Reason: Bad spelling...
Stein M is offline   Reply With Quote
Old Mar 30, 2010, 01:29 PM   #2365
Cybah
Emperor
 
Cybah's Avatar
 
Join Date: Jun 2007
Posts: 1,453
newest svn, never seen before, not reproducable:

Attached Thumbnails
Click image for larger version

Name:	Civ4ScreenShot0046.JPG
Views:	268
Size:	185.0 KB
ID:	248043  
Cybah is offline   Reply With Quote
Old Mar 30, 2010, 01:54 PM   #2366
EmperorFool
Deity
 
EmperorFool's Avatar
 
Join Date: Mar 2007
Location: Mountain View, California
Posts: 9,624
I haven't changed anything in the scoreboard code in ages. It sounds like some function that should normally return a single value returned multiple values. This error comes from using the % operator for string substitution in Python with a string that has too few places to substitute compared to the list of values being substituted.
__________________
Monkeys killing monkeys killing monkeys over pieces of the ground.
Silly monkeys, give them thumbs they make a club and beat their brother down.


BUG Mod - BTS Unaltered Gameplay
[ Forum | Download | FAQ | Known Issues | Troubleshooting | Modding Tutorial ]

BAT 3.0.1 QuickFix™ released Oct 24th
EmperorFool is offline   Reply With Quote
Old Apr 02, 2010, 01:15 PM   #2367
Cybah
Emperor
 
Cybah's Avatar
 
Join Date: Jun 2007
Posts: 1,453
hm how can I fix this?
Cybah is offline   Reply With Quote
Old Apr 10, 2010, 12:32 PM   #2368
EmperorFool
Deity
 
EmperorFool's Avatar
 
Join Date: Mar 2007
Location: Mountain View, California
Posts: 9,624
Quote:
Originally Posted by Stein M View Post
This is the save I made the same round that I took the screenshot that I posted:
Thanks for the quick reply btw
I tried it a couple times finally, but I don't see what you see. Does it happen every time? Do you have a lot of other apps running?
__________________
Monkeys killing monkeys killing monkeys over pieces of the ground.
Silly monkeys, give them thumbs they make a club and beat their brother down.


BUG Mod - BTS Unaltered Gameplay
[ Forum | Download | FAQ | Known Issues | Troubleshooting | Modding Tutorial ]

BAT 3.0.1 QuickFix™ released Oct 24th
EmperorFool is offline   Reply With Quote
Old Apr 10, 2010, 12:33 PM   #2369
EmperorFool
Deity
 
EmperorFool's Avatar
 
Join Date: Mar 2007
Location: Mountain View, California
Posts: 9,624
Quote:
Originally Posted by Cybah View Post
hm how can I fix this?
Somehow a score is being reported as None (not empty string or 0), and I don't see how that's possible. Did you add a calculateScore() gameutils callback handler?
__________________
Monkeys killing monkeys killing monkeys over pieces of the ground.
Silly monkeys, give them thumbs they make a club and beat their brother down.


BUG Mod - BTS Unaltered Gameplay
[ Forum | Download | FAQ | Known Issues | Troubleshooting | Modding Tutorial ]

BAT 3.0.1 QuickFix™ released Oct 24th
EmperorFool is offline   Reply With Quote
Old Apr 11, 2010, 03:44 AM   #2370
Stein M
Chieftain
 
Stein M's Avatar
 
Join Date: Oct 2008
Location: Trondheim, Norway
Posts: 10
Quote:
Originally Posted by EmperorFool View Post
I tried it a couple times finally, but I don't see what you see. Does it happen every time? Do you have a lot of other apps running?
This is very strange I think. Played some new games, different settings, and the same thing happens every time. Seems as the uniqe units in the mod gets changed into the original units graphic when they are inactive.

Nobody else has this problem??

Usualy I don't have many apps running, Firefox sometimes thats all.

Btw, I'm running a Intel Core2 Quad CPU Q6700 @2,66 GHz with 4 GB RAM
__________________
"That is not dead which can eternal lie,
Yet with strange aeons even death may die."
Stein M is offline   Reply With Quote
Old Apr 11, 2010, 06:24 AM   #2371
12monkeys
Prince
 
12monkeys's Avatar
 
Join Date: Nov 2003
Location: Germany, Europe
Posts: 395
Quote:
Originally Posted by Stein M View Post
This is very strange I think. Played some new games, different settings, and the same thing happens every time. Seems as the uniqe units in the mod gets changed into the original units graphic when they are inactive.

Nobody else has this problem??

Usualy I don't have many apps running, Firefox sometimes thats all.

Btw, I'm running a Intel Core2 Quad CPU Q6700 @2,66 GHz with 4 GB RAM
Could it be that this is graphic HW/driver problem? What card do you use, how much graphic mem, does it have the most actual driver?
__________________
:wq
12monkeys is offline   Reply With Quote
Old Apr 11, 2010, 07:31 AM   #2372
Cybah
Emperor
 
Cybah's Avatar
 
Join Date: Jun 2007
Posts: 1,453
Quote:
Originally Posted by EmperorFool View Post
Somehow a score is being reported as None (not empty string or 0), and I don't see how that's possible. Did you add a calculateScore() gameutils callback handler?
Hm no. Did not change anything to the scores.

Quote:
Originally Posted by Stein M View Post
This is very strange I think. Played some new games, different settings, and the same thing happens every time. Seems as the uniqe units in the mod gets changed into the original units graphic when they are inactive.

Nobody else has this problem??
I have had this in older versions of my mod. Could be caused by massive modules. Since I'm using no modules, I haven't seen this error anymore. You could also try using civcheck (must be around here somewhere).
Cybah is offline   Reply With Quote
Old Apr 12, 2010, 06:38 AM   #2373
phungus420
Deity
 
phungus420's Avatar
 
Join Date: Mar 2003
Posts: 6,296
In the new BULL SVN a debug dll complains because the new experience showing code tries to get CvPlayer::canConstruct to run on buildings that get passed to it which the civilization of the player cannot build. Adding this control statement fixes the assert:
Code:
for (int iJ = 0; iJ < GC.getNumBuildingClassInfos(); iJ++)
{
	if ((BuildingTypes)GC.getCivilizationInfo(kPlayer.getCivilizationType()).getCivilizationBuildings((BuildingClassTypes)iJ) == (BuildingTypes)iI)
	{
...do stuff
Code added to file below (pulled from latest BULL SVN):
__________________
Do not PM me with questions about modding. I will not answer. If you want help with something, start a thread on it, or post in a related existing thread.

Last edited by phungus420; Dec 02, 2010 at 07:15 AM.
phungus420 is offline   Reply With Quote
Old Apr 12, 2010, 01:49 PM   #2374
EmperorFool
Deity
 
EmperorFool's Avatar
 
Join Date: Mar 2007
Location: Mountain View, California
Posts: 9,624
Thanks, I'll just loop over the classes directly to get the list of buildings.
__________________
Monkeys killing monkeys killing monkeys over pieces of the ground.
Silly monkeys, give them thumbs they make a club and beat their brother down.


BUG Mod - BTS Unaltered Gameplay
[ Forum | Download | FAQ | Known Issues | Troubleshooting | Modding Tutorial ]

BAT 3.0.1 QuickFix™ released Oct 24th
EmperorFool is offline   Reply With Quote
Old Apr 12, 2010, 05:01 PM   #2375
phungus420
Deity
 
phungus420's Avatar
 
Join Date: Mar 2003
Posts: 6,296
Anther minor issue, which will only effect mods, is that if you give a unitclass to units that can't gain experience, the code displays that they will, because the domain type check returns true. In LoR I've set it up so that missionaries are of the "religious" unitclass, I do this so that Spiritual leaders grant them the free morale promotion, and thus an extra movement point. The game knows that these units do not get experience somehow, as barracks don't give them 3XP, but the BUG check does not. I'm not on my computer so I'm not sure how the game makes the distinction (At first I thought it was strength 0 units, but LoR also adds Spy promotions, and they are strength 0, and they are granted their XP from the buildings defined in the XML to do so; perhaps there is a check civ does to ensure there are no promotions available to a unit, and doesn't grant XP if this is true?), but I'll take a look at it and see if I can't add a check to fix this for mods.
__________________
Do not PM me with questions about modding. I will not answer. If you want help with something, start a thread on it, or post in a related existing thread.
phungus420 is offline   Reply With Quote
Old Apr 12, 2010, 05:29 PM   #2376
EmperorFool
Deity
 
EmperorFool's Avatar
 
Join Date: Mar 2007
Location: Mountain View, California
Posts: 9,624
Quote:
Originally Posted by phungus420 View Post
Perhaps there is a check civ does to ensure there are no promotions available to a unit, and doesn't grant XP if this is true?
This is exactly what it does, but it goes through CvUnit and not CvUnitInfo. This means I need an actual unit to use the existing code. I dug into it and thought that it eventually checked that the unit had a combat type and went with that.

So your missionaries receive a free Morale promotion. This means that the Morale promotion is valid for that combat type, right? I'll have to double-check, but if I see that it has an available promotion (Morale) I'll show that the unit will get experience. I'll also need to check that the promotion isn't given for free to the unit. That shouldn't be too hard.
__________________
Monkeys killing monkeys killing monkeys over pieces of the ground.
Silly monkeys, give them thumbs they make a club and beat their brother down.


BUG Mod - BTS Unaltered Gameplay
[ Forum | Download | FAQ | Known Issues | Troubleshooting | Modding Tutorial ]

BAT 3.0.1 QuickFix™ released Oct 24th
EmperorFool is offline   Reply With Quote
Old Apr 12, 2010, 05:42 PM   #2377
phungus420
Deity
 
phungus420's Avatar
 
Join Date: Mar 2003
Posts: 6,296
No, Morale is gifted to units of spiritual civs to "Religious units" in LoR, however it is not valid for the unit in any check that civ does (civilopedia, etc do not show this). If you click on a missionary in the civilopedia, it will not show any promotion as available, as the XML doesn't have any promotions available to "religious units". You can give any promotion to any unit via worldbuilder, or in UnitInfos and TraitInfos using the FreePromotions array tag, but doing so makes no difference in the civilopedia, or in the free XP grant from buildings, specialists, or religions.

Edit:
As a side note you can also cause a similar effect by making a unit go over it's max withdraw/intercept chances that are defined in GlobalDefines. As an example, in the XML say you give an attack sub the tactics promotion by default, and bump up it's base withdraw chance in the XML so that when created the attack sub has over a 95% withdraw chance. This unit will not be able to receive XP and cannot get any promotions (though the civilopedia will still show the promotions available that are in the XML). Not sure if that is useful at all, but it's related behavior.

Edit 2:
Quote:
Originally Posted by EmperorFool View Post
This is exactly what it does, but it goes through CvUnit and not CvUnitInfo. This means I need an actual unit to use the existing code. I dug into it and thought that it eventually checked that the unit had a combat type and went with that.
I think the simplest way might be to just to add a new function "bool CvGameCoreUtils::canRecieveExperience(eUnit)" which would find the combat class, and then loop over PromotionsInfos and see if the unit is valid to receive experience. Recently I've found that in many ways it's simply easier create my own function that does exactly what I want then trying to figure out how to string together a bunch of existing calls correctly.
__________________
Do not PM me with questions about modding. I will not answer. If you want help with something, start a thread on it, or post in a related existing thread.

Last edited by phungus420; Apr 12, 2010 at 06:00 PM.
phungus420 is offline   Reply With Quote
Old Apr 13, 2010, 06:48 AM   #2378
phungus420
Deity
 
phungus420's Avatar
 
Join Date: Mar 2003
Posts: 6,296
I couldn't figure out any other way to do it, other then to create a new function that took eUnit as an argument. CvUnit's functions required the unit to be an actual unit. Also fixed the loop, so it's just a single loop over unitclasses and then grabs the civilization's building for it. Anyway I fixed all issues with the Experience code I could find; except there is still a minor text thing, need to add XP to the text, as right now it just says +3 in green or red depending on if you have the building, or state religion or what not, instead of +3 XP. Source code in this post. I'm including 3 Cy files that exposes the new canAquireExperience(eUnit) function to python; not sure if you want to include that as the other experience functions aren't exposed, but I figured maybe some python modder would find it useful.

Also just as a question, I had to use this code to eliminate the assert caused by passing an invalid building type for a civilization to CvPlayer::canConstruct
Spoiler:
Code:
for (int iI = 0; iI < GC.getNumBuildingClassInfos(); iI++)
{
	BuildingClassTypes eBuildingClass = (BuildingClassTypes)iI;
	BuildingTypes eBuilding = (BuildingTypes)GC.getCivilizationInfo(eCivilization).getCivilizationBuildings((BuildingClassTypes)iI);
	if (GC.getCivilizationInfo(eCivilization).getCivilizationBuildings(eBuildingClass) != eBuilding || eBuilding == NO_BUILDING)
	{
		continue;
	}
	CvBuildingInfo& kBuilding = GC.getBuildingInfo(eBuilding);

Why isn't this good enough? How is it passing buildings from the wrong civ into CvPlayer?
Spoiler:
Code:
CvBuildingInfo& kBuilding = GC.getBuildingInfo((BuildingTypes)GC.getCivilizationInfo(eCivilization).getCivilizationBuildings((BuildingClassTypes)iI);)
__________________
Do not PM me with questions about modding. I will not answer. If you want help with something, start a thread on it, or post in a related existing thread.

Last edited by phungus420; Dec 02, 2010 at 07:15 AM.
phungus420 is offline   Reply With Quote
Old Apr 14, 2010, 04:38 AM   #2379
Thy_Spellcraft
King
 
Thy_Spellcraft's Avatar
 
Join Date: Sep 2008
Location: Stuttgart, Germany
Posts: 924
Using BUG 4.3 and BULL 1.1 (first installed BUG via *.exe, afterwards installed BULL) caused the following bug:

As you can see I didn't find HC yet, even though he's listed as Wang's WE!

And furthermore it seems that the property "Worst Enemy" for the Leaderheads on the fist page of the BUG-properties page doesn't work. Whether I selected or deselected it, the information of the WE's gets always shown on the hover text as well as on the foreign adviser sceen. I'm not sure whether I missunderstood this property but maby it's worth a look.

Nonetheless thx for the great improvements on BUG!!
Thy_Spellcraft is offline   Reply With Quote
Old Apr 14, 2010, 05:45 AM   #2380
phungus420
Deity
 
phungus420's Avatar
 
Join Date: Mar 2003
Posts: 6,296
Some more fixes, I'm no longer getting any asserts with these sources (the new BUG buiding defense functions were also tripping asserts). Let me know if you have a good idea around putting the canAcquireExperience(eUnit) function in CvGameCoreUtils.cpp, I can't think of any where else to put it where it will work though.
__________________
Do not PM me with questions about modding. I will not answer. If you want help with something, start a thread on it, or post in a related existing thread.

Last edited by phungus420; Dec 02, 2010 at 07:15 AM.
phungus420 is offline   Reply With Quote
Reply

Bookmarks

Go Back Civilization Fanatics' Forums > CIVILIZATION IV > Civ4 - Creation & Customization > Civ4 - Project & Mod Development > Civ4 - BTS Unaltered Gameplay (BUG, BAT and BULL) > Bug Reporting

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Bug Reporting Thorgrimm Fallout: The Rebirth Of Civilization 69 Jan 10, 2008 09:58 AM
reporting a bug Asgardus Civ4 - Fall from Heaven 4 May 25, 2007 07:35 AM
1.09, anyone still reporting open boarders bug? angelickitty Civ4 - Bug Reports 4 Nov 27, 2005 06:02 AM
No reporting mortalmadman Civ3 - Stories & Tales 1 Dec 14, 2004 08:38 AM
Reporting a bug GenghisK Civ2 - General Discussions 2 Apr 02, 2001 10:58 PM


Advertisement

All times are GMT -6. The time now is 07:28 AM.


Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
This site is copyright © Civilization Fanatics' Center.
Support CFC: Amazon.com | Amazon UK | Amazon DE | Amazon CA | Amazon FR