Platy's Peculiar Pleasant Posh Python

Discussion in 'Civ4 - Mod Components' started by platyping, Jun 2, 2013.

  1. isenchine

    isenchine Empress

    Joined:
    Oct 18, 2010
    Messages:
    1,774
    Location:
    Brussels, Belgium
    Alright, thanks!
     
  2. Civciv5

    Civciv5 Grand Emperor

    Joined:
    Aug 14, 2011
    Messages:
    2,103
    Location:
    Nergenshuizen, Belgium
    Hello, platyping.
    I'm using your requirements mod, but was wondering if it would be possible to make a building/unit/project require more than one civic.
    Example: The Statue of Liberty requires Universal Suffrage and Emancipation
     
  3. platyping

    platyping Sleeping Dragon

    Joined:
    Oct 22, 2010
    Messages:
    4,626
    Location:
    Emerald Dreams
    Yes, if you modify the python codes.
    No, if you don't, it only reads them as "or" not "and".

    Nowadays, I lazy to mod so not a priority unless it is bug fixing.
     
  4. Civciv5

    Civciv5 Grand Emperor

    Joined:
    Aug 14, 2011
    Messages:
    2,103
    Location:
    Nergenshuizen, Belgium
    Well that's regrettable. I'll ask someone else then.
     
  5. Civciv5

    Civciv5 Grand Emperor

    Joined:
    Aug 14, 2011
    Messages:
    2,103
    Location:
    Nergenshuizen, Belgium
    Hello, platyping. I'm trying to use your Leaning Tower mod component in my mod. However, I have trouble applying the effect to a wonder that has another name.
    The python code requires the use of "Pisa" somewhere, how could I solve this.
     
  6. Dancing Hoskuld

    Dancing Hoskuld Deity

    Joined:
    Jul 5, 2004
    Messages:
    23,555
    Gender:
    Male
    Location:
    Canberra, Australia
    Just wondering if it was feasible to adjust your Requirements mod to create one for technologies. Wondering about
    1) requiring a bonus before you can study a tech

    2) requiring a building anywhere in the nation before you can study a tech

    3) reducing the cost of a tech if you have access to bonuses eg if you have tin and copper (reveled at metal working) then the cost of the tech Bronze Working was cut in half. There is a mod that does this one but I think it is a dll mod. edit found it (here) by TheLopez​

    edit2 Looking at it, it would be best to make it another mod with its own custom XML. 1 and 2 should be straight forward but I am not sure about 3, it probably would need to happen when you first start researching a tech and allow for stopping and starting the study as well as research flow over from the previous study.
     
  7. platyping

    platyping Sleeping Dragon

    Joined:
    Oct 22, 2010
    Messages:
    4,626
    Location:
    Emerald Dreams
    Nowadays lazy to make new components. 1 & 2 as you said, are very easy to do. It is more or less just shifting the codes from cannotConstruct to cannotResearch with mild editing. It shouldn't be an issue for you since you have decent python experience.

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

    Dancing Hoskuld Deity

    Joined:
    Jul 5, 2004
    Messages:
    23,555
    Gender:
    Male
    Location:
    Canberra, Australia
    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.
     
  9. platyping

    platyping Sleeping Dragon

    Joined:
    Oct 22, 2010
    Messages:
    4,626
    Location:
    Emerald Dreams
    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.
     
  10. Dancing Hoskuld

    Dancing Hoskuld Deity

    Joined:
    Jul 5, 2004
    Messages:
    23,555
    Gender:
    Male
    Location:
    Canberra, Australia
    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.
     
  11. platyping

    platyping Sleeping Dragon

    Joined:
    Oct 22, 2010
    Messages:
    4,626
    Location:
    Emerald Dreams
    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.
     

    Attached Files:

  12. Dancing Hoskuld

    Dancing Hoskuld Deity

    Joined:
    Jul 5, 2004
    Messages:
    23,555
    Gender:
    Male
    Location:
    Canberra, Australia
    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.
     
  13. platyping

    platyping Sleeping Dragon

    Joined:
    Oct 22, 2010
    Messages:
    4,626
    Location:
    Emerald Dreams
    @DH

    I believe the hotseat issue reported by Keldath has already been resolved.
     
  14. Dancing Hoskuld

    Dancing Hoskuld Deity

    Joined:
    Jul 5, 2004
    Messages:
    23,555
    Gender:
    Male
    Location:
    Canberra, Australia
    Thanks, I'll re download and check it out. What with loosing both my main hard disk and my backups in the one week, I am a bit confused:lol:
     
  15. Dancing Hoskuld

    Dancing Hoskuld Deity

    Joined:
    Jul 5, 2004
    Messages:
    23,555
    Gender:
    Male
    Location:
    Canberra, Australia
    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.
     
  16. platyping

    platyping Sleeping Dragon

    Joined:
    Oct 22, 2010
    Messages:
    4,626
    Location:
    Emerald Dreams
    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.
     
  17. Dancing Hoskuld

    Dancing Hoskuld Deity

    Joined:
    Jul 5, 2004
    Messages:
    23,555
    Gender:
    Male
    Location:
    Canberra, Australia
    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.
    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.
     
  18. Dancing Hoskuld

    Dancing Hoskuld Deity

    Joined:
    Jul 5, 2004
    Messages:
    23,555
    Gender:
    Male
    Location:
    Canberra, Australia
    The actual error turned out to be a problem with the XML but

    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)
     
  19. platyping

    platyping Sleeping Dragon

    Joined:
    Oct 22, 2010
    Messages:
    4,626
    Location:
    Emerald Dreams
    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.
     
  20. Dancing Hoskuld

    Dancing Hoskuld Deity

    Joined:
    Jul 5, 2004
    Messages:
    23,555
    Gender:
    Male
    Location:
    Canberra, Australia
    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?
     

Share This Page