tukkek / javelin

Party-based roguelike (open-source strategy-RPG game).
https://javelinrl.wordpress.com/
64 stars 7 forks source link

Town quests #95

Open tukkek opened 7 years ago

tukkek commented 7 years ago

Each district Trait has a type of Quest associated with it. Weh a quest is generated it pick a random Trait out of the ones a city has and generates it as the active Town#quest. A Town without traits doesn’t generate quests.

Chance of creating a quest is once per season (1/100) on Town#turn(). Only one quest is available per town.

int reward #rewards can be either redeemed as treasure(el=reward) or +1 labor per $reward days
int deadline #all quests must be completed in 1 season (100 days) from the day they are generated
Boolean done() #if false doesn’t even create one
clone() #used when instantiating a new quest from Government#quest
generate() #quantifies details after cloning (mostly used to record rewards)
String describe() #describes quest objectives, rewards and progress
Boolean complete() #usually used to process #reward but but can be overwritten for custom rewards, may return false if the quest was failed
List<Location> reveal() #many quests involve target locations, use this to reveal them on the map

Quest radius: district#size*2

Quest types

All quests are cleared when the town is captured by monsters. Show a "level up" overlay when there's a quest available.

tukkek commented 7 years ago

A cool expansive quest would be to have you deliver a parcel to another town. This would encourage you to travel the map and visit other locations periodically - possibly even chaining them dinamically (you go to a town but that town has a quest sending you elsewhere).

tukkek commented 5 years ago

Achievements could also be a source of inspiration for town quests:

tukkek commented 5 years ago

Town happiness could range from -2.0 to +2.0 (revolting, unhappy, neutral, content, happy). Each point adds a 25% chance of getting positive or negative event cards, respectively and ±5% labor output.

Each quest failed adds -.5 happiness while a quest completed adds +.5. Each day happiness goes 1% closer to 0.

Town#happiness is a float. The rest is encoded through javelin.model...town.Happiness.

General Events can raise or reduce Happiness by ±.5. Having an enemy inside a district drops Happiness by another 0.5. A Celebrate labor adds .5 happiness as long as the city isn't already happy or revolting.

Buildings can add 1 or 2% happiness per day (in particular Cultural #49 and Religious #65).

A captured city is always set to unhappy.

tukkek commented 5 years ago

Purification (magical): when generated, the quest will place 1d4 quest markers, each being an EL=population of magic creatures. The player needs to clear those and will receive 1 ruby on completion. If not completed, each unbeaten place will become an Incursion instead.

tukkek commented 5 years ago

Tome of knowledge (magical): new Dungeon Feature, which is basically a chest with this Item. Can be sold as any item for cash (base value equal to half dungeon EL) or returned as a quest for full quest rewards.

tukkek commented 5 years ago

Martial master (military): bring one non-mercenary unit to a relevant rank in one of the Town academies.

Magic master (military): have one non-mercenary unit learn a relevant-level spell (or higher) from one of the Town guilds.

tukkek commented 5 years ago

Pest control (natural): animals have invaded one of the Town locations, clear it out.

Ruffians (criminal): a group of elites invaded one of the Town locations, clear it out.

tukkek commented 5 years ago

Wanted (criminal): a Escapee actor is generated and must be chased until he reaches another Town.

tukkek commented 5 years ago

Pilgrimage (religious): a quest marker is placed up to 3 x District radius, the player needs to go there. This is repeated a number of time equal to Town rank (randomized). Each new location is generated, placed and revealed only when the previous one is reached (and removed).

Each location deposits a number of pilgrims (monks, clerics and paladins), easy as a group, to the player party. At least one must be alive when reclaiming the quest reward. This needs to be a subclass of Combatant which will hold a reference to the Quest (and vice-versa) so that upon cancellation or completion they will be removed from the game.

How to make them not sap XP or be able to "hide" on academies and such and avoid being reclaimed? Maybe the best option is to make them mercenaries but have a #pay() method always return zero.

tukkek commented 5 years ago

Deliver slaves (criminal): get 1d4 slaves from a quest marker inside town (or nearby) and deliver them to another criminal Town. Upon receiving the slaves, they can be immediately fred, which will adjust reputation but fail the quest. If all slaves die, the quest is cancelled regardless and the slaves expire if the quest timer expires.

tukkek commented 5 years ago

Raid (criminal): a quest marker is placed nearby. On reaching it, the players need to decide if they want to turn on their would-be allies in this raid to protect the innocent or if they will go on with the raid - either way Reputation is adjusted. Turning on the attackers fails the quest.

The "ally" raiders are a Difficult encounter. The defending party should be a Difficult encounter when raiders and Squad are combined. Raiders are mostly criminal kits (rogues, fighters, assassins...) while the defenders can be any kit.

This means that turning on the raiders is always the easiest choice when it comes to battle difficulty - but that means not receiving the reward, instead getting only a fraction of it from the defending party as thanks.

tukkek commented 5 years ago

Fence (criminal): the city will pay full price for any Item in-between half and full reward price. Only non-equipped items are considered.

tukkek commented 5 years ago

Find hideout (criminal): 1d10 hideouts are marked on the map (up to twice city district size?). On finding the right one, all other ones are removed and a battle starts immediately with a group of rogues where EL=population.

tukkek commented 5 years ago

Quest marker: a temporary Actor that exists to represent a quest location. Their constructor receives a Town, a maximum distance from Town (for example district size*3) and whether to announce its placement to the player (usually false).

On being placed a quest marker is automatically revealed and on quest expiration all existing quest markers are removed.

tukkek commented 5 years ago

Out of favor (criminal, military, mercantile, magical..): if the town is already revolting, they will put a bounty on the player's head. Failing to come address the situation and paying a gold(r(population-1,ṕopulation+1)) fee, they will receive a major Reputation penalty.

tukkek commented 5 years ago

Assassination (criminal): a quest marker is placed. The Fight map is either a Town map or a Building map (new urban fight map). The Fight is difficult, with a director keeping it that way, but as long as the player can kill the one Elite unit, waves will stop coming and he will be victorious (Fleeing is also acceptable). Only one chance is given and the quest is failed otherwise.

tukkek commented 5 years ago

Heist (criminal): a quest marker is generated inside town, and the player has to assign one Combatant for each relevant skill. The DC of those checks are equal to 10+population. At least half of the skills must be successes or the quest is a failure.

Implementing intimidate #188 would be welcome prior to this.

Similar scenarios can be made for other Town traits: diplomatic mission (expansive), research team (magical), surveyors (natural), negotiations (mercantile).

tukkek commented 5 years ago

Steal (criminal): a quest marker inside the town district that hides a Dungeon stylized as a manor. Size varies with Town rank, and EL=population. All encounters are against intelligent humanoid elites (possibly of the same race, relevant to the Terrain). There are no dungeon features, only treasure Chests and a Goal (which must be taken before leaving the dungeon, otherwise the quest is failed).

Carefully selecting the available Templates should help with achieving a house-like look-and-feel.

tukkek commented 5 years ago

Sabotage (criminal): cancel a Construction Site that is over 50% done.

tukkek commented 5 years ago

Become X reputation with certain Town: Town must be discovered; Rank is either one higher or one lower than the current one depending on whether alignments between towns match or not.

Liberate Town (military, mercantile): Town must be discovered and hostile. Questing town population must be higher or equal to target Town.

tukkek commented 5 years ago

The base quest class should have a radius around the town in which quest objectives could be placed. This radius would start being equal to twice the District radius but would grow by another District radius with a 50% chance, cumulatively. This would result in most Quest locations being close by but still give a chance of having far-reaching quests that promote travel, exploration, etc.

Base methods to help deal with placement would also be helpful, if not there already.

tukkek commented 5 years ago

The UI could help with showing off what Locations are quest-related or not. A simple solution would be to have a crown symbol on the top-left corner, a more elegant one would be to, in addition, highlight those locations on a Town mouse-over or when you're standing in one (or more, at once) Districts. The second part is probably better left for 2.0 to avoid reworking on interface code.

Having a Location#isquest=true would probably be very error prone. A more stateless approach of iterating each Town for active Quest#targets would probably be easier, even if that is done through a boolean Location#quest() method.

tukkek commented 3 years ago

Leaving #247 open to finish the current Quest (re)implementation, this issue would serve better as an ongoing long-term source of inspiration and content for future releases.

tukkek commented 3 years ago

Expansive/mercantile: infested crops. Early on would be a simple Fight on Farmlands against vermin but on later levels would be a Horde-style battle with a big number of enemies, possibly made elite at random so that some only receive a few levels while others are champions. Something like 1d8 vermin per tier sounds right. To give the map a more "actual farm" feel, either double the amount of obstacles or draw extra lines of crops.