HOW-TO : Converting a mission to Co-op.

Post here if you want to help developing something for FAF.

Re: HOW-TO : Converting a mission to Co-op.

Postby IceDreamer » 25 May 2014, 19:56

OK so first error which shows is:

Code: Select all
WARNING: No initial position marker for army Coop2 found in /maps/SCCA_Coop_R04_v01/SCCA_Coop_R04_v01_save.lua
WARNING: No initial position marker for army Player found in /maps/SCCA_Coop_R04_v01/SCCA_Coop_R04_v01_save.lua
WARNING: No initial position marker for army Civilian found in /maps/SCCA_Coop_R04_v01/SCCA_Coop_R04_v01_save.lua
WARNING: No initial position marker for army Neutral found in /maps/SCCA_Coop_R04_v01/SCCA_Coop_R04_v01_save.lua
WARNING: No initial position marker for army Coop1 found in /maps/SCCA_Coop_R04_v01/SCCA_Coop_R04_v01_save.lua
WARNING: No initial position marker for army Coop3 found in /maps/SCCA_Coop_R04_v01/SCCA_Coop_R04_v01_save.lua
WARNING: No initial position marker for army Aeon found in /maps/SCCA_Coop_R04_v01/SCCA_Coop_R04_v01_save.lua


However, I get exactly the same thing happening when I load up Cybran Mission 2, which is already 'completed' and on the coop page. The next sequence of errors happens immediately on world creation:

Code: Select all
WARNING: Error running lua script: ...\maps\scca_coop_r04_v01\scca_coop_r04_v01_script.lua(589): attempt to call method `SetCustomName' (a nil value)
         stack traceback:
            ...\maps\scca_coop_r04_v01\scca_coop_r04_v01_script.lua(589): in function `callbackFunction'
            ...er\gamedata\lobby_coop.cop\lua\scenarioframework.lua(1566): in function <...er\gamedata\lobby_coop.cop\lua\scenarioframework.lua:1560>
WARNING: Movie file "/movies/C04_Ops_M01_0466.sfd" doesn't exist.
WARNING: Error resolving bank 'C04_VO' to audio engine


That first part looks like a script error from the part of the tutorial which (I think) allows the Coop armies to be given a player's FAF username. The second two look like it's having big trouble finding some movie files, so I'm going to quadruple check my Vanilla install and paths and see what happens.

EDIT: I checked and renewed all my game paths. Not the video appears to play correctly, and the subtitles are correct (It's Cybran now, used to be a UEF video), but I still get the final 'C04_VO' to audio engine warning, and the audio for the video does not play.

EDIT 2: I've found the C04_VO file in the Vanilla folder where it lives, and verified my game files through Steam. I can see the file, but for some reason it's just not playing properly :/
IceDreamer
Supreme Commander
 
Posts: 2607
Joined: 27 Dec 2011, 07:01
Has liked: 138 times
Been liked: 488 times

Re: HOW-TO : Converting a mission to Co-op.

Postby Ze_PilOt » 25 May 2014, 21:12

The first error is "normal".

The second one is why your map is not loading.

For sounds, you need to convert them for FA. Someone did it already (somewhere in this topic or forum), and placed there:
c:\ProgramData\FAForever\extra\sounds\voice\us\
(I will explain what to do for packing the map, or you can just check how the zip files are done).

For movies, linking your game to supcom vanilla in the lobby should solve the issue.
Nossa wrote:I've never played GPG or even heard of FA until FAF started blowing up.
User avatar
Ze_PilOt
Supreme Commander
 
Posts: 8985
Joined: 24 Aug 2011, 18:41
Location: fafland
Has liked: 18 times
Been liked: 376 times
FAF User Name: Ze_PilOt

Re: HOW-TO : Converting a mission to Co-op.

Postby IceDreamer » 27 May 2014, 06:30

Have not fixed the audio yet but I am ignoring that for the time being. I have done a lot of fiddling, tracking errors down one at a time. I now have this:

Code: Select all
WARNING: Error running lua script: ...ever\gamedata\faforever.nxt\lua\scenariotriggers.lua(374): attempt to call method `AddUnitCallback' (a nil value)
         stack traceback:
            ...ever\gamedata\faforever.nxt\lua\scenariotriggers.lua(374): in function `CreateUnitDeathTrigger'
            ...er\gamedata\lobby_coop.cop\lua\scenarioframework.lua(144): in function `CreateUnitDeathTrigger'
            ...\maps\scca_coop_r04_v01\scca_coop_r04_v01_script.lua(607): in function `callbackFunction'
            ...er\gamedata\lobby_coop.cop\lua\scenarioframework.lua(1566): in function <...er\gamedata\lobby_coop.cop\lua\scenarioframework.lua:1560>


The offending line:

Code: Select all
ScenarioFramework.CreateUnitDeathTrigger(PlayerCommanderDied, ScenarioInfo.PlayerCDR)


It errors out as soon as the mission starts. No ACUs spawn at all. I think this error is happening because it thinks nobody has spawned (They have not). This is the code I have for spawning the ACUs.

Code: Select all
    ScenarioInfo.PlayerCDR = ScenarioUtils.CreateArmyUnit( 'Player', 'Player_Commander' )
   ScenarioInfo.CoopCDR = {}
   local tblArmy = ListArmies()
   coop = 1
   for iArmy, strArmy in pairs(tblArmy) do
      if iArmy >= ScenarioInfo.Coop1 then
         ScenarioInfo.CoopCDR[coop] = ScenarioUtils.CreateArmyUnit(strArmy, 'Player_Commander')
         IssueMove({ ScenarioInfo.CoopCDR[coop]}, ScenarioUtils.MarkerToPosition( 'M1_Commander_Walk_1' ))      
         IssueMove({ ScenarioInfo.CoopCDR[coop]}, ScenarioUtils.MarkerToPosition( 'M1_Commander_Walk_2' ))
         coop = coop + 1
         WaitSeconds(0.5)
      end
   end


I'm a bit stumped by this one :(
IceDreamer
Supreme Commander
 
Posts: 2607
Joined: 27 Dec 2011, 07:01
Has liked: 138 times
Been liked: 488 times

Re: HOW-TO : Converting a mission to Co-op.

Postby Ze_PilOt » 27 May 2014, 07:52

What is the orignal script to spawn the ACU?
Nossa wrote:I've never played GPG or even heard of FA until FAF started blowing up.
User avatar
Ze_PilOt
Supreme Commander
 
Posts: 8985
Joined: 24 Aug 2011, 18:41
Location: fafland
Has liked: 18 times
Been liked: 376 times
FAF User Name: Ze_PilOt

Re: HOW-TO : Converting a mission to Co-op.

Postby IceDreamer » 27 May 2014, 08:32

Code: Select all
    ScenarioInfo.Commander = ScenarioUtils.CreateArmyUnit( 'Player', 'Commander' )


I've changes all the instances of ScenarioInfo.Commander to ScenarioInfo.PlayerCDR to keep everything uniform. I'm doing a lot of the bughunting by comparing this with the files for Cybran mission 2, which is working in Coop.

On thing I noticed is that faction in mission 2 is restricted to Cybran only (I think). It doesn't have options to spawn other factions. Are the vanilla missions supposed to always spawn that faction's ACU, or are we offering the choice?
IceDreamer
Supreme Commander
 
Posts: 2607
Joined: 27 Dec 2011, 07:01
Has liked: 138 times
Been liked: 488 times

Re: HOW-TO : Converting a mission to Co-op.

Postby Ze_PilOt » 27 May 2014, 08:51

IceDreamer wrote:
Code: Select all
    ScenarioInfo.Commander = ScenarioUtils.CreateArmyUnit( 'Player', 'Commander' )


And you have
Code: Select all
ScenarioInfo.PlayerCDR = ScenarioUtils.CreateArmyUnit( 'Player', 'Player_Commander' )


That's where the error is.

The second argument of CreateArmyUnit depends of the map (in particular the _save.lua file), even it's the unit type (it give the type of unit, the position, orientation, ...., look inside the lua file).
While 'Commander' exists, 'Player_Commander' is not.

Yes, all vanilla missions are locked to a faction.
Nossa wrote:I've never played GPG or even heard of FA until FAF started blowing up.
User avatar
Ze_PilOt
Supreme Commander
 
Posts: 8985
Joined: 24 Aug 2011, 18:41
Location: fafland
Has liked: 18 times
Been liked: 376 times
FAF User Name: Ze_PilOt

Re: HOW-TO : Converting a mission to Co-op.

Postby IceDreamer » 27 May 2014, 10:04

Thanks PilOt, map now launches with the proper armies and throws no errors. The next step is to test it all the way through. I can do that single player I guess, but I think it would be better to do it with a team.

1 - How should I distribute for testing? Should I upload it somewhere and recruit private testers, or do you want it to send it live immediately?
2 - I have been unable to translate the sound files. From the description of the guy who did it before, it sounds like they translated them all, so you may already have the translated files for mission 4. Can you check at some point?
3 - Should I try to give all the ACUs the appropriate nickname by using the code in the OP? I assume that will allow it to assign the FAF nickname to the ACU or something. Or should I just leave it as-is?
IceDreamer
Supreme Commander
 
Posts: 2607
Joined: 27 Dec 2011, 07:01
Has liked: 138 times
Been liked: 488 times

Re: HOW-TO : Converting a mission to Co-op.

Postby Ze_PilOt » 27 May 2014, 10:22

Do with alone with an AI as coop friends, just to check that all calls are correct first (+10, cheats on).
Nossa wrote:I've never played GPG or even heard of FA until FAF started blowing up.
User avatar
Ze_PilOt
Supreme Commander
 
Posts: 8985
Joined: 24 Aug 2011, 18:41
Location: fafland
Has liked: 18 times
Been liked: 376 times
FAF User Name: Ze_PilOt

Re: HOW-TO : Converting a mission to Co-op.

Postby IceDreamer » 28 May 2014, 03:59

Ze_PilOt wrote:Do with alone with an AI as coop friends, just to check that all calls are correct first (+10, cheats on).


OK I ran it through. The AI Coop players did nothing, but I think that could be normal? This is the relevant part of the error log: http://pastebin.com/UqFzUALm
Lots of failed sound banks, but the movies all played properly.
Error at the end must be something to do with using GCs to end it. UAS0201 error... Don't know? Didn't use any Exodus.
Mission ends with 'Mission Failed' but I think that's normal too.

How do I get it to you if you're satisfied it's ready?
IceDreamer
Supreme Commander
 
Posts: 2607
Joined: 27 Dec 2011, 07:01
Has liked: 138 times
Been liked: 488 times

Re: HOW-TO : Converting a mission to Co-op.

Postby Deering » 28 May 2014, 08:18

VoR_Tex and I completed the mission, however it desynced on objective 4 and when we won it said we lost. Other than that its all good.
Attachments
forever.log
(263.14 KiB) Downloaded 109 times
game.log
(143.3 KiB) Downloaded 108 times
Deering
Evaluator
 
Posts: 673
Joined: 18 Sep 2013, 11:47
Has liked: 16 times
Been liked: 41 times
FAF User Name: Deering

PreviousNext

Return to Contributors

Who is online

Users browsing this forum: No registered users and 1 guest