file Useful feature: "Hostile Pause"

More
8 years 3 months ago #17153 by SRC
Replied by SRC on topic Useful feature: "Hostile Pause"
Hi Tarcoon,

Yes, that's it. I toggled the status of a few of them with the training
fighter and the # of hostiles reported by the hostile pause module declined
accordingly. Thanks! My prior suspicion that it might be a trick in Bineshi's
mod was strengthened when I dropped a cargo pod outside the home base to test
a pod loading module. In short order a couple of Marauders showed up, which
led me to guess that Bineshi had posted Marauders around the base. But that
was probably just part of his code that spawns competitor scavengers whenever
there is loose cargo lying around, regardless of where one is. If I am that
adventurous, I might add a "distance to Lucrecia's base" exclusion zone
test to his scavenger code to prevent the appearance of the base being
discovered.

I'll start a thread over on the EOC forum reporting the tweaks to Bineshi's
mod. If anyone still plays the game, they might enjoy them. I've made it
a lot easier to collect cargo pods in the Pinguin (useful especially in Act 0)
with a "load cargo" module like Jafs' (but no double stacking, though I think
I see how they coded that. There must be two dockports on each cargo pod. The
2nd stack of pods dock onto ports on the first. There's a function in the SDK
that will dock two sims together with the caller specifying which dockports to
use on each sim).

Please Log in or Create an account to join the conversation.

More
8 years 3 months ago #17154 by cambragol
Nice little function SRC. It corresponds to the way I like to play, which involves lots of waiting and camping until a nice juicy cargo ship comes by.

I haven't played Bineshi's mod for many many years, but correct me if I'm wrong...his mod gives you a ship with which you can collect cargo yourself? The Pinguin I believe. I might have to check out how he coded that if it is the case, as it would be nice to add that feature into US. In US we can now add unlimited ships, but we are not able to use carge ships for the player, as we don't have any code or interface to allow the player to collect pods himself. It is all done by wingmen.

Please Log in or Create an account to join the conversation.

More
8 years 3 months ago #17155 by SRC
Replied by SRC on topic Useful feature: "Hostile Pause"
Hi Cambragal,

Yes, the Pinguin. It's a "City" class light freighter that is modified
to carry 5 AI controlled T-fighters on the upper side of the "spine."

5 cargo pods can be carried on the lower side.

The Pinguin is an intimidating ship. It's a light fighter carrier, a missile
cruiser (four hardpoints for missile launchers), and a freighter. It has
3 hardpoints for medium/heavy forward firing cannon. It has 8 internal cargo
bays, so potentially an enormous set of missile magazines and other additional
hardware. And 3 LDAs. And 2 auto-turrets and 2 point defense turrets.
It's more a light cruiser than the frigate class that Bineshi assigned it.

There is a corresponding ship for Jafs, which can load 15 pods, 5 above
and 10 below.

I'd like to try to modify the player-controlled Pinguin to carry the full
10 pod load on the lower side of the spine. With the "load cargo" function
(it works -- the pods approach you at 100 m/s and self dock), you can
zip in and collect pods in a hot environment that Jafs would not approach.

Here is the code for the module that collects the pods. I lifted it out of
the iUnleashedPatrols.pog (AI players) code (Nathan's/Bineshi's), made it user c
ontrollable and added a feature that changes the faction of the pod before it loads to the
player ship. So now the pods turn blue after you order them to load, just as they do for Jafs:

// Exports ////////////////////////////////////////////////////////////////////
provides
DockCargoPodToPlayerShip,



// Local functions ////////////////////////////////////////////////////////////

prototype DockCargoPodToPlayerShip();

// stick in the appropriate part of the .pog file:

Input.BindKey( "iUnleashed.DockCargoPodToPlayerShip", "iUnleashed.DockCargoPodToPlayerShip" );


// ****************************************************************************
// * DockCargoPodToPlayerShip
// ****************************************************************************

// SRC 2012/03/09

DockCargoPodToPlayerShip()
{

hship player_ship = iShip.FindPlayerShip();
hisim target_pod = iShip.CurrentTarget( player_ship );

if ( iSim.Type( iSim.Cast( target_pod ) ) == T_CargoPod )
{

if ( Sim.DistanceBetweenCentres( player_ship, target_pod ) < 4km )
{
iSim.SetFaction( target_pod, iFaction.Find( "Player" ) );
iAI.PurgeOrders( iShip.Cast( target_pod ) );
iPilotSetup.GenericCargoPod( iShip.Cast( target_pod ) );
iAI.GiveDockOrder( iShip.Cast( target_pod ), player_ship );
iHUD.Print( "REMOTE PILOTING POD TO SHIP" );
}
else
{
iHUD.Print( "TARGET POD TOO FAR TO REMOTE APPROACH" );
}
}
else
{
iHUD.Print( "TARGET IS NOT CARGO" );
}

}



I adopted the KeyBinding

; Dock Cargo Pod to Player Ship
[iUnleashed.DockCargoPodToPlayerShip]
Keyboard, D, SHIFT


The 4km limit is arbitrary. I believe that the notion is that the pilot
of the ship (or Jafs, though I'm not sure what his distance limit is)
remote logs on to the Cargo Pod and remote pilots it (or gives it a dock
autopilot command) to dock with the ship. And this works if you try it
explicity-- it's how I was docking pods to the Pinguin (with the help of
a POG module that makes player-selected cargo pods remote-loggable) prior
to noticing Bineshi's nice code in his "patrols" module. I did not realize
that one could install an AI pilot to a Cargo Pod and give it orders. THat's
probably how the Jafs load module works.

Though the 4km limit is arbitrary, at the current 100 m/s pod self-
propulsion speed, you would not want to have them come to you from much
further. There is a mod called "TurboPods" that speeds the pods up a
great deal, but this strikes me as unrealistic and more of a cheat than
a feature.

I'm going to keep fiddling with Unleashed and will eventually put up
a mod (if you approve, Cambragal, and instruct me how) to the old EOC mods
page with the modified packages which can be added into Bineshi's Unleashed mod.

Here are some other things I'd like to try:

1) toggle AutoTurrets to shoot at incoming missiles.

Pinguin has two point-defense turrets that only target missiles
and two auto-turrents (with two light assault cannon in each
turret, I think) which only target ships. In a missile rich
environment, the assault cannons might help Pinguin to stay alive

2) Toggle point defense turrets and auto turrets to attack mines
as well as missiles. Pinguin becomes a minesweeper. This would be
handy in one of the Act 2 missions where you spend a half hour
shooting at mines before docking at a pirate base.

The downside is that it makes mines more or less irrelevant.
Perhaps a new weapon class of stealth mines that are detectable
only at very close distances would restore some utility to mines.

3) perhaps try to intelligently target missiles and mobile mines by
their trajectories. At present, Nathan's code simply has a distance
test. Anything within 8km is a threat and gets targeted.

You could imagine your wingmen launching missiles from a tight
formation with Pinquin and Pinguin shooting them down. Perhaps a simpler thing
would be to de-target all missiles which are from the self- or a
friendly faction. I'll start with that and then maybe try to get
fancy with the prioritization of hostile faction missiles by their
Line-of-sight motion. A missile that isn't approaching should not
be shot at unless all others that are approaching have already been
destroyed.

4) perhaps some quick multi cargo load functions, such as

* Load nearest until ship is full
* Load by value priority
* Load weapons and ordnance by value priority

Please Log in or Create an account to join the conversation.

More
8 years 3 months ago #17156 by SRC
Replied by SRC on topic Useful feature: "Hostile Pause"
Hi Cambragal,

Also, I think that all you need for the player ship to collect
cargo is to have available dockports. In the Torn Stars mod, I
would start with a single tug and carry cargo about with it until
I had earned enough to hire a wingman freighter.

It might be nice to have TS/US be configured to allow the player
to switch among different ships in inventory, as in EoC. I have no
idea how much trouble that would be to add; perhaps not worth it.

Pinquin might be a perfectly adequate single ship for the player
in TS/US. It's a powerful warship and can carry significant cargo
(hopefully more soon, if I can figure how to get the lower-spine
capacity that Bineshi gave the Jafs version of the Pinguin.

Please Log in or Create an account to join the conversation.

More
8 years 3 months ago #17157 by SRC
Replied by SRC on topic Useful feature: "Hostile Pause"
And those AI controlled T-fighters would also be handy.
Perhaps Bineshi's mod will live in the TS/US world. A
happy thought.

Please Log in or Create an account to join the conversation.

More
8 years 3 months ago #17159 by cambragol
I think giving the player cargo loading and unloading capabilities with their own craft is possible for Unstable Space. However, I am so deep into debugging and testing that I can't even imagine thinking about a new feature. However once US is finished(if that happens), it could be feature that someone might want to add in. At the very least it would open up the use of every class of cargo ship to the player

Please Log in or Create an account to join the conversation.