Bug #1501
Tracking / Prospection failure message
Status: | New | Start date: | 10/09/2012 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | - | % Done: | 0% |
|
Category: | Services: General | |||
Target version: | - |
Description
When prospecting for mats in an area with more than 1 deposit, certain combinations might return an invalid message. Take the following scene:
Deposit 1: 1 Choice material
Deposit 2: 1 Supreme material - weather condition invalid
Both deposits on the same area, or in the action range.
If I prospect for supreme materials only, deposit 1 will be discarded with the error NFStatEnergyDifferent (NFStatEnergyTooHigh?) and deposit 2 will be discarded with the error NFInvalidCurrentWeather. The expected message is the weather failure, indicating that there is a material I want in the area (but unavailable), but the error returned is about a different class available.
The current tracking/prospection implementation discards each of the available deposits in a sequence, and each deposit discarded returns a reason, that is stored in a list. If a material is not found, the first reason in a sequence is returned. The way this sequence is coded allows for a broader reason to replace a more strict one, like the one stated.
This is the filter sequence:
(Static Filter)
NFNoDepositHere
NFInvalidEcotype
NFNoDepositForFilter (material group/family)
NFStatEnergyDifferent
NFStatEnergyTooHigh
(Dynamic Filter)
NFInvalidCurrentWeather
NFInvalidCurrentTimeOfDay
NFInvalidCurrentSeason
NFSiteDepleted
NFNoLocalMaterialForFilter
NFStatEnergyDifferentLocal
NFStatEnergyTooHighLocal
NFCantSpawnSource
This is the 'failure' sequence (the selection of the reason to be sent to the client):
NFSiteDepleted
NFStatEnergyDifferentLocal
NFStatEnergyTooHighLocal
NFNoLocalMaterialForFilter
NFNoDepositForFilter
NFStatEnergyDifferent
NFStatEnergyTooHigh
NFInvalidEcotype
NFInvalidCurrentSeason
NFInvalidCurrentTimeOfDay
NFInvalidCurrentWeather
NFNoDepositHere
NFDepositDepleted
NFCantSpawnSource
I still have to think moure about it, but I think the 'failure' sequence should be the inverse of the filter, so the player knows how far he got in the selection process.
Suggested 'failure' sequence:
NFCantSpawnSource
NFStatEnergyTooHighLocal
NFStatEnergyDifferentLocal
NFNoLocalMaterialForFilter
NFSiteDepleted
NFInvalidCurrentSeason
NFInvalidCurrentTimeOfDay
NFInvalidCurrentWeather
NFStatEnergyTooHigh
NFStatEnergyDifferent
NFNoDepositForFilter
NFInvalidEcotype
NFNoDepositHere
Note that this way the dynamic errors (weather,season...) have a priority over the static ones.
This code is in the fg_prospection_phrase.cpp in the egs/phrase_manager folder.