Something like:

			<OnReward>
				(block nil
					(if (or (msnGetData gSource 'noHelp)
							(msnGetData gSource 'betrayal)
							)
						(msnSetData gSource 'reward 0)
						)
					(korGiveReward gSource)
					)
			</OnReward>
nms 26 May 2017:

Also, maybe the full success case should mention that the player was paid in the debriefing.

giantcabbage 26 May 2017:

It's probably best to alter the credit reward at the same time as the XP award is changed (either update reward in OnObjDestroyed, or move the missionXP update to OnReward)

For the betrayal it's probably worth distinguishing 'friendly fire' from a deliberate attack (i.e. killing the leader when there are no enemies nearby)

nms 26 May 2017:

update reward in OnObjDestroyed

That would cause the change to be reflected in the mission log. I'm not sure if that makes sense or not.

For the betrayal it's probably worth distinguishing 'friendly fire' from a deliberate attack (i.e. killing the leader when there are no enemies nearby)

That would allow for different dialog, and probably blacklisting if deliberate. But it's hard to detect totally reliably. For instance, if the player has some overpowered fragmentation weapon that kills the station and squad leader, it could show up as intentional. Avoiding this problem requires something like constantly tracking how recently there have been enemies in the player's vicinity.

giantcabbage 27 May 2017:

The mission log (name and summary) text is generated in the msnAccept function (after calling OnAccepted, OnStarted). Updating any of the mission data after the player has accepted will not be reflected in the mission log.

If you want to update the summary you have to explicitly reset it with (msnSetProperty gSource 'summary (msnTranslate gSource 'Summary)) as done in Benedict01

george moromisato 30 Jul 2017:

I made the following changes in 1.8 Alpha 3:

  • Reward is 1,000, 2,000, and 4,000 credits (depending on system level, which corresponds to strength of stronghold). There are no Korolov stations at higher levels, so no need for other rewards.
  • If the player declines the mission, reward is cut in half.
  • If the player is not within 300 ls when the stronghold is destroyed, reward is cut in half (and the debrief explains why the reward is lower).
  • If the player kills the squadron leader, but the stronghold is destroyed, the player gets no reward (and we explain why in debrief). We don't check the difference between accidental vs. deliberate fragging.
  • We tell the player how much they earned in debrief.