Page 1 of 1
Can I change the behavior just by hacking the scripts?
Posted: Sat Feb 06, 2010 5:00 pm
by wades
This is probably a question I could answer by dredging through the forums but I'm lazy and anyway, the best way to get an answer is to ask someone who knows, says me.
Anyway, I'm looking at the Lave Academy OXP and would like to nerf the difficulty of the gunnery course temporarily. I'm guessing that I can edit shipSpawned() in laveAcademy_targetDrone.js to something like
Code: Select all
this.destructTimer = new Timer(this, this.selfDestruct, 90);
to make all of the drones last 90 sec. before they self-destruct. Am I right?
Posted: Sat Feb 06, 2010 5:26 pm
by Thargoid
You could do it that way, or alternatively if you look at the top of laveAcademy_targetBuoy.js, right at the top in the function this.examStart is the line:
missionVariables.laveAcademy_droneLifetime = 30;
Change the 30 to whatever lifetime you want to give the drone. Personally I found 30s to be plenty for the early ones, and just the right kind of challenge for the latter ones.
Oh, and remember what happened to Cadet Kirk after the Kobayashi Maru
Posted: Sat Feb 06, 2010 6:21 pm
by wades
Is there some kind of build step I have to do?
After editing the script, I just launch Oolite and my changes don't seem to be taking effect. I added a
Code: Select all
player.commsMessage("Using hacked drone lifetime", .5);
and I'm not seeing that. This is still in laveAcademy_targetDrone.js!shipSpawned() btw.
Posted: Sat Feb 06, 2010 6:24 pm
by Cmdr James
Hold shift key while starting to make sure it reloads OXP data.
Posted: Sat Feb 06, 2010 6:24 pm
by Griff
after editing files inside an oxp, then next time you start Oolite you have to hold down the Shift, press it straight after clicking on it's icon and keep it pressed down untill the spinning cobra comes up on the title screen. this gets Oolite to clear out its cache of oxp files and makes it reload them all in again
edit: i got ninja'd!
Posted: Sat Feb 06, 2010 6:56 pm
by wades
OK, clearing the cache worked. Thanks.
I'm still finishing the test in about the same time (11 min or so) but I'm killing most of the drones now.