Liberty Unleashed

Scripting => Script Help => Topic started by: Njord on July 29, 2012, 05:16:34 pm

Title: Help with object placement
Post by: Njord on July 29, 2012, 05:16:34 pm
So I want to get an object from a .IPL file (from single player) and have it in content.xml (LU).
This one is from a .IPL file.
Code: [Select]
1145, nbbridgerda, -264, 50, 20, 0, 0, 0, 0.100014, -0.100014, -0.707724, 0.707724
How do I place it in content.xml?
Code: [Select]
<object x="?" y="?" z="?" anglex="?" angley="?" anglez="?" model=? />
Title: Re: Help with object placement
Post by: Thijn on July 29, 2012, 08:53:06 pm
The model is 1145. The rest is up to you. Where do you need it. Get those coords and add it :)
Title: Re: Help with object placement
Post by: Njord on July 29, 2012, 09:26:31 pm
I know the coordinates, I'm stuck with the angles, it seems to be 4 angles values in the .IPL; but there's only 3 in content.xml. So basically the object is there at the correct place but its inclinations are wrong.
Title: Re: Help with object placement
Post by: Thijn on July 30, 2012, 03:18:40 pm
Why do you want to use the same coordinates and angles as in the IPL? That just places the same object on the exact same place. So they will either be on the right place and you wont see any difference or they will bugg out like shit.

Question is, What do you wanna do with with the object?
Title: Re: Help with object placement
Post by: stormeus on July 31, 2012, 08:28:50 pm
The angles used in the IPL are quaternions. The angles used by LU are vectors. I don't know much else about that.

/me cues for a dev to explain conversion and shiz
Title: Re: Help with object placement
Post by: Njord on August 03, 2012, 06:02:08 pm
Why do you want to use the same coordinates and angles as in the IPL? That just places the same object on the exact same place. So they will either be on the right place and you wont see any difference or they will bugg out like shit.

Question is, What do you wanna do with with the object?
Well I wanna convert a mod I downloaded for single player which adds a stunt zone. I thought it would be cool to feature it in LU.
Title: Re: Help with object placement
Post by: SugarD on August 03, 2012, 08:27:24 pm
Why do you want to use the same coordinates and angles as in the IPL? That just places the same object on the exact same place. So they will either be on the right place and you wont see any difference or they will bugg out like shit.

Question is, What do you wanna do with with the object?
Well I wanna convert a mod I downloaded for single player which adds a stunt zone. I thought it would be cool to feature it in LU.
Custom objects aren't possible in LU yet, if you are trying to add them from your game's mods...however they will be in 0.1.1.0.
Title: Re: Help with object placement
Post by: Njord on August 03, 2012, 11:20:13 pm
Why do you want to use the same coordinates and angles as in the IPL? That just places the same object on the exact same place. So they will either be on the right place and you wont see any difference or they will bugg out like shit.

Question is, What do you wanna do with with the object?
Well I wanna convert a mod I downloaded for single player which adds a stunt zone. I thought it would be cool to feature it in LU.
Custom objects aren't possible in LU yet, if you are trying to add them from your game's mods...however they will be in 0.1.1.0.
But this mod uses the default objects, not custom ones.
Title: Re: Help with object placement
Post by: SugarD on August 04, 2012, 12:12:41 am
Why do you want to use the same coordinates and angles as in the IPL? That just places the same object on the exact same place. So they will either be on the right place and you wont see any difference or they will bugg out like shit.

Question is, What do you wanna do with with the object?
Well I wanna convert a mod I downloaded for single player which adds a stunt zone. I thought it would be cool to feature it in LU.
Custom objects aren't possible in LU yet, if you are trying to add them from your game's mods...however they will be in 0.1.1.0.
But this mod uses the default objects, not custom ones.
You said you were using a mod, though. D:
Title: Re: Help with object placement
Post by: Njord on August 04, 2012, 01:09:47 am
Why do you want to use the same coordinates and angles as in the IPL? That just places the same object on the exact same place. So they will either be on the right place and you wont see any difference or they will bugg out like shit.

Question is, What do you wanna do with with the object?
Well I wanna convert a mod I downloaded for single player which adds a stunt zone. I thought it would be cool to feature it in LU.
Custom objects aren't possible in LU yet, if you are trying to add them from your game's mods...however they will be in 0.1.1.0.
But this mod uses the default objects, not custom ones.
You said you were using a mod, though. D:
Yes I am, but it only changes object placement, it doesn't add custom objects.
Title: Re: Help with object placement
Post by: SugarD on August 04, 2012, 01:16:56 am
Why do you want to use the same coordinates and angles as in the IPL? That just places the same object on the exact same place. So they will either be on the right place and you wont see any difference or they will bugg out like shit.

Question is, What do you wanna do with with the object?

Well I wanna convert a mod I downloaded for single player which adds a stunt zone. I thought it would be cool to feature it in LU.

Custom objects aren't possible in LU yet, if you are trying to add them from your game's mods...however they will be in 0.1.1.0.

But this mod uses the default objects, not custom ones.

You said you were using a mod, though. D:

Yes I am, but it only changes object placement, it doesn't add custom objects.

In that case you would just need to replicate the location of the objects then. I see your confusion now.

Does the file explain what each number is used for? IIRC, some of them are coordinates, but they may be in a different format.

Edit: Although this is in code format, hopefully the math method can give you an example to work from:
http://answers.unity3d.com/questions/22883/can-i-get-a-normalised-vector3-from-a-quaternion.html (http://answers.unity3d.com/questions/22883/can-i-get-a-normalised-vector3-from-a-quaternion.html)
Title: Re: Help with object placement
Post by: Njord on August 04, 2012, 01:47:27 am
Why do you want to use the same coordinates and angles as in the IPL? That just places the same object on the exact same place. So they will either be on the right place and you wont see any difference or they will bugg out like shit.

Question is, What do you wanna do with with the object?

Well I wanna convert a mod I downloaded for single player which adds a stunt zone. I thought it would be cool to feature it in LU.

Custom objects aren't possible in LU yet, if you are trying to add them from your game's mods...however they will be in 0.1.1.0.

But this mod uses the default objects, not custom ones.

You said you were using a mod, though. D:

Yes I am, but it only changes object placement, it doesn't add custom objects.

In that case you would just need to replicate the location of the objects then. I see your confusion now.

Does the file explain what each number is used for? IIRC, some of them are coordinates, but they may be in a different format.

Edit: Although this is in code format, hopefully the math method can give you an example to work from:
[url]http://answers.unity3d.com/questions/22883/can-i-get-a-normalised-vector3-from-a-quaternion.html[/url] ([url]http://answers.unity3d.com/questions/22883/can-i-get-a-normalised-vector3-from-a-quaternion.html[/url])

Nah, the file doesn't explain it, and I can't work that codes out either. :P
Title: Re: Help with object placement
Post by: Hatser on August 30, 2012, 10:50:32 am
try to use map editor that shows positions and angles of objects
Title: Re: Help with object placement
Post by: Njord on August 30, 2012, 07:06:08 pm
try to use map editor that shows positions and angles of objects
Does it have a converter?
Title: Re: Help with object placement
Post by: Hatser on August 31, 2012, 01:49:48 am
converter for what?

And you will need IDs of objects to create them
Title: Re: Help with object placement
Post by: SugarD on August 31, 2012, 03:04:18 am
I think he means something that converts the map editor's coordinates to that of what LU understands.
Title: Re: Help with object placement
Post by: Thijn on September 01, 2012, 02:07:45 pm
I've been trying to figure out a way to do this, but the rotations LU uses are weird.
I'll have a dev look into it and let you know the outcome.