1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

The tuner

Discussion in 'Communitas Expansion Pack' started by Thalassicus, Apr 1, 2012.

  1. More4Fred

    More4Fred Chieftain

    Joined:
    Dec 19, 2007
    Messages:
    3
    Gender:
    Male
    Location:
    Pennsylvania
    I added the enhanced panels to my tuner, and on the map panel I was getting a nil value exception error. Now, I have lost all of the panels. Is there any way to add these panels back?
     
  2. ExpiredReign

    ExpiredReign Deity

    Joined:
    Jan 3, 2013
    Messages:
    2,450
    Gender:
    Male
    Location:
    Tasmania
    If you allow Steam to validate your installation, all the changed files inside the Civilization directory will be checked and any modified files will be reverted to the originals.

    Since these Tuner panel files are inside that directory structure, they will be "fixed".

    In the future it would be easier to rename the existing files to something like "Debug.ltp.orig" then any files you copy in won't destroy the originals. If any problems occur just rename the "*.ltp.orig" back to "*.ltp".
     
  3. ExpiredReign

    ExpiredReign Deity

    Joined:
    Jan 3, 2013
    Messages:
    2,450
    Gender:
    Male
    Location:
    Tasmania
    The latest so-called "Fall patch" has changed the layout for a number of these tuner panels.

    Until they are updated, I suggest not using the edited versions as found in the Communitas mod.
     
  4. ExpiredReign

    ExpiredReign Deity

    Joined:
    Jan 3, 2013
    Messages:
    2,450
    Gender:
    Male
    Location:
    Tasmania
    If anyone wants to help out with a bit of non-essential coding the tuner panels need a bit of a re-vamp.

    With our reworking of the tech-tree the code for selecting the next tech or the granting of techs based on era is out of whack.

    Each tech is given an ID that is stored in the database and the code chooses this to give the player the next tech, or set of techs that match the ID criteria.

    Now the problem arises when we shuffle the techs around, or create new ones like 'Carvel Hulls' that they are now out of sync with the next tech.

    eg. Carvel Hulls, the addition by us, has the ID 81, the last on the list. Yet it is a prereq for Astronomy, ID 31. Carvel Hulls is in the Medieval and Astronomy is Renaissance.

    What this means is if you give yourself Renaissance era techs and beyond, you will still have to research Carvel Hulls manually because its ID is too far removed from the count for those eras.

    eg.
    Code:
    while( pTechInfo~= nil ) do
       
       if (GameInfoTypes[pTechInfo.Era] <= 1) then
          pTeam:SetHasTech(iTechLoop, true);
       end
    
       iTechLoop = iTechLoop + 1;
       pTechInfo= GameInfo.Technologies[iTechLoop];
    
    A simple block of code that increments the ID taken from the Technologies table.

    Other techs have a similar problem where the next numerically selected tech is now a prereq for our later tech and if there are too many discrepancies the code just gives up.

    Also the Era buttons haven't been changed since the first release and therefore don't show the Atomic & Information eras.

    None of these changes are necessary for the game to run and are only mentioned here if anyone wants to fiddle around with the code in the tuner panels.
    They are a mixture of XML and Lua, but are very basic, good for testing out your skills.

    Best of luck to any who take it up.:)
     

Share This Page