Page 1 of 3 1 2 3 LastLast
Results 1 to 30 of 74

Thread: AE Scenario Conversion: Cradle

  1. #1
    Ekmek
    Emperor Ekmek's Avatar
    Join Date
    26 May 1999
    Posts
    3,156
    Country
    This is Ekmek's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 22, 2013
    Local Time
    13:09

    AE Scenario Conversion: Cradle

    Of course I was also looking to do this for Cradle but found that the files have prefixes like CRAB_, CRA_, and CRAG_ which files are used. Maybe Hexagonian can enlighten me as to which ones.


    If your wondering why I need to know, the scenarios use the regular file names and when a scenario is loaded it looks in the scenario folder first then to the main folder. So to convert our favorite mods they need to have the prefixes removed.
    Formerly known as "E" on Apolyton

    See me at Civfanatics.com

  2. #2
    Tamerlin
    King Tamerlin's Avatar
    Join Date
    26 Apr 2002
    Location
    Toulouse (South-western France)
    Posts
    2,058
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 22, 2013
    Local Time
    23:09

    Re: AE Scenario Conversion: Cradle

    Originally posted by E
    Of course I was also looking to do this for Cradle but found that the files have prefixes like CRAB_, CRA_, and CRAG_ which files are used. Maybe Hexagonian can enlighten me as to which ones.


    If your wondering why I need to know, the scenarios use the regular file names and when a scenario is loaded it looks in the scenario folder first then to the main folder. So to convert our favorite mods they need to have the prefixes removed.
    I have never played with the Cradle Mod but I think that a given set of files with an appropriate extension is used when you are selecting the game you want to play through Modswapper.

    For example, I suppose that the files named CRAG_ are used when you select to play Cradle with a Gigantic map.
    "Democracy is the worst form of government there is, except for all the others that have been tried." Sir Winston Churchill

  3. #3
    Maquiladora
    Emperor
    Join Date
    17 Jun 2001
    Posts
    7,714
    Country
    This is Maquiladora's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 22, 2013
    Local Time
    22:09
    To get Cradle III working with the AE you just need to extract the Cradle folder to a separate data folder. These are my folders in the CtP2 folder:

    CradleIII
    ctp2_data
    ctp2_program
    etc...

    So the CradleIII folder is just like a ctp2_data folder, with the "default" and "english" folders in there.

    Then you need to tell the game to load CradleIII for it's data first, rather than the original ctp2_data. You do this by editing this line in \ctp2_program\ctp\userprofile.txt:

    RuleSets=

    and change it to:

    RuleSets=..\..\CradleIII

    You'll know if it worked as the title screen will be the Cradle screen, just like you had loaded it with modswapper. The benefit of using the ruleset option rather than modswapper is obviously you don't need to extract the CradleIII folder into your default ctp2_data folder. And you don't need to install modswapper.
    Last edited by Maquiladora; July 8, 2009 at 19:39.
    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.

  4. #4
    EPW
    Emperor EPW's Avatar
    Join Date
    10 Jan 2004
    Location
    ??
    Posts
    3,887
    Country
    This is EPW's Country Flag
    Thanks
    1
    Thanked 1 Time in 1 Post
    Local Date
    May 22, 2013
    Local Time
    14:09
    RuleSets=..\..\CradleIII
    This doesn't work for me. I have to point it to ..\..\CradleIII\ctp2_data

  5. #5
    EPW
    Emperor EPW's Avatar
    Join Date
    10 Jan 2004
    Location
    ??
    Posts
    3,887
    Country
    This is EPW's Country Flag
    Thanks
    1
    Thanked 1 Time in 1 Post
    Local Date
    May 22, 2013
    Local Time
    14:09
    Maq...you left out some rather critical information...

    You need to rename one of the CRADLE_III[C-E]_gamefile.txt to gamefile.txt. I'm not sure what the differences are between the different gamefiles, but one of them needs to be changed.

    Also, CRARR4C_newsprites.txt needs to be renamed newsprites.txt. Apparently the newsprites file isn't loaded through the gamefile.txt file.

  6. #6
    Maquiladora
    Emperor
    Join Date
    17 Jun 2001
    Posts
    7,714
    Country
    This is Maquiladora's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 22, 2013
    Local Time
    22:09
    Quote Originally Posted by EPW View Post
    This doesn't work for me. I have to point it to ..\..\CradleIII\ctp2_data
    If default and english are the only folders inside CradleIII it should work. I noticed in the CradleIII download zip file it's zipped up like "call to power 2\ctp2_data\" so maybe you extracted it straight from that.

    Maq...you left out some rather critical information...
    Oops, yeah I forgot, there are a couple of hurdles at first.

    You need to rename one of the CRADLE_III[C-E]_gamefile.txt to gamefile.txt. I'm not sure what the differences are between the different gamefiles, but one of them needs to be changed.
    It should say on the 3rd to bottom line of each which Cradle set up they're for.
    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.

  7. #7
    Maquiladora
    Emperor
    Join Date
    17 Jun 2001
    Posts
    7,714
    Country
    This is Maquiladora's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 22, 2013
    Local Time
    22:09
    You might also have to disable diplomod, but it's implemented in the source code now anyway IIRC.
    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.

  8. #8
    EPW
    Emperor EPW's Avatar
    Join Date
    10 Jan 2004
    Location
    ??
    Posts
    3,887
    Country
    This is EPW's Country Flag
    Thanks
    1
    Thanked 1 Time in 1 Post
    Local Date
    May 22, 2013
    Local Time
    14:09
    Quote Originally Posted by Maquiladora View Post
    You might also have to disable diplomod, but it's implemented in the source code now anyway IIRC.
    I just got an "array index out of bounds" error from diplomod.

  9. #9
    EPW
    Emperor EPW's Avatar
    Join Date
    10 Jan 2004
    Location
    ??
    Posts
    3,887
    Country
    This is EPW's Country Flag
    Thanks
    1
    Thanked 1 Time in 1 Post
    Local Date
    May 22, 2013
    Local Time
    14:09
    CRASH!!!

    Code:
      0x006dd325  [Ins_DELTAP + 0x2b]
      0x0000000f  [__safe_se_handler_count + 0xf]
      0x00552c30  [?Serialize@DiplomacyProposalRecord@@QAEXAAVCivArchive@@@Z + 0x2a0]
      0x0003f3e8  [_fltused + 0x35b72]
    I got a similar crash when playing the CTC mod with the AE. I think it has to do with sending non-existent diplomatic proposals.

  10. #10
    Maquiladora
    Emperor
    Join Date
    17 Jun 2001
    Posts
    7,714
    Country
    This is Maquiladora's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 22, 2013
    Local Time
    22:09
    Quote Originally Posted by EPW View Post
    CRASH!!!
    OH NOES!

    Did you disable diplomod?
    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.

  11. #11
    EPW
    Emperor EPW's Avatar
    Join Date
    10 Jan 2004
    Location
    ??
    Posts
    3,887
    Country
    This is EPW's Country Flag
    Thanks
    1
    Thanked 1 Time in 1 Post
    Local Date
    May 22, 2013
    Local Time
    14:09
    Yeah.

  12. #12
    EPW
    Emperor EPW's Avatar
    Join Date
    10 Jan 2004
    Location
    ??
    Posts
    3,887
    Country
    This is EPW's Country Flag
    Thanks
    1
    Thanked 1 Time in 1 Post
    Local Date
    May 22, 2013
    Local Time
    14:09
    After running cradle with the debug version, I can safely say that there are ALOT of issues to be resolved.

  13. #13
    Maquiladora
    Emperor
    Join Date
    17 Jun 2001
    Posts
    7,714
    Country
    This is Maquiladora's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 22, 2013
    Local Time
    22:09
    Why did you run it in debug? You can find lots of issues using debug with the original game.
    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.

  14. #14
    EPW
    Emperor EPW's Avatar
    Join Date
    10 Jan 2004
    Location
    ??
    Posts
    3,887
    Country
    This is EPW's Country Flag
    Thanks
    1
    Thanked 1 Time in 1 Post
    Local Date
    May 22, 2013
    Local Time
    14:09
    Because I can't get passed the crash I posted above. Seems to have something to do with the # of governments loaded from the strategies.txt file, but I can't figure it out.

  15. #15
    Maquiladora
    Emperor
    Join Date
    17 Jun 2001
    Posts
    7,714
    Country
    This is Maquiladora's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 22, 2013
    Local Time
    22:09
    Quote Originally Posted by EPW View Post
    Because I can't get passed the crash I posted above. Seems to have something to do with the # of governments loaded from the strategies.txt file, but I can't figure it out.
    Maybe edit strategies.txt like the AE. Rather than only putting in what governments you want that strategy to use, put in ALL the governments for each strategy, but in the order you want them to be used. I think I had this problem too.
    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.

  16. #16
    EPW
    Emperor EPW's Avatar
    Join Date
    10 Jan 2004
    Location
    ??
    Posts
    3,887
    Country
    This is EPW's Country Flag
    Thanks
    1
    Thanked 1 Time in 1 Post
    Local Date
    May 22, 2013
    Local Time
    14:09
    You were right! That's one crash down. (it would be nice if you shared any other such information Maq )

    Next up, I get a ton of slic errors from the mod_UnitAttack function. Says the "pla" is noname or some such thing.

  17. #17
    Maquiladora
    Emperor
    Join Date
    17 Jun 2001
    Posts
    7,714
    Country
    This is Maquiladora's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 22, 2013
    Local Time
    22:09
    Quote Originally Posted by EPW View Post
    You were right! That's one crash down. (it would be nice if you shared any other such information Maq )
    I noticed that making the AE Mod, so I totally forget it here. Maybe Martin can think of anything else we might need convert.

    Next up, I get a ton of slic errors from the mod_UnitAttack function. Says the "pla" is noname or some such thing.
    That's gotta be the unit training mod, sounds like a syntax error got added somewhere, since I know it works with the AE. This is why testing with debug slic=yes is a good idea. Does it tell you what file and line it's on?
    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.

  18. #18
    EPW
    Emperor EPW's Avatar
    Join Date
    10 Jan 2004
    Location
    ??
    Posts
    3,887
    Country
    This is EPW's Country Flag
    Thanks
    1
    Thanked 1 Time in 1 Post
    Local Date
    May 22, 2013
    Local Time
    14:09
    Quote Originally Posted by Maquiladora View Post
    That's gotta be the unit training mod, sounds like a syntax error got added somewhere, since I know it works with the AE. This is why testing with debug slic=yes is a good idea. Does it tell you what file and line it's on?
    No, I've confirmed that it is an event error. It happens only with debugslicevent on. It occurs for both mod_UnitAttack and mod_UnitDefense.

    Here's a cool screen shot I took on turn 150 with only AIs playing. Pretty impressive!
    Attached Images Attached Images

  19. #19
    Maquiladora
    Emperor
    Join Date
    17 Jun 2001
    Posts
    7,714
    Country
    This is Maquiladora's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 22, 2013
    Local Time
    22:09
    Quote Originally Posted by EPW View Post
    No, I've confirmed that it is an event error. It happens only with debugslicevent on. It occurs for both mod_UnitAttack and mod_UnitDefense.
    Strange, I got no errors testing the training mod with debug slic=yes. Edit: Oh wait, debugslicevents, I don't like those.

    Here's a cool screen shot I took on turn 150 with only AIs playing. Pretty impressive!
    Orange got ate up pretty bad, after only 150 turns too. Nice.
    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.

  20. #20
    EPW
    Emperor EPW's Avatar
    Join Date
    10 Jan 2004
    Location
    ??
    Posts
    3,887
    Country
    This is EPW's Country Flag
    Thanks
    1
    Thanked 1 Time in 1 Post
    Local Date
    May 22, 2013
    Local Time
    14:09
    I got a slic error in CRASL_homegaurd, event CRA_MilitiaCityDestroyed on line 213. Says -1 is not a valid player index.

    Also in the same file, on line 259 in CRA_MilitiaCity, got an "Array index 1 out of bounds" error.
    Last edited by EPW; July 13, 2009 at 03:20.

  21. #21
    Maquiladora
    Emperor
    Join Date
    17 Jun 2001
    Posts
    7,714
    Country
    This is Maquiladora's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 22, 2013
    Local Time
    22:09
    Quote Originally Posted by EPW View Post
    I got a slic error in CRASL_homegaurd, event CRA_MilitiaCityDestroyed on line 213. Says -1 is not a valid player index.
    I'm not sure what is wrong, it looks it could happen if that was the player's last unit. Either way I might prefer to do it like this:

    Code:
    // if city is destroyed (from hunger or war), kill all Militia units
    HandleEvent(KillCity) 'CRA_MilitiaCityDestroyed' pre {
    unit_t	tmpUnit;
    city_t	tmpCity;
    int_t	i;
    int_t	tmpPlayer;
    
    	tmpPlayer = player[0];
    
    	for(i = GetUnitsAtLocation(city[0].location)-1; i >= 0; i = i - 1) {
    		GetUnitByIndex(tmpPlayer, i, tmpUnit);
    		if (CRA_IsMilitia(tmpUnit.type)) {
    			KillUnit(tmpUnit);
    		}
    	}
    }
    Using a for loop cycling backwards instead of a while loop means it won't cause problems when something is removed from it, in this case a unit. This also doesn't cycle through all the player's units, just the ones on the tile. Untested so may not work as advertised.

    Also in the same file, on line 259 in CRA_MilitiaCity, got an "Array index 1 out of bounds" error.
    That might be because CTC_PLAYER_COUNT is already used as a global in the code, since it's only a local variable on that line, so just rename it.
    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.

  22. #22
    EPW
    Emperor EPW's Avatar
    Join Date
    10 Jan 2004
    Location
    ??
    Posts
    3,887
    Country
    This is EPW's Country Flag
    Thanks
    1
    Thanked 1 Time in 1 Post
    Local Date
    May 22, 2013
    Local Time
    14:09
    This is turn 235 of a 2-player AI-only Cradle game with Frenzy DISABLED. Sadly, most of the Roman empire revolts the next turn.
    Attached Images Attached Images

  23. #23
    Maquiladora
    Emperor
    Join Date
    17 Jun 2001
    Posts
    7,714
    Country
    This is Maquiladora's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 22, 2013
    Local Time
    22:09
    Quote Originally Posted by EPW View Post
    This is turn 235 of a 2-player AI-only Cradle game with Frenzy DISABLED. Sadly, most of the Roman empire revolts the next turn.
    I assume they're way over their city cap? You should add the "TOO_MANY_CITIES" strategy to Cradle if that's the case.
    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.

  24. #24
    EPW
    Emperor EPW's Avatar
    Join Date
    10 Jan 2004
    Location
    ??
    Posts
    3,887
    Country
    This is EPW's Country Flag
    Thanks
    1
    Thanked 1 Time in 1 Post
    Local Date
    May 22, 2013
    Local Time
    14:09
    Quote Originally Posted by Maquiladora View Post
    Using a for loop cycling backwards instead of a while loop means it won't cause problems when something is removed from it, in this case a unit. This also doesn't cycle through all the player's units, just the ones on the tile. Untested so may not work as advertised.
    This fix appears to work, at least I havn't got the error yet.

    Quote Originally Posted by Maquiladora View Post
    That might be because CTC_PLAYER_COUNT is already used as a global in the code, since it's only a local variable on that line, so just rename it.
    This didn't work.

    And the mod_UnitAttack/Defend errors came back with a vengence when I played a single turn for the AI - even with debugslicevents off...

  25. #25
    Maquiladora
    Emperor
    Join Date
    17 Jun 2001
    Posts
    7,714
    Country
    This is Maquiladora's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 22, 2013
    Local Time
    22:09
    Quote Originally Posted by EPW View Post

    This didn't work.
    Did you change every instance of CTC_PLAYER_COUNT in that event handler?

    And the mod_UnitAttack/Defend errors came back with a vengence when I played a single turn for the AI - even with debugslicevents off...
    Errors that weren't debug slic event popups of before? What did they say?
    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.

  26. #26
    EPW
    Emperor EPW's Avatar
    Join Date
    10 Jan 2004
    Location
    ??
    Posts
    3,887
    Country
    This is EPW's Country Flag
    Thanks
    1
    Thanked 1 Time in 1 Post
    Local Date
    May 22, 2013
    Local Time
    14:09
    Quote Originally Posted by Maquiladora View Post
    Did you change every instance of CTC_PLAYER_COUNT in that event handler?
    Yes

    Quote Originally Posted by Maquiladora View Post
    Errors that weren't debug slic event popups of before? What did they say?
    Same popup as before, except the occurred during combat this time.

  27. #27
    Maquiladora
    Emperor
    Join Date
    17 Jun 2001
    Posts
    7,714
    Country
    This is Maquiladora's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 22, 2013
    Local Time
    22:09
    Quote Originally Posted by EPW View Post

    Next up, I get a ton of slic errors from the mod_UnitAttack function. Says the "pla" is noname or some such thing.
    Does it point to any line or file?
    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.

  28. #28
    EPW
    Emperor EPW's Avatar
    Join Date
    10 Jan 2004
    Location
    ??
    Posts
    3,887
    Country
    This is EPW's Country Flag
    Thanks
    1
    Thanked 1 Time in 1 Post
    Local Date
    May 22, 2013
    Local Time
    14:09
    In object mod_UnitAttack, variables 'mod_UnitAttack#pl' and 'noname' are of different types.
    Maybe its because I changed players during play?

  29. #29
    Maquiladora
    Emperor
    Join Date
    17 Jun 2001
    Posts
    7,714
    Country
    This is Maquiladora's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 22, 2013
    Local Time
    22:09
    Quote Originally Posted by EPW View Post
    Maybe its because I changed players during play?
    pl is the owner of the unit being modified. I thought mod_UnitAttack was a built-in function, so I thought didn't need to pass the function parameter through a local variable, like you have to with user functions. But that may be the case. It's worth a try either way.

    In each mod unit function you'll find this kind of part:

    Code:
    	u = att;
    	pl = att.owner;
    and need to change it to this:

    Code:
    	u = att;
    	pl = u.owner;
    and do that for the 3 mod unit functions. I'm just guessing here though, I usually make my code work through immense trial and error.
    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.

  30. #30
    EPW
    Emperor EPW's Avatar
    Join Date
    10 Jan 2004
    Location
    ??
    Posts
    3,887
    Country
    This is EPW's Country Flag
    Thanks
    1
    Thanked 1 Time in 1 Post
    Local Date
    May 22, 2013
    Local Time
    14:09
    That appears to have fixed it, more testing needed though.

Page 1 of 3 1 2 3 LastLast

Similar Threads

  1. Mac-Pc Scenario Conversion
    By Justinianum in forum Civilization Series General: Past and Future
    Replies: 8
    Last Post: December 17, 2003, 14:39
  2. Scenario to Map Conversion
    By Leon in forum Scenario League / Civ2-Creation -Archive
    Replies: 1
    Last Post: May 7, 2002, 08:29
  3. Tot Scenario Conversion help using Civconverter
    By Buffy in forum Scenario League / Civ2-Creation -Archive
    Replies: 3
    Last Post: November 21, 2001, 18:22
  4. Scenario conversion from Civ 2
    By Roman in forum Civ3-General-Archive
    Replies: 7
    Last Post: May 5, 2001, 22:01
  5. Red Front Scenario PC to Mac Conversion help needed
    By MacUser in forum Scenario League / Civ2-Creation -Archive
    Replies: 9
    Last Post: May 31, 2000, 06:15

Visitors found this page by searching for:

conversion scenario

call to power 2 array index 1 out of bounds

call to power array index out of bound

array index 1 out of bounds call to power

ae 34 cradle

whats a scenario that include at least three conversions

Bookmarks

Posting Permissions