Sign up Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
Dave Thaler

Registered:
Posts: 499
Reply with quote  #1 
I'm investigating whether it is possible to have the feel of two "sectors" in a two-ship mission where each ship is in its own area and cannot get to or interact with the other ship's area, e.g., each ship uses half the map like in a border-war style arrangement.

Putting the two ships on different player "side" values can help somewhat with hiding information from the other ship and keeping scans and NPC ship interactions separate, but the main issue is with movement.

A mission script can keep each capital ship's X (for example) coordinate capped within a range similar to when it hits the edge of the map, but that doesn't solve the problem since ships can launch probes across the map, and ships have shuttles/fighters that can be launched and can be resupplied at stations (for which Mike's thread here is highly relevant).

So: Any way folks can think of to block probes from going to the other half of the sector?




ryleyra

Registered:
Posts: 2,960
Reply with quote  #2 
I don't know if the destroy_near command works on probes, but if so, you could just program a regular "pulse" that destroys probes on the far side of the map. I can't think of any other way to destroy a probe, if destroy_near does not work. And I can see the ability to destroy a probe as useful.

If you give the shuttles and fighters names, including those on base stations, then you can check to see if they are on the "wrong side" and destroy them or force them back as you would with the player ship.

Personally, though, unless there is a situation where the two ships start out together, and then are separated and then come back again, my suggestion would be to make TWO scripts, which are run simultaneously. If one ship needs to trigger something in the other ship's sector, you could use GM commands to make that happen.

In fact, if you don't have a dedicated GM, you can have the Comms players interact to synchronize their scripts. For example, Comms Player 2 could have three Comms buttons labelled "Purple", "Yellow", and "Blue". The Player 1 ship is instructed to investigate a beacon, and report what color nebula the transmitting beacon is located in. Player 2 Comms then presses the right button to continue the plot. If Player 2 tries to jump ahead and make a guess at the right answer, the wrong answer ends the script in failure.

I've actually been thinking about a mission that coordinates actions between a ship and its shuttle, on opposite sides of the screen, so this is a relevant problem for me. I actually don't want them in separated sectors, but I do want to make sure there is some distance between them. (Social distancing... 😃)
Xavier Wise

Registered:
Posts: 1,134
Reply with quote  #3 
In the TSN, we have run two separate servers with the ship on each. This has worked to keep them separate. It might not be the solution you want though as it requires two servers running. However, if that isn't an issue, then it is an idea solution.

In a mission script, you can set the name of the shuttle that is allocated to the ship. This should then allow you to manipulate the x-coordinate in the same way that you would for the ship itself. Make sure the names are defined in the Start block of your script. You can set it so no stations have additional supplies of shuttles/probes or can produce them - if it is gone it is gone - and remove the player's supply of probes from their ship at mission start. 

Another idea is that you could set a line of generic meshes, evenly spaced, down the centre of the map and create a relatively small push radius around them (500-1000 units). I think this should stop probes going through (you'd have to test though), and it would definitely act as a barrier for both the shuttles and the ship. We use this similar concept to create planets in the TSN Sandbox, with a generic mesh in the centre that has a push radius around it so the players cannot fly "through" it. Of course, you would see the line of generic meshes on the map, but if you intend to have a marked border, that probably won't be an issue.

__________________
Fleet Captain Xavier Wise - TSN Sabre
Link to TSN RP Community website
ryleyra

Registered:
Posts: 2,960
Reply with quote  #4 
Quote:
Originally Posted by Xavier Wise
Of course, you would see the line of generic meshes on the map, but if you intend to have a marked border, that probably won't be an issue.


That is a great idea! The mine would probably be a good mesh to use. It would encourage the players to stay away from it.  

You could make the border of a lot of meshes 500 meters apart, or just set the push radius really high and only use a few of them. The border will be kind of "lumpy", but that won't be an issue if the ships aren't supposed to go near it.

I'll note that the sector is 1000 units high, so you'll either need to make the push radius more than 500 units, or stack the meshes vertically.
Xavier Wise

Registered:
Posts: 1,134
Reply with quote  #5 
One thing to consider is that the push radius is a distance from the centre of the mesh used. I visualise it as a bubble around the point where the mesh has been spawned. Using the line idea, setting a push radius of 500 and then creating a line of objects 1000 units apart along the border would potentially give a barrier. If you "stack" the objects 3 high, at y=0, y=1000 and y=-1000 (y being the vertical axis coordinate), it might just give you the wall you want.

If you want a more solid wall, then I think you'd have to alternate them as well. Below I have added a quick "side on" diagram of what it might "look" like (the push radius is invisible!) - each O representing the push radius. I can't squash them together (imagine the O's touching), but hopefully it gives you an idea of the arrangement. I think, as a quick stab at figures, set the top layer at y=750, with a distance of 1000 between each mesh, the middle at y=0 with the same distance and finally the bottom at y=-750. If they are too close, they should push each other apart, however there is chance that it will cause a crash. If that occurs, just alter the spacing.

Side profile example:

  O  O  O  O  O  O  O
O  O  O  O  O  O  O
  O  O  O  O  O  O  O

__________________
Fleet Captain Xavier Wise - TSN Sabre
Link to TSN RP Community website
Dave Thaler

Registered:
Posts: 499
Reply with quote  #6 
Thanks for the ideas so far!  

From my testing, destroy_near does not work, as it does not delete probes or other missiles.

Using generic meshes does not work because of the bug Darrin pointed out here where no missiles (including probes) are blocked even if the blocksShotsFlag is true.  However, I found that a black hole does consume shots so I'm looking at having a series of black holes down the middle. 

To keep player ships from entering or falling into the black holes, I can cap the X coordinate as mentioned via script code (which would provides a straight line but requires singleseat craft to have fixed names) or using a series of generic meshes with a push radius (which wouldn't provide a straight line but allows arbitrary singleseat names) in addition to the black holes.

One issue with requiring singleseat craft to have fixed names testable in script conditions though is that I haven't found a way to effectively use set_player_station_carried to set the correct names.  Specifically, to allow an unlimited number of replacement fighters (esp. since v2.7.2 "made code change so there's ALWAYS a replacement fighter at SOME base") in a ship with multiple bay slots, I would need a fixed list of fighter names, with unlimited replacements.   I can certainly keep track of when a ship is launched (if_exists) but cannot distinguish between re-docked (don't reuse the name in set_player_station_carried) vs destroyed (so reuse the name in set_player_station_carried) once it no longer exists.    And having multiple singleseat craft with the same name would cause problems with condition checking since it would only test one of them.

I appreciate the ideas on using separate servers but it won't work in this particular case since I do want the ships to be together at at least one point in the plot, to answer ryleyra's question.

So the most workable idea so far is to use black holes + generic meshes together for the border.
ryleyra

Registered:
Posts: 2,960
Reply with quote  #7 
I believe it's possible to clear all singleseat ships from the bases before creating your own. I don't know how the new patch to the game changes this, but I'm fairly sure I forced the name of all replacement shuttles in a script. Also, maybe this could have unintended side effects with multiple fighters on the screen at the same time, but I didn't have any trouble creating all of the shuttles with the same name.

It may not be an issue to lose a shuttle or fighter in a black hole, though. It doesn't end the game, you just lose the shuttle, and pilots SHOULD be steering well clear of black holes since shuttles don't have the thrust to escape from them.
Dave Thaler

Registered:
Posts: 499
Reply with quote  #8 
Just to report back... after testing I found that black holes do damage (and destroy probes, etc.) at a radius of about 500.  A ship warping at say warp 4 with shields up can potentially survive, but fighters and probes won't.   So I created a border using a black hole every 1000, plus a generic mesh every 10000 with a pushRadius of 7500.   This gives a border impenetrable to capital ships at warp 4, fighters, and missiles.

I found that the pushRadius isn't a hard barrier, it just creates a push force.  So a smaller pushRadius can be partially defeated by a ship at warp 4, but the numbers above result in a pretty effective border from my tests.
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.