Jump to content

Would it be possible, that I add new medals myself for the game?


Recommended Posts

Posted

For example the Frontflugspange (Front Flying Clasp of the Luftwaffe) 
I know a bit of coding, but I only found where the pictures and paper dolls are stored and not where I could add the code for that.
Sorry if this is a bad question.

 

  • Upvote 1
Posted (edited)

I can change existing Medals but, would be sad if I would just replace them
(In this image I replaced the Iron Cross First Class with the bronze flying claps)

 

Spoiler

image.png

 

Edited by LukeFF
swastikas
PatrickAWlson
Posted

It takes code changes to add medals.

Posted
Just now, PatrickAWlson said:

It takes code changes to add medals.

And where and how would i do this? or is it not possible?

Posted
14 hours ago, PatrickAWlson said:

You would have to rewrite parts of PWCG.

If you are a Java developer and want to change the software it can be downloaded here:

https://github.com/PWCGDeveloper/PWCGCampaign

 


I now worked through some of the files but couldent find it yet. Do you maybe rember where exactly the file with the Medals is?

PatrickAWlson
Posted

MedalManager has one variation for every service.  You would be looking for the Luftwaffe medal manager.  Those files contain the logic for all of the award criteria for the service.

Posted
4 hours ago, PatrickAWlson said:

MedalManager has one variation for every service.  You would be looking for the Luftwaffe medal manager.  Those files contain the logic for all of the award criteria for the service.

I am so sorry to bother you again! But I think I now have a rough plan how to add the medals I want to, I also asked some friend, who also know java for help.  The problem I have, is that I don't know how to compile it without an .Sln file. Again, sorry to bother you!

PatrickAWlson
Posted

It's a gradle build.  I use command line -

./gradlew build

You might have to download something to get the gradle wrapper batch file.  You might also have to create some directories for the build to work.  Either the build will tell you or you can look into build.gradle to see what the target directories are.  The build process builds the code, runs the tests, creates deployment directgories for BoS and FC and zips them up.

 

Some of the tests do not have a 100% guaranteed outcome, which is bad, but I keep them anyway because they exercise the code at an integration level.  If I am looking at the tests and decide that the integration tests are flaking (inconsistent failures, usually in tests that create  missions top to bottom and then verify content) I just temporarily remove the test segment of the build.gradle file.  I would recommend running the tests until you are happy with your changes.  There are unit tests for medal awards.  I would recommend modifying them to verify your changes.  Much easier to test that way than by running the whole program.

Posted
13 hours ago, PatrickAWlson said:

It's a gradle build.  I use command line -

./gradlew build

You might have to download something to get the gradle wrapper batch file.  You might also have to create some directories for the build to work.  Either the build will tell you or you can look into build.gradle to see what the target directories are.  The build process builds the code, runs the tests, creates deployment directgories for BoS and FC and zips them up.

 

Some of the tests do not have a 100% guaranteed outcome, which is bad, but I keep them anyway because they exercise the code at an integration level.  If I am looking at the tests and decide that the integration tests are flaking (inconsistent failures, usually in tests that create  missions top to bottom and then verify content) I just temporarily remove the test segment of the build.gradle file.  I would recommend running the tests until you are happy with your changes.  There are unit tests for medal awards.  I would recommend modifying them to verify your changes.  Much easier to test that way than by running the whole program.



I am finished with the code (I think) and I installed Gradle (version 6.8.1, which was mentioned in the gradle wrapper batch file)  With ./gradlew build, nothing happens but with "gradle build" this happens:

 

> Task :buildEnvironment

------------------------------------------------------------
Root project 'PWCGCampaign-master'
------------------------------------------------------------

classpath
No dependencies

A web-based, searchable dependency report is available by adding the --scan option.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.8.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 636ms
1 actionable task: 1 executed

 

And I really don't know what that means.

I really appreciate all your effort! 

PatrickAWlson
Posted

Not sure.  In your IDE (I user Eclipse) update your gradle dependencies.  In Eclipse:

Right click on the project in the Project Explorer

Select Gradle->Refresh Gradle Project

Posted

Ok, so now I have eclipse and I opened the project as “existing gradle project”. The dependency error only appears when I use the command "gradlew build". When I use "gradle build" I get “ General error during semantic analysis: Unsupported class file major version 61” with a lot of extra lines. I read something about the wrong java version, but I can't figure it out.

PatrickAWlson
Posted

Use google to search for  “ General error during semantic analysis: Unsupported class file major version 61”.  Several responses on Stack Overflow.  Short version os that there is a mismatch between your Java version and your Gradle version.  I have been using Java 11 to build. My gradle version is 6.8.1

 

For the next build I am going to go to Java 17, but I am not there now.  

Posted
1 hour ago, PatrickAWlson said:

For the next build

 

Whoa, the plot thickens...getting my wish list together now! :ph34r:

Posted
2 hours ago, PatrickAWlson said:

Use google to search for  “ General error during semantic analysis: Unsupported class file major version 61”.  Several responses on Stack Overflow.  Short version os that there is a mismatch between your Java version and your Gradle version.  I have been using Java 11 to build. My gradle version is 6.8.1

 

For the next build I am going to go to Java 17, but I am not there now.  

Ok, I give up XD

I think I still know to less about all of this. 
I will maybe try in some time again. I hope it is ok if, when I try again, that I ask you some question... again.

But although I couldn't add more medals, thank you so much for your effort!

  • 2 months later...
Corralandy120000
Posted (edited)
On 3/25/2023 at 8:24 PM, Gerlat said:

Ok, I give up XD

I think I still know to less about all of this. 
I will maybe try in some time again. I hope it is ok if, when I try again, that I ask you some question... again.

But although I couldn't add more medals, thank you so much for your effort!

Hi. Have you managed to make it work please? I'm trying to make the source files work but I got the very same error as you. Do you have any advice please? Thanks

Edited by Corralandy120000
  • 2 months later...
Posted
On 6/3/2023 at 11:55 AM, Corralandy120000 said:

Hi. Have you managed to make it work please? I'm trying to make the source files work but I got the very same error as you. Do you have any advice please? Thanks

i am so sorry, no 
as i said, i gave up 

 

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