sdrubble wrote:A while ago someone published an improved script for the Caduceus DCN (which, mind you, is
coded somewhat differently than the equivalent coding found in the stand-alone OXP which performs a similar function for other ships). I had tested it at the time, and validated it for the Dark Rainbow (as a matter of fact
it DID solve fully a performance issue which my netbook was having with some other heavy script from a HUD OXP).
I'll do some homework shortly and update here with the relevant info & links.
Actually I'm making a new post instead of amending the previous one. Things should become more clear that way.
So, for anybody willing to take The Dark Rainbow for more than a single
test-drive test-flight, there's a simple
HACK which should be done to the
DCN script. It should greatly
improve the overall performance of Oolite, and this is mainly noticed when flying The Dark Rainbow on a
low-spec machine.
Now, the
DCN script I'm talking about is
NOT a part of The Dark Rainbow OXP - it comes from the
Caduceus OXP, and pls remember that
The Dark Rainbow OXP's install process is a sort of 'piggyback' atop the Caduceus OXP. As I'm writing this, the Caduceus OXP currently available for download -
Caddy wiki page HERE and
Caddy zip file HERE - is still at the same 2010 version that I originally based The Dark Rainbow OXP on.
For everybody's convenience (including mine, of course)
I'll paste below not only some relevant links but also the applicable code and instructions. This post might become a bit long but should encompass all the important stuff in one fell swoop.
Here we go:
***BACKGROUND***
1. This is my
ORIGINAL POST reporting an issue I was having: the DCN script from the Caddy / Dark Rainbow was being choked under the ChupacabraHUD.oxp. After this post, a LOT of people chimed in with advice.
2. Fast forward (on same thread of #1.) to
THIS POST by Eric Walch where he performed some awesome magic and proposed a change to the DCN script from the Caddy / Dark Rainbow. That's where
the relevant code (see #C. below) comes from.
3. Then I made
THIS POST in the Dark Rainbow's own thread, drawing the attention of DR's Commanders to points #1 and #2 above and giving some instructions on how to go about all this.
4. And finally we make things a lot simpler by pasting all of this shebang right here in a (hopefully) helpful manner. So what needs to be done is:
***RECIPE***
A. WHAT to update:
sdrubble wrote:the DCN script contained in the current Neocaduceus download
which
sdrubble wrote:BTW it's the script.js
file in the Config
folder.
B. HOW to update:
sdrubble wrote:It's just a matter of
commenting (with leading [b]'//'[/b]
) all the lines of the
this.checkSystems
function (i.e. ,
up to the start of the
this.repairSystems
function), and
pasting Eric's code in its place.
EDIT: duuuh... rather, paste the new code BELOW the commented lines, actually!
C. CODE to be pasted: (this comes from Eric Walch - see
#2 above)
Code: Select all
this.checkSystems = function()
{
this.playerDamagedList = [];
var equipment = player.ship.equipment
var listCounter = 0 ; // reset the counter
for(listCounter = 0;listCounter<equipment.length;listCounter++)
{
if( player.ship.equipmentStatus(equipment[listCounter].equipmentKey) !== "EQUIPMENT_DAMAGED")
{continue}
var scriptEqInfo = EquipmentInfo.infoForKey(equipment[listCounter].equipmentKey).scriptInfo;
if((scriptEqInfo.thargoidRepairBotChance === undefined
|| isNaN(scriptEqInfo.thargoidRepairBotChance))
|| (!isNaN(scriptEqInfo.thargoidRepairBotChance)
&& scriptEqInfo.thargoidRepairBotChance > 0))
{
this.playerDamagedList.push(equipment[listCounter].equipmentKey); // if it's broke and fixable, add it to the list.
}
}
}
Puff - I think that covers everything now. If anything isn't clear enough, pls gimme a shout !