I have put together a chapter and tried it out. I compiled it and tried to run it. After I clicked on the chapter name to start it, I got a black screen and then "Game has stopped working."
I have found bb's indication of what a crash means according to when it happens, and I will check it out further.
The above would mean that it is a crash on the chapter map screen, no? Louis... it depends. Check the 1.xml and make certain the first mission name is correct and agrees with the [map].lua file. The game.exe is seeing the Chapter, but it doesn't know what to do with it after it loads. It could be waiting for a Chapter splash screen, or try to move right into the first mission.
This should help: [From RT Husky]
-----------------------------------------------------------------------------------
<?xml version="1.0"?>
<base>
<RPG
Season="0">
<KeyName></KeyName>
<StatsType>
Chapter</StatsType>
<--- this line must be here<HeaderText>scenarios\chapters\allies\
husky\header</HeaderText>
<--- path to header text<SubheaderText>scenarios\chapters\allies\
husky\subheader</SubheaderText>
<--- path to subheader text<DescriptionText>scenarios\chapters\allies\
husky\description</DescriptionText>
<--- path to description text<MapImage>scenarios\chapters\allies\
husky\map</MapImage>
<--- path to Chapter minimap<MapImageRect x1="407" y1="422" x2="0.795898" y2="0.825195"/>
<---where the Chapter minimap is displayed on the screen<InterfaceMusic>scenarios\chapters\allies\
husky\music\explore1</InterfaceMusic>
<---music selection<Missions>
<---- now we list the missions in their order<item Difficulty="0">
<Mission>scenarios\scenariomissions\allies\
gela\1</Mission>
<PosOnMap x="229" y="283"/>
<MissionBonus></MissionBonus><AllBonuses/></item>
<item Difficulty="0">
<Mission>scenarios\scenariomissions\allies\
palermo\1</Mission>
<PosOnMap x="121" y="134"/>
<MissionBonus></MissionBonus><AllBonuses/></item>
<item Difficulty="0">
<Mission>scenarios\scenariomissions\allies\
messina\1</Mission>
<PosOnMap x="269" y="172"/>
<MissionBonus></MissionBonus><AllBonuses/></item>
</Missions>
<--- end of missions in chapter<PlaceHolders/>
<Script>scenarios\chapters\allies\husky\
script</Script>
<--- the name of the script (.lua). It should be named script.lua<SettingName>scenarios\settings\
africa</SettingName>
<---the season<ContextName>scenarios\chapters\allies\husky\
context</ContextName>
<--- the path to the context.xml file... it should be in the same folder with the chapter.<PlayerSide>USA</PlayerSide>
<MODName></MODName>
<MODVersion></MODVersion>
</RPG>
</base>
----------------------------------------------------------------------------------
Now lets look at the script.lua for husky:---------------------------------------------------------------------------------
function EnterChapter( strChapterName )
EnableMission("scenarios\\scenariomissions\\allies\\
gela\\1");
<---well here's gela end;
function MissionFinished( strMissionName )
local bScenario = GetIGlobalVar("Mission.scenarios\\scenariomissions\\allies\\palermo\\1.Finished", 0);
if ( strMissionName == "scenarios\scenariomissions\allies\gela\1") then
<--- checking here to see if gela is complete, the one means it is done AddBaseUpgrade( "M7_Priest_USA" );
AddBaseUpgrade( "M13_GMC_USA" );
*****the script adds the BaseUpgrades then moves to the next mission palermo EnableMission("scenarios\\scenariomissions\\allies\\palermo\\1");
end;
if ( strMissionName == "scenarios\scenariomissions\allies\palermo\1") then
EnableMission("scenarios\\scenariomissions\\allies\\messina\\1");
AddNewSlot ("76mm_M1A1_USA");
end;
if ( strMissionName == "scenarios\scenariomissions\allies\messina\1") then
EnableChapter("scenarios\\chapters\\allies\\theinvasion\\1");
----medal
AddMedal ("Medals\\Allies\\BronzeStar\\1", 1); ----- after messina Bronzestar
end;
end;
function PlayerGainLevel( iLevel )
if ( iLevel == 1) then
AddNewSlot ("105mm_M2A1_USA");
AddNewSlot ("105mm_M2A1_USA");
AddNewSlot ("105mm_M2A1_USA");
end;
if ( iLevel == 2) then
AddNewSlot ("M3_General_Stuart_USA");
AddNewSlot ("M3_General_Stuart_USA");
AddNewSlot ("M3_General_Stuart_USA");
end;
end;
----------------------------------------------------------------------------------
There are ways to simplify this script, using variables and short names. But stick to following what you know works before you try to venture off in that direction.
It is important to remember to change the names of the missions and put them in the correct order. You must also have all of the "tests" in the script to move between missions.
Think of it very much like the objectives in a mission, You have the same kind of test, but just localized.
Hope this helps...