Buildings Model Quickpad

From FreeOrionWiki

Jump to: navigation, search

Contents

New

Empire Templates

What?

How?

Have a new xml file that contains "empire template" definitions.

Aside: Could perhaps be called a "culture", but this term might be used for something else as well. It probably can't be called just "empire" since in game, "empire" already refers to the set of planets and ships and related info that a player controls; I'll call this set the "in-game empire".

An empire template would be a attached to a player's in-game empire. At the start of the game, all players, Human and AI, would be assigned empire templates for their in-game empires. Multiple players' empires could have the same template. This would be like having two empires in MOO3 that are of the same race. They would be separately in-game empires, but based on the same empire template and thus would have the same starting techs and empire-specific bonuses or penalties.

Empire templates would act like techs that their associated in-game empire knows. They would have effects that would work just like tech effects, and they could unlock buildings. They would be different from techs in that they wouldn't appear on the tech screen, wouldn't be reserached, and in future, wouldn't be tradeable or stealable, and would never be referred to by in-character game text. By that, I mean that other empires in the game will probably specifically offer to trade for particular techs you know, so in-game characters know that "Techs" as a game concept exist. In-game characters would not know about "empire templates", however, and would perceive their effects as inherent to the in-game empires they are associated with.

To make a building unlocked at the start of the game, it would be added to the <unlocks> tag of the template.

Empire templates could, and IMO should, also replace many of the current hard-coded effect-type bonuses to planets. Until we add races, empire templates should include a set of effects that determine the maximum population numbers and default meter levels of planets. Planets should default to 0 for all their max meters, and would get the current hard-coded increases to max meters of planets from the effects of its empire template.

For now, since empires haven't been decided on and aren't scheduled for a while, there only needs to be a single "Default" empire template.

Also...

A similar mechanism should be created to replace all hard-coded adjustments to meters that occur in the game with effects-defined adjustments. These include:

Placing all these in effects makes modification simple, and allows variation between races or empires.

Building Availability

What?

Notable quirk:

How?

Enhanced Prerequisites

What?

How?

Future

Resources

Should have some concept of strategic resources. Should be able to requiring an empire to have access to a special resource and be able to supply that resource to the build location (ie. not being blockaded) See User:Geoff_the_Medio/Musings#Strategic_Resources.

Maintenance

We can already specify the maintenance cost for buildings, as indicated in the Effects page, but this idea needs to be extended to cover what happens if maintenance is not paid. This may be integrated with the following section, Building Enabling.

Building Enabling / Disabling

Buildings mostly (exclusively?) do their jobs through their effects groups, which already have activation and scope conditions. These are very useful and versatile, but they have some limitations that are problematic for buildings. In particular, we need ways to enable to enable or disable or change buildings' effects groups for reasons such as:

Solutions?

A mix of new effects and conditions and non-effects methods will likely be needed to impliment the desired functionalitly.

New Effect: ResetTimer, New Condition: TimerValue

ResetTimer: Sets building property: Timer, to 0

Each turn, timer is increased by 1 (automatically)

TimerValue: Works like MeterValue conditions. Has <max> and <min> fields. UniverseObjects with Timer properties between <min> and <max> are matched.

The timer value gives the number of turns since it was last reset. The TimerValue condition could be used to determine if a fixed number of turns has passed, or to schedule a series of effects groups on different turns.

New Effect: SetEnabling, New Condition: Enabled

Objects would have a new binary property "Enabled".

The SetEnabled effect would set Enabled to true or false (1 or 0).

The Enabled condition would match all objects which have Enabled = True.

The Enabled flag of an object would be altered in a manner similar to the meter values of production centres through various non-effects mechanisms. For example, if a building's maintainance is not paid, or a player uses the UI to disable a building, then Enabled would be set to false. The activation condition for the building's effects would have <Condition::Enabled/>, meaning the effects would only work for enabled buildings.

Sidenote: Turn off Maintainance

It would also be useful to be able to turn off or alter maintainance fees for buildings that the player has disabled through the UI. This could be done via fields in the building description like <enabledmaintainance> and <disabledmaintainance>, or through a more complicated effects-based system. The enabled / disabled flags should be sufficient, though.

Other Ideas

Building Visibility

Being able to set whether a building is visible to non-allied empires of the owner would be useful. This would ideally be separately settable while the building is under construction, and after it is finished. This would mean that some buildings are always visible to empires that can see into a system (before and after the buildigns are completed), but some are visible only when complete (not while under construction), or are never visible, or visible while under construction but not when complete. This could also be represented as a visibility rating, rather than just on/off, similar to the proposed starlane visibility system.

Having buildings be invisible would be useful for setting traps, or honeypot-systems, that look tempting, but which have major negative consequences for any invaders who capture it. Having buildings be visible while under construction and not when finished, or vice-versa, could make for interesting / fun races against the "clock" to keep something hidden, or sudden surprises when a finished building pops up unexpectedly... and also makes for a strong justification for espionage and detection technology, like with starlanes.

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox