RFC: re-squared-dux ...

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

User avatar
Simon B
---- E L I T E ----
---- E L I T E ----
Posts: 836
Joined: Thu Oct 23, 2008 5:54 am
Location: Red Beach NZ
Contact:

Re: RFC: re-squared-dux ...

Post by Simon B »

Just checking how the new-style subentities are supposed to work...

Code: Select all

subentities = {
  "carrier1-dock" = {
     type = "standard";
     position = (0 0 0);
     orientation = (1 0 0 0);
     is_dock = true;}
  "carrier-turret" = {
     type = "ball_turret";
     position = (-9.48 38.99 188.07);
     orientation = (1 0 0 0);}
};
Simon Bridge
[re2dux] [neolite]
"Everything is perfect down to every last flaw..."
HBT: The Book of Verse - Principia Discordia
User avatar
Killer Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 2278
Joined: Tue Jan 02, 2007 12:38 pm

Re: RFC: re-squared-dux ...

Post by Killer Wolf »

Eric Walch wrote:
Simon B wrote:
I've practiced docking with it - I found that I don't get to fly into the dock to, um, dock ... even though the back of the docking bay is close to the models origin ... so what determines this?
You are docked when 75% (could be eighty %, Im not fully sure) of your ship has passed the point of origin of the bay. Therefor is the origin of a bay not defined in the centre or back but always at its front.
Also make sure you defined the docking bay correct, or the system will generate a default bay in the ship centre. For to be recognised as dock with the old subentity definitions, the subentity name has to contain the word 'dock' somewhere in the name. Very user unfriendly, so better define it with the new method and add a is_dock key.
Eric, as per my post in the "things i wish i knew..." thread, when i built the Nuit i could only get the dock working by building the dock at the Origin and then shifting it up to the required position - is that still necessary or does the is_dock now enough to work out the positioning? The dock for one of my new stations is a much longer tunnel than normal stations, if the origin is defined at the front that's going to ruin it, i'll have to work out a way around it :-\
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: RFC: re-squared-dux ...

Post by Eric Walch »

Simon B wrote:
Just checking how the new-style subentities are supposed to work...
Your code should work when two missing semicolons are added. And when the orientation or position has the default value, you just can ignore the entries. So, the following should work

Code: Select all

subentities = {
  "carrier1-dock" = {
     type = "standard";
     is_dock = true;};
  "carrier-turret" = {
     type = "ball_turret";
     position = (-9.48 38.99 188.07);};
};
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: RFC: re-squared-dux ...

Post by Eric Walch »

Killer Wolf wrote:
The dock for one of my new stations is a much longer tunnel than normal stations, if the origin is defined at the front that's going to ruin it, i'll have to work out a way around it :-\
The origin of the dock is the position value defined in shipdata. When the dock is long enough, you could define the docks origin a bit more to the centre of the dock and use a corresponding value in shipdata. For checking if a ship is docked, the code only checks the position defined in shipdata. It is about 90% that must have past the position when I read it correct and not the 75% I mentioned before. But the code is a bit complex as it also corrects a bit for not entering perpendicular.
User avatar
Killer Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 2278
Joined: Tue Jan 02, 2007 12:38 pm

Re: RFC: re-squared-dux ...

Post by Killer Wolf »

so just to clarify, cos i'm feeling a bit thick at the mo : that position attribute is just for info, it doesn't actually move the dock model itself? it's just a point in space that you have to pass to dock? The wiki suggests it's the subent position, which is why i'm getting baffled as that just sounds like the above situation, of having to build a dock at origin then shift it.
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Re: RFC: re-squared-dux ...

Post by JensAyton »

Commander McLane wrote:
If you want to find out what a ship does and why (or why it doesn't do what you want it to do) AI-logging is what you need. I'm not sure how to enable it for one ship without using the JS-console, but I'm sure others will be able to help.
ship.reportAIMessages in Jibblywobblyscript.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: RFC: re-squared-dux ...

Post by Thargoid »

Killer Wolf wrote:
so just to clarify, cos i'm feeling a bit thick at the mo : that position attribute is just for info, it doesn't actually move the dock model itself? it's just a point in space that you have to pass to dock? The wiki suggests it's the subent position, which is why i'm getting baffled as that just sounds like the above situation, of having to build a dock at origin then shift it.
In Wings3D (or whatever) place the model so that the origin (0,0,0) is in the centre of the front of the docking bay (or to put it another way, there is nothing in the +z direction beyond 0, the whole dock is "behind" the plane made by the X-Y axes).

Then use the sub-ent position when you make your shipdata.plist file for the mother to move the position of the dock sub-ent to the correct place. So if the dock sub-ent is defined as above, then that position would be in the centre of the hole you've cut in your model for the bay.

Hope that makes it a little clearer?
User avatar
Simon B
---- E L I T E ----
---- E L I T E ----
Posts: 836
Joined: Thu Oct 23, 2008 5:54 am
Location: Red Beach NZ
Contact:

Re: RFC: re-squared-dux ...

Post by Simon B »

Ah - that's more like what I thought!

When sufficient ship crosses the dock x-y plane, it docks.
It s safest to put the dock x-y plane at the mouth of the dock to avoid ships attempting to dock slamming into the back wall.
In my carrier - I have separated the bits I intended to be smoothed and consigned them to a subentity - the only major subentity. It looks like I will need to calve off the docking bay as well.

An alternative would be to create another entity either enclosing the docking bay just outside it or perhaps as a small design feature inside the bay itself - rows of lights say - I can reposition this model to make the docking process work the way I want.
Simon Bridge
[re2dux] [neolite]
"Everything is perfect down to every last flaw..."
HBT: The Book of Verse - Principia Discordia
User avatar
Killer Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 2278
Joined: Tue Jan 02, 2007 12:38 pm

Re: RFC: re-squared-dux ...

Post by Killer Wolf »

Thargoid wrote:
Killer Wolf wrote:
so just to clarify, cos i'm feeling a bit thick at the mo : that position attribute is just for info, it doesn't actually move the dock model itself? it's just a point in space that you have to pass to dock? The wiki suggests it's the subent position, which is why i'm getting baffled as that just sounds like the above situation, of having to build a dock at origin then shift it.
In Wings3D (or whatever) place the model so that the origin (0,0,0) is in the centre of the front of the docking bay (or to put it another way, there is nothing in the +z direction beyond 0, the whole dock is "behind" the plane made by the X-Y axes).

Then use the sub-ent position when you make your shipdata.plist file for the mother to move the position of the dock sub-ent to the correct place. So if the dock sub-ent is defined as above, then that position would be in the centre of the hole you've cut in your model for the bay.

Hope that makes it a little clearer?
that's how i used to do it, for the Nuit etc, it just seemed from the way i was reading it that things had changed. my bad. current thought is to place my tunnel w/ the origin 90% along the length of the tunnel and shift the model into position so that (i hope) you get to fly along the tunnel before hitting the dock trigget at the end.
User avatar
Simon B
---- E L I T E ----
---- E L I T E ----
Posts: 836
Joined: Thu Oct 23, 2008 5:54 am
Location: Red Beach NZ
Contact:

Re: RFC: re-squared-dux ...

Post by Simon B »

Hmmm debug console ... ./DebugConsole.py ... ^M error - hell: The debug console script is in DOS format!

$ cat -e DebugConsole.py
#! /usr/bin/python^M$
#^M$

Confirmed ... okaaay: now to see if I can remember how to convert it.

$ flip -u *.py

yep - that was it.

OK - start console, it says "waiting for connection" ... start Oolite, select a commander and launch ... try to click "run" and it asks me to restart oolite ... then it just sits there.
Simon Bridge
[re2dux] [neolite]
"Everything is perfect down to every last flaw..."
HBT: The Book of Verse - Principia Discordia
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6682
Joined: Wed Feb 28, 2007 7:54 am

Re: RFC: re-squared-dux ...

Post by another_commander »

You also need to install the Basic-debug.oxp. Once you have it installed, run the console, the run Oolite and you should be able to see the console establishing a connection with the game. Once that is done, you can interact with the game in realtime. You generally do not have to click the Run button.
User avatar
Simon B
---- E L I T E ----
---- E L I T E ----
Posts: 836
Joined: Thu Oct 23, 2008 5:54 am
Location: Red Beach NZ
Contact:

Re: RFC: re-squared-dux ...

Post by Simon B »

Thanks AC - twas what was needed ... discovered that some scripts weren't loading as I'd renamed them on the outside but neglected to rename their references on the inside. All done now. Also treated the secondary entity as a dock, even though it aint the physical dock, and that made the docking work properly. Shot it with rear laser on the way out and got pulverized by the carrier's 5x fwd mil lasers cool AND saw it launch a defender. I'll add the glows and upload an oxp for people to play with. Prob by the weekend my time.
Simon Bridge
[re2dux] [neolite]
"Everything is perfect down to every last flaw..."
HBT: The Book of Verse - Principia Discordia
User avatar
Simon B
---- E L I T E ----
---- E L I T E ----
Posts: 836
Joined: Thu Oct 23, 2008 5:54 am
Location: Red Beach NZ
Contact:

Re: RFC: re-squared-dux ...

Post by Simon B »

SB-Navy.oxp
Image
... adds one large carrier (the big triangular one from before) with a naming scheme based on Norse Gods or other godlike beings.
... you need the re2dux oxp installed or the defence ships won't work - these are place fillers, I'll add dedicated navy versions later.

At the mo I'm puzzled that it wont respond to docking requests ... it doesn't need a request, but it should say so.
I'm hoping that folk here will try it out and generally destruct test it find all the holes, maybe fill a few, before I add the other carrier.

Oh - and it is crying out for a normalmap ... anyone want a go?
Simon Bridge
[re2dux] [neolite]
"Everything is perfect down to every last flaw..."
HBT: The Book of Verse - Principia Discordia
User avatar
Simon B
---- E L I T E ----
---- E L I T E ----
Posts: 836
Joined: Thu Oct 23, 2008 5:54 am
Location: Red Beach NZ
Contact:

Re: RFC: re-squared-dux ...

Post by Simon B »

re2dux.oxp updated - added rockhermit, glows to the thargoids, that sort of thing.
Simon Bridge
[re2dux] [neolite]
"Everything is perfect down to every last flaw..."
HBT: The Book of Verse - Principia Discordia
User avatar
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8515
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Re: RFC: re-squared-dux ...

Post by DaddyHoggy »

Simon B wrote:
re2dux.oxp updated - added rockhermit, glows to the thargoids, that sort of thing.
Excellent - nice one Simon!
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
Post Reply