• 0
TroyT

Importing initServer.sqf into EDEN

Question

I'm looking for a way to import the objects and NPCs from my mission initServer.sqf and initPlayersqf files into EDEN so I can make some tweaks relative to those already in-game. I've tried a few things in the debug console but the parameters aren't translating correctly.

Herre is an example of the format that my initServer.sqf contains:

Spoiler

    ["Exile_Locker",[2988.82,18173.9,1.35244],[[0.999929,0.011945,0],[0,0,1]],[false,false]],
    ["Exile_Sign_Locker",[2984.21,18173.6,1.35244],[[0.999929,0.0118953,0],[0,0,1]],[false,false]]

 

And initPlayer.sqf

Spoiler

        "Exile_Trader_Aircraft","Exile_Trader_Aircraft","WhiteHead_17",["LHD_krajPaluby"],[14596.5, 16752.9, 0.12644],133

I only need to load them into EDEN, I will manually export and insert the new objects into their respective files.

 Any help here would be appreciated.  

Share this post


Link to post
Share on other sites

44 answers to this question

  • 0

You cannot reverse add them to your eden editor. Gotta start all over, if u wanna make changes. It's harsh, I lost my saved missions yesterday.. :)

Share this post


Link to post
Share on other sites
  • 0

I think you can, but need to know the code structure for the debug console.  

For example, this:

Spoiler

collect3DENHistory{
    {
        private[ "_obj" ];
        _x params[ "_type", "_pos", "_rot" ];

        _obj = create3DENEntity [ "Object", _type, _pos, true ];
        _obj set3DENAttribute [ "rotation",[ 0,0,_rot ] ];

    }forEach [
    
        ["Land_Pier_wall_F",[14620,16805.8,0],145.181,0,0,false]

    ];
};

 

Will load the Land_Pier_wall_F item into the editor correctly, but the elevation and rotation parameters in the initServer aren't the same format.  I think if I could sort out the format I could make it work.  The main problem for me is that I don't know how to translate the rotation parameter from the initServer to degrees. 

Share this post


Link to post
Share on other sites
Advertisement
  • 0
15 minutes ago, kuplion said:

Just remove all the comments and they'll work.

I'm not sure exactly what to remove.

How would you edit this line?

Spoiler

    ["Exile_Locker",[2988.82,18173.9,1.35244],[[0.999929,0.011945,0],[0,0,1]],[false,false]],

 

Share this post


Link to post
Share on other sites
  • 0

I just realized that editing one example isn't going to be the ultimate answer because there are  380 items to import.  I really need a script solution I think.

 

Share this post


Link to post
Share on other sites
  • 0
5 minutes ago, TroyT said:

I'm not sure exactly what to remove.

How would you edit this line?

  Reveal hidden contents

 

 

3 minutes ago, TroyT said:

I just realized that editing one example isn't going to be the ultimate answer because there are  380 items to import.  I really need a script solution I think.

 

I mean remove any // and /* or */ , and the characters they're commenting out. The debug console doesn't like commented code.

1 person likes this

Share this post


Link to post
Share on other sites
  • 0

Oh crap, I just realized what you meant.  I just place the whole:

Spoiler


private _objects = 
[
    ["Exile_Sign_Aircraft", [14630,16720,0], [[0,0,0],[0,0,1]], [false, false]],
    ["Exile_Sign_AircraftCustoms", [14635,16720,0], [[-.25,0,0],[0,0,1]], [false, false]],
    ["Exile_Sign_Vehicles", [14640,16720,0], [[-.5,0,0],[0,0,1]], [false, false]],
    ["Exile_Sign_VehicleCustoms", [14645,16720,0], [[-.75,0,0],[0,0,1]], [false, false]],
    ["Exile_Sign_Equipment", [14650,16720,0], [[1,0,0],[0,0,1]], [false, false]],
    ["Exile_Sign_Food", [14655,16720,0], [[.75,0,0],[0,0,1]], [false, false]],
    ["Exile_Sign_SpecialOperations", [14660,16720,0], [[.5,0,0],[0,0,1]], [false, false]],
    ["Land_KartTrolly_01_F", [14620.2,16889.6,17.8613], [[0.599278,0.800541,0],[0,0,1]], [false, false]],
    ["Land_BucketNavy_F", [14619.1,16888.6,18.6619], [[-0.96991,0.243463,0],[0,0,1]], [false, false]],
    ["Land_Bucket_painted_F", [14619.1,16889.1,18.6544], [[0,1,0],[0,0,1]], [false, false]],
    ["Exile_Locker",[2988.82,18173.9,1.35244],[[0.999929,0.011945,0],[0,0,1]],[false,false]],
    ["Exile_Sign_Locker",[2984.21,18173.6,1.35244],[[0.999929,0.0118953,0],[0,0,1]],[false,false]]
];

{
    private _object = (_x select 0) createVehicle [0,0,0];
    _object setPosASL (_x select 1);
    _object setVectorDirAndUp (_x select 2);
    _object enableSimulationGlobal ((_x select 3) select 0);
    _object allowDamage ((_x select 3) select 1);
} forEach _objects;
 

 

in the debug and it works.

 

I was waaaay overthinking it.

Thanks a lot!

Share this post


Link to post
Share on other sites
  • 0

I do not think this works for traders themselves though, does it?

Share this post


Link to post
Share on other sites
Advertisement

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

  • Recently Browsing   0 members

    No registered users viewing this page.