Mantaray
17th Apr 08, 12:53 AM
Ok, here is a tutorial to fix/edit formations.
Now I know a lot of people have been wanting to make formations and parades and such but have no idea why when they put the formation code in the correct folder the game crashes,
Basically the LUAdc doesn’t de-compile the formations properly,
This tutorial will get you round it.
First off, open your raw formation file, you should get something like this
-- LuaDC version 1.0.1
-- 11/12/2007 09:57:56
-- LuaDC by Age2uN
-- on error send source file (compiled lua) and this outputfile to Age2uN@gmx.net
--
formationSlot(
{ 0, 0, 0, ,
{ 0, 0, 1, ,
{ 0, 1, 0, })
formationSlot(
{ 1, 0, -1, ,
{ 0, 0, 1, ,
{ 0, 1, 0, })
formationSlot(
{ -1, 0, -1, ,
{ 0, 0, 1, ,
{ 0, 1, 0, })
formationSlot(
{ 2, 0, -2, ,
{ 0, 0, 1, ,
{ 0, 1, 0, })
formationSlot(
{ -2, 0, -2, ,
{ 0, 0, 1, ,
{ 0, 1, 0, })
formationSlot(
{ 3, 0, -3, ,
{ 0, 0, 1, ,
{ 0, 1, 0, })
formationSlot(
{ -3, 0, -3, ,
{ 0, 0, 1, ,
{ 0, 1, 0, })
formationSlot(
{ 4, 0, -4, ,
{ 0, 0, 1, ,
{ 0, 1, 0, })
formationSlot(
{ -4, 0, -4, ,
{ 0, 0, 1, ,
{ 0, 1, 0, })
formationSlot(
{ 5, 0, -5, ,
{ 0, 0, 1, ,
{ 0, 1, 0, })
formationSlot(
{ -5, 0, -5, ,
{ 0, 0, 1, ,
{ 0, 1, 0, })
formationSlot(
{ 6, 0, -6, ,
{ 0, 0, 1, ,
{ 0, 1, 0, })
formationSlot(
{ -6, 0, -6, ,
{ 0, 0, 1, ,
{ 0, 1, 0, })
formationSlot(
{ 7, 0, -7, ,
{ 0, 0, 1, ,
{ 0, 1, 0, })
formationSlot(
{ -7, 0, -7, ,
{ 0, 0, 1, ,
{ 0, 1, 0, })
formationSlot(
{ 8, 0, -8, ,
{ 0, 0, 1, ,
{ 0, 1, 0, })
formationSlot(
{ -8, 0, -8, ,
{ 0, 0, 1, ,
{ 0, 1, 0, })
formationSlot(
{ 9, 0, -9, ,
{ 0, 0, 1, ,
{ 0, 1, 0, })
formationSlot(
{ -9, 0, -9, ,
{ 0, 0, 1, ,
{ 0, 1, 0, })
if you where to insert it in this raw state, you get a crash to desktop upon loading.
Now the problem is, that 2 squiggly brackets are missing. So lets fix this now
Heres the old one
formationSlot(
{ 0, 0, 0, ,
{ 0, 0, 1, ,
{ 0, 1, 0, })
and here it is again with the brackets in,
formationSlot(
{ 0, 0, 0, },
{ 0, 0, 1, },
{ 0, 1, 0, })
now there in, it looks like common sense, but if you were to do this to all your formation slots it still looks untidy and is difficult to work with.
So now I would suggest that you edit it to appear like so:
formationSlot({ 0, 0, 0, },{ 0, 0, 1, },{ 0, 1, 0, })
now, you can put the formation slots directly next to each other which should allow easier edditing
formationSlot({ 0, 0, 0, },{ 0, 0, 1, },{ 0, 1, 0, })
formationSlot({ 1, 0,-1, },{ 0, 0, 1, },{ 0, 1, 0, })
formationSlot({-1, 0,-1, },{ 0, 0, 1, },{ 0, 1, 0, })
Now for editing,
Each set of 3 co-ordinates controls something on the ship.
The ship is positioned in the formation almost as turrets are on a ship.
The first batch of co-ordinates is the ships position relative to the origin.
The second batch is where the front of the ship faces. As it is set at the moment, the ship faces forward as there is a ‘1’ in the last space, if you instead put a 1 in the second place, the ships would face upwards, amusing but its nice to know.
The third batch of co-ordinates controls where the top of the ship faces, This ensures when the ship turns and moves that the top of the ship always faces upwards and acts as a level for the game engine (I believe).
That’s about the long and the short of it. At the moment I am playing with parade formations as they have an extra co-ordinate that I need to figure out before I write a tutorial about it, but I hope this is useful
Now I know a lot of people have been wanting to make formations and parades and such but have no idea why when they put the formation code in the correct folder the game crashes,
Basically the LUAdc doesn’t de-compile the formations properly,
This tutorial will get you round it.
First off, open your raw formation file, you should get something like this
-- LuaDC version 1.0.1
-- 11/12/2007 09:57:56
-- LuaDC by Age2uN
-- on error send source file (compiled lua) and this outputfile to Age2uN@gmx.net
--
formationSlot(
{ 0, 0, 0, ,
{ 0, 0, 1, ,
{ 0, 1, 0, })
formationSlot(
{ 1, 0, -1, ,
{ 0, 0, 1, ,
{ 0, 1, 0, })
formationSlot(
{ -1, 0, -1, ,
{ 0, 0, 1, ,
{ 0, 1, 0, })
formationSlot(
{ 2, 0, -2, ,
{ 0, 0, 1, ,
{ 0, 1, 0, })
formationSlot(
{ -2, 0, -2, ,
{ 0, 0, 1, ,
{ 0, 1, 0, })
formationSlot(
{ 3, 0, -3, ,
{ 0, 0, 1, ,
{ 0, 1, 0, })
formationSlot(
{ -3, 0, -3, ,
{ 0, 0, 1, ,
{ 0, 1, 0, })
formationSlot(
{ 4, 0, -4, ,
{ 0, 0, 1, ,
{ 0, 1, 0, })
formationSlot(
{ -4, 0, -4, ,
{ 0, 0, 1, ,
{ 0, 1, 0, })
formationSlot(
{ 5, 0, -5, ,
{ 0, 0, 1, ,
{ 0, 1, 0, })
formationSlot(
{ -5, 0, -5, ,
{ 0, 0, 1, ,
{ 0, 1, 0, })
formationSlot(
{ 6, 0, -6, ,
{ 0, 0, 1, ,
{ 0, 1, 0, })
formationSlot(
{ -6, 0, -6, ,
{ 0, 0, 1, ,
{ 0, 1, 0, })
formationSlot(
{ 7, 0, -7, ,
{ 0, 0, 1, ,
{ 0, 1, 0, })
formationSlot(
{ -7, 0, -7, ,
{ 0, 0, 1, ,
{ 0, 1, 0, })
formationSlot(
{ 8, 0, -8, ,
{ 0, 0, 1, ,
{ 0, 1, 0, })
formationSlot(
{ -8, 0, -8, ,
{ 0, 0, 1, ,
{ 0, 1, 0, })
formationSlot(
{ 9, 0, -9, ,
{ 0, 0, 1, ,
{ 0, 1, 0, })
formationSlot(
{ -9, 0, -9, ,
{ 0, 0, 1, ,
{ 0, 1, 0, })
if you where to insert it in this raw state, you get a crash to desktop upon loading.
Now the problem is, that 2 squiggly brackets are missing. So lets fix this now
Heres the old one
formationSlot(
{ 0, 0, 0, ,
{ 0, 0, 1, ,
{ 0, 1, 0, })
and here it is again with the brackets in,
formationSlot(
{ 0, 0, 0, },
{ 0, 0, 1, },
{ 0, 1, 0, })
now there in, it looks like common sense, but if you were to do this to all your formation slots it still looks untidy and is difficult to work with.
So now I would suggest that you edit it to appear like so:
formationSlot({ 0, 0, 0, },{ 0, 0, 1, },{ 0, 1, 0, })
now, you can put the formation slots directly next to each other which should allow easier edditing
formationSlot({ 0, 0, 0, },{ 0, 0, 1, },{ 0, 1, 0, })
formationSlot({ 1, 0,-1, },{ 0, 0, 1, },{ 0, 1, 0, })
formationSlot({-1, 0,-1, },{ 0, 0, 1, },{ 0, 1, 0, })
Now for editing,
Each set of 3 co-ordinates controls something on the ship.
The ship is positioned in the formation almost as turrets are on a ship.
The first batch of co-ordinates is the ships position relative to the origin.
The second batch is where the front of the ship faces. As it is set at the moment, the ship faces forward as there is a ‘1’ in the last space, if you instead put a 1 in the second place, the ships would face upwards, amusing but its nice to know.
The third batch of co-ordinates controls where the top of the ship faces, This ensures when the ship turns and moves that the top of the ship always faces upwards and acts as a level for the game engine (I believe).
That’s about the long and the short of it. At the moment I am playing with parade formations as they have an extra co-ordinate that I need to figure out before I write a tutorial about it, but I hope this is useful