Posted by: Deinon - Saturday, December 30, 2017 7:17:44 PM
Say I want to create a map for the China Infantry general, or complete the one for General Juhziz (I'm aware certain mods do this). How do I add them to the Generals Challenge mission lineups? What do I have to add to their maps, be it scripts or waypoints, which tells the game where the player is supposed to start?

Posted by: Annihilationzh - Sunday, December 31, 2017 5:38:17 PM
[quote=Deinon;146884]Say I want to create a map for the China Infantry general, or complete the one for General Juhziz (I'm aware certain mods do this). How do I add them to the Generals Challenge mission lineups? What do I have to add to their maps, be it scripts or waypoints, which tells the game where the player is supposed to start?[/quote] Edit ChallengeMode.ini to add them to the lineup. You know how to add a starting location to a multiplayer map? If not, there should be a tutorial here somewhere. Generals challenge maps should have a single starting position. I'm afraid to say Ican't remember if there are any particular scripts you need for a generals challenge map.

Posted by: Queryk - Thursday, January 18, 2018 7:28:35 AM
I'd highly recommend you to check out the original generals challenge maps and read trough the scripts. This way you can see how they did these scripts and you might get some new ideas. To tell the map where the player starts, you need to make a script that spawns a CC and a dozer at a location with a direction. If you want to make this challenge accessible for all factions, you need to add each faction manually. For example: If: player'[human player]' is faction name AmericaLaserGeneral Then: Spawn object 'Lazr_AmericaCommancCenter in Team 'team[human player]' At position (333.33,333.33,9.00) rotated -135 degrees. Spawn object 'Lazr_AmericaVehicleDozer in Team 'team[human player]' At position (433.33,433.33,9.00) rotated -135 degrees.

Posted by: Deinon - Thursday, January 18, 2018 7:28:06 PM
[quote=Queryk;146958]I'd highly recommend you to check out the original generals challenge maps and read trough the scripts. This way you can see how they did these scripts and you might get some new ideas. To tell the map where the player starts, you need to make a script that spawns a CC and a dozer at a location with a direction. If you want to make this challenge accessible for all factions, you need to add each faction manually. For example: If: player'[human player]' is faction name AmericaLaserGeneral Then: Spawn object 'Lazr_AmericaCommancCenter in Team 'team[human player]' At position (333.33,333.33,9.00) rotated -135 degrees. Spawn object 'Lazr_AmericaVehicleDozer in Team 'team[human player]' At position (433.33,433.33,9.00) rotated -135 degrees.[/quote]I had looked through the scripts for the other Generals missions, even tried that scripting. They don't include scripts to manually spawn the command center and first dozer. I just crash to exit when I try to load the map through that route, even if the map works fine renamed and loaded as a skirmish map.

Posted by: Annihilationzh - Friday, January 19, 2018 8:59:35 AM
[quote=Deinon;146961]I had looked through the scripts for the other Generals missions, even tried that scripting. They don't include scripts to manually spawn the command center and first dozer. I just crash to exit when I try to load the map through that route, even if the map works fine renamed and loaded as a skirmish map.[/quote] Why did you ignore me? I already told you how it's done... [quote=Annihilationzh;146889]You know how to add a starting location to a multiplayer map? If not, there should be a tutorial here somewhere. Generals challenge maps should have a single starting position.[/quote] You're free to ignore this if you don't ever want your map to work. But that's a bit pointless.

Posted by: Deinon - Friday, January 19, 2018 7:12:22 PM
[quote=Annihilationzh;146968][quote=Deinon;146961]I had looked through the scripts for the other Generals missions, even tried that scripting. They don't include scripts to manually spawn the command center and first dozer. I just crash to exit when I try to load the map through that route, even if the map works fine renamed and loaded as a skirmish map.[/quote] Why did you ignore me? I already told you how it's done... [quote=Annihilationzh;146889]You know how to add a starting location to a multiplayer map? If not, there should be a tutorial here somewhere. Generals challenge maps should have a single starting position.[/quote] You're free to ignore this if you don't ever want your map to work. But that's a bit pointless.[/quote]Sorry I didn't get back to you, I've been tied up with a lot of personal stuff lately and checked in here for the first time after my absence. I included the starting waypoint. When it crashes, it isn't outputting anything to logs that I can see. Again, sorry. Thanks for your reply.

Posted by: Queryk - Sunday, January 21, 2018 6:36:30 AM
If it is the Infantry general you want to include, you don't actually have to edit Challengemode.ini, since the infantry general is included in the file (persona 7). You do need to edit the campaign.ini To test if your challenge works, you can edit one generals challenge to meet the infantry general first. So if you want to play airforce vs infantry for example, it should look like this: Campaign CHALLENGE_0 CampaignNameLabel CAMPAIGN:CHALLENGE_0 FirstMission Mission01 FinalVictoryMovie USACampaignVictory IsChallengeCampaign yes PlayerFaction FactionAmericaAirForceGeneral Mission Mission01 Map Maps\GC_InfantryGeneral\GC_InfantryGeneral.map GeneralName GUI:BioNameEntry_Pos7 IntroMovie GeneralsChallengeBackground NextMission Mission02 END Mission Mission02 Map Maps\GC_NukeGeneral\GC_NukeGeneral.map GeneralName GUI:BioNameEntry_Pos2 IntroMovie GeneralsChallengeBackground NextMission Mission03 END Etc. Notice here that your map needs to be in the same folder as the original maps and it needs the name you give it in mission01 above (so in this case GC_InfantryGeneral) Just placing a waypoint with 'player_1_start' should make the map work I think. Where does the game crash? Before starting the game or before starting the challenge?

Posted by: Deinon - Sunday, February 11, 2018 11:39:53 PM
I included the starting position waypoint and made the prescribed change to Campaign.ini, but I still crash when loading the map via challenge mode. I can post the ReleaseCrashInfo file produced when this happens, but it's an "exception at address violation" message which I'm not sure is terribly helpful. [quote]Release Crash at Sun Feb 11 22:25:50 2018 ; Reason Uncaught Exception in GameEngine::update Last error: Exception is access violation WinMain at 401720 Error code: EXCEPTION_ACCESS_VIOLATION Description: The thread tried to read from or write to a virtual address for which it does not have the appropriate access. Access address:00000038 was read from. Stack dump: (-1) : 0x005B6E99 Details: Register dump... Eip:005B6E99 Esp:0018F660 Ebp:00000038 Eax:0018F688 Ebx:0018F6CC Ecx:00000038 Edx:0018F6CC Esi:00000038 Edi:00000001 EFlags:00010216 CS:0023 SS:002b DS:002b ES:002b FS:0053 GS:002b EIP bytes dump... Bytes at CS:EIP (005B6E99) : 8B 55 00 56 57 8B 7A 04 85 FF 89 54 24 10 74 57 8B 03 85 C0 8D 70 04 75 05 BE 68 97 93 00 8D 4F Current stack: [/quote]The loading screen shows, General Fai says "My men will crush you!", and the game crashes. I can pass along the partial map if anyone would be willing to take a look, but it requires the "Global Crisis" mod. Might run without it, I haven't included any units in the map which were created in that mod, but I've thus far done all development with it installed because I'm also working on Generals Challenge missions for the Syrian and Israeli factions it adds to the game.