Jump to content

0AD Economy Simulation Mod


Monder87
 Share

Recommended Posts

==/// ECONOMY SYSTEM MODEL UPDATE \\\==

Here is the Model of the Economy System so far, i will update this small section of the first message time to time

1203030846_EconomySystem.thumb.png.1b2c5b39d5dac79530feb7ed38f99c69.png

////////////////== END UPDATE SECTION == \\\\\\\\\\\\\

 

 

Hi everyone!! 

This is my second Topic in this forum and also the extension of a discussion started here that naturally evolved in a Mod Project. So here we are.

First of all i have to tell that i am not native english, i am Italian,  so please be patient with me for my grammar. :)

All started from the idea to create a economy structure of the game more complex, i feel all the cities i build  with so much effort during the game are just like ghost city, with not real live in it if not for the traders go up and down.... i wanted to have something overall more strategic, not focus on the military where the game is already quite strong, but on the civilian side. To give life to this cities i think is necessary develop their economy dimension, so for example add buildings like  Shops , Academies, Products, Markets (Extending that one already in the game) etc.. and Entities like Dealers, Traders, Professors, Artists, Nobles, Citizens, Slaves etc.

Starting from this very draft Idea i start developing is something more structured as follow below:

(All the Code of the Mod is freely available in this dedicated GitHub for who is interested to partecipate on the development don t hesitate to contact me.)

 

Goal 

Create a Economy System for 0Ad to give more Realism and add Strategy to the Game.

 

3 Main Concepts of the Economy System :

 

1 Economy Entities

Dividing the Military Unit from the Civilian , we focus just in the latter for our Economy.

Civilian Entity can Upgrade from Slave to Noble paying fee to special structure ( like Academy) or collecting a certain amount of experience ( calculated in money earned ).

There are two kind of entity in our model:

Passive: Earn Money from the resource gathering job

Active: Earn Money producing and selling products

We can say that Passive Entity are just Consumer, and Active are both Consumer and Producer.

All the Economy Entities consume product and resources, can stock products , have own money saved in them personal wallet and most important  they can spend or earn.

In more details:

Slave work for free and consume just some food the only owner is the State which account for the food and benefits of the resources gathered

Citizen the can earn and spend; they consume food and also other commodities like textile or wine, they can buy food from the State or from Food vendors, and the other commodities from the shops or in the market, the own the money earned but also the State own them: all resources gathered go to State which pay them producing money from free

Shops, Market, Circus are instead Structures which spend money to buy resources from State and resell them to Citizens offering different products from clothes exotic food  entreatment etc..also they need to pay a tax for each transaction to State

Nobles  instead they can own Slave and earn a percent for all the Lifecycles of them economy once they upgrade in the different economy entity described above. They Spend money for very expensive commodities and they influence the civ evolution like giving some very good benefits to win the game( not sure yet which one ) 

In more details:

 

State:

 Ownership:  Own

Spend : Money / Technology, Weapon, Diplomacy, Super Unit, Corruption etc..

Earn : Money/ VAT Tax, Monthly Tax, Resources, Villas, Castles

Consume: None

Produce: Money, Slaves, Market Building

Dedicated Building: Civ Center

 

 Slave:

Ownership: State, Nobles

Spend : NO Money

 Earn : NO Money

Consume: 1 Food[fish,fruit,grain,meat]/Day

Dedicated Building: No

Produce: Labor

  

Citizen:

Ownership: State, Own

Spend : Money / Products and Resources

Earn : Money/ Resource Gathered

Consume:

2 Food [fish, fruit, grain, meat]/Day

2 Food [wine, sausage, bread, steak]/Day

1 Clothes/Week ( will be produced by some Shop or 

1 Entertainment/Month

Produce: Labor

Dedicated Building: No

 

 Food Dealer: 

Ownership: Own

Spend : Money / Resources, Products

Earn : Money / Bread , Sausage

Consume:

4 Food [fish, fruit, grain, meat]/Day

4 Food [wine, sausage, bread, steak]/Day

2 Clothes/Week 

2 Entertainment/Month

1 Jewelry  

Produce: Sausages,Breads,Wines, Steak

Dedicated Building: 

1 Level : Street Vendor,

2 Level:  Locand, Bakery, Butcher

 

Clothes Dealer:

Ownership: Own

Spend : Money / Resources, Products

Earn : Money / Clothes 

Consume:

4 Food [fish, fruit, grain, meat]/Day

4 Food [wine, sausage, bread, steak]/Day

2 Clothes/Week 

2 Entertainment/Month

1 Jewelry  

Produce: Clothes

Dedicated Building:  

1 Level : Street Vendor,

2 Level:   Clothes Shop

 

Jewelry Dealer:

Ownership: Own

Spend : Money / Resources, Products

Earn : Money / Jewelry 

Consume:

6 Food [fish, fruit, grain, meat]/Day

6 Food [wine, sausage, bread, steak]/Day

4 Clothes/Week 

3 Entertainment/Month

2 Jewelry  

Produce: Jewelry

Dedicated Building:  

1 Level : Street Vendor,

2 Level:  Jewelry Shop

 

Trader:

Ownership: Own

Spend : Money / Resources, Products

Earn : Money /  Resources, Products Traded

Consume:

6 Food [fish, fruit, grain, meat]/Day

6 Food [wine, sausage, bread, steak]/Day

4 Clothes/Week 

3 Entertainment/Month

2 Jewelry  

Produce: Resources, Products

Dedicated Building:  

1 Level : Street Merchant,

 

Artist:

Ownership: Own

Spend : Money / Resources, Products

Earn : Money / Entreatment 

Consume:

6 Food [fish, fruit, grain, meat]/Day

6 Food [wine, sausage, bread, steak]/Day

4 Clothes/Week 

3 Entertainment/Month

2 Jewelry  

Produce: Entreatment

Dedicated Building:  

1 Level : Street Vendor,

2 Level:  Entreatment Building(Arena)

 

Noble:

Ownership: Own

Spend : Money / Resources, Products, Slaves

Earn : Money /  Tax from his former Slaves 

Consume:

20 Food [fish, fruit, grain, meat]/Day

20 Food [wine, sausage, bread, steak]/Day

10 Clothes/Week 

10 Entertainment/Month

10 Jewelry  

Produce: Technology

Dedicated Building:  

1 Level : Villa,

2 Level:  Castle

 

2) Money

Of course all is about money, so the first thing i did is to create the Money Resource.

The Player represent the State in my Economy System, perceive a Tax for every transaction done in its kingdom, ( ex. 20%) plus it can collect money selling resources to the producers and adding other fee after a certain amount of time. More glorious is his economy more money he can make.

 

3) Products

So far i created 8 products that can be sold: 

- Food:

bread, wine, steak, sausage

- Clothes

- Entertainment

- Jewelry

- Slave

Each Product has a price that change based on the Supply and Demand, they are being calculated by a PriceManager Component, which will calculate the demand and offer every tot amount of time, to give realism of the Economy Model.

 

 

What i Achieved so far ... 

 

As you can see on the image i took the template of  Female Support i add to the template EntityFinance, EntityConsumer and EntityProducer.

With EntityFinance Component  they can earn money every resources gathered, they automatically pay the tax to the State,  they can store all money in a Balance which has a maximum capacity , depending if are just citizen or nobles. or dealer etc..

With EntityConsumer Component i track the need of the entity, every time she work one algorithm calculate different variables to define is actual need.

these variables are 

- Product Daily Consuming, 

- Product Daily Availability,

- Product Already in Stock

- Product Prices Compared with his Own Balance.

The need is so calculated as a value between 0 and 2 , if the value of need of a product is major of 1 , the product is inserted inside a list of FirstChoiceProduct, which define the entity needed product in every given the moment 

Of course this component track all the product consumed and stocked by the entity

With EntityProducer Component instead define the capabilities to produce products to resell later. all Products produced are in a catalogue that other entity can see , so far i developed just to let the entity purchase what she wants, still need to be developed to producing product etc..

To make the entity moving to buy product if needed i implemented a new order in unitAI Component, i called it "Shopping", which let the entity once she working checking if she has need, if there are producer with available product around and in case if go to them, buy the product, stock them and go back to work .

Also For the Visual Part and GUI, i added the 8 product category for Entity Consumer in the left panel so to have a track of what the entity has in stock(you can see the tooltip) and the balance of money of the entity is showed on top of the head of the 3d woman and also in the central panel, where there is a more specific description with tot amount ant max capacity.

Money resources are instead tracked in the top together with all other resources.

Also i added one new animation once the entity approach the seller, is just a start but at least she do something like paying cash.( Is the third picture, i used another woman as a producer cause i don t have now 3d model of vendor to use)

 

All the Code of the Mod is freely available in this dedicated GitHub for who is interested to partecipate on the development don t hesitate to contact me.

 

Please give me Ideas and Feedback 

 

Screen Shot 2019-01-15 at 7.43.53 PM.png

Screen Shot 2019-01-15 at 8.15.01 PM.png

Screen Shot 2019-01-15 at 8.15.30 PM.png

Edited by Monder87
Put the Mayor Updates Available in the first Message
  • Like 8
  • Thanks 1
Link to comment
Share on other sites

Here some more structured data for some basic component of the economy: 

 

Trades Type Diagram

The Economy will consist in 3 different levels of Trades:

1) City Trade

 Slave provide basic Resources for Free to the State, the State sell these to the Vendors or Dealers which use to create Product that they sell to all the Citizens.

If the Products needed are not available the citizens can try to go to the Market, where they can found products from different cities.

2) InterCity Trade 

The Traders move city to city bringing the products needed, they buy and sell straight to the market buildings.

3) InterCiv Trade

This is handled by a special envoy in the Capital, prior agreement with the other player

 

Strategy Tip

Every City should focus on developing a Standard Generic City Trade and at the same time specialize itself in one main Industry. In fact if the business and technologies of one city are in the same industry there are very good bonus and can be develope faster

Because different City Specialize, is very important keep an eye on the Intercity Trade so to don t disrupt the Supply Chain 

760336880_ScreenShot2019-01-18at2_46_20AM.thumb.png.1ebf6218c8ad999374862eca84f1fb43.png

 

  • Like 2
Link to comment
Share on other sites

Entity Upgrade Diagram

This instead is the Upgrading Tree of the Entities, from Slave to City Major and the necessary condition to meet for the upgrade.

Slave for example are the first step of our economy, before become citizen they need gather 2000 of resources.

Citizen instead after they earn 5000 Money the can finally decide to upgrade in 1 of the 4 possible Economic Entity:

Remain Citizen but higher class,  become a trader, a street vendor or a street artist etc...

1656565233_ScreenShot2019-01-18at3_19_34AM.thumb.png.e2b6971b522449c1feb36ae146099af2.png

 

Edited by Monder87
  • Like 3
Link to comment
Share on other sites

I think this looks quite interesting. I've always wanted a more in depth economy for 0AD. My advice would be to keep it as intuitive as possible, and make sure there's lot's of tooltips :) 

One caveat I see is that social classes in the ancient world were generally speaking quite rigid. People didn't just go from slave to citizen, or from citizen to noble very often. 

Link to comment
Share on other sites

In concept alone, it seems to be a good idea, but social mobility was extremely rare during the ancient times, as Sundiata has mentioned.  Only a minority of residents of a nation actually were citizens, and citizens that were not nobles practically never became so except in egalitarian societies like Sparta (relative to other citizens since rights were the same regardless of social status with the exception of kings.).  Next, the consumption of meat by lower classes was extremely rare.  The predominant thing they would eat were grain products.  Lastly, leadership was not solely based on wealth but more so on social status, and the means of reaching the governmental positions varied based on government type.  In Athens, Sparta, Rome, and many other ancient states, mayors were nonexistent, instead having positions like Strategos, Ephor, and Consul respectively, and these functioned in a very different way.  

Link to comment
Share on other sites

4 hours ago, Angen said:

Uh, by look on diagrams, looks complicated but really nice system, do you plan some tutorial for this mod ?

Yes sure , once the mod will be complete,  we need to finish it first,  Now looks little complex because not defined yet, in a second time we will semplify all and make it very intuitive, still complex enogh to make the game gain dramatically in Strategy. Will be a lot of fun !

 @Sundiata and @Thorfinn the Shallow Minded All yours are valuable suggestions. I think we can redesign the Entity Upgrade Diagram and make it more historical realistic . You have good historical notions, can you propose a model can fit all acient civs in the game? ( of course different titles for different civs) We can start with a general model with the assumption that social mobility is quite limited and after we apply the general model to all specific civs. Also about products we can define the agrarian goods as principal economic industry, i think more the civ evolve more also other industries emerge in some degree, i wil make a study about it, open to suggestion, will follow a product diagram after that.

Link to comment
Share on other sites

I want add a small idea to the discussion: achievable programmatically and that can overcome the rigid social mobility problem: i can code a Family Component, which give our Economic Entities the ability to procreate Entity of the same kind once condition are met, for example a King can just procreate Prince or princess, like farmer can just procreate farmer, insinde them kind they can upgrade in some level based on wealth achieved. In this way we have a rigid society but also upgradable Economic Entities and that can increase in number if the civ develope

Edited by Monder87
  • Thanks 2
Link to comment
Share on other sites

ok this can be an updated version of Entity Upgrade Diagram where the social mobility is extremely rigid. Who born nobles can just upgrade in nobles function, same like farmers, artist, the only two classes can overlap are Merchant and Dealers. Slaves just don t upgrade!1957308769_EntityUpgradeDiagram2.thumb.png.57988a7e6e60e7cdf286e39568a8ad03.png

  • Like 1
Link to comment
Share on other sites

Regarding instead how to let the entities be created, before i was suggesting a family Component to make entity procreate each other, but actually is much simpler and straight forward to use dedicated Building to create them, that is actually the 0A.D way.  Of corse not for free, but using Money Resource. Following the above diagram this could be a Entity Creation Diagram where Cost is the cost for unit and the Building is all building where that basic entity can be created.  Once created each entity has to pass all upgrades if want to evolve to higher level and earn more money.

 

Screen Shot 2019-01-20 at 4.49.37 PM.png

Edited by Monder87
  • Like 1
Link to comment
Share on other sites

To give reason for nobles and hight rank official to exist ,be expensive to build and richer and more powerful  than any other entities excluded the king, i create a Taxation System, where not just the king but also hight official in different degree take away a part of the money hardly earned by the other entities.

Not nobles or official can tax all the population unless  the king and the sacerdote. Of course the King tax heavier. The Sacerdote instead ask a offer for God.

For example a Landowner Noble  can tax 50% of all transactions of the farmer he own, a judge instead can fine anyone on the city up to 20% of his asset, a General iinstead can tax just merchant for the safety in trading route.

This is a hypothetical Taxation Diagram, still using the same entities structure i used in the last two diagrams. The Tax ability are defined in clusters so to understand who can tax who.

Screen Shot 2019-01-19 at 3.49.00 AM.png

  • Like 4
Link to comment
Share on other sites

If the Diagram above describe the Taxation to define how the wealth i divided in the Economy System , the Entity Power Diagram define instead the division of power. 

We describe Power as a Selection Capability of Slaves when we give order.

I try to clarify:  In 0 A.d we are used to select as a Player whatever entity we want  and just pass an order to them. In this Economy Simulation  instead if we select one Slave or one Farmer ( it doesn't affect Military Unit that i will leave the way they are or any other Economic Entity outside Slaves and Farmers)  our selection capability is filter by ownership. 

Let s see the picture below and i will make some example:764993183_ScreenShot2019-01-19at3_58_22PM.thumb.png.f178d88ed185bf3f49c7f4fd3e72cca7.png

1) The first on the left is the King who has the power to select all Slaves and ordering them to build 1 Civ Center or to go gather unlimited resources. He cannot order anything else if not this.

So far look quite similar in the way we used to, but there is actually one important difference. Instead to make the selection like we are normally used to with the mouse dragging a square and selecting all entities inside, now we need to select first the Economic Entity in charge ( king, sacerdote, landowner Noble et..) and after keep doing with the square selection or the doubleClick. Doing like this we make sure that a slave can just follow certain order of certain Economic Entity, based on the power subdivision. For example in this example every slave will be able to build for the king the Civ Center, but not other order. 

2) Now take 5 th entity : Nobles Landowner. They can order just to the slave they own to build 1 Villa or 1 Grain Farm.  This is important because the slaves they will just follow the orders of their owner, and other nobles entity will be not able to use them, they will need to buy new slaves from the civ center to expand their wealth. In this way we can create a division of ownership and roles so we push the player to create all different economic entities and for each type more than just one, like in this example we need more than a noble and more than a farm if he want to achieve better economi performance.

Hope this was clear, sorry if wasn t , i will try simplify all once all economic system take shape.

  • Like 1
Link to comment
Share on other sites

Hi everyone, i tried to put all the things we say in all Diagrams posted before in one single Economy Model Representation, so i give everyone a simpler and unified view of the Model, is just miss the products produced by each entity, so where you read produce, there will be in the future the list of products produced.

Please let me know your feedback 

 

Ps. The second file is a PDF to see the model in High Resolution

Economy System.png

Economy System (2).pdf

Edited by Monder87
  • Like 3
Link to comment
Share on other sites

I also start visualizing the GUI ( Graphic User Interface ) to handle all Economy Activity, i start with the Consumer Panel:

 

The Consumer Panel will have the duty to 1) show the Entity Happiness, 2) let the User decide if want to handle the entity economic activity Manually or with Ai, 3) track the products the entity carry showing icon, name, quantity, urgency and daily consume.

 

— Consumer Panel —

1) Happiness Rating

2) Command Buttons

a) Ai Consuming Manager

b) Manual Consuming Manager

3)Product Stoked

a) Icon

b) Name

c)Quantity

d) Urgency Color

e) Daily Consume

 

Below you can see a prototype done in Photoshop, please let me know if you feel is intuitive or what to improve.

 

Screen Shot 2019-01-20 at 8.49.36 PM.png

Edited by Monder87
  • Like 4
Link to comment
Share on other sites

And here is the Production Panel.

he Production Panel will have the duty to :

1) Show the Product in Production, this will appear in 0AD style as a icon on top of the panel with a green layer showing the percent of progress

2) Show the Product produced and stoked by the entity with icon, name, quantity and urgency. These will be the product ready to be sell. Also from here , if you are in Manual modality you can select the product to produce by clicking on the prod icon ( first image )

3) Show the raw material the entity can stock to produce its products, like before need to be show icon, name, quantity and urgency. ( second Image )

4) let the User decide if want to handle the entity economic activity Manually or with Ai and maybe in the future other settings. ( third image)

 please let me know if you feel is intuitive or what to improve.

Screen Shot 2019-01-21 at 10.41.34 PM.png

Screen Shot 2019-01-21 at 10.42.15 PM.png

Screen Shot 2019-01-21 at 10.44.16 PM.png

Edited by Monder87
  • Like 4
Link to comment
Share on other sites

  • 1 month later...

Just added the icons :) would great if someone could help me to create a complete list of all products  exchange in ancient times with historical attention for each civ. If someone is available please let me know and i can give further details

Screen Shot 2019-03-02 at 7.43.17 PM.png

  • Like 5
Link to comment
Share on other sites

i also added the stock bar for each product consumed and i linked the happiness level proportional to the consumer status...in this case is quite angry :) less product stocked means less money to buy it and/or not enough availability, one main challenge for the player would be to keep prices reasonable and enough supply for all population .

Screen Shot 2019-03-03 at 4.11.25 PM.png

  • Like 4
Link to comment
Share on other sites

17 minutes ago, Sundiata said:

@Monder87 Nice stuff! 

One question, you've probably covered this, but are these units supposed to be some kind of NPC's that take care of their own stuff, and are assigned indirectly to certain jobs, or do you have to keep track of and adjust all these things manually? 

I was planning to have both manual and auto, all auto in default but with the chance for the player to enter manual modality from the consume panel. This give more interactivity and fun!

  • Like 3
Link to comment
Share on other sites

Small Update...to keep easier for the player to track many units happiness i added also the happiness icon on top of each one, it will appear just if the unit is selected or the mouse hover it. In addition i will add a separate economy panel where the player can see all major stats for all entities of the economy, including total average happiness level.

Screen Shot 2019-03-07 at 1.57.36 AM.png

Screen Shot 2019-03-07 at 2.03.26 AM.png

Edited by Monder87
  • Like 2
  • Thanks 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...