Skip to main content
GameDev.net gamedev.net
🔒 Locked

Laws/edicts system for 4X

Started by Acharis Jun 15, 2015 at 7:37 PM 17 replies 6.5k views
Original Post
Acharis
Acharis

A space builder (4X) where you play as the Emperor, the focus is on macro not micro (you don't build planetary infrastructure manually (it's not allowed), it's constructed automaticly by the AI).

You can affect what is built (like if you want more food and require more farms) on a planet by 3 ways:

1) what kind of planet you colonize (a desert planet will never build farms :))

2) you can set specialization of a planet (food, mining, industry, refinery, administration), such planet will tend to build more of the requested buildings

3) you can enact empire wide laws, decrees, edicts that would affect the production/infrastructure

The question is, how the 3) can be done? Note: it's OK to make it more complex if needed (the game is from the point of view of the Emperor that rules hundreds stars, so a more complex laws system is compatible here).

To make this topic rolling an example solution: lame, overused and unthematic sliders "agriculture slider", "mining slider", "manufacturing slider", "refining slider" :) Then the AI adjusts construction of new buildings by the position of these sliders.

Dragonsoulj
Dragonsoulj




1) what kind of planet you colonize (a desert planet will never build farms smile.png)


But...I like my moisture farms....
Dragoncar
Dragoncar

I think that rather than directly setting the amount of agriculture, etc. you can issue an edict that grants positives or negatives to planets for following or not and and then have the planet decide if this is enough of a benefit for it to follow. For example the bonus might be donation for special civil buildings for food production, if the planet doesn't care about civil buildings but can easily produce more food then they would follow any way but if it is going to be difficult (eg. no space and have to remove other buildings) then they won't follow, on the other hand a planet that values civil buildings largely may take be willing to try harder to earn the bonus.

You could also have edicts that allow for greater amounts of pollution on planet types (or less) that would influence planets to develop more or less industry for example (or produce agriculture if this counts towards reducing pollution).

Brain
Brain




(a desert planet will never build farms smile.png)

And why not?

Who says that a farm must only produce food? Ever read dune? :)

On a more serious note, how about you just set your policy as a set of laws with tickboxes, in the same way simcity 3000/4000 do with the local bylaws like 'nuclear free zone'. Various combinations of ticked options would provide for a massive number of possible outputs (different results and playing styles) with very little coding up front needed by you and very little impression of micro management.

Polama
Polama

Guilds could be a fun way to theme up a slider system. The Farmers Guild tries to obtain subsidies, research grants, etc. for agriculture. They try to get planets designated as "priority farming worlds". The miners guild does likewise for mineral extraction. The Entertainers Guild for happiness granting structures, etc. As Galatic Emperor you give or withdraw your support to a guild to change how influential it is. You could order your propaganda arm to teach the worlds how important farming is. Or you could have the head of the miners guild framed if he's grown too powerful. Events would shift guild power outside your control, to try to give a feeling of guiding the fate of the galaxy, but contending with conflicting agendas.

If there happens to be a balance issue with focusing too narrowly on one aspect of development (e.g., turtilng and going all tech focused is over powered), you could use corruption as a countermeasure: As guilds become more and more powerful, corruption and bureaucracy consume more of your resources.

DanglinBob
DanglinBob

I really like the elegance of Brain's suggestion. Passing laws should be very blunt instruments with some kind of thematic hook. IE: A Greener Tommorrow which is about focusing the entire empire on environmental conservation (with a huge variety of effects and impacts). Then you begin mixing these things together "Nuclear Power In Every Home" which has its own impacts and after a couple law passings you have a very weird place full of mildly conflciting policies that is radically different from where you started.

Acharis
Acharis

I realized there are actualy two things here: a product and a building. Like if there is a food shortage it does not necessarily mean the player has to/wants to increase the rate of building new farms... Instead/in addition there could be a law like "subsidy food production - it makes farms +10% more efficient".

Actually, the key is to give the player the tools to deal with a problem (food shortage, minerals shortage, too low industrial output) which does not always have to deal with building new farms/mines/factories. Hmm...

powerneg
powerneg
Well, you could just let the player give subsidy/settings to the groups of specialized planets.
Stani R
Stani R

Consider a system like in Rome2/Attila. You assign governors to regions and can also pass edicts in those games. Edicts are region-wide (in your example, they could affect all planets in a system, for instance). Edicts give some small bonus to one or more game features - increased happiness, increased tax income, more unit recruitment slots, cheaper production, better spies, increased scan range whatever. The possibilities are literally endless and depend mainly on your game design and balancing. You could counteract it for balance purposes as well - for instance, maybe a "Technocracy" edict gives a bonus to research on every planet in the system at the cost of reduced tax income (money is funneled into research grants).

Acharis
Acharis



to regions
I don't want regions in this game (it does not fit other mechanics). Only a planet and empire wide levels.
cyberpunkdreams
cyberpunkdreams

Why not eschew sliders altogether and do it the way it's done in the real world -- with the stick and the carrot. Laws, tax breaks, trade incentives, handouts, etc. Want more food production? Lower taxes on agriculture, etc. And then Rome 2 or SimCity-style edicts (as stanirya mentioned) to add more flavour.

Acharis
Acharis




Guilds could be a fun way to theme up a slider system. The Farmers Guild tries to obtain subsidies, research grants, etc. for agriculture.
I was thinking of corporations. You as the Emperor can grant monopoly to a corporation, then based on which corporation has a monopoly you get that effect "SpaceBurgerKing: +5% to farms efficiency, +10% more likely for planetary governors to invest in farms". There is some limit how many monopolies can be in the Empire (flexible, like 1 monopoly +1 monopoly per 50 planets).
Mutt
Mutt

It really depends on the mechanics and their depth, If the goal is to make the game about macro decisions then here are some suggestions:

- Each planet has its own sliders/qualities, this are unchangeabe by the emperor.

For example a desert planet will have low agriculture, therefore the people there won't be building stuff that just doesn't pay off.

- Budget Sliders, or in this case, Infrastructure Construction Budget.

For example the emperor allocates a lot of money to finance the construction of agriculture, therefore the planets will start using this money to build farms, and maybe that desert planet will make a moisture/whatever top notch farm.

- Planet Governors, they have their own specialties and preferences which will influence what is built in the planet. (Appointed by the Emperor or elected by the planet's people, up to you).

For example the Governor of that desert planet has the trait, "Self-suficient" which is a trait that makes him want the planet to be self-suficient, therefore he will be prone to build those topnotch desert farms because the planet doesn't produce enough food to feed itself.

Acharis
Acharis




- Budget Sliders, or in this case, Infrastructure Construction Budget.

For example the emperor allocates a lot of money to finance the construction of agriculture, therefore the planets will start using this money to build farms, and maybe that desert planet will make a moisture/whatever top notch farm.
Hmmm, that actually makes a lot of sense. You have "industry/sector type priority" (1-9) and you set it for agriculture, mining, industry, refining, etc. This affects the odds which sector will be improved next on a planet (assuming it makes sense, desert planets would behave as if these always have 0 agriculture, unless you go for 7+ priority where it starts behaving irrational and try to build farms even on desert planets - as long as it is capable of at least a minimal food production).
Brain
Brain

he will be prone to build those topnotch desert farms because the planet doesn't produce enough food to feed itself.


That doesn't make too much sense to me because an advanced space faring civilization will just bulk import water from nearby comets for desert worlds and other inhospitable places. There's enough water in the average comet to fill lakes the size of the great lakes on earth, after all... why go to the effort of trying to pull it from the local environment?
thatguyfromthething
thatguyfromthething
Well, in code I have something like a list of bonuses. Then I can create a [fill in the blank] in this case a law to enact, then it adds up all the laws and calculates the bonuses for each item as needed. You still have to determine what these core bonuses will do in the game and make them work. But you would basically check every turn/day/hour/whatever and see what changes. Then you would look at "production ability" bonus for example and then use that to check each turn if new factories were built (or whatever). Or to decrease the price of the player/AI building factories. Once you have the basic pattern down then it becomes easy to add new bonuses. Kinda vague but hope this helps a little.
This is my thread. There are many threads like it, but this one is mine.
Acharis
Acharis

Or maybe laws/edicts/settings based on planet type? Like "encourage agriculture on swamp planets [YES/NO]"?

powerneg
powerneg

I don't understand why you won't just let the player set which group a planet belongs to;

it would only need "micromanagement" when setting the group(generally when the colony has just been established)

If you don't want some kind of connection to the map(border-colonies in the military group) i recommend to see the planets as "economic potential"

for example:
edict: research agriculture

total progression-cost : 5.000 RP

turn cost: 100 RP

bonus: +5% for every swamp-colony

So with 10 swamp colonies the player would pay 100 RP / turn and receive 150 RP towards the competion of this edict

Other edict: Allow commercial traders more freedom

effects: +5% taxes for rocky planets, -10% tax-income for low-developed colonies, +5% tax-income for high-developed colonies.

Acharis
Acharis




I don't understand why you won't just let the player set which group a planet belongs to;

it would only need "micromanagement" when setting the group(generally when the colony has just been established)
Two issues, the first the player would micromanage things (set a single planet as type X, then pass edict "do something on all X type planets", then change the type of the next planet and repeat), the second is the mood, I want the feel of a grand empire where the player does not *think* about management of an individual planet, also groups of planets do not fit the map...

I could go for it, if it wasn't the player setting these groups. For example if planets over time get auto promoted from low developed to high developed or belong to a group based on the proximity to the homeworld (central core worlds and frontier worlds) or based on population or time of acquisition (high pop world/new settlements).

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.