Can someone explain exactly how bulbing mechanics work ?

Acken

Deity
Joined
Sep 13, 2013
Messages
5,637
Location
QC, Canada
I'm talking about whether or not you'll get the tech or if you have to wait one turn.

I have a hard time wrapping my head around that one. What determines if you will get the technology after using a GS or if it will be "completed" only on the next turn despite being over the tech cost ?

Since their crappy fix of the overflow exploit you have to very carefully bulb in order to not hit the overflow cap (which is way too low by the way). But sometimes I'd really like to bulb twice in a turn without issues when at the end I have many GS to use.

What I feel matters is whether or not you got some non-overflow beakers into the tech but I'm really not sure.
 
I thought overflow was only possible with the World Congress policy that makes techs that have been researched cost 20% less?

Acken, if you don't know, then Sid Meier himself doesn't have a clue.
 
This is exactly what I wanted to ask. Basically I'm sitting on 10 GSs late game and I have to wait around 5 turns for the tech to properly research even though I sank enough beakers in it, you know, the usual Combustion => Combined Arms => Whatever follows in that bottom branch
 
My current feeling is that if the science you have is purely overflow from the last turn you won't get the tech. But if you spend one turn researching any tech it will somewhat dump that overflow on it and then you can safely bulb that tech or an entirely different one.

In the spain DCL I've been jumping back and forth between techs to make it work.

For example:
I bulb Electronics (4T) and it gives me the tech, I then want to get radar but the overflow of electronics gets me too close to completion of Balistics (2turns). If I bulb again I'll hit the cap. So I spend only one turn on that tech, dumping my overflow. Next turn I select Combustion and then bulb that, it gives me the tech. With that overflow I have enough to get Balistics on the next turn.
Then what I did is that I spent one turn on Atomic Theory dumping extra overflow after Radar. After that I was able to safely get Radar and Rocketery with 2 bulbs. This is where I don't really understand while Rocketery was given to me.
 
I'm talking about whether or not you'll get the tech or if you have to wait one turn.
I thought it was simply a matter of only being able to get one tech a turn. So if your first bulbing get you a tech or you got a tech by usual research, you have to wait for the next turn to be able to bulb and get the tech directly.
But to be sure, one would have to look at the code. Maybe asking in the modding forum would give a more definitive answer.

BTW, what's the actual limit of overflow and how does it work?
 
Thanks.
Science from GS bulb is 8*:c5science: per turn right? Or is it 10 turns and 8 is for Great Writers only?
So unless current tech would take at 8 or more turns to research, i shouldn't bulb a GS if i'm 2 turns from finishing it cause then i would loose some of the beakers. Never really payed attention to such details.
 
GS bulbs are the sum of the last 8 turns of research (excluding beakers from Rationalism opener bonus and Scholasticism), not 8 x current beaker run-rate.
 
Can you somehow lose overflaw beakers if you bulb only 1GS per turn?
Can you safely bulb a GS if you have researched a tech the current turn?
 
^ you may lose some overflow if you research techs that have low tech costs because the overflow is capped to 5 turns of beakers or the last tech researched, whichever is larger. say you have 1000 beakers left on a tech and the last tech you finished is only worth 5000, and if you pop a gs for 8000, you'd be losing out on 1000 beakers if your next tech is worth 1000.

I think the mechanics is like this: when you are in the course of researching a tech A and have the next tech B queued up, bulbing will grant you the current tech A. if after the bulb you can finish the next tech B with overflow, you'll get that tech B on the next turn, but not any techs after that even if your overflow is sufficient to cover tech C, D....
as I recall it, the only way to gain more than one tech in a turn without getting free techs is if you finish a tech on that turn, have a cheap tech queued and bulb for it.
 
I'm talking about whether or not you'll get the tech or if you have to wait one turn.

I have a hard time wrapping my head around that one. What determines if you will get the technology after using a GS or if it will be "completed" only on the next turn despite being over the tech cost ?

You can gain at most one tech per bulb. That is, a tech as a result of clicking the bulb button, i.e. as a direct result of those exact N beakers the bulb gives you. That much is simple.

Now, as to avoid hitting the heavy-handed overflow patch, I guess it's time to do some math.
Since their crappy fix of the overflow exploit you have to very carefully bulb in order to not hit the overflow cap (which is way too low by the way). But sometimes I'd really like to bulb twice in a turn without issues when at the end I have many GS to use.

What I feel matters is whether or not you got some non-overflow beakers into the tech but I'm really not sure.

The overflow is capped at (an amount less than what the bulb quantity is), so you absolutely must queue the research or you're guaranteed to discard those beakers. The answer, I suppose, comes down to

1. When you stream overflow into a tech, does that count as capped overflow?
2. What exactly is measured as "your previous 8(/5) turns of science" ?

I have run out of time; here's a reference for doResearch() in the CvPlayer code, which is called only on your turn-start setup. To answer this, you'll have to find where science goes when it is acquired at other times. And because the architecture is incredibly spaghetti, you'll have to find -every- reference to getting science.

Spoiler :
Code:
void CvPlayer::doResearch()
{
	if(GC.getGame().isOption(GAMEOPTION_NO_SCIENCE))
	{
		return;
	}

	AI_PERF_FORMAT("AI-perf.csv", ("CvPlayer::doResearch, Turn %03d, %s", GC.getGame().getElapsedGameTurns(), getCivilizationShortDescription()) );
	bool bForceResearchChoice;
	int iOverflowResearch;

	if(GetPlayerTechs()->IsResearch())
	{
		bForceResearchChoice = false;

		// Force player to pick Research if he doesn't have anything assigned
		if(GetPlayerTechs()->GetCurrentResearch() == NO_TECH)
		{
			if(GetID() == GC.getGame().getActivePlayer() && GetScienceTimes100() > 0)
			{
				chooseTech();
			}

			if(GC.getGame().getElapsedGameTurns() > 4)
			{
				AI_chooseResearch();

				bForceResearchChoice = true;
			}
		}

		TechTypes eCurrentTech = GetPlayerTechs()->GetCurrentResearch();
		if(eCurrentTech == NO_TECH)
		{
			int iOverflow = (GetScienceTimes100()) / std::max(1, calculateResearchModifier(eCurrentTech));
			changeOverflowResearchTimes100(iOverflow);
		}
		else
		{
			iOverflowResearch = (getOverflowResearchTimes100() * calculateResearchModifier(eCurrentTech)) / 100;
			setOverflowResearch(0);
			if(GET_TEAM(getTeam()).GetTeamTechs())
			{
				int iBeakersTowardsTechTimes100 = GetScienceTimes100() + iOverflowResearch;
				GET_TEAM(getTeam()).GetTeamTechs()->ChangeResearchProgressTimes100(eCurrentTech, iBeakersTowardsTechTimes100, GetID());
				UpdateResearchAgreements(GetScienceTimes100() / 100);
			}
		}

		if(bForceResearchChoice)
		{
			clearResearchQueue();
		}
	}
	GetPlayerTechs()->CheckForTechAchievement();

}

And here is the only declaration of chooseTech in that object:
Code:
void CvPlayer::chooseTech(int iDiscover, const char* strText, TechTypes iTechJustDiscovered)
{
	if(GC.getGame().isOption(GAMEOPTION_NO_SCIENCE))
	{
		return;
	}

	if(iDiscover > 0)
	{
		SetNumFreeTechs(GetNumFreeTechs()+iDiscover);
	}

	if(iDiscover > 0)
	{
		CvNotifications* pNotifications = GetNotifications();
		if(pNotifications)
		{
			pNotifications->Add(NOTIFICATION_FREE_TECH, strText, strText, -1, -1, iDiscover, iTechJustDiscovered);
		}
	}
	else if(strText == 0 || strText[0] == 0)
	{
		CvString strBuffer = GetLocalizedText("TXT_KEY_NOTIFICATION_NEW_RESEARCH");
		CvString strSummary = GetLocalizedText("TXT_KEY_NOTIFICATION_SUMMARY_NEW_RESEARCH");
		CvNotifications* pNotifications = GetNotifications();
		if(pNotifications)
		{
			pNotifications->Add(NOTIFICATION_TECH, strBuffer, strSummary, -1, -1, iDiscover, iTechJustDiscovered);
		}
	}
	else
	{
		CvNotifications* pNotifications = GetNotifications();
		if(pNotifications)
		{
			pNotifications->Add(NOTIFICATION_TECH, strText, strText, -1, -1, iDiscover, iTechJustDiscovered);
		}
	}
}
 
Well yeah of course you'll get at max only a tech per bulb.

To answer
1. Yes. For example if you have queued up something or not does not matter for the cap. If you have 2 techs queued and only 1 turn left on the first one, bulbing will destroy some of the bulb value. That much is clear from experience and tests. Only bulb techs that have 3 or more turns left to get (unless the tech cost is well over the cap).
2. It's 8 times the science produced by your cities. Not total science but city science.

As a side observation, the tech cap should be sometimes the cost of last tech as mentioned above. However after some test the "cost of last tech" is actually not what is displayed in the tree (when that cost is well over 5 times my city bpt). Maybe it uses the raw cost (without number of city modifier) or something.

I do not understand that level of coding sorry.
 
As a side observation, the tech cap should be sometimes the cost of last tech as mentioned above. However after some test the "cost of last tech" is actually not what is displayed in the tree (when that cost is well over 5 times my city bpt). Maybe it uses the raw cost (without number of city modifier) or something.

the patch notes specifically say unmodified tech cost of the last researched tech.

I'm interested in knowing how the OverflowResearch functions are implemented...
 
I think the mechanics is like this: when you are in the course of researching a tech A and have the next tech B queued up, bulbing will grant you the current tech A. if after the bulb you can finish the next tech B with overflow, you'll get that tech B on the next turn, but not any techs after that even if your overflow is sufficient to cover tech C, D....
as I recall it, the only way to gain more than one tech in a turn without getting free techs is if you finish a tech on that turn, have a cheap tech queued and bulb for it.

There seems to be more rules than this you can get 2 techs in a row with 2 bulbs. Sometimes, which is what I'd like to know.

But yes if you spend a turn of normal research on A then bulb you'll get A, B doesn't have to be queued.
But also if you spend a turn researching B and then select A and bulb A you will also get A.
 
There seems to be more rules than this you can get 2 techs in a row with 2 bulbs. Sometimes, which is what I'd like to know.

But yes if you spend a turn of normal research on A then bulb you'll get A, B doesn't have to be queued.
But also if you spend a turn researching B and then select A and bulb A you will also get A.

sorry, I overlooked the case where you bulb multiple times on a turn. it generalizes to at most granting a tech per bulb. this is only the case when each bulb you make gives you more beakers than necessary for the tech you are currently researching or queuing.

after the patch this isn't very efficient in most cases, unless your overflow is still below the cap after multiple bulbs.
 
No because sometimes you will bulb, go over the tech cost but dont get the tech you would have to wait next turn. And the thing is, if you bulb the following turn for the next tech, I'm 90% sure that you won't get the tech with the bulb.

The "why" it sometimes give it to you and why it sometimes dont is the purpose of the thread.

I probably should just make a video to explain.
 
yeah, you can bulb three times and get two techs and then hang the third one, or you can bulb twice, get one tech and hang on the second. Obviously a numerical reason for it, but nobody explained exactly how it works, yet
 
I thought this is pretty clear though...you can get at most 1 tech researched from 1 bulb, and N techs from N bulbs in one turn.
If you bulb while researching A, you get A on your turn with a bulb. if you have overflow afterwards that is more than enough for B, you will get it on the next turn. Under this situation, if you bulb again, you will generate more overflow and get B, but won't get C afterwards even though your overflow will cover C.

I'm pretty sure this is the case, so as long as your bulb beakers are enough, you can get one tech every time you bulb.

@stormtrooper412 with your case of bulbing N times and getting N-1 techs, does that count the tech that you were researching before you bulb?
 
you can get at most 1 tech researched from 1 bulb
Yes.
and N techs from N bulbs in one turn.
At most yes but sometimes you'll get N-1 with the last one stuck at 1 turn even though you have enough from the bulb to cover the whole cost. I must not be the only one to have seen that happen.
If you bulb while researching A, you get A on your turn with a bulb. if you have overflow afterwards that is more than enough for B, you will get it on the next turn. Under this situation, if you bulb again, you will generate more overflow and get B, but won't get C afterwards even though your overflow will cover C.

Yes but this is not the issue. All of this is clear.
 
Top Bottom