Re: BlackJacks bullion mission addon
Posted: Tue Jun 05, 2012 11:08 am
Yoink!
Thank you
Thank you
For information and discussion about Oolite.
https://bb.oolite.space/
Thanks, I put this link on its wiki page.Wildeblood wrote:Talisker wrote:licensing permitting, obviouslyhttps://www.box.com/s/1b042baf433f0bb92059this.name = "blackjacks"
this.author = "Rustybolts"
this.copyright = "Do with as you wish"
this.description = "Starts in Galaxy 2 at Telace.";
I don't know anything about it; I've never played it and never poked around inside it. I did not hesitate to upload it the other night because I can vouch for my copy being unchanged from the last version RustyBolts published; I cannot, however, vouch for it actually working.richard.a.p.smith wrote:Hi. Given recent updates, should this work with 1.76.1?
runScreen
is different from the syntax of the removed runMissionScreen
. They're not the same thing.Code: Select all
if (guiScreen != "GUI_SCREEN_MISSION" && player.ship.dockedStation.isMainStation && galaxyNumber==1 && !missionVariables.bolts && system.ID==241){
mission.runMissionScreen('revengebolts_briefing','pod.png');
mission.setInstructionsKey ('bolts1');
missionVariables.bolts='STAGE1';
}
I already looked there. It's too cryptic for me to ken.Commander McLane wrote:See here.
Code: Select all
mission.runMissionScreen('revengebolts_briefing','pod.png');
Code: Select all
messageKey:'revengebolts_briefing', model:'pod.png'
runScreen
(the second parameter would be the callback function if there were any), thus we need to combine them into one parameter with brackets:
Code: Select all
{messageKey:'revengebolts_briefing', model:'pod.png'}
runScreen
:
Code: Select all
mission.runScreen({messageKey:'revengebolts_briefing', model:'pod.png'});
I'm flattered that you over-estimate my kenning ability.Commander McLane wrote:It's not that cryptic.
Should probably work. Since 1.74 we have a better trigger for showing mission screens. I would propose the following:Wildeblood wrote:Let's try this: https://www.box.com/s/ed1c019b87b021ee54db
Code: Select all
this.name = "blackjacks"
this.author = "Rustybolts"
this.copyright = "Do with as you wish"
this.description = "Starts in Galaxy 2 at Telace.";
this.version = "1.2.6 (1.22)"
this.missionOffers = function()
{
if (player.ship.dockedStation.isMainStation && !missionVariables.bolts && system.ID==241){
mission.runScreen({messageKey:'revengebolts_briefing', background:'pod.png'});
mission.setInstructionsKey ('bolts1');
missionVariables.bolts='STAGE1';
}
if (player.ship.dockedStation.isMainStation && missionVariables.bolts == 'STAGE2'){
mission.runScreen({messageKey:'revengebolts_firearms', background:'firearms.png'});
mission.setInstructionsKey ("bolts2");
missionVariables.bolts='STAGE3';
}
if (player.ship.dockedStation.isMainStation && missionVariables.bolts == 'STAGE3' && system.ID==233){
mission.runScreen({messageKey:'revengebolts_robbery'});
player.ship.awardCargo("Firearms",1);
missionVariables.bolts='STAGE4';
mission.setInstructionsKey ('bolts3');
}
if (player.ship.dockedStation.isMainStation && missionVariables.bolts == 'STAGE4' && system.ID==127){
mission.runScreen({messageKey:'revengebolts_flee', background:'vipers.png'});
player.ship.bounty = 64;
missionVariables.bolts='STAGE5';
mission.setInstructionsKey ('bolts4');
}
if (missionVariables.bolts=='STAGE5'){
player.ship.bounty = 64;
}
if (missionVariables.bolts=='STAGE6'){
player.ship.bounty = 64;
}
if (player.ship.dockedStation.isMainStation && missionVariables.bolts == 'STAGE6' && system.ID==67){
mission.runScreen({messageKey:'revengebolts_finish', background:'end.png'});
player.credits+=9500;
missionVariables.bolts='STAGE99';
player.ship.bounty = 0;
mission.setInstructionsKey (null);
}
}
this.missionScreenOpportunity = function()
{
if(!player.ship.docked || galaxyNumber != 1) return;
this.missionOffers();
}
this.shipExitedWitchspace = function()
{
if (system.ID==99 && galaxyNumber==1 && missionVariables.bolts=='STAGE5'){
system.legacy_addSystemShips("witness", 1, 0.10);
}
if (system.ID==88 && galaxyNumber==1 && missionVariables.bolts=='STAGE1'){
system.legacy_addSystemShips("bolts", 1, 0.10);
}
}
missionScreenOpportunity
also allows to skip the test for a missionscreen. The opportunity only fires when it is correct to show them.Code: Select all
player.ship.awardCargo("Gold",20);
Code: Select all
player.ship.manifest.gold += 20;
Done.Eric Walch wrote:Since 1.74 we have a better trigger for showing mission screens. I would propose the following:Its based on your new code were I changed the triggers. UsingCode: Select all
this.missionScreenOpportunity = function() { if(!player.ship.docked || galaxyNumber != 1) return; this.missionOffers(); }
missionScreenOpportunity
also allows to skip the test for a missionscreen. The opportunity only fires when it is correct to show them.
I saw that, too. Already done.Eric Walch wrote:One other thing is 'risky' in the original. The used images have names like 'end', 'firearms', 'vipers' etc. And because all images of all oxps go into one big image pool, there could be another oxp using those same names. Unique names are always better. e.g. by preceding them with 'blackjacks_'
Done. I fixed one of my pet peeve grammatical errors in the mission text, and changed the version numbers on the scripts to 1.2.7, and updated the wiki, so there's no confusion that-Eric Walch wrote:and in one of the ship scripts I find:That is also deprecated some time ago. Should be:Code: Select all
player.ship.awardCargo("Gold",20);
Code: Select all
player.ship.manifest.gold += 20;