Is destruction the only way?

General discussion for players of Oolite.

Moderators: winston, another_commander

User avatar
JohnnyBoy
---- E L I T E ----
---- E L I T E ----
Posts: 490
Joined: Mon May 05, 2008 9:41 pm
Location: West Sussex, UK (rich agricultural)

Post by JohnnyBoy »

Disembodied's advice is especially valuable if your shields are low when your opponent starts "looking a bit missiley" :lol: ;)
"That's no vicious Treeoid. That's my wife."
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

Disembodied wrote:
another_commander wrote:
Totally agree. Right now, ships will just fire a missile as soon as their energy has dropped enough. If the player is preemptively tapping ECM, then he can easily avoid problems, but that reduces the fun and challenge of combat.
Good idea. I (after learning through bitter expereince) also use the tactic of a pre-emptive ECM burst if an incoming/overflying enemy looks like he's going to try squirting a missile at me close in. I don't do repeated bursts, though – just a quick blip if I think he's looking a bit missiley, because it's those up-close-and-personal buggers you've really got to watch for. I think it's a valid tactic, not cheating: but this way the tactic remains valid.
When discussing the level of cheatingosity of this approach, keep in mind that firing the ECM isn’t free – you need that energy for other stuff, like staying alive.
User avatar
Frame
---- E L I T E ----
---- E L I T E ----
Posts: 1477
Joined: Fri Mar 30, 2007 8:32 am
Location: Witchspace

Post by Frame »

LittleBear wrote:
A missile that tells the derelict ship's computers to power up and take it in on autopiolt could be done with the existing OXP commands fairly easily with a missile that sets the AI of the ship to a custom one that takes the ship into dock, but will not fight (ie the player would have to protect it on its way to the station - no J jumping off and leaving it!) and fly in with it. That'd be quite a nice balance in gameplay terms. You might get (say) 3,000C scrap vaule for an Annaconda, but if the special missile cost 500 (say) and you've had to escort the blighter in it only as much as a trade run and without using J jump or injectors you may well have had to fight a few more battles than you normally wold. The ship's docking would set a variable paying you the ship's value. Not sure though how to have different ships pay different savage amounts. Might be calculateable with the ships mass in Java, so big ships paid more than little ships.
I do think anybody would like to escort a vessel from say the witch-point to the station... unless there was a huge reward, you could take two factors into account

Size of ship: Mass, base price... anaconda say 3000 cr...

Distance or time required for the ship to travel from being orderd to goto the station for salvage.

We could make the ship go faster some way i think, i seem to recall an AI command to set the speedfactor for missiles... that same AI command could be used to have the ship travel with the player. until it meets another mass lock ofcourse, a ship with a role not of rock null AI etc.. the ship is in derelict status, but it still maintain its role of trader/pirate and carries a bounty... which mean if trader it will be attacked by pirates, if pirate it will be attacked by hunters and police...

I know for a fact, during my design of the Fuel Collector that the ship maintains its role... and the role can´t be switched since it is read only.

Wheter or not we can use the AutoAI.plist to have it switch roles i dont know since i have not played around with that... but i beleive once the role is set you cannot alter it... allthough i do seem to recall Adders launched as scavengers can become shuttles... but the adder allready has both these roles, and is just auto AI switching between these two roles...

Setting a new AI.plist, will not alter the role, it works the other way around as the role of the ship determines the AI of the ship...

That leaves us with only Traders being legit Salvage Targets, which ofcourse will give you an explantion problem with the Police, if this should make sense..

Usually traders are blown up by pirates to get to the cargo...
pirates would´nt blow up ships, if they could get more for salvageing, but ofcourse they do if the ships pilot do not eject... also ingame coding prevents pirates from not killing the ship. since we cant over-ride pirate behaviour yet, well you could by monitoring all ships in a system... however i think that would take quite a performance hit on any system todo so. it would have to detect a derelict ships, then identify its attackers, and call them off in case any of them have the salvage apperatus... which afaik, cant be checked. afaik, only the players Equipment can be checked.

however hunters and traders should be able to salvage derelict pirate ships, however the police would still attack the derelicti think once it comes into police scanner range..

A solution ofcourse is to add a new staion in each system, or in some systems, making it random that you can´t salvage ships in every system... or the 2nd option that a ship jumps in and jumps out with the derelict ship makes for variation... and pay less than ferrying the ship to its salvage destination. Randomnes could tell the player that no salvage ships are availble for his area...

What would make sense is to make it so that ships inside the Witchspace beacon distance need to be ferried outside or to the Witchspace beacon, or to the station... since we could have another explanation reason on our hands if we suddenly make ships jump into the system inside the witchpoint beacons diameter to the planet.

I have one idea though... Vipers, if we go by the Wiki could have a Tractor beam, we should make them use it.

A Tractor beam Apperatus that the player can use to ferry the ship to a salvage station... the station then checks for derelict ships, makes them dock and pays out salvage. We could argue that this tractor beam only works on unshielded ships.

The java code need though todo this would be elaborant,

1 It would need to check that the player has activated his tractor beam while the dereclict ship is targeted..

2 it would have make the derelict ship follow the player at any speed, even "J" key speed...

3 A salvage station will make the derelict ship dock, once in range

4 we need an explanation why unmanned derelict ships can go "j" key speed without being masslocked by the player.

Unless somebody else picks this up, i think i will have a go at it, once i finish the Fuel Collector... (which hopefully will be today)
Bounty Scanner
Number 935
User avatar
matt634
Deadly
Deadly
Posts: 206
Joined: Tue Mar 21, 2006 6:32 pm
Location: Colorado, USA

Post by matt634 »

I do think anybody would like to escort a vessel from say the witch-point to the station...
Isn't that the truth. I've played with several "escort" type missions for the update to galactic navy and they were all incredibly boring or frustratingly tedious - read not fun.
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2882
Joined: Tue Apr 04, 2006 7:02 pm
Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.

Post by LittleBear »

Hmm. A cargo drone (mounted as a mine) could swich the AI to follow it into dock. The player woudn't need to stay with the ship, when it docked the money would be awarded. Might do a quick hack to see if it works.

EDIT : Or have the drone summon a dredger (say) 50 Km away, so its a short flight.
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

LittleBear wrote:
EDIT : Or have the drone summon a dredger (say) 50 Km away, so its a short flight.
Nice idea, I give it a thought. Currently I am working on a few new Dredger scripts. Sabre has one that is a little bigger than the current one and one that he calls a super-dredger. It must be at least 300.000 km away added. But that is a manageable distance and the dredger can also help bridging the gap. I'll play with it tomorrow to see if it is do-able.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

Doing it with a missile with special script will work, but has as big drawback that you can't define the missile icon on the console. At the end you don't know witch missile is the special one. Oolite will reorder them on buying a new one. So I tried an other line: collision

I just created a short script that tested to work:

Code: Select all

this.shipCollided = function(ship)
{
    if(ship.isShip && ship.scanClass == "CLASS_CARGO")
    {
        if(player.hasEquipment("EQ_SALVAGE_PILOT"))
        {
            player.removeEquipment("EQ_SALVAGE_PILOT")
            system.legacy_addShipsAtPrecisely("dredger", 1, "abs", player.position.add(Vector.randomDirection().multiply(300000)))
            ship.switchAI("dockingAI.plist")
        }
    }
}
When colliding with an object at low speed no damage will happen but an event is issued. The mainscript can analyse the object and when it is a ship with scanclass cargo it should be an abandoned ship. (Internally the ship has a key "is_hulk" but that can't be seen from JS)

It adds a dredger and the ship is put in a dockingAI.plist. The AI itself will look for the nearest station. In my tests the main station was closer thus it docked at the main station. (no payment at this point)

I see no easy way to pay the player on docking as I can't attach a script to a random ship. The easy way would be to add a script to the dredger that activates on docking of a ship with scanclass cargo. That means only the dredgers would pay for salvaged ships and maybe the equipment should only be buyable on the dredger.

the difficult way would to set up a timer that keeps checking for the status of the ship until it docks. That way it would be equipment that is independent of the dredger.oxp. Without the dredger it just takes longer to reach the nearest station.
User avatar
Frame
---- E L I T E ----
---- E L I T E ----
Posts: 1477
Joined: Fri Mar 30, 2007 8:32 am
Location: Witchspace

Post by Frame »

while i´m on the road right now, i´m pretty sure i can make a java script track and record wheter or not a ship that is derelict has docked, and wheter or not the player was the one responsible for making that ship dock via EQ_SALVAGE..

Derelict ships have two proberties attached to them

1 they have null.AI
2 they are allways either Trader, Pirate, escort, hunter.. allthough i have never seen an escort eject, i know if he has an escape pod that will be a possibility...

so you take these two properties, and compare them to the ship, that the player has targeted while activating EQ_SALVAGE.. i do it right now in the fuel collector... while i ATM am not at the machine having that code.

Cheers Frame.
Bounty Scanner
Number 935
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2882
Joined: Tue Apr 04, 2006 7:02 pm
Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.

Post by LittleBear »

Nice work. I what about 1) making a clone of the dredger with the name "Salvage Dredger" and adding this by custom role (we can then test for a docked at this station name). 2) rather than switching to standard docking AI switching to a customAI that set a variable with safeScriptActionOnTarget when it docks in order to pay the player. 3) Can't we attach the script to the missile itself in shipdata? Then the missile will be defined as an entry so we can set its icon. I've got some very nice unrealesed models by Griff on my harddisc that would do nicely for the pylon mounted cargo drone (and also a salvage base). Gonna have a play with this today and see how far I get.

@Frame. They do have null AI, but you can switch the AI with a legacy or Java command. I did this with the harmlessAI in the first version of randomhits. Any NPC that attacked a victim had its AI swiched to harmlessAI (which made it break off, retreat 20km and then switch back to whatever AI it had in the first place.) I took this out later on and just told the mark to flee NPC attacks, so there is a chance of an NPC doing the hit and the player gets a mission fail briefing.

EDIT:-

OK here's the Salvage Drone in game. Now to get it mounted and fireing as a missile:-

Image

For sale. ATM the icon is just a boring square. Anybody artistic feel like doing some number for it to make it like a little robot? :-

Image

There he goes, on his way to salvage this abandoned ship. Now the hard part an AI. What I want it to do is stop and very gently bump the ship. Then he sends a message saying he's overwriting the ships computer code. Pause AI a few seconds, then another message saying its done. Switch the derelict's AI to follow the drone. Drone sets off towards the dredger with the derelict in tow. :-

Image
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

OK, It is now fully working.

- The pilot costs 175 credits. (it's a cheap box of navigation equipment.)

- It will only enter the computer of a ship with mass < 500 000 (Anaconda is 450 000 and much larger ship will probably not dock well)

- Also in another 30% of the cases the box detects that the engine is defect so it can't do nothing. (investment of 175 cr gone).

- The dredger will pay 10 credits per 1000 ton. (resulting in e.g. Anaconda 4000, python 2000, mamba 250)

- It takes about 5 to 10 minutes for the ship to reach the dredger, so the player has to be patient to get its payment but the player can do anything as long he stays in the system. Payment is announced over a console message.

---
Frame > primaryRole is read/write, so you can change it to prevent pirates attacking the ship, but I think a abandoned ship has still cargo and should be attacked by pirates when found. But the device could set bounty to zero.

---
Main script:

Code: Select all

this.shipCollided = function(ship)
{
    if(ship.isShip && ship.scanClass == "CLASS_CARGO" && ship.AI == "nullAI.plist")
    {
        if(player.hasEquipment("EQ_DREDGER_SALVAGE_PILOT"))
        {
            player.consoleMessage("Attaged salvage pilot to ships hull", 5)
            player.removeEquipment("EQ_DREDGER_SALVAGE_PILOT")
            if (Math.random() < 0.3) {player.consoleMessage("Can't do anything, damage is to bad", 5); return;}
            if(ship.mass < 500000) // anaconda has 429553 , a sidewinder 26737
            {
                system.legacy_addShipsAtPrecisely("dredgers", 1, "abs", player.position.add(Vector.randomDirection().multiply(300000)))
                let dredger = system.shipsWithPrimaryRole("dredgers")[0];
                ship.target = dredger.ID; log(this.name, "Target ID = "+dredger.ID)
                ship.switchAI("dredgersDockingAI.plist")
                this.salvagedShip = ship
            }
            else player.consoleMessage("Salvage pilot can't controll this ship", 6)
        }
    }
}
dredgers script:

Code: Select all

this.otherShipDocked = function(ship)
{
    if(ship == worldScripts.deep_space_dredger.salvagedShip)
    {
        let payment = Math.round(ship.mass/1000)*10;
        player.consoleMessage("Salvaged ship docked, dredger pays " + payment + " credits.", 10);
        player.credits += payment
    }
}
standard dockingAI, but preceded with:

Code: Select all

    GLOBAL = {
        ENTER = ("setStateTo: GOTO_DREDGER");
        EXIT = ();
        UPDATE = ();
    };
    "GOTO_DREDGER" = {
        ENTER = ("pauseAI: 10");
        "DESIRED_RANGE_ACHIEVED" = (dockEscorts, setTargetToStation, "setSpeedTo: 0.0", requestDockingCoordinates, "setStateTo: AWAIT_COORDS");
        "TARGET_FOUND" = (dockEscorts, setTargetToStation, "setSpeedTo: 0.0", requestDockingCoordinates, "setStateTo: AWAIT_COORDS");
        EXIT = ();
        UPDATE = (setDestinationWithinTarget, "setDesiredRangeTo: 15000", "setSpeedFactorTo: 1", performFlyToRangeFromDestination, "scanForNearestShipWithRole: dredgers", "pauseAI: 10");
    };
This alteration makes sure it is not docking an other station.
Last edited by Eric Walch on Sun Jul 20, 2008 2:12 pm, edited 1 time in total.
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2882
Joined: Tue Apr 04, 2006 7:02 pm
Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.

Post by LittleBear »

Hi Eric. Very nice. I've been going at it the other way with a missile to take over control. As Griff's model looks rather nice, would you mind if I combined the two to make it a missile fired that takes control? Here it is latching on to the deretict and taking control :-

Image
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

I've been going at it the other way with a missile to take over control. As Griff's model looks rather nice, would you mind if I combined the two to make it a missile fired that takes control?
No, to do it with a missile it nicer, but just bumping onto the target was easier scripting. The only problem I have with a missile is the "icon". I think it is not customisable and with a lot of several icons it gets confusing. (The newer dredgers package from Sabre also contains a drone that currently is used as a missile)
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2882
Joined: Tue Apr 04, 2006 7:02 pm
Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.

Post by LittleBear »

Cheers Eric. I've modded your script slightly and attached it to the Drone. Seems to be working fine! I'm gonna fiddle slightly with the comms messages (just some random words to give different descriptions of what the missile is up to). BTW you can set the icon like this:-

(add to a descriptions .plist).

Code: Select all


<key>EQ_SALVAGE_MISSILE</key> 
<array> 
<integer>2</integer>   <integer>2</integer> 
<integer>2</integer>   <integer>-2</integer> 
<integer>-2</integer>   <integer>-2</integer> 
<integer>-2</integer>   <integer>2</integer> 
</array> 
The numbers define the icon (like a VDU command). I have no artistic skill, so ATM its just a big square, but you will be able to tell the drone apart. The Missiles and Bombs OXP has lots of different icons. I wonder if the author would mind knocking out a little Robot shaped one! :D
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
User avatar
Stromboli
Dangerous
Dangerous
Posts: 76
Joined: Sun Jul 06, 2008 10:09 am
Location: Japan

Post by Stromboli »

Does someone need an icon? :D

Any idea on what it should look like? I think I can make it.
Space Pirate, and a proud Mac Us-arrr!
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

Stromboli wrote:
Does someone need an icon? :D

Any idea on what it should look like? I think I can make it.
I think making a few and adding them in a small database for others to use would be cool.

LB> I somehow new they could be customised, but I looked only in shipdata and equipment.
Post Reply