Page 4 of 56

Posted: Wed Sep 05, 2007 12:12 pm
by JensAyton
Commander McLane wrote:
Ahruman, I love you!

I'm feeling like with Father Christmas here: You submit a request, and it gets fulfilled!!!

Joy! :D :D :D :D :D

(Sorry, you may as well delete this enthusiastic outburst of mine when you've read it. :oops:)
*enshrines outburst*

Keep in mind that for each quickly-answered bug report or feature request, there are at least twenty that are effectively ignored…

Posted: Thu Sep 06, 2007 6:40 am
by Commander McLane
To get back to my original request and to show how important has_npc_traffic is going to be, let me tell you what happened yesterday:

As I said I want to dock the player with a Generation Ship, so I made that dockable. The (unwanted) result is that there are traders randomly launching from the Generation Ship. Yesterday it happened that one of those traders went a short while forward and ... jumped. Now as also the Generation Ship moves forward--painfully slowly, of course--eventually it got caught by the trader's wormhole and disappeared, leaving the most gigantic wormhole I've ever seen :shock:! Its blue dot was at the very edge of my scanner, but it filled the sky! And I got sucked in when I came closer than 20 kilometers! WOW!

Posted: Sun Sep 23, 2007 9:17 pm
by nijineko
sweet! where can i find that? hmmm, have you ever shot a wormhole? it has... interesting side effects.

Posted: Mon Sep 24, 2007 8:53 am
by Commander McLane
You can't find it yet, because it's still in the making (and has still to go a long way). And again, the has_npc_traffic-key is meant to prevent something like this incident from happening, so you are not going to see it anyway, as far as I am concerned. :roll:

Posted: Mon Sep 24, 2007 7:15 pm
by nijineko
seriously, try shooting the wormhole on your way in. but you have to hit it dead center. with a wormhole that big, though, you might just crash the game instead of seeing the spectacular results. ^^

Posted: Fri Sep 28, 2007 9:25 pm
by Arexack_Heretic
why are traders launching from it?
The behemoth only launches interceptors, I have yet to see any other ship dock with one.

Posted: Sat Sep 29, 2007 10:46 am
by Commander McLane
Arexack_Heretic wrote:
why are traders launching from it?
The behemoth only launches interceptors, I have yet to see any other ship dock with one.
Well, just tested it. Made an entity-status-dump of a Behemoth. Looks basically the same as for my Generation Ship:

Code: Select all

[dumpState]: State for <StationEntity Behemoth - Titan 263>:
  [dumpState.entity]: Universal ID: 263
  [dumpState.entity]: Scan class: CLASS_POLICE
  [dumpState.entity]: Status: STATUS_IN_FLIGHT
  [dumpState.entity]: Position: (-9527.52, 7538.95, -8892.81)
  [dumpState.entity]: Orientation: (0.99058 - 0.053205i + 0.0735196j - 0.102541k)
  [dumpState.entity]: Distance travelled: 589.563
  [dumpState.entity]: Energy: 2500 of 2500
  [dumpState.entity]: Mass: 7.16395e+07
  [dumpState.entity]: Flags: isShip, isStation, hasMoved, hasRotated, isSunlit
  [dumpState.shipEntity]: Name: Behemoth - Titan
  [dumpState.shipEntity]: Roles: behemoth-titan
  [dumpState.shipEntity]: Subentity count: 35
  [dumpState.shipEntity]: Time since shot: 100007
  [dumpState.shipEntity]: Behaviour: BEHAVIOUR_ATTACK_FLY_TO_TARGET_TWELVE
  [dumpState.shipEntity]: Target: <ShipEntity Thargoid Warship 249>
  [dumpState.shipEntity]: Destination: (-1494.02, 6101.75, -5195.25)
  [dumpState.shipEntity]: Other destination: (0, 0, 0)
  [dumpState.shipEntity]: Waypoint count: 0
  [dumpState.shipEntity]: Desired speed: 125
  [dumpState.shipEntity]: Fuel: 0
  [dumpState.shipEntity]: Fuel accumulator: 1
  [dumpState.shipEntity]: Missile count: 0
  [dumpState.shipEntity.ai]: AI:
    [dumpState.ai]: State machine name: carrierPatrolAI.plist
    [dumpState.ai]: Current state: ATTACK_TARGET
    [dumpState.ai]: Next think time: 220.888
    [dumpState.ai]: Next think interval: 220.888
  [dumpState.shipEntity]: Frustration: 0
  [dumpState.shipEntity]: Success factor: 0
  [dumpState.shipEntity]: Shots fired: 0
  [dumpState.shipEntity]: Hull temperature: 60
  [dumpState.shipEntity]: Heat insulation: 1
  [dumpState.shipEntity]: Flags: has_ecm, escortsAreSetUp
  [dumpState.stationEntity]: Alert level: green
  [dumpState.stationEntity]: Max police: 8
  [dumpState.stationEntity]: Max defence ships: 3
  [dumpState.stationEntity]: Police launched: 1
  [dumpState.stationEntity]: Max scavengers: 3
  [dumpState.stationEntity]: Scavengers launched: 0
  [dumpState.stationEntity]: Docked shuttles: 3
  [dumpState.stationEntity]: Docked traders: 8
  [dumpState.stationEntity]: Equivalent tech level: 2147483647
  [dumpState.stationEntity]: Equipment price factor: 1
  [dumpState.stationEntity]: Flags: no_docking_while_launching
The last part is the relevant one. And it shows that there are the same numbers of docked ships as for any other station, including eight traders. Why you haven't seen them launching (and I don't recall it either), is a mystery to me.

Posted: Sat Sep 29, 2007 4:11 pm
by Arexack_Heretic
I usually see them in WS, testing 'Thargorn'. No reason to launch there, no traders required in WS.


ok I dunno. :lol:

Posted: Sun Sep 30, 2007 4:50 pm
by Commander McLane
Well, it just seems to me that all stations (=dockable entities) are given a default number of police ships, defense ships, scavengers, traders and shuttles on being spawned, and there is nothing much we can currently do about it. (Apart from waiting for the version where has_npc_traffic and the like will be implemented.)

Actually even Thargoid Carriers should be able to launch traders. Although I've never seen that.

Posted: Sun Sep 30, 2007 5:06 pm
by Arexack_Heretic
I'm having trouble myself with a hermit-lookalike, It won't set the techlevel to 1 and defenceships are either police or not at all.

Additional keys for Docking_allowed_roles (and also launching) etc would be helpfull in your case.
in the same line as max_scavengers, max_defenceShips, max_miners, etc.

Posted: Sun Sep 30, 2007 5:09 pm
by Commander McLane
Yes, equivalent_techlevel and some other shipdata-keys are broken in 1.69.1. Have a look at the bug reports.

But Ahruman has already fixed it on his harddisk. Not yet released, though.

Posted: Sun Sep 30, 2007 5:11 pm
by Arexack_Heretic
I always forget whats in the changelogs.

Maybe I should revert to an older version to test/update OXP's. :/
Or just wait for the next patch. ;)

edit: I gots a request...may not be a new one, may even be already implemented.

Code: Select all

cargoCarried_number as a queriable state. 
The purpose is to compare the amount of cargo carried by a player before and after a visit to a smugglers' asteroid: a crude way to 'check the manifest'.

A way to use trading (SoldGoods/BoughtGoods) as a trigger for scripting is not really usefull outside the context of what I want to do, so too much effort for the possible benefits to the community.

Posted: Mon Oct 01, 2007 11:48 am
by Arexack_Heretic
Ahruman wrote:
Ahruman wrote:
Hopefully it will be possible for ship-attached JavaScript scripts to get a “who killed me” parameter to their didBecomeDead() handler.
Update on this: the world script event for player deaths now has two paramaters, “whodunnit” and “context”, as in:

Code: Select all

this.didBecomeDead = function(whodunnit, context)
{
    Log("Gadzooks! Player was killed by " + whodunnit + " through " + context + ".");
}
Context can (currently) be one of:
  • “energy damage” (whodunnit is a ship)
  • “scrape damage” (whodunnit is a ship)
  • “heat damage” (whodunnit is null)
  • “hit a planet” (whodunnit is a planet)
There will be a similar takeDamage() event for energy, scrape, and possibly heat damage.

My intention is (still) to have NPC scripts look similar to world scripts, so the same principle will apply.

Oh, it’ll also be possible for NPC scripts to suppress explosions in their death handlers.
will 'hit a planet' by police cause the planet to become fugitive?

Posted: Mon Oct 01, 2007 12:20 pm
by JensAyton
Arexack_Heretic wrote:
will 'hit a planet' by police cause the planet to become fugitive?
Heh. The bounty stuff isn’t handled by JavaScript, but even if it was, setting the bounty of a planet would have no effect (because bounty is a Ship property, not a Planet property).

Annoying kamikazes

Posted: Sat Oct 06, 2007 12:22 pm
by Arexack_Heretic
I feel performAttack(etc) should reset speed from 100%+ back to 100%, I'm getting tired of being rammed to death by speedaddled pirates.