Special Aircraft Service

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2   Go Down

Author Topic: Changing a ships flag experiement: SUCCESSFUL 2 new ships  (Read 707 times)

0 Members and 1 Guest are viewing this topic.

redbaron96

  • member
  • Offline Offline
  • Posts: 210
Changing a ships flag experiement: SUCCESSFUL 2 new ships
« on: May 08, 2022, 10:06:34 AM »

Apologies in advance if this is posted in the wrong part of the forum (I am happy for a moderator to move the post to a different part of the site if they think that is more appropriate) but I was unsure which part of the 'modding' section would be most appropriate for this enquiry.

I have been learning more about how the game works and as a experiment, I downloaded the Taiho and Taiho Kai files and edited the ".tga" 'alpha' file to show the Soviet Navy flag instead of the Japanese one.





I have BAT. 4.2 but have not yet tested this experiment in game.
Can I ask two questions?
One, if I made this edit to the Taiho/Taiho Kai in my game, would the carrier then display the Soviet Flag instead of the IJN one?
If not, what other edits would have to be made?

Additionally, what further changes would have to be made to create a new object (but a copy of the Taiho/Taiho Kai, just with the flag changed) so it would be a new object, appearing in game as a Russian ship?

I am asking this to see if I can create a Russian flagged carrier, that I could then use in the WAW module of my BAT installation.
Logged

Kopfdorfer

  • member
  • Online Online
  • Posts: 1829
  • Potez 63.11 France's most significant AC in 1940
Re: Changing a ships flag experiement
« Reply #1 on: May 08, 2022, 10:22:35 AM »

This is quite possible - emmett grogan and I managed to reflag several vessels for a campaign we are developing.
Sadly he is the brains and I am the dumb muscle , but I will mention it to him and see if he can post a simple step by step
procedure for this.
It has to do with going into the Files/3do/Ships/Ship in Question path and changing the flag.tga or f#.tga

Kopfdorfer
Logged

redbaron96

  • member
  • Offline Offline
  • Posts: 210
Re: Changing a ships flag experiement
« Reply #2 on: May 08, 2022, 10:40:25 AM »

Thanks Kopfdorfer.
Do you know what the procedure would be for creating a 'new' object, so that the ship with the changed flag be a separate object in FMB (e.g. with a default as a Red Army ship, if an Axis ship was given a new Allied flag).
Logged

Epervier

  • 4.09 Guardian Angel !
  • SAS Team
  • member
  • Offline Offline
  • Posts: 8685
  • I'm French and Rebel_409! Nobody is perfect!
    • Some tinkering here
Re: Changing a ships flag experiement
« Reply #3 on: May 08, 2022, 11:41:29 AM »

New Ship ?
===> new Java Class + all new lines in xxx.ini files !!
Logged
If your results are not up to your expectations, tell yourself that as large oak was once an acorn ...

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 3353
Re: Changing a ships flag experiement
« Reply #4 on: May 09, 2022, 04:22:00 AM »

When saving a .tga, first ascertain if it has an alpha channel. If so, save as a 32-bit image. 24-bit format is for images having no alpha channel.

I sometimes encounter images that have an alpha channel that is entirely white, meaning full opacity. This is superfluous, and such an alpha channel 8s unnecessary. I delete it and save as a 24-bit image, which reduces the file size by 25%. Such an alpha channel likely arose from the artist saving as a 32-bit image, thus creating a superfluous alpha channel.
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

redbaron96

  • member
  • Offline Offline
  • Posts: 210
Re: Changing a ships flag experiement
« Reply #5 on: May 14, 2022, 11:50:45 AM »

New Ship ?
===> new Java Class + all new lines in xxx.ini files !!

Hi Epervier, can I ask honestly, how much work/how hard is the creation of the new 'Java Class file', if you were 'cloning' the ship and working from the mod files for the ship be to cloned, in this case the Taiho and Taiho Kai?

Would the starting point be the original Taiho/Taiho Kai mod file? and is that the file that I have inserted below, from using Notepad ++ to search for 'Taiho'?

Code: [Select]
Search "taiho" (8 hits in 1 file of 8447 searched)
ClassDump_BAT_4.1.3_Blue_Edge_WAW_DJ_Decompiled\com\maddox\il2\objects\ships\Shipkdm3.java (8 hits)

Line 16:     public static class IJNTaihoCV extends BigshipGeneric
Line 20:         public IJNTaihoCV()
Line 24:         public IJNTaihoCV(String s, int i, SectFile sectfile, String s1, SectFile sectfile1, String s2)
Line 30:     public static class IJNKaiTaihoCV extends BigshipGeneric
Line 34:         public IJNKaiTaihoCV()
Line 38:         public IJNKaiTaihoCV(String s, int i, SectFile sectfile, String s1, SectFile sectfile1, String s2)
Line 63:         new BigshipGeneric.SPAWN(com.maddox.il2.objects.ships.Shipkdm3$IJNTaihoCV.class);
Line 64:         new BigshipGeneric.SPAWN(com.maddox.il2.objects.ships.Shipkdm3$IJNKaiTaihoCV.class);

Code: [Select]
/*  1:   */ package com.maddox.il2.objects.ships;
/*  2:   */
/*  3:   */ import com.maddox.il2.ai.ground.TgtShip;
/*  4:   */ import com.maddox.rts.SectFile;
/*  5:   */
/*  6:   */ public abstract class Shipkdm3
/*  7:   */   extends Ship
/*  8:   */ {
/*  9:   */   public static class IJNKaiTaihoCV
/* 10:   */     extends BigshipGeneric
/* 11:   */     implements TgtShip
/* 12:   */   {
/* 13:   */     public IJNKaiTaihoCV() {}
/* 14:   */     
/* 15:   */     public IJNKaiTaihoCV(String s, int i, SectFile sectfile, String s1, SectFile sectfile1, String s2)
/* 16:   */     {
/* 17:26 */       super(i, sectfile, s1, sectfile1, s2);
/* 18:   */     }
/* 19:   */   }
/* 20:   */   
/* 21:   */   public static class IJNTaihoCV
/* 22:   */     extends BigshipGeneric
/* 23:   */     implements TgtShip
/* 24:   */   {
/* 25:   */     public IJNTaihoCV() {}
/* 26:   */     
/* 27:   */     public IJNTaihoCV(String s, int i, SectFile sectfile, String s1, SectFile sectfile1, String s2)
/* 28:   */     {
/* 29:40 */       super(i, sectfile, s1, sectfile1, s2);
/* 30:   */     }
/* 31:   */   }
/* 32:   */   
/* 33:   */   static
/* 34:   */   {
/* 35:59 */     new BigshipGeneric.SPAWN(IJNTaihoCV.class);
/* 36:60 */     new BigshipGeneric.SPAWN(IJNKaiTaihoCV.class);
/* 37:   */   }
/* 38:   */ }


/* Location:           U:\IL2\DEV\ClassDumps\BAT\4.1.3 Blue Edge\ClassDump_BAT_4.1.3_Blue_Edge_WAW_Classes\ClassDump_BAT_4.1.3_Blue_Edge_WAW.jar

 * Qualified Name:     com.maddox.il2.objects.ships.Shipkdm3

 * JD-Core Version:    0.7.0.1

 */

Logged

Epervier

  • 4.09 Guardian Angel !
  • SAS Team
  • member
  • Offline Offline
  • Posts: 8685
  • I'm French and Rebel_409! Nobody is perfect!
    • Some tinkering here
Re: Changing a ships flag experiement
« Reply #6 on: May 14, 2022, 01:58:15 PM »

To answer one of your previous questions...
Code: [Select]
One, if I made this edit to the Taiho/Taiho Kai in my game, would the carrier then display the Soviet Flag instead of the IJN one?The answer is yes. You would have a Japanese ship with a Soviet flag!

Hi Epervier, can I ask honestly, how much work/how hard is the creation of the new 'Java Class file', if you were 'cloning' the ship and working from the mod files for the ship be to cloned, in this case the Taiho and Taiho Kai?
First create a new folder and copy the files of the Japanese ship with the new flag into it.

A new Mother Class must be created for the new ship.
Example: NewShipSoviet

Then give a name to this new ship.
Example: SU_Test

Then put in the minimum...
Example:

Code: [Select]
package com.maddox.il2.objects.ships;

import com.maddox.il2.ai.ground.TgtShip;
import com.maddox.rts.SectFile;

public abstract class NewShipSoviet extends Ship {

public static class SU_Test extends BigshipGeneric implements TgtShip {

public SU_Test() {
}

public SU_Test(String s, int i, SectFile sectfile, String s1,
SectFile sectfile1, String s2) {
super(s, i, sectfile, s1, sectfile1, s2);
}
}

public NewShipSoviet() {
}

static {
new BigshipGeneric.SPAWN(SU_Test.class);
}
}


Then you have to make the lines for the "ini" files by taking the one of the Taiho and changing the names and the path for this new ship... in short the routine!

Nota : Standard code for Eclipse Java!

Nota 2 : If it is an aircraft carrier with radar or radio beacons... the code must be more complex... but as 409 is not the case, I cannot say anything more. We will have to see examples of code 412 or BAT!

Logged
If your results are not up to your expectations, tell yourself that as large oak was once an acorn ...

redbaron96

  • member
  • Offline Offline
  • Posts: 210
Re: Changing a ships flag experiement
« Reply #7 on: May 16, 2022, 05:58:23 AM »

I have successfully been able to edit the java and create new class files, creating two extra Russian aircraft carrier ships (the Taiho and Kai-Taiho with Russian flags).
Many thanks to Epervier who advised me on how the java files should be edited.

These are both successfully working in my BAT 4.2.1.

https://www.mediafire.com/file/hcdnj1mjzqmyj45/Russian_Carrier_Leningrad_and_Stalingrad.zip/file

The zip file includes the two Russian carriers, the original Taiho files, and a single mission that I created using the two new ships and the existing 'Soviet Navy' aircraft in BAT.









Logged

Epervier

  • 4.09 Guardian Angel !
  • SAS Team
  • member
  • Offline Offline
  • Posts: 8685
  • I'm French and Rebel_409! Nobody is perfect!
    • Some tinkering here
Re: Changing a ships flag experiement: SUCCESSFUL 2 new ships
« Reply #8 on: May 16, 2022, 07:14:59 AM »

I see that you take pictures of your screen...
Don't you have any editing software?  ;)
Like "FastStone". It's free!
https://www.faststone.org/FSViewerDetail.htm
The rendering would be much better!  8)
Logged
If your results are not up to your expectations, tell yourself that as large oak was once an acorn ...

Wolfosito

  • member
  • Offline Offline
  • Posts: 26
    • Steam Profile
Re: Changing a ships flag experiement: SUCCESSFUL 2 new ships
« Reply #9 on: May 16, 2022, 07:18:17 AM »

Hey, Could you clarify the installation a bit? Can't find the "respective files" in the readme
Logged

redbaron96

  • member
  • Offline Offline
  • Posts: 210
Re: Changing a ships flag experiement: SUCCESSFUL 2 new ships
« Reply #10 on: May 16, 2022, 07:36:02 AM »

The respective files are the 'ship ini', 'techni' and the other text files in the mod folder.

The text from them needs to be copied into the appropriate 'properties' file in the module/mod folder (these were made for BAT WAW and I have not tested them in a different module) that the mods are going to be used in.
Logged

Wolfosito

  • member
  • Offline Offline
  • Posts: 26
    • Steam Profile
Re: Changing a ships flag experiement: SUCCESSFUL 2 new ships
« Reply #11 on: May 16, 2022, 08:53:15 AM »

Yeah that's the thing I can't find the properties files where I have to paste the code into
I'm also using BAT so could you tell me their actual location?
Logged
Pages: [1] 2   Go Up
 

Page created in 0.191 seconds with 24 queries.