Jump to content

PWCG 17.1.1 Oh, your squadron needs a plane.


Recommended Posts

Posted

"added Added recon missions with photos" sry for the question. How does that work? Just fly to the waypoint or do i have to click a specific button in order to make a picture?

Posted
13 hours ago, Spikos said:

"added Added recon missions with photos" sry for the question. How does that work? Just fly to the waypoint or do i have to click a specific button in order to make a picture?

 

Also interested in how this works.   I tried flying both types of mission.   Loaded the camera/radio, flew to the location (could see the enemy troops to be shelled) but got no Lwin+1 msg and hitting those keys did not bring up the camera or grid sheet.     

 

Is there something else that needs to be set?

PatrickAWlson
Posted
3 hours ago, JG1_Jaus said:

 

Also interested in how this works.   I tried flying both types of mission.   Loaded the camera/radio, flew to the location (could see the enemy troops to be shelled) but got no Lwin+1 msg and hitting those keys did not bring up the camera or grid sheet.     

 

Is there something else that needs to be set?

 

You have to hit the waypoints.  

Posted

I'm pretty sure I hit the waypoints on the recon, and I know I was on the grid for the party spot.

  • 1 month later...
Bmallia13
Posted

With the eventual addition of Odessa, will there be any Romanian squadron's added to the campaign generator? If not, what is still needed? I really want to fly the IAR 80/81 in a campaign besides base game campaign. I am willing to help find stuff to make this happen. 

PatrickAWlson
Posted
1 hour ago, Bmallia13 said:

With the eventual addition of Odessa, will there be any Romanian squadron's added to the campaign generator? If not, what is still needed? I really want to fly the IAR 80/81 in a campaign besides base game campaign. I am willing to help find stuff to make this happen. 

 

That would seem like a good time to add a Romanian unit.  When the time comes, any information on ranks, medals, criteria for promotion, criteria for medals, first and last names would be helpful.

  • Like 1
Bmallia13
Posted

I wonder what information is available on that. Also will there be modifications added for the Mig 3? I can only chose my weapons not the weapons of my comrades as flight lead.

  • PatrickAWlson changed the title to PWCG 17.1.1 Oh, your squadron needs a plane.
PatrickAWlson
Posted

17.1.1

Bugs:

Fixed issue that could cause planes not to be available in equipment requests.

Fixed issue that would cause claims to be denied if they were scored by a gunner

Fixed Nieuport 17 skin designations

Fixed too early N17 for Esc 102 (thanks AeroCrab)

Fixed numerous errors in aircraft assignment for FC. BoS is OK.

  • Like 2
  • Thanks 4
  • Upvote 1
  • 1 month later...
French_Fungible
Posted

Is it intentional that some aircraft are not available for equipment request?

Im running a JG51 campaign on Kuban but I can only request Me-410s, and not other FW variants

French_Fungible
Posted (edited)
On 5/26/2025 at 1:17 AM, French_Fungible said:

Is it intentional that some aircraft are not available for equipment request?

Im running a JG51 campaign on Kuban but I can only request Me-410s, and not other FW variants

Ok so the equipment request is still bugged, I can only request one aircraft type no matter what campaign I choose or make, for German campaigns I can only choose JU-88 C6 or Me-410, for Soviet campaigns only Yak-1, Yak-7 or Yak-9T depending on what time the campaign is.

Edited by French_Fungible
Charon
Posted

@PatrickAWlson Is there anything we can do to help adding Odessa?

 

I'm afraid I was never able to get builds working (Java isn't a language I use and I'm completely unfamiliar with all the tooling), but if you have drudge work such as mapping roads and rails or plotting out airfields then I'm willing to do what I can.

  • Like 2
  • 4 weeks later...
eggbred
Posted
On 5/28/2025 at 12:34 AM, French_Fungible said:

Ok so the equipment request is still bugged, I can only request one aircraft type no matter what campaign I choose or make, for German campaigns I can only choose JU-88 C6 or Me-410, for Soviet campaigns only Yak-1, Yak-7 or Yak-9T depending on what time the campaign is.

Did you ever find out why this is? I am getting the same issue, and can't seem to fix it 

AeroCrab
Posted
56 minutes ago, eggbred said:

Did you ever find out why this is? I am getting the same issue, and can't seem to fix it 

This is a bug in PlaneTypeFactory::getAvailablePlaneTypes (aka "the code"). Everything I know about Java comes from looking at the PWCG code (in other words, not much) so I don't really understand why it is a bug - it seems like it should be working - but the conversion from Map to List leaves just a single item. When I just got rid of the Map and went straight to the List (here and elsewhere in this class), it all started working. But again, I don't know enough about Java to understand why it wasn't working in the first place.

 

Bottom line, though, is that as a user there isn't anything you can do about this, as far as I can tell. It needs a code change.

 

(Tagging @PatrickAWlson in case he's interested).

Posted

That code takes the full list of planes and filters out those that are not applicable. The code can only return one roleCategory. Do I understand correctly that @eggbred wants to switch from bombers to fighters and vice versa?

 

@AeroCrab

 

Not really sure what you mean with the conversion from map to list being an issue. If you remove the entire filtering, then of course it will return much more.

 

The code is a little inefficient, by filtering from one map into another map and then converting to a list, while it could filter directly into a list, but I don't see any errors with the conversions.

AeroCrab
Posted

@Aapje That's what I'm saying - it looks like it should work, albeit with some inefficiency. But it doesn't - somehow, you only get the last one added to the map. So this doesn't work:

 

Spoiler

    public List<PlaneType> getAvailablePlaneTypes(ICountry country, PwcgRoleCategory roleCategory, Date date) throws PWCGException
    {
        Map<String, PlaneType> availablePlaneTypes = new TreeMap<>();
        for (PlaneType thisPlane : planeTypes.values())
        {
            if (thisPlane.isUsedBy(country))
            {
                if (thisPlane.isRoleCategory(roleCategory))
                {
                    if (DateUtils.isDateInRange(date, thisPlane.getIntroduction(), thisPlane.getWithdrawal()))
                    {
                        availablePlaneTypes.put(thisPlane.getDesc(), thisPlane);
                    }
                }
            }
        }
        
        return new ArrayList<>(availablePlaneTypes.values());
    }

and this does:

 

Spoiler

    public List<PlaneType> getAvailablePlaneTypes(ICountry country, PwcgRoleCategory roleCategory, Date date) throws PWCGException
    {
        List<PlaneType> availablePlaneTypes = new ArrayList<>();
        for (PlaneType thisPlane : planeTypes.values())
        {
            if (thisPlane.isUsedBy(country))
            {
                if (thisPlane.isRoleCategory(roleCategory))
                {
                    if (DateUtils.isDateInRange(date, thisPlane.getIntroduction(), thisPlane.getWithdrawal()))
                    {
                        availablePlaneTypes.add(thisPlane);
                    }
                }
            }
        }
        
        return availablePlaneTypes;
    }

 

and I have no idea why... actually, now that I'm looking at it, I think the problem may be that getDesc for each thisPlane is the same (probably ""), and so the map keeps replacing the same item with each thisPlane, leaving us with only one at the end. That sounds reasonable, and would also explain why eliminating the map solves the problem. A quick look at a couple of the aircraft json files seems to bear this out as the ones I checked have "desc": "".

 

So @eggbred and @French_Fungible, if that is correct you could solve the problem by adding a description (of any kind, as long as it was unique) to all the json files in BoSData\Input\Aircraft (or FCData\Input\Aircraft for Flying Circus). That would require a bit of effort, so I guess it depends on how important it is to you. And also, of course, it depends on me not being entirely full of crap. :biggrin:

 

  • Like 1
French_Fungible
Posted
4 hours ago, AeroCrab said:

By adding a description (of any kind, as long as it was unique) to all the json files in BoSData\Input\Aircraft (or FCData\Input\Aircraft for Flying Circus).

so how exactly would I go about doing this? I'm not that knowledgeable about coding.

Posted

@PatrickAWlson

 

The attached patch should fix it.

 

PS. If you use forward slashes in paths, your code is cross-platform, and you don't have to escape the backslashes, so your code becomes more readable too.

planeTypesFilterFix.zip

AeroCrab
Posted (edited)
On 6/23/2025 at 2:58 AM, French_Fungible said:

so how exactly would I go about doing this? I'm not that knowledgeable about coding.

In the PWCG install location, there is a directory PWCGBoS\BoSData\Input\Aircraft that has a bunch of .json files in it. These can be opened with any text editor (like notepad), and the contents look like this (for example - this is the bf109g4.json file):

 

Spoiler

{
    "type": "bf109g4",
    "archType": "bf109",
    "side": "AXIS",
    "primaryUsedBy": [
        "GERMANY"
    ],
    "stockModifications": [
    ],
    "displayName": "Bf 109 G-4",
    "script": "LuaScripts\\WorldObjects\\Planes\\bf109g4.txt",
    "model": "graphics\\planes\\bf109g4\\bf109g4.mgm",
    "desc": "",
    "cruisingSpeed": 400,
    "climbOutRate": 1300,
    "goodness": 50,
    "range": 600,
    "isFlyable": true,
    "planeSize": "PLANE_SIZE_SMALL",
    "roleCategories": [
        "FIGHTER",
        "ATTACK"
    ],
    "introduction": "19420901",
    "endProduction": "19430901",
    "withdrawal": "19440201"
}

 

The part in bold is where the problem lies. You would need to change that in each file to something unique, like what is in the displayName field. So for the above file,

 

"desc":"Bf 109 G-4",

 

or something like that, only for each file in the directory. I think that would work with the existing code, but I haven't tried it, and if you make any mistakes there would be other issues so... be careful? I'd make a copy of everything first for sure.

Edited by AeroCrab
Posted

Anyone have a copy of the wiki for PWCG? The link in the first post seems to be dead.

  • 1 month later...
Shadowed
Posted

Just popping in to say thanks so much for the continued updates. I am having so much fun with PWCG! 

  • Upvote 1
  • 2 weeks later...
tattywelshie
Posted

@PatrickAWlson - hey, will you be adding any of the newly released aircraft into the generator? 

  • 1 month later...
Von_Fontlebottom
Posted

@AapjeIs that file a solution for the average user or was that code meant for Pat? Either way, I would like to make alterations to what planes are available for use in FC at various times. I would also like to be able to choose, at my discretion, "captured" planes so that I can fly a Fokker Dr.I as a Brit. 

Posted

It was meant for Pat to include in the default version.

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...