Announcement

Collapse
No announcement yet.

PROJECT: Playest II

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #61
    Arrrgh - I am always forgetting that I am using 'generalized' functions for the otherwise repetitive stuff. Sorry for that - here comes the very short function that is missing above:

    Code:
    int_f TileHasFacility(location_t theLoc) {
    	location_t tmpLoc;
    
    	tmpLoc = theLoc;
    
    	if(TileHasImprovement(tmpLoc, TerrainImprovementDB(TILEIMP_FORTIFICATIONS))
    	|| TileHasImprovement(tmpLoc, TerrainImprovementDB(TILEIMP_AIR_BASES))
    	) {
    		return 1;
    	}
    	return 0;
    }
    The modding knowledgebase: CTP2 Bureau (with CTP2 AE Modding Wiki). Modern Times Mod (work in progress): MoT-Mod for CTP2.

    Comment


    • #62
      IIRC there is a constant which limits how much PW the Mayors have access to, and IIRC it is set to 5000. This means that when your PW goes above 5000 the mayors start building as they please.

      1) Make sure you keep your PW below 5000 i.e. build stuff every turn, or
      2) change the value of the constant (I do no recall which file it is in)
      ·Circuit·Boi·wannabe·
      "Evil reptilian kitten-eater from another planet."
      Call to Power 2 Source Code Project 2005.06.28 Apolyton Edition

      Comment


      • #63
        Originally posted by BureauBert
        Mayors always used to do that - maybe you didn't experience this behaviour due to poor PW reserve
        Or they were just disabled. Usually I never engange a mayor, because I can manage my cities better.


        // really odd: != does not work in the above statements
        To make it work you have to replace all the || by &&.

        And another piece of code you can improve:

        Code:
        int_f TileHasFacility(location_t theLoc) {
        	location_t tmpLoc;
        
        	tmpLoc = theLoc;
        
        	if(TileHasImprovement(tmpLoc, TerrainImprovementDB(TILEIMP_FORTIFICATIONS))
        	|| TileHasImprovement(tmpLoc, TerrainImprovementDB(TILEIMP_AIR_BASES))
        	) {
        		return 1;
        	}
        	return 0;
        }
        TileHasImprovement(tmpLoc, TerrainImprovementDB(TILEIMP_FORTIFICATIONS))
        || TileHasImprovement(tmpLoc, TerrainImprovementDB(TILEIMP_AIR_BASES)

        That above is a boolean expression and is evaluated to true or false, in terms of slic 1 or 0.

        So this piece of code should do the same:

        Code:
        int_f TileHasFacility(location_t theLoc) {
        	location_t tmpLoc;
        
        	tmpLoc = theLoc;
        
        	return TileHasImprovement(tmpLoc, TerrainImprovementDB(TILEIMP_FORTIFICATIONS))
        	|| TileHasImprovement(tmpLoc, TerrainImprovementDB(TILEIMP_AIR_BASES));
        }
        Of course this is the theory, but I remember to encountered some strange effects once, but I don't remember if it was this or something else.

        -Martin
        Civ2 military advisor: "No complaints, Sir!"

        Comment


        • #64
          Usually I never engange a mayor, because I can manage my cities better.

          // really odd: != does not work in the above statements
          To make it work you have to replace all the || by &&.
          Actually this is Pedrunn's comment and supposedly corresponds to his experience in testing - I didn't test it myself, it works, though it isn't extremely elegant this way.
          Code:
          return TileHasImprovement(tmpLoc, TerrainImprovementDB(TILEIMP_FORTIFICATIONS))
          	|| TileHasImprovement(tmpLoc, TerrainImprovementDB(TILEIMP_AIR_BASES));
          Of course this is the theory, but I remember to encountered some strange effects once, but I don't remember if it was this or something else.
          Must have been something like this, since all of the similar functions in GoodMod for checking tile improvements, terrain etc. are written using the explicit assignment of 0 and 1. But of course in theory you are right and I will eventually give the shortened version a try (maybe something will work differently with the AE playtest build).
          The modding knowledgebase: CTP2 Bureau (with CTP2 AE Modding Wiki). Modern Times Mod (work in progress): MoT-Mod for CTP2.

          Comment


          • #65
            well, normally i use mayors only in lategame when i just get too bored by micromanagement AND it gets irrelevant whether to use all cities most effectively.

            if i see that right, that piece of slic would prohibit myself to turn the fields into farms as well? actually thats what i did 2 turns later after my border had moved quiet a bit.

            Comment


            • #66
              Originally posted by Zaphod Beeblebrox
              if i see that right, that piece of slic would prohibit myself to turn the fields into farms as well? actually thats what i did 2 turns later after my border had moved quiet a bit.
              Well, yes, that's a bit odd - BUT you could still pillage your forts and air bases and build farms afterwards, not very elegant but leads to the same result.
              The modding knowledgebase: CTP2 Bureau (with CTP2 AE Modding Wiki). Modern Times Mod (work in progress): MoT-Mod for CTP2.

              Comment


              • #67
                Originally posted by BureauBert
                Usually I never engange a mayor, because I can manage my cities better.



                What is so rediculous about it, I mean the mayors act like the AI would act and the mayors don't know when it is time to engage an entertainer and when not. For example instead of engaging entertainers they do nothing and let the city revolt. So that I have to move the global sliders. That is not a very efficient exploitation of my people.

                -Martin
                Civ2 military advisor: "No complaints, Sir!"

                Comment


                • #68
                  Not only do i never use mayors, i dont even like the idea in them
                  I mean one of the most fun things about CTP2 and any civ game, is managing your cities, from ur powerhouse cities and cities in prime locations, to your crappy little cities and cities in the middle of nowhere
                  Oxygen should be considered a drug
                  Tiberian Sun Retro
                  My Mod for Tiberian Sun Webmaster of
                  http://www.tiberiumsun.com

                  Comment


                  • #69
                    Originally posted by Martin Gühmann
                    Usually I never engange a mayor, because I can manage my cities better.
                    What is so rediculous about it
                    Sorry, I didn't want to express any doubt about the fact that you are able to manage your cities more efficiently than the (current) AI logic does. It was just the slightly apodictic character of this statement that made me laugh a bit, but I didn't mean to bother you.
                    Originally posted by SMIFFGIG
                    Not only do i never use mayors, i dont even like the idea in them.
                    I think this is once more a question of individual preferences - I myself prefer using mayors as a basis and interfering where I know the "default" logic does not meet my needs, which are also changing during a game starting with few cities that need to be developed very carefully and probably ending up with 100+ cities and more production and PW than I need to conquer the rest of the world. Therefore I basically like the current system that offers the use of mayors to reduce micomanagement when it becomes tedious but allows the human player to take over control where and whenever he wishes to do so. The mayor's logic can be improved by tweaking the textfiles, by SLICing and maybe by further developments in the source code (which is alltogether more important for the AI than for the HUMAN player, specially when the HUMAN player is Martin or SMIFFGIG ).
                    The modding knowledgebase: CTP2 Bureau (with CTP2 AE Modding Wiki). Modern Times Mod (work in progress): MoT-Mod for CTP2.

                    Comment


                    • #70
                      GreatLibrary.TXT

                      Tracked down the "Debug Assertion Failed!" message that pops up, when executing the current CivCTP_dbg.exe with the german data files.

                      It's the Assertion from greatlibrary.cpp Line: 387
                      Expression: entry_pos < MAX_ENTRY - 6


                      This will be caused by a too long text in the [UNIT_KNIGHT_HISTORICAL] section of the german GreatLibrary.txt. This section contains 4299 characters, but the program will only handle 4090. I don't know if this is also true for other languages than german.

                      In the normal german version, this leads to a cut in the middle of a sentence after char number 4090.

                      What's the project conform way to correct this?

                      Feels someone already responsible for the GreatLibrary.txt and will shorten the mentioned section?

                      Or is it appropriate, simply to post a modified german/GreatLibrary.txt file in the "Altered Source code" thread?
                      Ludwig

                      Comment


                      • #71
                        Re: GreatLibrary.TXT

                        Originally posted by Lui2
                        In the normal german version, this leads to a cut in the middle of a sentence after char number 4090.
                        Is it just a cut in the middle of a word and an additional line wrap is inserted or is the rest cut off. From looking into the code I thought they had a solution if the text is too long, but probably it is just a cut off solution, unfortunatly I don't have the game here to check this.

                        Originally posted by Lui2
                        What's the project conform way to correct this?

                        Feels someone already responsible for the GreatLibrary.txt and will shorten the mentioned section?

                        Or is it appropriate, simply to post a modified german/GreatLibrary.txt file in the "Altered Source code" thread?
                        The solution cannot be to shorten the text there must be another solution. This is a limit for modmakers and this is not good. So until some finds a good solution for that problem, I can live this assertaion.

                        -Martin
                        Civ2 military advisor: "No complaints, Sir!"

                        Comment


                        • #72
                          ARGGG!!!!
                          I just found a bug!

                          I rush built a Sea Engineer in a city of size one, the warning message came up, and I clicked yes to disband the city, but instead of my Sea Engineer, I has a regular Settler

                          Now forming a Sea Engineer on a land tile may also cause problems, but I do not want a Settler! An Urban Planner would also be useless to me as there is no (useful) free land to settle.
                          ·Circuit·Boi·wannabe·
                          "Evil reptilian kitten-eater from another planet."
                          Call to Power 2 Source Code Project 2005.06.28 Apolyton Edition

                          Comment


                          • #73
                            Two more issues that need to be addressed:

                            1) Now that we have added the ability to have more than 8 civs in a game we need to add the ability to see more than 8 civs on the Science Manager window.

                            2) If the AI offers a counter proposal, the leader head chances from the correct one to.... Oh! that is supposed to be my head
                            ·Circuit·Boi·wannabe·
                            "Evil reptilian kitten-eater from another planet."
                            Call to Power 2 Source Code Project 2005.06.28 Apolyton Edition

                            Comment


                            • #74
                              I think disbanding cities over a certain size should be an atrocity
                              Oxygen should be considered a drug
                              Tiberian Sun Retro
                              My Mod for Tiberian Sun Webmaster of
                              http://www.tiberiumsun.com

                              Comment


                              • #75
                                Originally posted by SMIFFGIG
                                I think disbanding cities over a certain size should be an atrocity
                                You can not disband a city with more than 3 population points.
                                "Democracy is the worst form of government there is, except for all the others that have been tried." Sir Winston Churchill

                                Comment

                                Working...
                                X