Page 7 of 13

Re: NEW : Bank of the Black Monks OXP

Posted: Fri Jul 06, 2012 8:30 am
by cim
Griff wrote:
Yeah, i don't know either why they're so docile. The station goes absolutely ape when you shoot it, but the defenders just flit about aimlessly, i wonder if they need a certain scan_class and their weapon stats tweaking? maybe they don't fire becuase their guns are too short range for them to be happy about getting close enough to fire off a shot?
That might be it. In 1.76, if all they have is two plasma turrets, they'll be counted as having "no weapon" (range: 32km) and will attempt to fight based on that. In trunk they'll be counted as having "plasma cannon" (range: 6km) and therefore fight at much shorter range. If they flee out to 16km or so before turning round to attack, that's what's happening.

scan_class should be explicitly set to CLASS_NEUTRAL to deal with the 1.76 bug with defence ship scan class.

They'll only automatically be given the policeInterceptAI.plist AI if they're scan_class CLASS_POLICE (which you don't want) or have a primaryRole of "hermit-ship" (which you also don't want), so you'll need to give them that AI explicitly in shipdata.

Re: NEW : Bank of the Black Monks OXP

Posted: Fri Jul 06, 2012 9:36 am
by Griff
Thanks for the tips guys, yeah they have the policeinterceptAi set as their ai type, i'll change the scan_class to neutral, remove their bounty and up their energy & recharge a bit - i'll test them later this evening with oolite trunk to see if they're more aggressive

edit: done, oxp is now v1.41.

Re: NEW : Bank of the Black Monks OXP

Posted: Fri Jul 06, 2012 9:53 am
by Fatleaf
Just gave them scan_class = "CLASS_NEUTRAL"; and they go out to about the 16km to 20 km and just doze about there as a group doing not much until I approach. That's in 1.76

In oolite-trunk-1.77.0.5048 it gets even stranger as when they launch they are not targeting you (staying yellow on the scanner) untill you get close to 6km then they get aggressive. As soon as you get about 6km away they stop attacking you (back to yellow on the scanner) ...

Re: NEW : Bank of the Black Monks OXP

Posted: Fri Jul 06, 2012 10:12 am
by cim
Fatleaf wrote:
In oolite-trunk-1.77.0.5048 it gets even stranger as when they launch they are not targeting you (staying yellow on the scanner) untill you get close to 6km then they get aggressive. As soon as you get about 6km away they stop attacking you (back to yellow on the scanner) ...
Red on the scanner (and in 1.76 too) means "hostile targeting and within weapons range". The difference is that in trunk their weapon range is calculated properly. (See also: pirate ships which are clearly coming for you only turning red when they get within 12.5/15 km)

So what should be happening is they launch on yellow (out of range), and then start attacking you - which will mainly consist of flying towards you at max speed, since they're out of range. When they get to weapons range they will turn red and start shooting.

If you use the Griff shipset in 1.76 many of the ships in that have their forward laser on a subent and so are affected by this calculation bug - so the game thinks their range is 32km and they turn red immediately. A non-Griff ship with the same forward weapon but on the main entity would close to 12.5/15km before turning red, assuming no military laser.

Re: NEW : Bank of the Black Monks OXP

Posted: Fri Jul 06, 2012 10:21 am
by Fatleaf
cim wrote:
Fatleaf wrote:
In oolite-trunk-1.77.0.5048 it gets even stranger as when they launch they are not targeting you (staying yellow on the scanner) untill you get close to 6km then they get aggressive. As soon as you get about 6km away they stop attacking you (back to yellow on the scanner) ...
Red on the scanner (and in 1.76 too) means "hostile targeting and within weapons range". The difference is that in trunk their weapon range is calculated properly. (See also: pirate ships which are clearly coming for you only turning red when they get within 12.5/15 km)

So what should be happening is they launch on yellow (out of range), and then start attacking you - which will mainly consist of flying towards you at max speed, since they're out of range. When they get to weapons range they will turn red and start shooting.

If you use the Griff shipset in 1.76 many of the ships in that have their forward laser on a subent and so are affected by this calculation bug - so the game thinks their range is 32km and they turn red immediately. A non-Griff ship with the same forward weapon but on the main entity would close to 12.5/15km before turning red, assuming no military laser.
I never knew this :shock:
Most of the ships in my Ooniverse have military lasers anyway so I got used to them turning red almost immediately.

Might need to give these guys a custom AI. I will have a look around to see if there is one I can steal for them!!! :wink:

Re: NEW : Bank of the Black Monks OXP

Posted: Fri Jul 06, 2012 10:25 am
by Griff
oops, looks like there's a mistake in one of the turret subentities, it only has half the range & damage of the other turret, i'll fix this (by setting both turrets to a range of 4500 and an energy_damage of 8 )

Yeah, if you have any ship stats and code improvement fatleaf, just post them up and i'll put them into the oxp

Re: NEW : Bank of the Black Monks OXP

Posted: Fri Jul 06, 2012 11:20 am
by Eric Walch
I just installed the monks. When a defence ship launches, it jumps after a few hundred meters in 'behaviour_avoid_collision'. Than it takes about 10 km before the ship thinks it has a safe distance from the station, and only than his attention goes to the target.
Happens both in 1.76 as in trunk.

Re: NEW : Bank of the Black Monks OXP

Posted: Fri Jul 06, 2012 12:09 pm
by Shipbuilder
If you use the Griff shipset in 1.76 many of the ships in that have their forward laser on a subent and so are affected by this calculation bug - so the game thinks their range is 32km and they turn red immediately. A non-Griff ship with the same forward weapon but on the main entity would close to 12.5/15km before turning red, assuming no military laser.
Reading between the lines I assume that military lasers give npc ships a longer range. Have I understood this correctly ?

If this is the case do beam lasers give a longer range than a pulse laser on a npc ship ?

Re: NEW : Bank of the Black Monks OXP

Posted: Fri Jul 06, 2012 12:48 pm
by cim
Shipbuilder wrote:
Reading between the lines I assume that military lasers give npc ships a longer range. Have I understood this correctly ?

If this is the case do beam lasers give a longer range than a pulse laser on a npc ship ?
Pulse, beam and military lasers on NPC ships have the same range as the same weapons on the player ship (12.5km, 15km and 30km respectively). In practice an NPC with a military laser won't intentionally hit anything beyond 25.6km, as it won't be able to see it on its scanner, while a skilled player is often able to make use of the extra range, but that's a minor difference only.

Re: NEW : Bank of the Black Monks OXP

Posted: Fri Jul 06, 2012 3:14 pm
by Eric Walch
Eric Walch wrote:
I just installed the monks. When a defence ship launches, it jumps after a few hundred meters in 'behaviour_avoid_collision'.
This problem can be avoided by making the dock a bit deeper. I now changed in the dat file the 4 numbers -250 into -450. The dock still looks okay than. :)

On launch a ship first travels 2 dock lengths outside the station before the ai becomes active. By making the dock longer it takes a bit longer before the ai starts active working on the attack and the ship is outside the trigger range of getting into a 'behaviour_avoid_collision'.
I haven't tested a value of -350. Might also work.

Edit: I was wondering why this was no problem with normal stations. Now I think i know why; it are the 4 spikes that are pointing downwards. When launching 2x a dock length of 250 meters, the ship is still too close to the spikes when normal AI starts.

Re: NEW : Bank of the Black Monks OXP

Posted: Sat Jul 07, 2012 1:16 am
by Fatleaf
I was thinking about how to solve the issue of the weapon range and how it affects their seemingly lack of aggression. If you gave them a laser entry in the shipdata.plist but set the weapon energy at zero or something ridiculously weak like 0.0001 or there about. Then make the colour clearColor (0, 0, 0, 0) so it would be all but invisible.

I tried this out but for some reason the lasers aren't clear. They appear grey not clear. The same is true if you give them a black colour they appear grey not black :?
On the aggression side of things it seemed to work. They launch clear the bank then turn to face you and attack. Mostly with (grey :? ) lasers till their turrets are in range.
Another problem with the lasers is that when they strike you get the hit sound on your ship. I suppose you could give them a mining laser to lower the fire rate but still far from ideal.
All this was only tested on 1.76
Still thinking... :!:

Re: NEW : Bank of the Black Monks OXP

Posted: Sat Jul 07, 2012 9:00 am
by Smivs
Fatleaf wrote:
Then make the colour clearColor (0, 0, 0, 0) so it would be all but invisible.
I tried this out but for some reason the lasers aren't clear. They appear grey not clear. The same is true if you give them a black colour they appear grey not black ...
:roll: This is because the (Benedictine) Black Monks are very good at financial dealings, but are useles with tech, so they have to buy their weaponry from the Tironensian Order (the Grey Monks) who, quite understandably only make grey lasers. 8)

Re: NEW : Bank of the Black Monks OXP

Posted: Sat Jul 07, 2012 9:43 am
by Commander McLane
Fatleaf wrote:
I tried this out but for some reason the lasers aren't clear. They appear grey not clear. The same is true if you give them a black colour they appear grey not black :?
For the technical reason see Image here. (Sometimes it's worthwhile to read the documentation for an answer when having a question. Many facts about the inner workings of Oolite are exposed in the documentation. That's sort of the reason why the documentation exists. :wink: )

Re: NEW : Bank of the Black Monks OXP

Posted: Sat Jul 07, 2012 12:46 pm
by Fatleaf
Commander McLane wrote:
For the technical reason see Image here. (Sometimes it's worthwhile to read the documentation for an answer when having a question. Many facts about the inner workings of Oolite are exposed in the documentation. That's sort of the reason why the documentation exists. :wink: )
You know, I very briefly skimmed the documentation and very quickly clicked the Colour specifier link :oops:

Maybe I shouldn't try to code so early in the morning... :roll:

But thanks :D

Re: NEW : Bank of the Black Monks OXP

Posted: Sun Jul 08, 2012 12:58 pm
by Diziet Sma
Fatleaf wrote:
Griff wrote:
well spotted! they don't fit :lol: i'll see about scaling them down
Image
How about not scaling down all the Gunships as they look great with their current size, but you could have a defender Gunship that IS scaled down.
So how come it hasn't occurred to anyone here that maybe the docking bay should be enlarged instead? :shock: