Jump to content

Issue: Adding New Units to the Campaign


Recommended Posts

Posted

Hey Pat,

 

Hope all is good there. I have an issue with adding new units to Bodenplatte for the Allied side. I was successful in adding units for the LW but every time I try to do the same for the USAAF, I cannot generate a mission in Competitive Coop (it works fine with the LW newly created units). Here is the unit I'm creating named 361st FG (361st FG.json):

 



{ "country": "USA", "squadronId": 102361375, "name": "361st Fighter Group", "fileName": "361st FG.json", "skill": 80, "planeAssignments": [ { "archType": "p51", "squadronIntroduction": "19440901", "squadronWithdrawal": "19450601" } ], "airfields": { "19440901": "Melsbroek", "19441001": "St.Trond", "19441101": "Aachen", "19441220": "Aachen", "19441225": "Aachen", "19441229": "Ophoven", "19450201": "Chievres", "19450207": "Chievres", "19450310": "Chievres", "19450404": "Chievres" }, "skins": [], "squadHistory": { "squadHistoryEntries": [] }, "serviceId": 10102, "squadronRoles": { "squadronRolePeriods": [ { "startDate": "19420801", "endDate": "19450601", "weightedRoles": [ { "role": "ROLE_FIGHTER", "weight": 80 }, { "role": "ROLE_ATTACK", "weight": 20 } ] } ] }, "conversionPeriods": [], "callsigns": { "19410801": "ELWOOD" } }

 

The error I get is the following:

 



PWCG Error Thu Nov 14 22:47:52 EST 2019 java.lang.NullPointerException at pwcg.mission.flight.plane.PlaneMCU.write(PlaneMCU.java:300) at pwcg.mission.flight.Flight.write(Flight.java:445) at pwcg.mission.io.MissionFlightWriter.writeFlights(MissionFlightWriter.java:37) at pwcg.mission.io.MissionFlightWriter.writeFlights(MissionFlightWriter.java:25) at pwcg.mission.io.MissionFileWriter.writeFlights(MissionFileWriter.java:140) at pwcg.mission.io.MissionFileWriter.writeMission(MissionFileWriter.java:59) at pwcg.mission.Mission.write(Mission.java:129) at pwcg.gui.helper.BriefingMissionHandler.finalizeMission(BriefingMissionHandler.java:95) at pwcg.gui.rofmap.brief.BriefingPilotPanelSet.acceptMission(BriefingPilotPanelSet.java:554) at pwcg.gui.rofmap.brief.BriefingPilotPanelSet.actionPerformed(BriefingPilotPanelSet.java:341) at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.setPressed(Unknown Source) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source) at java.awt.Component.processMouseEvent(Unknown Source) at javax.swing.JComponent.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$500(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source)

 

Now, if I try to replace the existing code of a predefined unit, such as 352nd FG.json, with the code above and rename the file from 352nd FG.json to 361st FG.json, it works fine and I dont get the error. Could you point me to the right direction here?

 

Cheers

PatrickAWlson
Posted

Are you trying to do this with a campaign created before the new unit exists?  PWCG code has limited provisions for adding a new unit on the fly, so that could be it.

 

Did you change the squadron id?  Most things are keyed by squadron id and not name,  By necessity, some things are also keyed by name.  Not sure how PWCG would respond if two squadrons had the same id, but definitely not well.

Posted
24 minutes ago, PatrickAWlson said:

Are you trying to do this with a campaign created before the new unit exists?  PWCG code has limited provisions for adding a new unit on the fly, so that could be it.

 

Did you change the squadron id?  Most things are keyed by squadron id and not name,  By necessity, some things are also keyed by name.  Not sure how PWCG would respond if two squadrons had the same id, but definitely not well.

 

1 - This was done prior to the creation of a new campaign for Bodenplatte;

2 - As you can see in the code above, the "squadronId",  "name", "fileName", and the "callsigns" were modified to be unique to the unit. "fileName" also matches the name of the json file and I made sure the "callsigns" field is present in the mission editor and does not conflict with the callsigns of other US units.

PatrickAWlson
Posted

Zip up the campaign and post it.  It looks like somebody else had the same issue in a different scenario.  Having a ready made campaign that reproduces the issue would help.

Posted

Pat,

 

Have you had the chance to look into it?

 

Cheers

PatrickAWlson
Posted
1 hour ago, SCG_Riksen said:

Pat,

 

Have you had the chance to look into it?

 

Cheers

 

Not yet.  It's in the queue but there were other immediate issues with the base product that were taking time.

  • Thanks 1
  • 2 years later...
Clay-menTheGumbie
Posted

Sorry to bother everyone, but I am not sure if the Competitive tab has been removed from Generator?                An is it possible to use the Generator to make maps for DogFight multiplayer for IL-2?              And last one where can I find a Video that has shows a Walk through of making a Competitive map I really would love to try putting something together for me and some friends. 

PatrickAWlson
Posted
2 hours ago, Clay-menTheGumbie said:

Sorry to bother everyone, but I am not sure if the Competitive tab has been removed from Generator?                An is it possible to use the Generator to make maps for DogFight multiplayer for IL-2?              And last one where can I find a Video that has shows a Walk through of making a Competitive map I really would love to try putting something together for me and some friends. 

 

Some time ago I changed PWCG to seamlessly handle competitive, eliminating the need for a separate mode.  Just choose "coop" and add pilots to any side that you wish.  PWCG mission generation will handle it.

  • Upvote 1
Clay-menTheGumbie
Posted

Your my hero mate, this little Genei is amazing I just have to say!

 

 

  • Upvote 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...