Re: Progress
Posted: Sat Sep 15, 2012 8:19 pm
Thanks. Fixed in r5329, along with a crash bug in the interface code.Thargoid wrote:However I think the example parcel script itself needs a little tweaking, unless you've got a TARDIS...
Thanks. Fixed in r5329, along with a crash bug in the interface code.Thargoid wrote:However I think the example parcel script itself needs a little tweaking, unless you've got a TARDIS...
What categories have you got to start with?cim wrote:The interfaces are categorised and sorted by category. For easier translation and consistency, I'd like to add a few common categories to the core descriptions.plist: suggestions for what they should be are welcome.
tickle()
event handler, which has been deprecated more or less since the dawn of time, is no longer supported. Attempting to set the tickle
property of a script now generates a warning.script.trace.javaScript
and script.trace.legacy
log messages – which are unrelated to the above trace facility and the JavaScript equivalent console.trace()
– have been renamed to script.javaScript.call
and script.legacy.run
respectively. (script.javaScript.call
is logged every time a method on a script is called directly by Oolite. script.legacy.run
is logged each time a legacy script is run. These messages are disabled by default in logcontrol.plist.)scriptActionOnTarget:
has printed a big, scary deprecation notice for some time now. Is anything notable still using it?
----- WARNING in AI fooAI.plist: the AI method scriptActionOnTarget: is deprecated and should not be used. It is slow and has unpredictable side effects. The recommended alternative is to use sendScriptMessage: to call a function in a ship's JavaScript ship script instead. scriptActionOnTarget: should not be used at all from scripts. An alternative is safeScriptActionOnTarget:, which is similar to scriptActionOnTarget: but has less side effects.
Checking through the big pile of OXPs:Ahruman wrote:Since I’m busy throwing things out: the AI methodscriptActionOnTarget:
has printed a big, scary deprecation notice for some time now. Is anything notable still using it?
"scriptActionOnTarget: becomeUncontrolledThargon"
"scriptActionOnTarget: becomeExplosion"
scriptActionOnTarget:
was aliased to safeScriptActionOnTarget:
. (The difference is that scriptActionOnTarget:
causes an immediate legacy script update/tickle event.) While Assassins uses a legacy script, it appears none of its handlers do anything when status=STATUS_IN_FLIGHT, except for a few that update planet descriptions on the idle tick. As such, the difference shouldn’t matter. And in practical terms, I tend to think of legacy script support as “Assassins compatibility mode”.The smarter half of the NPCs will adjust their targeting circle narrower if they keep missing, which automatically limits their rate of fire a bit (as well as making it less likely that they'll get into this sort of situation). The less smart half will just hold the trigger down in the vague direction of the target.Switeck wrote:Perhaps they should fire about half as fast till they score a hit or get hit?
Well, anything without an aft laser will be fine, so how common it is depends on your ship mix.Switeck wrote:Cool, just as long as this isn't the overwhelmingly common npc behavior.
Missile accuracy is randomised, but works in a completely different way and doesn't make a lot of difference to their flight path (and also should be virtually identical to 1.76 behaviour). I haven't noticed any odd missile behaviour myself, but then I don't use them much, so I'll keep an eye open.Switeck wrote:Incidentally, I'm seeing missiles fly off in every direction except the ship I targeted.
Are missiles also using random-but-low accuracy values?
It's funny that you should mention a potential problem with missile behaviour Switek. Maybe related, I'm not sure yet, but normally, when you have a target and fire a missile, it will pursue it's target, while the player loses target lock with that target and all is well. If on the other hand you have an oxp in place that gives the player a new target lock with a different target right after he loses the lock on the target the missile was targetting, it would seem the missile instantly has that new target as its target for some reason. I've just discovered this last night and today will try some frame callback delay between the missile firing and adding the new target lock for the player and see if that fixes it for what I'm trying to do.cim wrote:Well, anything without an aft laser will be fine, so how common it is depends on your ship mix.Switeck wrote:Cool, just as long as this isn't the overwhelmingly common npc behavior.
Missile accuracy is randomised, but works in a completely different way and doesn't make a lot of difference to their flight path (and also should be virtually identical to 1.76 behaviour). I haven't noticed any odd missile behaviour myself, but then I don't use them much, so I'll keep an eye open.Switeck wrote:Incidentally, I'm seeing missiles fly off in every direction except the ship I targeted.
Are missiles also using random-but-low accuracy values?