Continuing missionrefactor tasks:

see PR41, PR43, PR58

Benedict

Korolov / Charon Fortress

Eridani Raisu / Centauri occupation

Merchant Prince Hotel

Battle Arena

  • [Done] Custom mission assignment code to integrate with gladiator selection
  • [Done] Converted Katami rescue to MissionType (should help with 4326, 70127)
  • [Done] Converted Melee to MissionType
  • scKateMorgentalCruiserArena no longer used - could move to HSCompatibility?
  • No mission logic or dockscreens left in stBlackMarketRigelAurelius - could replace with normal stBlackMarketStation?

Blackmarket

St Kats

  • [Done] Need to support multiple missions givers at single station
    • There are some minor issues when mission intervals or maxPerStation for the Militia affecting the Taikon or Hospital missions.
  • [Done] Converted Militia mission
  • [Done] Converted Dall mission
  • Could implement School of Engineering as a mission
  • Need to restore Dall mission aftermath text

Huari

  • [Done] Moved intital generic missions to HumanSpace
  • [Done] Convert Huaramarca missions

PointJuno

  • [Done] Converted missions

Terra/Antarctica

  • [Done] RPGCharacters for Helios
  • [Done] Converted Dantallion Informant and Antarctica Escape
  • [Done] Convert Terra and Decker

Heritic

  • Move missions to SotP

Code

  • Added rpgMissionGetAssignment function which is the same as rpgMissionAssignment except it returns the mission object (or Nil) rather than displaying the dockscreen
    • Can be used when we need complex behavior for the no mission available case (e.g. Battle Arena, or integrating missions and rumors in a single dockscreen action)
  • Added rpgCharacterIsKnown to check if player has met a character Change rpgCharacterGetQuickRel to only return Nil for characters which have not been met.

See Also:

giantcabbage 14 May 2017:

For the black market delivery mission I have added a new type unidRPGPaneInitMission which calls the OnPaneInit event on any active mission with the paneInitMission attribute. i.e. it's basically a <OnGlobalPaneInit> equivalent to the delivery mission <GetGlobalDockScreen>

This way the same global event can also be used for the Katami kidnap mission (and any other missions which want to override dockscreen actions)

the_shrike 18 May 2017:

An issue I've identified with the new Korolov missions that doesn't really extend to a new ticket: Ships using the old data structures will fail-unsafe and give missions with no reward due to the lack of a level below apprentice in pre-1.7 ship-side code. It may be worth migrating value calculations over to the korolov side of things so that older ships with the old three-tier code will simply ignore that code, rather than defaulting to 0-value missions until you reach 'Apprentice' value.

Obviously this really only affects mods since the stock freighters are updated in 1.8a1, but as this wasn't a highlighted incompatibility (it probably should have been) I ran into this as an SM&M++ bug as my own ships lacked the four-tier data structure for cargo value.

giantcabbage 21 May 2017:

I hadn't realised that anyone had made a mod to add new freighters to Korolov. I was thinking about how to make it easier for mods to do so when I started the rewrite, but mostly I was working on converting the missions so some aspects of backward compatibility suffered - but that’s what an alpha if for ;o)

Anyway I’ve created a new branch to test some additional Korolov changes here

Korolov will use any freighters with the attributes +commonwealth +freighter and static data korolovMinLevel. The initial ships are still generated from the standard 6 freighters, but additional ships (from both traffic control and missions) will include new ships defined in mods

New ships will now appear in the Korolov Service Record and Freighter Data screens without having to modify the Korolov dock screens.

StaticData:

  • korolov.containerPrice = list of container prices for each level (example)
  • korolovContainerPrice = legacy "code-in-static data" method of calculating container price (example)
  • korolovEscortRate = escort fee as fraction of cargo value (100 = 1%)
  • korolovMinLevel = minimum player level required to escort freighter

Language:

  • korolov.shipDesc = descriptive text to use in Ship Data screen

When calculating cargo value we
1) try using the new korolov.containerPrice
2) try korolovContainerPrice (support 1.7 and earlier mods)
3) select a default value based on playerLevel

the_shrike 21 May 2017:

Nice tweaks. I'll certainly be using the ability to add new types to the Korolov missions...it's a great addition to the system.

You may want to add in an automatic filter by maximum speed (don't give missions for shiptypes with a max speed equal to or higher than the player's top speed, since there's a risk of copy-pasta ships accidentally getting into the mix. (Eg. Right now my EI100/S stealth-freighter is used only by corporate traders....but until I remove the copy-pasted code, it would get put into missions and promptly outrun literally every playership in the stock game.) While fixing the mods that add 'em is obviously best, having the code try making things at least possible for the player should help catch issues, and also help with slower playerships added by mods. Personally, I'll be checking all my own EI-series derivatives before your code goes live and start throwing them into missions.

nms 21 May 2017:

You changed the chance of the hotel encounter being a sting from 5% to 50%.

giantcabbage 21 May 2017:

You changed the chance of the hotel encounter being a sting from 5% to 50%.

Thanks - I've removed the 'test' code and put it back to normal!

nms 23 May 2017:
george moromisato 31 May 2017:

Point Juno and Antarctica missions should be HumanSpace.

But Heretic missions should be StoP.

giantcabbage 11 Jun 2017:

Added PR for Huari missions

Using thioseptal in Huaramaraca will point the player to the temple (not back to the gate)

Only the Fortress where you get the thioseptal will remind the player to use it (as the reminder is the InProgress message, other stations will just give the default no missions text. Could change this with a blocking mission / rumor in the future.

NoMissions message mentions the governor by name even if the player has not met them. Should add a generic message if the player has not met the governor

Intercept transport mission should be more likely to start from Sung station, but still needs work to avoid repetitive deep space missions.

johnbwatson 18 Jun 2017:

Outstanding.

giantcabbage 17 Sep 2017:

PJ / Antarctica / Terra pull request.

Heretic is the last big rewrite to go...

AttackInProgress message.

  • Could implement as a mission, but this would not override an active mission

Svalbard Explorer

  • Could implement as rpgCharacter mission, but that would probably work better if MeetingIntro was skipped for active player missions.
  • Or just write a svalbard dockscreen and call rpgCharacterSetMeeting directly

MRAD

  • Currently the anomaly exisits (and can be found) in every system
  • Could change the item/device so they can be reused in several different missions
    • Would allow generic research mission "find the anomaly" (or old wreck / dall sphere type item)
    • Could include interference from nearby ships / stations

St. Josephine Mission

  • Seems to have an old and unsed DonationTable