Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: Kiloku on November 22, 2016, 08:14:28 am

Title: Player docking, player-use-ai and allowed ships
Post by: Kiloku on November 22, 2016, 08:14:28 am
I was trying to work with the idea of having a player dock with an object, and noticed that there was no direct way to do so.
Cue an hour of scouring through searches all around the forum.

What I found was that supposedly, using player-use-ai would let me add the dock order to player as it was controlled by the AI. However, I get this message when I try to save the event: "Ship not allowed to have this order".

From what I can tell, this was a conundrum ever since 2003. Do we have a way to let players dock with things?
Title: Re: Player docking, player-use-ai and allowed ships
Post by: 0rph3u5 on November 22, 2016, 08:28:07 am
player-use-ai is the way to go

What a ship can do (=what is valid for its AI to do) is determined by it's type which is determined in the "$flags:"-section of its .tbl/.tbm-entry; see this page (http://www.hard-light.net/wiki/index.php/Ships.tbl#Ship_Type) in the wiki, if the retail types don't work for you check out ObjectTypes.tbl (http://www.hard-light.net/wiki/index.php/Objecttypes.tbl)
Title: Re: Player docking, player-use-ai and allowed ships
Post by: Kiloku on November 22, 2016, 09:04:20 am
Nice! I added an ***-obt.tbm with a new valid orders entry, and it worked.

Now, the ship's pathing is a bit odd, but that's unavoidable I guess. It's also kinda weird to grab the cargo by the top of the ship, but the fighters and bombers only have that as a docking point (and I don't have the blender+PCS2 expertise needed to change that)
Title: Re: Player docking, player-use-ai and allowed ships
Post by: The E on November 22, 2016, 09:36:47 am
Nice! I added an ***-obt.tbm with a new valid orders entry, and it worked.

Now, the ship's pathing is a bit odd, but that's unavoidable I guess. It's also kinda weird to grab the cargo by the top of the ship, but the fighters and bombers only have that as a docking point (and I don't have the blender+PCS2 expertise needed to change that)

That's because that dockpoint is intended to be used by the supply ship. Adding more dockpoints is pretty easy in PCS2 though, no Blender expertise needed.