Jump to content
  • 1

[WIP] Chernarus Train Service


Fully

Question

Being working on this for a few days.
YES thats right North Berezino - Electro fully working so far =)
Makes track sounds, level crossings sounds as well as stops at every train station along the way =)
Still WIP so not quite finished yet......:/

zqkdKVx.jpg

 

 

- Electro

 

2hl9ItH.jpg

 

 

Still working on collecting the track ids from here to Kamenka =)

 

Link to comment
Share on other sites

Recommended Posts

  • 0

what the hell? :o

 

you have a BUS on the RAILS? :lol:

 

 

in some map addition (northwest airfield main entrance) there were a locomotive on the street which also was very confusing ^^

 

Yeah there is no train passenger carriages. So why not use the bus you can ride the train  =)

 

I will have a look there Matt =)

Link to comment
Share on other sites

  • 0

I have this working - Completly from berezino - Kamenka.
Stop at all stations, sound the horn on all road crossings. But

 

"CLEANUP: KILLING A HACKER Fulgore B 1-1-B:1 (Fulgore) REMOTE IN Ikarus"

How do I fix this?

Link to comment
Share on other sites

  • 0

I have this working - Completly from berezino - Kamenka.

Stop at all stations, sound the horn on all road crossings. But

 

"CLEANUP: KILLING A HACKER Fulgore B 1-1-B:1 (Fulgore) REMOTE IN Ikarus"

How do I fix this?

Look into some sarge AI files or readmes, he had a tutorial how to disable killing a hacker from BE( if its in the BE ) I can look at home, but am at shool ATM

Link to comment
Share on other sites

  • 0

Ok, found it. try this:

A2) Adjust your server_cleanup.fsm file for "Killed a hacker" fix

Depends which DayZ version you are running.

The line you are looking for is either:

" if (!(vehicle _x in _safety) && ((typeOf vehicle _x) != ""ParachuteWest"") ) then {" \n

Change to / add as shown:

" if (!(vehicle _x in _safety) && ((typeOf vehicle _x) != ""ParachuteWest"") && (vehicle _x getVariable [""Sarge"",0] != 1) ) then {" \n

Or the line looks like

if(vehicle _x != _x && !(vehicle _x in _safety) && (typeOf vehicle _x) != ""ParachuteWest"") then {" \n

Change that to

if(vehicle _x != _x && (vehicle _x getVariable [""Sarge"",0] != 1) && !(vehicle _x in _safety) && (typeOf vehicle _x) != ""ParachuteWest"") then {" \n

Now I know this is for helicopter ( I think ) but if you have managed to code your trains, you will have no problem to adapt this to your problem :)

Link to comment
Share on other sites

  • 0

Time for a update on this =)

I want to thank Zonekiller for the original script found here

http://www.armaholic.com/page.php?id=16784

 

I then modified it to make a passenger train to go from Berezino to Kamenka, stopping at every train station along the way, and sounding the train horn at every level crossing =)

It reads the track ids, runs until it runs out of them, then rereads the track ids in reverse. 

 

I am sure there are some bugs, but it works in general.

 

 

Files are here
https://github.com/FullyGored/Cherno-Train-Service.git

 

Have Fun =)

Link to comment
Share on other sites

  • 0

HI mate, the first image is were it starts, Berezino Gas works!
 

class Vehicles
{
    items=1;
    class Item0
    {
        position[]={13113.642,6.0146008,10507.089};
        azimut=199.69299;
        id=1;
        side="EMPTY";
        vehicle="Land_loco_742_blue";
        skill=0.60000002;
        init="_nil = [this,1] execVM ""scripts\Train\Train_Start.sqf"";";
    };
};

Add this to your mission.sqm, change class Vehicles numbers (items=1;)  if you have them in your mission.sqm

Also make sure the paths are correct in the above.

 

That is all you need to add to the mission.pbo =)

Link to comment
Share on other sites

  • 0

HI mate, the first image is were it starts, Berezino Gas works!

 

class Vehicles
{
    items=1;
    class Item0
    {
        position[]={13113.642,6.0146008,10507.089};
        azimut=199.69299;
        id=1;
        side="EMPTY";
        vehicle="Land_loco_742_blue";
        skill=0.60000002;
        init="_nil = [this,1] execVM ""scripts\Train\Train_Start.sqf"";";
    };
};

Add this to your mission.sqm, change class Vehicles numbers (items=1;)  if you have them in your mission.sqm

Also make sure the paths are correct in the above.

 

That is all you need to add to the mission.pbo =)

 

I tried that but can't get it to work.

 

I have class vehicles here:

class Groups
{
items=2;
class Item0
{
side="WEST";
class Vehicles
{
items=100;
class Item0
{
position[]={-7244.9355,365.97467,19534.543};
azimut=-17.0839;
id=11;
side="WEST";
vehicle="Survivor1_DZ";
player="PLAY CDG";
skill=0.60000002;
init="this enableSimulation false;this allowDammage false;this disableAI 'FSM';this disableAI 'ANIM';this disableAI 'MOVE';";
};

and I also have it here, just before class Markers:

class Item1
{
side="LOGIC";
class Vehicles
{
items=1;
class Item0
{
position[]={-143.93861,0.52647489,2319.5012};
id=50;
side="LOGIC";
vehicle="FunctionsManager";
leader=1;
lock="UNLOCKED";
skill=0.60000002;
};
};
};

I've tried it in both places. I did have an engine show up at what I assume is the starting point, with no cars and no movement but I don't recall which location in the file I had that code.

Link to comment
Share on other sites

  • 0

It should look like this when in the mission.sqm at around line 1174.

                };
            };
        };
    };
    class Vehicles
    {
        items=1;
        class Item0
        {
            position[]={13113.642,6.0146008,10507.089};
            azimut=199.69299;
            id=1;
            side="EMPTY";
            vehicle="Land_loco_742_blue";
            skill=0.60000002;
            init="_nil = [this,1] execVM ""scripts\Train\Train_Start.sqf"";";
        };
    };
    class Markers
    {

Forgot about the sounds :/

Add this to description.ext

class CfgSounds
{
    sounds[] = {};

    class NoSound
    {
    name = "NoSound";
        sound[] = {"", 0, 1};
        titles[] = {};
    };

#include "scripts\Train\sounds.hpp"
};
Link to comment
Share on other sites

  • 0

 

It should look like this when in the mission.sqm at around line 1174.

                };
            };
        };
    };
    class Vehicles
    {
        items=1;
        class Item0
        {
            position[]={13113.642,6.0146008,10507.089};
            azimut=199.69299;
            id=1;
            side="EMPTY";
            vehicle="Land_loco_742_blue";
            skill=0.60000002;
            init="_nil = [this,1] execVM ""scripts\Train\Train_Start.sqf"";";
        };
    };
    class Markers
    {

I tried to get this running, the train spawned at Berezino but without waggons.

I guess that's the problem is related to the lines I added to the mission.sqm

 

So, I'm also not sure how to implement it, because at the place to put it in it's original this:

 

class Item1

        {

            side="LOGIC";

            class Vehicles

            {

                items=1;

                class Item0

                {

                    position[]={-143.93861,0.52647489,2319.5012};

                    id=50;

                    side="LOGIC";

                    vehicle="FunctionsManager";

                    leader=1;

                    lock="UNLOCKED";

                    skill=0.60000002;

                };

            };

        };

    };

    class Markers

 

So I tried it this way:

 

class Item1

        {

            side="LOGIC";

            class Vehicles

            {

                items=2;

                class Item0

                {

                    position[]={-143.93861,0.52647489,2319.5012};

                    id=50;

                    side="LOGIC";

                    vehicle="FunctionsManager";

                    leader=1;

                    lock="UNLOCKED";

                    skill=0.60000002;

                };

                class Item1

                {

                    position[]={13113.642,6.0146008,10507.089};

                    azimut=199.69299;

                    id=1;

                    side="EMPTY";

                    vehicle="Land_loco_742_blue";

                    skill=0.60000002;

                    init="_nil = [this,1] execVM ""custom\Train\Train_Start.sqf"";";

                };

            };

        };

    };

    class Markers

 

Didn't work. Would appreciate some help on this. Thx!

Link to comment
Share on other sites

  • 0

You put it in the groups class =)
 

It should look like this =)

                class Item99
                {
                    position[]={-7246.0605,365.94415,19535.738};
                    azimut=-17.0839;
                    id=95;
                    side="WEST";
                    vehicle="Survivor1_DZ";
                    player="PLAY CDG";
                    skill=0.60000002;
                    init="this enableSimulation false;this allowDammage false;this disableAI 'FSM';this disableAI 'ANIM';this disableAI 'MOVE';";
                };
            };
        };
        class Item1
        {
            side="LOGIC";
            class Vehicles
            {
                items=1;
                class Item0
                {
                    position[]={-143.93861,0.52647489,2319.5012};
                    id=50;
                    side="LOGIC";
                    vehicle="FunctionsManager";
                    leader=1;
                    lock="UNLOCKED";
                    skill=0.60000002;
                };
            };
        };
    };
    class Vehicles
    {
        items=1;
        class Item0
        {
            position[]={13113.642,6.0146008,10507.089};
            azimut=199.69299;
            id=1;
            side="EMPTY";
            vehicle="Land_loco_742_blue";
            skill=0.60000002;
            init="_nil = [this,1] execVM ""scripts\Train\Train_Start.sqf"";";
        };
    };
    class Markers

Make sure the path is correct put the Train folder into your scripts folder inside your mission.pbo.

Or custom folder and change the above path to match.

Link to comment
Share on other sites

  • 0

Nice! Noticed any performance loss when using this?

 

No!

The dedicated box it runs on is a very nice powerful server =)

 

Like I said it was WIP and still needs a little more work to just tidy it up a little more.

But the basic function is there, If anyone want's to make it better please do =)

 

It would be cool to make like Axeman's bus service.

 

A lot people get a shock when they see a train coming :P

Link to comment
Share on other sites

  • 0

Thx, mate, I succeeded to get this running with the mission.sqm part you posted above.....but...

 

The driver of the train can be seen in front of the train, then he is pulled back inside the train again.

ix4yfbm8.png
Overall the train drives very jumpily.

 

But most worse thing is, that I got killed after the train continues his tour.
So, I hopped in and when the train drives off I got killed.

 

"CLEANUP: KILLING A HACKER Stollenwerk B 1-1-D:1 (Stollenwerk) REMOTE IN Ikarus_TK_CIV_EP1"

 

The lines, MrInfro posted one site before, in the server_cleanup.fsm are not existant for me.

So this would be the most important thing to fix.

Any solutions yet for this? FIXED: SEE POST BELOW

 

At least I'm getting this error in the logs:

12:17:25 House 37aeb900# 1059997: lhd_3.p3d (from) not found in the operative map
12:17:26 Error in expression <then {_stopdelay = _stoptime;if !(alive _gunner) then {[_tgun,_pos,_group] spawn>
12:17:26   Error position: <_gunner) then {[_tgun,_pos,_group] spawn>
12:17:26   Error Undefined variable in expression: _gunner
12:17:26 File mpmissions\DayZ_Epoch_11.Chernarus\custom\Train\Train_Start.sqf, line 137
12:17:33 House not found in the list
 

Link to comment
Share on other sites

  • 0

I have this working - Completly from berezino - Kamenka.

Stop at all stations, sound the horn on all road crossings. But

 

"CLEANUP: KILLING A HACKER Fulgore B 1-1-B:1 (Fulgore) REMOTE IN Ikarus"

How do I fix this?

 

Was able to sort this.

Add in your variables.sqf the Ikarus to the following line so it looks like this:

 DZE_safeVehicle = ["ParachuteWest","ParachuteC","Ikarus_TK_CIV_EP1"];

It's working now....for a while, than I fell out of the bus.(without dieing)

The bus is gone after this and the train drives without it around.

Link to comment
Share on other sites

  • 0

At a guess, as you join the bus you become the owner, it then desyncs from the server owned train convoy. Which is interesting as there are 'issues' with ownership transfer when done manually.

 

Desync is the reason for the jerky behaviour of the train in general. Best solution is to reduce the frequency of position updates and, ideally run it from a client.

 

Would also be tempted to experiment with its simulation, so long as it doesn't break it :)

Link to comment
Share on other sites

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
  • Discord

×
×
  • Create New...