Platy's Peculiar Pleasant Posh Python

As for 3, it is not possible to adjust the cost itself via pure python.

Would this not work?

At the end of the players turn so they can't change the tech they are studying
If they are studying a reduced cost tech and have the bonus
If their current research on the tech plus their current research this turn is less that the total cost of the tech

Calculate the boost by taking the reduced cost percentage and applying it to the current research this turn to get the possible extra research this turn

Compare this with the amount to finish the tech and get the lesser

Add this lesser to their current research.​

I know you can get the amount of research done this turn and change it but I am not sure if you can get information on the tech in python or not, of course you must it is shown in Platy Tech screen.
 
What you are doing is adding an extra amount every turn, it is increased production, not reduced cost. Reduced cost would affect things, such as trading cost, hurry cost via GP. Also, tech is a team ability, not a player ability, reduced cost would affect team mates too.
 
What you are doing is adding an extra amount every turn, it is increased production, not reduced cost. Reduced cost would affect things, such as trading cost, hurry cost via GP. Also, tech is a team ability, not a player ability, reduced cost would affect team mates too.

Not what I originally meant. I meant that the cost of learning the tech would be reduced if you have the resource. This effectively does exactly that but by giving you increased research while you are doing the research into the tech.

I would not have thought it would have had any affect on other things at all since it is ownership of the resource that makes it easier to study.
 
Tech Bonus Modifier

Features:
Research Boost Per Turn for having access to selected Resources. Works like Tech Diffusion.
Each Tech can have multiple bonus modifiers, they will be added together.
Modifier is then multiplied with your final research rate to get boosted amount.
 

Attachments

  • Test0000.JPG
    Test0000.JPG
    104.7 KB · Views: 393
Just a heads up on two issues that have come to light with your Tech Chooser screen in recent times in Caveman2Cosmos

  1. If there is a tech that is hidden because it can't be studied then no techs will be highlighted to the right of that tech when selected even when that is not required for the selected tech.

  2. In hot seat multiplayer the tech tree shown for all players is the one for player one. IE Player 2 can see what player 1 has (and checking still when they select a tech to study it is player 1 that is affected)

I am trying to get a bit more information on both cases.
 
@DH

I believe the hotseat issue reported by Keldath has already been resolved.
 
More detail on the other tech tree issue.

If you have a tech that is can not be researched and is hidden (default option) then when you select any tech to the right of it on the screen to be studied no techs will be highlighted nor will they get the order numbers.

Normally if you select a tech way ahead then that tech will be selected as will all the unstudied techs needed to get to that tech. Each will also get a number indicating the order in which they will be studied.

The techs to the left of the hidden tech get numbered and highlighted but the ones to the right don't.

I forgot to check what happens if the tech is not hidden.

edit I notice that you removed the option of limiting the number of effects shown in the tech box.
 
When you said "To the right", I assumed you meant the hidden tech is a pre-req of the techs to the right?

If so, it makes perfect sense that clicking on them has no effect. If you can't research the disabled tech, naturally you cannot research any tech that needs it as a pre-req. That is how it works in BTS as well, no effect.

However, if C requires B and B requires A, and A is disabled:
Clicking C will have no effect.
But if B is acquired through means such as trading or WB, then clicking C will be allowed.

@Edit
All along it was never there IIRC. All I did was limit the number of tech panels to be shown, which effectively will limit the number of effects per panel.
 
When you said "To the right", I assumed you meant the hidden tech is a pre-req of the techs to the right?

No because if they require that tech they would not be able to be researched either and so would be hidden.;) I have not actually tried this as I have only done "dead end" techs so far.


Normally when you click on B what happens is that it is highlighted, all the techs needed to get to B are also highlighted and each gets a number to show the order that they will be researched in.

The situation:

A can not be researched and so is hidden.

B is selected and A is nowhere in the requirement tree for B or any tech needed by B, not even as an OR condition.

A is in a column somewhere between the column of first tech you need to learn to get to B and the column B is in.​

What happens:
The techs in columns to the right of the column A is in don't get highlighted or numbered. I think they still get put in the research queue but are just not shown on the tech chooser screen.

I am not sure what happens to those techs in the same column as A, I think those below were highlighted and those above were not but I may have that around the wrong way.
@Edit
All along it was never there IIRC. All I did was limit the number of tech panels to be shown, which effectively will limit the number of effects per panel.

Of course, the original C2C fix had that. I'll have to make sure that I use the supplied method - less maintenance for me to do;)


edit Forget all that about highlight etc being to do with the hidden tech. It happens if the tech is not hidden also and appears to be just a coincidence it happens there. It is happening at iGridX=47 or 48 for me at the moment. The number of tech in the list is over 100 (and less that 110) but we used to be able to select Future tech right from the start and have it work.
 
The actual error turned out to be a problem with the XML but

If so, it makes perfect sense that clicking on them has no effect. If you can't research the disabled tech, naturally you cannot research any tech that needs it as a pre-req. That is how it works in BTS as well, no effect.

why is a tech that requires a tech that you can't research also not capable of being researched and thus hidden?

Tech A (Glass Blowing) is not available to be researched and so is not shown on the tech tree when the "Hide Unresearchable" is selected, the default. Tech B (Concrete) requires A but is shown but is not selectable. Shouldn't it also be considered not able to be researched and thus hidden?

edit we are still getting the problem that with the BtS default tech chooser the techs all appear on one screen vertically but with your tech chooser one line of techs needs to be scrolled down to see. This is much better than it was btw, where it used to be three or four lines on the next page. (BOX_Y_SPACING = 0)
 
Although A is hidden, B can still be obtained via other means such as events. Thus, you can still research whatever B leads to, even though you cannot get A.
 
Although A is hidden, B can still be obtained via other means such as events. Thus, you can still research whatever B leads to, even though you cannot get A.

Except that is A can also get gotten via events or other means so perhaps it should be displayed also.

This screen is not a pedia it is about what you can choose to study now/next. You can't select them so why display them?
 
It uses a simple function "canEverResearch" to decide whether to display or not. This function only checks the tech itself and not the whole tree leading to it. To do what you want, is technically unfeasible due to the number of checks. To decide whether Future Tech is researchable or not, you have to check every single tech of your 1000+ techs that leads to it, which will just slow down the tree. And of course, every tech in the future era will come with another 900+ checks each.

Rather than making your players suffer from a slower tech tree by adding all these checks, it is easier for the modders themselves to make all those techs you want to hide, disabled, rather than just disabling the initial tech.

If you don't want to edit every tech xml, there is a CannotResearch function in CvGameUtils for that purpose. Just create a list, if it is in the list, disable.
 
I thought the techs were drawn left to right so you would only need to check if the techs leading to the tech was available and if not make this tech not available. Very little more than is already done when checking what eras to display I would have thought.
 
Nope, if you read the codes in placeTechs, it simply loops through all the techs and place them at their locations.
 
Here is a fun thing. With our, C2C, tech tree your Tech Screen makes it go over one page vertically. We have 19 tech places vertically. If I add another line of techs to the bottom to make that 20 it all fits on the one screen!:lol:

I went through your algorithm and it seems fine so it must be a problem with how the divide by 2 is happening in python somewhere.
 
Rewrote the algorithm for calculating the vertical spacing and expanded the usable area slightly for tech tree. 19 is the max for appearing on one page for default resolution.
 
Back
Top Bottom