Special Aircraft Service

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 13 14 15 [16] 17 18   Go Down

Author Topic: WxTech's Effects Pack v1.6 for B.A.T and 4.12  (Read 19678 times)

0 Members and 4 Guests are viewing this topic.

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6013
Re: WxTech's Effects Pack v1.6 for B.A.T and 4.12
« Reply #180 on: May 29, 2024, 10:40:08 AM »

I started out on my adventure in modding back in 2009 after installing some effects mods, and just diving in by experimenting with some .eff and .mat files for effects that were easy enough to identify and understand the action of. Soon after that I began making changes to .tga textures using Photoshop.

Then in the next step, to figure out the structure of the .msh files I started experimenting with a very simple house object, first sketching things on paper and making adjustments in Notepad. It was some time later that I learned to use a spreadsheet so as to more easily make 3-view charts in order to visualize things much more rapidly. My immediate 3D goals back then were to make brand new new gun sights from scratch, which I finally succeeded to do with my American N-2 sight for the F4F-3 and the P-40E, in 2014. By then I was well and truly down the rabbit hole. ;) But I didn't get brave enough to tackle Java until late 2019, and nearly 5 years later I feel I barely know enough to be dangerous.  ;D
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

Whiskey_Sierra_972

  • Modder
  • member
  • Offline Offline
  • Posts: 6423
  • In memory of my beloved hero: Saburo SAKAI!
Re: WxTech's Effects Pack v1.6 for B.A.T and 4.12
« Reply #181 on: May 29, 2024, 11:47:17 AM »

At the end , I have find a compromize....all work if I disable your mother class 10C28AC4C8A11640.....can I know what does manage it's code?

I bet it as mother class due his size.....
Logged

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6013
Re: WxTech's Effects Pack v1.6 for B.A.T and 4.12
« Reply #182 on: May 29, 2024, 12:05:15 PM »

Classfile 10C28AC4C8A11640 is LocomotiveUSSR.class, which is the full code.

My main change:
- Altered the period in which the headlight gets turned on/off when an enemy gets within a certain distance. Previously this was fixed to the period between certain hours of the day. But the seasonal variation, particularly at middle and sub-Arctic latitudes, is too large for this to be appropriate. I use the actual elevation of the Sun below the horizon. And I dynamically scale the threshold detection distance with the Sun elevation, such that when darker an enemy is sensed only at a nearer distance.

Here's the Java file for LocomotiveUSSR.class:
Code: [Select]
package com.maddox.il2.objects.trains;

import com.maddox.JGP.Point3d;
import com.maddox.JGP.Vector3d;
import com.maddox.il2.ai.*;
import com.maddox.il2.engine.*;
import com.maddox.il2.objects.air.Aircraft;
import com.maddox.il2.objects.effects.MiscEffects;  //NEW
import com.maddox.rts.MsgAction;
import com.maddox.rts.Spawn;
import com.maddox.util.HashMapExt;
import java.util.Map;

// Referenced classes of package com.maddox.il2.objects.trains:
//            Wagon, Train, WagonSpawn

public class LocomotiveUSSR extends Wagon
    implements MsgCollisionRequestListener, MsgExplosionListener, MsgShotListener
{
    public static class SPAWN
        implements WagonSpawn
    {

        public Wagon wagonSpawn(Train train)
        {
            return new LocomotiveUSSR(train);
        }

        public SPAWN()
        {
        }
    }


    private boolean danger()
    {
        Point3d point3d = new Point3d();
        super.pos.getAbs(point3d);
        Vector3d vector3d = new Vector3d();
        for(java.util.Map.Entry entry1 = Engine.name2Actor().nextEntry(null); entry1 != null; entry1 = Engine.name2Actor().nextEntry(entry1))
        {
            Actor actor1 = (Actor)entry1.getValue();
float scaleDist = MiscEffects.cvt(World.Sun().ToSun.z, -0.31F, -0.1F, 0.25F, 1.0F);
//            if(Actor.isAlive(actor1) && (actor1 instanceof Aircraft) && actor1.getArmy() != myArmy && actor1.pos.getAbsPoint().distance(point3d) < 1500D)
            if(Actor.isAlive(actor1) && (actor1 instanceof Aircraft) && actor1.getArmy() != myArmy && actor1.pos.getAbsPoint().distance(point3d) < 3000F * scaleDist)
                return true;
        }

        return false;
    }

    protected void explode(Actor actor)
    {
        new MsgAction(0.0D, this)
{
            public void doAction(Object obj)
            {
                LocomotiveUSSR locomotiveussr = (LocomotiveUSSR)obj;
                Eff3DActor.New(locomotiveussr, new HookNamed(locomotiveussr, "Damage"), null, 1.0F, "Effects/Smokes/BoilerBurst.eff", 2.0F);  //was 2s; NEW effect by WxTech
                Eff3DActor.New(locomotiveussr, new HookNamed(locomotiveussr, "Damage"), null, 1.0F, "Effects/Smokes/LocomotiveFC2.eff", 25F);  //was 25s
            }
        };
//        new MsgAction(2D, new Wagon.Pair(this, this, this))
        new MsgAction(2D, new Wagon.Pair(this, actor))
{
            public void doAction(Object obj)
            {
                Actor actor1 = getOwner();
                if(actor1 != null)
                    ((Train)actor1).wagonDied(((Wagon.Pair)obj).victim, ((Wagon.Pair)obj).initiator);
                life = -1F;
                ActivateMesh();
            }
        };
        new MsgAction(6.5D, this)
{
            public void doAction(Object obj)
            {
                LocomotiveUSSR locomotiveussr = (LocomotiveUSSR)obj;
                Eff3DActor.New(locomotiveussr, new HookNamed(locomotiveussr, "Damage"), null, 1.0F, "Effects/Smokes/LocomotiveFC1.eff", 90F);  //was 35s
            }
        };
    }

    protected LocomotiveUSSR(Train train, String s, String s1)
    {
        super(train, s, s1);
//        fn = World.getTimeofDay();
        super.life = 0.015F;
        super.ignoreTNT = 0.84F;
        super.killTNT = 3.5F;
        super.bodyMaterial = 2;
        pipe = Eff3DActor.New(this, new HookNamed(this, "Vapor"), null, 1.0F, "Effects/Smokes/SmokeBlack_Locomotive.eff", -1F);
        pipe2 = Eff3DActor.New(this, new HookNamed(this, "Vapor2"), null, 1.0F, "Effects/Smokes/SmokeWhite_Locomotive.eff", -1F);
        Light1 = Eff3DActor.New(this, new HookNamed(this, "Light1"), null, 1.0F, "Effects/Smokes/Locomotive_light.eff", -1F);
        Light2 = Eff3DActor.New(this, new HookNamed(this, "Light2"), null, 1.0F, "Effects/Smokes/Locomotive_light.eff", -1F);
        Light3 = Eff3DActor.New(this, new HookNamed(this, "Light3"), null, 1.0F, "Effects/Smokes/Locomotive_light.eff", -1F);
        SteamL = Eff3DActor.New(this, new HookNamed(this, "SteamL"), null, 1.0F, "Effects/Smokes/S_SteamL.eff", -1F);
        SteamR = Eff3DActor.New(this, new HookNamed(this, "SteamR"), null, 1.0F, "Effects/Smokes/S_SteamR.eff", -1F);
    }

    public LocomotiveUSSR(Train train)
    {
        this(train, getMeshName(0), getMeshName(1));
    }

    private static String getMeshName(int i)
    {
        String s;
        switch(World.cur().camouflage)
        {
        case 0: // '\0'
            s = "summer";
            break;

        case 1: // '\001'
            s = "winter";
            break;

        default:
            s = "summer";
            break;
        }
        return "3do/Trains/Prvz" + (i != 1 ? "" : "_Dmg") + "/" + s + "/hier.him";
    }

    void place(Point3d point3d, Point3d point3d1, boolean flag, boolean flag1)
    {
        super.place(point3d, point3d1, flag, flag1);
        if(pipe == null && Light1 == null && Light2 == null && SteamL == null && SteamR == null && pipe2 == null)
            return;
        float f;
        if(!IsDead())
        {
            f = ((Train)getOwner()).getEngineSmokeKoef();
            if(f == 0.0F && ((Train)getOwner()).stoppedForever())
                f = -1F;
        } else
        {
            f = -1F;
        }
        if(f >= 0.0F)
        {
            pipe._setIntesity(f);
            pipe2._setIntesity(f);
            Light1._setIntesity(f);
            Light2._setIntesity(f);
            Light3._setIntesity(f);
            SteamL._setIntesity(f);
            SteamR._setIntesity(f);
//            if((double)fn < 18D && (double)fn >= 6D || danger())
if(World.Sun().ToSun.z > -0.1 || danger())
            {
                Light1._setIntesity(0.0F);
                Light2._setIntesity(0.0F);
                Light3._setIntesity(0.0F);
            }
        } else
        {
            pipe._finish();
            pipe = null;
            pipe2._finish();
            pipe2 = null;
            Light1._finish();
            Light1 = null;
            Light2._finish();
            Light2 = null;
            Light3._finish();
            Light3 = null;
            SteamL._finish();
            SteamL = null;
            SteamR._finish();
            SteamR = null;
        }
    }

    protected void ActivateMesh()
    {
        if(IsDead() && pipe != null && Light1 != null)
        {
            pipe._finish();
            pipe = null;
            pipe2._finish();
            pipe2 = null;
            Light1._finish();
            Light1 = null;
            Light2._finish();
            Light2 = null;
            Light3._finish();
            Light3 = null;
            SteamL._finish();
            SteamL = null;
            SteamR._finish();
            SteamR = null;
        }
        super.ActivateMesh();
    }

/*    public static String getMeshNameForEditor()
    {
        return getMeshName(0);
    }

    static Class _mthclass$(String s)
    {
        return Class.forName(s);
        ClassNotFoundException classnotfoundexception;
        classnotfoundexception;
        throw new NoClassDefFoundError(classnotfoundexception.getMessage());
    }  */

    static Class _mthclass$(String s)
    {
        try
        {
            return Class.forName(s);
        }
        catch(ClassNotFoundException classnotfoundexception)
        {
            throw new NoClassDefFoundError(classnotfoundexception.getMessage());
        }
    }

//    float fn;
    private static Class cls;
    protected Eff3DActor pipe;
    protected Eff3DActor pipe2;
    protected Eff3DActor Light1;
    protected Eff3DActor Light2;
    protected Eff3DActor Light3;
    protected Eff3DActor SteamL;
    protected Eff3DActor SteamR;
    private int myArmy;

    static
    {
        cls = com.maddox.il2.objects.trains.LocomotiveUSSR.class;
        Spawn.add(cls, new SPAWN());
    }
}
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

Whiskey_Sierra_972

  • Modder
  • member
  • Offline Offline
  • Posts: 6423
  • In memory of my beloved hero: Saburo SAKAI!
Re: WxTech's Effects Pack v1.6 for B.A.T and 4.12
« Reply #183 on: May 29, 2024, 02:25:13 PM »

Ok....thanks for your reply!

I can't figure how I have such fortune to have selected this one....

I was trying to eliminate conflict and (as I'm absolutely not able to manage classes or java) I supposed (wrongly) that bigger classfiles could be the same as the ships where there is a motherclass....I simply start from bigger....

I think that something is conflicting in BAT 422 with this active because with this disabled all russian trains work correctly....

And since previously the not showing/placing issue was only with russians stocks....

BTW....

I have made a brief research about locomotives....their capacity is calculated in tons moveable....the Il2 locomotives (assuming that russian have the same performance of german bk52) could handle 1200 tons in plain and 800 with a 3% slope....

Usually a loaded wagon is about 20 tons....

Since war railroads could have higher slopes I'm rebuilding trains of about 400 tons or about 20 wagons....

I plan to finish tomorrow....

If someone like to test I can post my new chief.ini entries here....
Logged

gunny0134

  • member
  • Offline Offline
  • Posts: 1134
  • no skill just simple, but seek the best beauty !!
Re: WxTech's Effects Pack v1.6 for B.A.T and 4.12
« Reply #184 on: May 29, 2024, 05:11:08 PM »

I'm very lacking in the ability to make and share something.

But I have my own tricks to use well what's made by the modders.

So I try to use it as beautifully as possible.

I think this is also a way to repay those modders.


Logged

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6013
Re: WxTech's Effects Pack v1.6 for B.A.T and 4.12
« Reply #185 on: May 29, 2024, 05:29:04 PM »

I love you long time--I mean train! ;) Neat doubled Loco. But then, that means a kilometer-long train, right? :angel:
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

gunny0134

  • member
  • Offline Offline
  • Posts: 1134
  • no skill just simple, but seek the best beauty !!
Re: WxTech's Effects Pack v1.6 for B.A.T and 4.12
« Reply #186 on: May 29, 2024, 06:03:59 PM »

It's this...'Germany_CargoFuelTrainLong/AA'

This train column was designed by Hubberranz...I'd like to thank him for taking this opportunity !!

The screenshot above is from his quick mission : https://www.sas1946.com/main/index.php/topic,72445.msg788667.html#msg788667

The train column is contained in the map mod file he provides.
Logged

ssn637

  • member
  • Offline Offline
  • Posts: 173
  • Men mean more than guns in the rating of a ship
Re: WxTech's Effects Pack v1.6 for B.A.T and 4.12
« Reply #187 on: May 30, 2024, 01:34:02 AM »

It's this...'Germany_CargoFuelTrainLong/AA'

This train column was designed by Hubberranz...I'd like to thank him for taking this opportunity !!

The screenshot above is from his quick mission : https://www.sas1946.com/main/index.php/topic,72445.msg788667.html#msg788667

The train column is contained in the map mod file he provides.

Thanks Gunny!

That was fun to watch...



Logged

PO_MAK_249RIP

  • CMON U SPURS!
  • member
  • Offline Offline
  • Posts: 2089
Re: WxTech's Effects Pack v1.6 for B.A.T and 4.12
« Reply #188 on: August 05, 2024, 12:47:42 AM »

Any news on your next effects pack WxTech? ıts been a long time coming lol
Logged
Corsair Carbide case, Intel core i5 4690 3.5ghz with Arctic Cooler, Asus Rock H97 performance, MSI Ventus XS OC 1660GTX 6GB DDR6, 32GB Patriot Viper 1600Mhz, 256GB/500GB Crucial SSDs, Windows 10 64bit.

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6013
Re: WxTech's Effects Pack v1.6 for B.A.T and 4.12
« Reply #189 on: August 05, 2024, 01:34:34 AM »

I know. I keep making further refinements, which I really should pause and release what I have. One thing which causes me some bother is the inability successfully compile a couple of crucial 4.2.x B.A.T classes, meaning that for the time being I would be sending out a pack for just 4.0 to 4.1.1 (pre triggers introduction.)
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

PO_MAK_249RIP

  • CMON U SPURS!
  • member
  • Offline Offline
  • Posts: 2089
Re: WxTech's Effects Pack v1.6 for B.A.T and 4.12
« Reply #190 on: August 05, 2024, 06:40:23 AM »

Ah I see I did wonder why you had'nt tried to combine a release wıth the latest update. Here's hoping you get the BAT classes resolved mate
Logged
Corsair Carbide case, Intel core i5 4690 3.5ghz with Arctic Cooler, Asus Rock H97 performance, MSI Ventus XS OC 1660GTX 6GB DDR6, 32GB Patriot Viper 1600Mhz, 256GB/500GB Crucial SSDs, Windows 10 64bit.

Old_DaD

  • member
  • Offline Offline
  • Posts: 498
  • Fully engaged in the war on senior moments.
Re: WxTech's Effects Pack v1.6 for B.A.T and 4.12
« Reply #191 on: September 12, 2024, 03:24:47 AM »

Hello persons.
To WxTech..if you should pass by, or any other specialists, of course..
This is related to the MOD HeirHimStatic by Novichok.
That Mod uses the same 3 classes and is important for anyone using any of the new static objects MODS.
I'm having the same trouble as some people did earlier, in placing  .him objects on maps, and in missions

Quote: "I include here my improved House.class. This deals with stationary objects. The 3 classfiles:

  00178BEA6D437F32
  C1E6491A15C0411E
  D60102080342BDC2

- Formerly "RockHuge" and "RockBig" Body types were treated the same; now they're handled differently, with their own effects.
- The "Flesh" Body type is now handled like the others, not be so easily destroyed and also to be able to have effects associated.
- Added NEW Body type of "Vehicle" (and created new effects)

These classfiles are NOT crucial, but do make an important contribution to the variety of effects."
 I'm guessing it's going to be down to the choice of having the effects or the vehicles.
I put the 3 class files from Novichiks MOD above the effects..however, still having probs with placing of objects.
Logged
Pages: 1 ... 13 14 15 [16] 17 18   Go Up
 

Page created in 0.043 seconds with 27 queries.