[MODCOMP] New Profession: Inventor w/ TechTree

Hi Kailric,

Are you going to check your Inventor modcomp in the next few days/weeks/months?
Could you please check these features?

1) Missing light bulb icon in many screens?
2) Incorrect images in Civilopedia screen (profession screen)
3) Incorrect numbers in Invention screen ("current research": "1 turn left"... Actually it's "2 turns left ")
4) Sometimes AI will accept research pact, but nothing happens.
5) <iCenterPlotFoodBonus> tag doesn't work properly
6) Neither does the "reveal bonus" tag...

Thank you !
Hey, Robert, I am looking into these bugs now. Which screens are missing the light bulb? I am working on adding light bulbs to the Domestic Advisor General screen as it should be the only one in the Domestic Advisor that has the light bulb.

And what about the Incorret images in profession screen? What version are you useing on that is it the Core mod?

I will attempt to fix the other bugs you mentioned as well.
 
Hi Kailric !
Hey, Robert, I am looking into these bugs now. Which screens are missing the light bulb? I am working on adding light bulbs to the Domestic Advisor General screen as it should be the only one in the Domestic Advisor that has the light bulb.
I know I said "screens", but it's actually more than just screens. The light-bulb incon is missing in Domestic Advisor screen, in Civilopedia scren, and even panels and so on
(you can check this out:
Code:
CvGameTextMgr::setYieldHelp
...
szBuffer.append(gDLL->getText("TXT_KEY_MISC_HELP_BUILDING_YIELD", iBuildingYield, info.getChar()));
)
I think you "only" have to fix Gamefonts...

And what about the Incorrect images in profession screen? What version are you using on that is it the Core mod?
Well, yes it's the Core Mod.

I will attempt to fix the other bugs you mentioned as well.
Thank you very much :goodjob:
 
Hi Kailric, I'm glad to see you're back and are updating this modcomp. In the 2071 mod based on your TechTree modcomp, I didn't notice particular problems with lightbulbs, turn number or profession images. I'm wasnt aware of a RevealsBonus tag, but AllowsBonus seems to work. There is still a rare problem where sometimes cities won't start with an Inventors House, but it's not a big issue. I havent checked yet whether the CenterPlotFoodBonus works.

I was wondering if it could be possible to adjust <AllowsBuildingTypes> to use BuildingClasses instead of BuildingTypes? That's what was causing errors if all civs don't have access to the same BuildingTypes.
 
Hi Kailric, Hi Orlanth,

Your 2071 looks interesting Orlanth :goodjob:

About Kailric's inventor modcomp...Who am I to argue with the might God of thunder :bowdown: ? I'm only a privateer after all. ;)
However I must insist. Have you been using the "InventorCore" Orlanth or not?

I've checked again. In the InventorCore modcomp I've downloaded, gamefonts are missing... There isn't any "Res" folder.
As you can see, the bell icon "crushes" percentage icon (%). And inventor profession produces... NOTHING !
I'll try to send more screenshots ...
 

Attachments

  • InvCore.jpg
    InvCore.jpg
    81.9 KB · Views: 184
  • Inventor.jpg
    Inventor.jpg
    86.6 KB · Views: 227
  • Civ4ScreenShot0578.JPG
    Civ4ScreenShot0578.JPG
    122.4 KB · Views: 284
I've tried several values for CONTACT_YIELD_GIFT_ENCOMEIDA_TIMER to increase native gifts, but don't seem to be getting any gifts. Is this feature working, and should this timer variable be set lower or higher to increase gifts?
 
Neither does the "reveal bonus" tag
I think you're right that there's some problem with the AllowsBonuses tag. It usually won't allow the bonus yields after the tech's been discovered - hope this can be fixed in future because this is definitely a cool tag to have!
 
Hello Kailric,

I noticed that from line 4010 of CvCity.cpp, you have the following lines of code:

Code:
	///TKs Invention Core Mod v 1.0
	bool bBuildingExtra = true;
    if (eYieldType == YIELD_IDEAS && owner.getCurrentResearch() == NO_CIVIC)
    {
        bBuildingExtra = false;
    }
    ///TKe

However, the bBuildingExtra boolean is not used for anything; I assume it should have been used with the code below (starting from line 4017), which you left just as in vanilla:

Code:
	//building extra
	int iBuildingYieldProduced = 0;
	CvCivilizationInfo& civilizationInfo = GC.getCivilizationInfo(getCivilizationType());
	for (int i = 0; i < GC.getNumBuildingClassInfos(); ++i)
	{
		BuildingTypes eBuilding = (BuildingTypes) civilizationInfo.getCivilizationBuildings(i);

		if (eBuilding != NO_BUILDING && isHasBuilding(eBuilding))
		{
			iBuildingYieldProduced += GC.getBuildingInfo(eBuilding).getYieldChange(eYieldType);
			iBuildingYieldProduced += getBuildingYieldChange((BuildingClassTypes) i, eYieldType);
			iBuildingYieldProduced += owner.getBuildingYieldChange((BuildingClassTypes) i, eYieldType);
		}
	}
 
Interesting find Androrc. In my 2071 mod which uses this DLL, there is an issue with Inventors House sometimes not appearing as a free building and not being buildable (but this happens only in some games and it works normally in others).

Do you think this code fragment could be related to that error? On the other hand I'm wondering if it could be caused by some problem with initially assigning Inventors House to the list of buildinginfos. Then when it iterates through the buildinginfos list using getNumBuildingInfos (for example in CvCity.cpp line 201) it could sometimes miss Inventors House in some games.

About the problem with the AllowsBonuses tag, I would think that every turn it needs to iterate through all map tiles, and calculate the yields including bonuses where the owning player has the tech to use that bonus. This would also solve the problem where when a new bonus is created by an improvement, it doesn't update the tile yields. But I'm not really sure where this is in the code.
 
Interesting find Androrc. In my 2071 mod which uses this DLL, there is an issue with Inventors House sometimes not appearing as a free building and not being buildable (but this happens only in some games and it works normally in others).

Do you think this code fragment could be related to that error?

I don't think so, because this isn't related to initial buildings or allowed buildings, but to the extra production a building can give to a yield.

On the other hand I'm wondering if it could be caused by some problem with initially assigning Inventors House to the list of buildinginfos. Then when it iterates through the buildinginfos list using getNumBuildingInfos (for example in CvCity.cpp line 201) it could sometimes miss Inventors House in some games.

Maybe... I don't know what would cause that though. One possibility is comments on the CIV4BuildingInfos.xml file, since according to drjest, comments on xml files can cause random problems when parsing (including Firaxis comments).
 
Maybe... I don't know what would cause that though. One possibility is comments on the CIV4BuildingInfos.xml file, since according to drjest, comments on xml files can cause random problems when parsing (including Firaxis comments).
I had thought so too, unfortunately removing comments didn't fix it. I can't think of what's causing it :confused:
 
Heya guys, I am so sorry I havent got an update on this mod yet. Honestly, life has thrown me a super curve in the form of a women!:eek: :crazyeye: :goodjob:. I don't know when I'll be able to get back on this and finish my work, but if anyone should use the SDK I supplied and fixes any bugs I will be happy to post a patch though.
 
I seems it look like a good mod but i came not in on it it came an error when i go in on it.
 
Top Bottom