Quick check of roles for ship's OXP

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

Post Reply
Rustem
Deadly
Deadly
Posts: 170
Joined: Mon May 25, 2015 5:23 pm
Location: Russia

Quick check of roles for ship's OXP

Post by Rustem » Thu Nov 30, 2017 11:56 am

If you want find incorrect role in the ship's OXP quickly, then inputed in oolite console:

Code: Select all

var roles = Ship.roles();
for( var i = 0; i < roles.length; i++ ) {
 var roleKeys = Ship.keysForRole( roles[i] );
 log("roles", i + ". "+roles[i] + ": " + roleKeys );
}
Details can seen in the [EliteWiki] Oolite JavaScript Reference wiki page (Static Methods).

I found in Latest.log file the next incorrect roles for in the my set of AddOns:
... [fighters-shark]: fighters-shark
...

... (0.04): RNRL_Stormbrewer-vigilante
...

... (0.05): classic_mussurana_hunter,classic_mussurana_pirate
...

... (0.07): RNRL_Stormbrewer-vigilante
...

... (0.3): classic_mussurana_hunter,RNRL_Stormbrewer-pirate
...

... griff_processor_subent: griff_1_pipe,griff_4_pipe
I think not should be number role. Errors is consist in space between the name roles and role weights this OXP's.

So, may fixed in shipdata.plist, roles string for OXP's: The Classic Mussurana, Stormbrewer.

User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Disunited Kingdom
Contact:

Re: Quick check of roles for ship's OXP

Post by Smivs » Thu Nov 30, 2017 12:45 pm

Hi Rustem,
Thanks for the heads-up on this. I had no idea I had spaces between the role and weight, and also had no idea that it was a problem!
It is now on my (rather long!) 'to do' list, so will be fixed when I can get round to this.
Commander Smivs, the friendliest Gourd this side of Riedquat.

Rustem
Deadly
Deadly
Posts: 170
Joined: Mon May 25, 2015 5:23 pm
Location: Russia

Re: Quick check of roles for ship's OXP

Post by Rustem » Fri Dec 01, 2017 7:46 am

Smivs wrote:
Thu Nov 30, 2017 12:45 pm
It is now on my (rather long!) 'to do' list, so will be fixed when I can get round to this.
Hi, Smivs!

It is big 'to do' a deleting space :D.

Find space is difficult task :D.

I looking The GalCop MostWanted OXP code. There is use a role weights. Not sure exactly, but it seems that it affects the choice a ship for addition to GC MW list.

User avatar
phkb
Commodore
Commodore
Posts: 2438
Joined: Tue Jan 21, 2014 10:37 pm
Location: [p]laying [h]ard and [k]icking [b]utt somewhere in G7...

Re: Quick check of roles for ship's OXP

Post by phkb » Fri Dec 01, 2017 9:05 am

Rustem wrote: There is use a role weights. Not sure exactly, but it seems that it affects the choice a ship for addition to GC MW list.
I'm attempting to allocate ships with (kind of) the same frequency as the core code does it, so a rare ship doesn't get over-allocated. I use a similar method for Station Dock Control. I'm by no means sure I have the algorithm close to what the core code does, but it's workable.

User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Disunited Kingdom
Contact:

Re: Quick check of roles for ship's OXP

Post by Smivs » Fri Dec 01, 2017 4:09 pm

Hi, Smivs!

It is big 'to do' a deleting space :D.
Well, no, not in itself, but when taken in context (the number of updates I need to do!) it is. RL is crazy at the moment, but I hope to sort all of my backlog out within the next week or two.
Commander Smivs, the friendliest Gourd this side of Riedquat.

User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 13693
Joined: Sat Jul 04, 2009 9:31 pm
Location: Corke's Drift
Contact:

Re: Quick check of roles for ship's OXP

Post by Cody » Fri Dec 01, 2017 8:18 pm

Smivs wrote:
Fri Dec 01, 2017 4:09 pm
RL is crazy at the moment
Fixed that for you!
Their dreams a tattered sail in the wind

User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Disunited Kingdom
Contact:

Re: Quick check of roles for ship's OXP

Post by Smivs » Fri Dec 01, 2017 8:25 pm

Ah, that explains it, then...
Commander Smivs, the friendliest Gourd this side of Riedquat.

Post Reply