problem with a The Feudal States mission

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

Moderators: winston, another_commander, Getafix

Post Reply
DGill
---- E L I T E ----
---- E L I T E ----
Posts: 292
Joined: Thu Jan 01, 2009 9:45 am

problem with a The Feudal States mission

Post by DGill »

On the mission to recover cargo I can scoop the cargo from the Boa but it does not register on my ships cargo manifest or in the oolite-save file:

<key>mission_feudal_mission_cargocount</key>
<string>0</string>

Also have a problem with the escort mission - I get a message saying we can take it from here and in the oolite save file it says:

<string>ESCORT_SUCCESS</string>

but I get no message on docking and the ship's mission screen is not cleared.

Note:

Moving:

if((missionVariables.feudal_mission == "ESCORT_SUCCESS") && (system.ID == [missionVariables.feudal_mission_location_no]))// standard response for an escort success on docking at destination

{player.credits += missionVariables.feudal_mission_rewardmission.runScreen({messageKey:"feudal_mission_escort_success"})
mission.unmarkSystem([missionVariables.feudal_mission_location_no])
missionVariables.feudal_mission = "NONE_SET"
missionVariables.feudal_score += 20
mission.setInstructionsKey()
}


from after - // response screens for missions that don't end at the Royal Court

to after - // standard responses for missions returning to the royal court

seems to solve the escort mission problem

Note:

The problem with collecting cargo during the raid mission seems to be line 202 of feudal-target.js

missionVariables.feudal_mission = "RAID_SUCCESS"}

it stops cargo scooped being counted. Success perhaps should be based on destroying the three ships and collecting their cargo
DGill
---- E L I T E ----
---- E L I T E ----
Posts: 292
Joined: Thu Jan 01, 2009 9:45 am

Post by DGill »

For the raid mission, deleting line 202 of feudal target and adding to feudal-mission:

if(missionVariables.feudal_mission == "RAID_RUNNING" && (missionVariables.feudal_mission_home == expandDescription("[%H]")))
{ missionVariables.feudal_mission = "RAID_SUCCESS"

seems to work

also I think line 214 of feudal target should be (ie a '-' before knight):

if(missionVariables.feudal_mission == "ESCORT_RUNNING" && this.ship.primaryRole == [missionVariables.feudal_mission_house]+"-knight")
User avatar
Ramirez
---- E L I T E ----
---- E L I T E ----
Posts: 628
Joined: Mon Nov 07, 2005 9:52 am
Location: London, UK

Post by Ramirez »

Thanks - you're getting to know all the foibles of this OXP pretty well!

Fixed the problem with ESCORT_SUCCESS - I didn't quite have some of the curly brackets in the right place. The script has to differentiate between briefings that take place when you're returning to a royal court or when you're just at the main space station. Looks like I hadn't quite got this right on some of the events.

I see what I did on the raid mission. The intention is to trigger the RAID_SUCCESS as soon as one of the targets is destroyed, but then to count the amount of cargo the player scoops up afterwards. So, for both the raid and escort missions, I'll change feudal-cargo.js so the variables it looks for are "RAID_SUCCESS" and "ESCORT_FAIL".
Download Resistance Commander plus many other exciting OXPs HERE
DGill
---- E L I T E ----
---- E L I T E ----
Posts: 292
Joined: Thu Jan 01, 2009 9:45 am

Post by DGill »

Thanks Ramirez :)
DGill
---- E L I T E ----
---- E L I T E ----
Posts: 292
Joined: Thu Jan 01, 2009 9:45 am

Post by DGill »

Regarding the ransom mission, for it to work I had to alter line 661 of feudal-mission.js from -lord to -prince

and line 12 of feudal-escape-pod.js to

this.ship.displayName = expandDescription("[mission_feudal_mission_rank] [mission_feudal_mission_of] [mission_feudal_mission_house]")

and at line 32 of feudal-targets.js :

if(missionVariables.feudal_mission == "RANSOM_RUNNING" && this.ship.primaryRole == [missionVariables.feudal_mission_house]+"-prince")
{
if(this.ship.displayName == this.ship.name)
this.ship.displayName = expandDescription("[mission_feudal_mission_rank] [mission_feudal_mission_of] [mission_feudal_mission_house]") // Show the ID of the ransom target target
if(this.ship.primaryRole == missionVariables.feudal_mission_role)
{this.zETimer = new Timer(this,this.zeroEscorts,null,0.2)}
if(this.ship.primaryRole == [missionVariables.feudal_mission_house]+"-knight")
{this.ship.setAI("feudal-escortAI.plist")}
}
Post Reply