Announcement

Collapse
No announcement yet.

PROJECT: Playest II

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

  • So that means if I define a global variable and define a local variable with the same, the slic compile doesn't notice it.

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

    Comment


    • Again, I have some good news and some bad news from playtesting :

      The good news:
      max_player is not a member of g because the new variable has been renamed in the meantime: g.max_players does exist and work as expected as well as g.num_of_players

      The bad news:

      Code:
      TEST_Advance = AdvanceDB(ADVANCE_SUBNEURAL_ADS); // should be 161
      TEST_Building = BuildingDB(IMPROVE_CAPITOL); // should be 14
      still leads to this result:

      (see TestAdv and TestBldg).

      Unfortunately this gives me the choice of using either a build with player.government implemented or database access for AdvanceDB and BuildingDB working, which is a hard choice
      Maybe I could need a vacation anyways - or should I do something useful in the meantime, like getting rich and famous?

      Edit: corrected a typo "should be 61" -> "should be 161"
      Last edited by BureauBert; July 24, 2004, 17:59.
      The modding knowledgebase: CTP2 Bureau (with CTP2 AE Modding Wiki). Modern Times Mod (work in progress): MoT-Mod for CTP2.

      Comment


      • I just tried to reproduce the error BureauBert, but no success. In fact I was able to find something that went wrong afterwards I applied all the mini files from the alterd source files thread, but nothing slic releated. Here is the slic I did:

        Code:
        int_t int0;
        int_t int1;
        int_t int2;
        int_t int3;
        int_t int4;
        int_t int5;
        int_t int6;
        int_t int7;
        int_t int8;
        int_t int9;
        int_t int10;
        int_t int11;
        int_t int12;
        int_t int13;
        int_t int14;
        int_t int15;
        int_t int16;
        int_t int17;
        int_t int18;
        int_t int19;
        int_t int20;
        int_t int21;
        int_t int22;
        int_t int23;
        int_t int24;
        int_t int25;
        int_t int26;
        int_t int27;
        int_t int28;
        int_t int29;
        
        HandleEvent(ArmyClicked)'MG_TestSomething'pre{
        	int0 = BuildingDB();
        	int1 = AdvanceDB();
        	MessageAll('MGMAETestMessage');
        }
        
        MessageBox'MGMAETestMessage'{
        	Text(ID_TEST_MESSAGE_FOR_MAE);
        	Duration(1);
        	MessageType("GIFT");
        }
        And the string:

        TEST_MESSAGE_FOR_MAE "0: {int0}, 1: {int1}, 2: {int2}, 3: {int3}, 4: {int4}, 5: {int5}, 6: {int6}, 7: {int7}, 8: {int8}, 9: {int9}, 10: {int10}, 11: {int11}, 12: {int12}, 13: {int13}, 14: {int14}, 15: {int15}, 16: {int16}, 17: {int17}, 18: {int18}, 19: {int19}, 20: {int20} 21: {int21}, 22: {int22}, 23: {int23}, 24: {int24}, 25: {int25}, 26: {int26}, 27: {int27}, 28: {int28}, 29: {int29}"
        And the result is that int0 = 52 and int1 = 107, so 52 buildings and 107 advances in the original game, nothing unexpected regarding slic in my *.exe unfortunatly it contains something unexpected the const.txt.

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

        Comment


        • I just tried to reproduce the error BureauBert, but no success
          I just figured out that I am able to get the size of the database, too, but not the index of a particular record:



          (see the last line, the number of advances and buildings corresponds to my modded files, that's ok)
          Strange, but that's how it stands ...
          The modding knowledgebase: CTP2 Bureau (with CTP2 AE Modding Wiki). Modern Times Mod (work in progress): MoT-Mod for CTP2.

          Comment


          • I now use this code:

            Code:
            HandleEvent(ArmyClicked)'MG_TestSomething'pre{
            	int0 = BuildingDB();
            	int1 = AdvanceDB();
            	int2 = AdvanceDB(1);
            	int3 = AdvanceDB(ADVANCE_ADV_NAVAL_TACTICS);
            	int4 = AdvanceDB(ADVANCE_ADV_NAVAL_TACTICSS);
            	MessageAll('MGMAETestMessage');
            }
            int0 should contain the size of the BuildingDB, int1 should contain the size of the AdvanceDB, int2 should be 1, int3 should also be 1, because ADVANCE_ADV_NAVAL_TACTICS is the advance with index 1 in AdvanceDB. And int4 should be -1 and gives an slic error on /reloadslic, because ADVANCE_ADV_NAVAL_TACTICSS is not an advance. And from my screenshot everything is right. Maybe you should post how you access the AdvanceDB.

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

            Comment


            • Here is all of the relevant code. Meanwhile I have also tested all databases systematically, and I can get the size of all databases and the index of a particular record in most of the databases except for buildings and advances.
              Code:
              int_t		MOD_NUMOFTILEIMPS;		// no. of tileimps in this Mod
              int_t		MOD_NUMOFWONDERS;		// no. of wonders in this Mod
              int_t		MOD_NUMOFBUILDINGS;		// no. of buildings in this Mod
              int_t		MOD_NUMOFUNITS;			// no. of units in this Mod
              int_t		MOD_NUMOFADVANCES;		// no. of advances in this Mod
              int_t		MOD_NUMOFSTRATEGIES;		// no. of strategies in this Mod
              int_t		MOD_NUMOFGOVERNMENTS;		// no. of governments in this Mod
              int_t		MOD_NUMOFTERRAINS;		// no. of terrains in this Mod
              
              int_t		TEST_Tileimp;
              int_t		TEST_Wonder;
              int_t		TEST_Building;
              int_t		TEST_Unit;
              int_t		TEST_Advance;
              int_t		TEST_Strategy;
              int_t		TEST_Government;
              int_t		TEST_Terrain;
              Code:
              HandleEvent(BeginTurn) 'SetupGamestart' pre {
              
              	.
                              .
                              .
              	GetModInfo();
                              .
                              .
                              .
              	
              	DisableTrigger('SetupGamestart');
              }
              Code:
              void_f GetModInfo() {
              	MOD_NUMOFTILEIMPS = TerrainImprovementDB();
              	MOD_NUMOFWONDERS = WonderDB();
              	MOD_NUMOFBUILDINGS = BuildingDB();
              	MOD_NUMOFUNITS = UnitDB();
              	MOD_NUMOFADVANCES = AdvanceDB();
              	MOD_NUMOFSTRATEGIES = StrategyDB();
              	MOD_NUMOFGOVERNMENTS = GovernmentDB();
              	MOD_NUMOFTERRAINS = TerrainDB();
              }
              Code:
              HandleEvent(BeginTurn) 'SetupEveryTurnPre' pre {
              	int_t setupPlayer;
              
              	setupPlayer = player[0];
              
              	TEST_Building = BuildingDB(IMPROVE_CAPITOL);
              	TEST_Tileimp = TerrainImprovementDB(TILEIMP_COLONIAL);
              	TEST_Wonder = WonderDB(WONDER_GLOBAL_SURVEILLANCE_CENTER);
              	TEST_Unit = UnitDB(UNIT_SETTLER);
              	TEST_Advance = AdvanceDB(ADVANCE_SUBNEURAL_ADS);
              	TEST_Strategy = StrategyDB(STRATEGY_GOVT_FUNDAMENTALISM);
              	TEST_Government = GovernmentDB(GOVERNMENT_ADV_GANG);
              	TEST_Terrain = TerrainDB(TERRAIN_SPECIAL2);
              	
              	if (setupPlayer == 0) {
              		// TEST
              		Message(1, 'GeneralGamestatsMsg');
              	}
              
                              .
                              .
                              .
              }
              Code:
              GENERAL_GAME	"(Tileimps: {MOD_NUMOFTILEIMPS}, Wonders: {MOD_NUMOFWONDERS}, 
              Buildgs: {MOD_NUMOFBUILDINGS}, Units: {MOD_NUMOFUNITS}, Advances: {MOD_NUMOFADVANCES}, 
              Strat: {MOD_NUMOFSTRATEGIES}, Govs: {MOD_NUMOFGOVERNMENTS}, Terrains: {MOD_NUMOFTERRAINS})\n
              TestTileImp: {TEST_Tileimp}, TestWonder: {TEST_Wonder}, TestBldg: {TEST_Building}, TestUnit: {TEST_Unit}, 
              TestAdv: {TEST_Advance}, TestStrat: {TEST_Strategy}, TestGov: {TEST_Government}, TestTerrain: {TEST_Terrain}"
              And this is the resulting messagebox:


              Everything is fine, except TestBldg and TestAdv. I have also compared the textfiles coming with the playtest build to my modded textfiles - but as far as i can see nothing has been changed in their structure. I am clueless ...
              The modding knowledgebase: CTP2 Bureau (with CTP2 AE Modding Wiki). Modern Times Mod (work in progress): MoT-Mod for CTP2.

              Comment


              • Good morning Martin!

                Another observation: The line

                MIN_TURNS_BETWEEN_REVOLT

                you mentioned here is not included in the Const.txt delivered with the latest playtest build. Well this didn't cause any problems so far, but probably this indicates that the setup of the 2004.06.28 playtest posted in this thread might differ from your local setup in other aspects, too. I continue comparing the playtest textfiles to my modded textfiles anyway.
                The modding knowledgebase: CTP2 Bureau (with CTP2 AE Modding Wiki). Modern Times Mod (work in progress): MoT-Mod for CTP2.

                Comment


                • Well I just tried this:

                  Code:
                  HandleEvent(ArmyClicked)'MG_TestSomething'pre{
                  	int0 = BuildingDB();
                  	int1 = AdvanceDB();
                  	int2 = AdvanceDB(1);
                  	int3 = AdvanceDB(ADVANCE_SUBNEURAL_ADS);
                  	int4 = BuildingDB(IMPROVE_CAPITOL);
                  	MessageAll('MGMAETestMessage');
                  }
                  I just tried this, and the result is that ADVANCE_SUBNEURAL_ADS has the index 95 and IMPROVE_CAPITOL has index 15 in BuildingDB of the default game. So far your code looks ok as well. And it doesn't look like the two values are overwritten somewhere else. Another possibility is that with John's playtest version is something wrong.

                  Originally posted by BureauBert
                  Another observation: The line

                  MIN_TURNS_BETWEEN_REVOLT

                  you mentioned here is not included in the Const.txt delivered with the latest playtest build. Well this didn't cause any problems so far, but probably this indicates that the setup of the 2004.06.28 playtest posted in this thread might differ from your local setup in other aspects, too. I continue comparing the playtest textfiles to my modded textfiles anyway.
                  Of course we use different versions of the game, the first difference is that I added all the changes from the altered source files thread to my setup, and I tested it on a debug version. So this means I should compile a release version, maybe I should release a playtest version. Unfortunatly I still have the problems with the Const.txt in, and I had to notice that obviously noone has tried to compile the game with the altered Actor.h, otherwise the file would have been ok.

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

                  Comment


                  • Another possibility is that with John's playtest version is something wrong.
                    Of course I can't tell from what's in the files but I went back to the first playtest thread to see when and how the described problems started: Actually I had my first troubles with the events GrantAdvance and CreateBuilding (presumably due to lack of database access) with the first playtest build posted by John (2004.04.12). If this could be helpful for you: Here is the first bug report - unfortunately it is not extremely precise, there is more information in the third (!) one (well I think my bug reports are getting better ... ).
                    By now I would be really interested if other people have experienced similar problems or if I am actually the only one. I think if anyone out there is not on vacation and trying to play any Mod for playtesting some noticeable malfunctions should occur since most SLICpacks are dealing with buildings and advances.
                    However if you would be willing to release a new playtest version this would be great (IIRC John posted that he won't be able to upload a new version until september anyway ...)
                    The modding knowledgebase: CTP2 Bureau (with CTP2 AE Modding Wiki). Modern Times Mod (work in progress): MoT-Mod for CTP2.

                    Comment


                    • OK, here is a new playtest version. Changes from last version are:

                      2004-07-25
                      Fixed: Various memory leaks
                      Added: Added corrections for the French version
                      Added: Redermination of the city style when setting the civilization in HotSeat
                      Fixed: Strange tile visibility patterns in HotSeat mode
                      Fixed: Enabled the end turn button when unblanking the screen in HotSeat mode
                      Fixed: Blank the interface when loadeding a saved hot seat game
                      Fixed: Recipients of messages
                      Fixed: Increased animation queue to 12, making unit-in-wrong-place bug less likely
                      Fixed: Cities do not revolt twice in a row
                      Fixed: Slic files for the Alexander the Great scenario
                      Added: Crash prevention for missing strings and images
                      Fixed: Sort order for governors in in status tab for blank entries
                      Improved: Sort logic for listboxes
                      Fixed: Sort order in NationalManager for turns until production is finished
                      Added: New message for the distinction if a unit was cought or not in city investigation
                      Fixed: Recalculation of military support after government change
                      Added: Option to display the intersection of unit orders or the union of unit orders for an army

                      As my version of VC++ 6 is an Autorenversion, the ctp2.exe does not contain any code optimizations, and you get an disclaimer whenever you start the program. And another thing I did not rebuild my setup from scratch since I released the last playtest version, maybe the problem that caused it not to function is still present. If so I will use the files from the original installer and unzip my latested all pack over it.

                      But until then play test.

                      Edit: Link removed see my next post.

                      -Martin
                      Last edited by Martin Gühmann; July 26, 2004, 14:04.
                      Civ2 military advisor: "No complaints, Sir!"

                      Comment


                      • New play test cool

                        Got to make a scenario then.
                        "Every time I learn something new it pushes some old stuff out of my brain" Homer Jay Simpson
                        The BIG MC making ctp2 a much unsafer place.
                        Visit the big mc’s website

                        Comment


                        • Excellent Martin

                          By the way just reminded me with the hotset mode. If it were made possible to save/load (and exit of course) a hotseat game while the screen was "blacked out" waiting for next player, we could use it as a PBEM mode.
                          Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
                          CtP2 AE Wiki & Modding Reference
                          One way to compile the CtP2 Source Code.

                          Comment


                          • Good idea Maq!
                            ·Circuit·Boi·wannabe·
                            "Evil reptilian kitten-eater from another planet."
                            Call to Power 2 Source Code Project 2005.06.28 Apolyton Edition

                            Comment


                            • In hotseat the game loading bar appears and the top control bar appears but it crashes to desktop before the map or the bottom control bar appears. Crashes without any error too.

                              PBEM crashes to desktop without any error either as soon as the loading bar is complete, most of the time. However i tried it a few times and one time it didnt crash but immediately ended player 1's turn (human) and gave the regular quit or close popup. I never saw the map of course because it all happened instantly.
                              Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
                              CtP2 AE Wiki & Modding Reference
                              One way to compile the CtP2 Source Code.

                              Comment


                              • Actually it just CTD starting a single player game. The error report (or whatever) is here from the file it generated.

                                edit: and of course i try again a few times and it does the same thing, but then suddenly it works.
                                Attached Files
                                Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
                                CtP2 AE Wiki & Modding Reference
                                One way to compile the CtP2 Source Code.

                                Comment

                                Working...
                                X