New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Economy System (based on BariumBlue's) #150
Conversation
Conflicts: dat/ships/gawain.xml src/map.c src/nlua.c src/space.c
Conflicts: src/space.h
Conflicts: src/nlua_commodity.c
Thinking about it a bit, I suppose the idea was probably to determine what kinds of prices each commodity could have so you could use the same system prices for all commodities. Or if not, it could be used that way. For example, the price could be set such that 100 is always an average amount for that commodity. Then if you decide to make one commodity more or less expensive, you just have to change one number, and not dozens of numbers. |
http://colabti.org/irclogger/irclogger_log/naev?date=2015-02-08#l421 I agree with BTAxis that the current implementation leaves a bit desired. Instead of setting it manually having it automatically get set based on asset metadata seems fairly more complex, but it's more of a question of running some tests and finding some heuristics that give reasonable numbers. Ideally each commodity would be tuned with 4-5 parameters related to some higher level concept that would automatically set the prices around the universe. Would need a bit more thought. |
For what it's worth, I had a discussion with BariumBlue back in the day in which I explained my misgivings about his system. Log begins here: |
Personally, I don't see that as beneficial, and here's why: we still have to add something manually, because there simply isn't currently any data that can be used to infer what kinds of prices we should have. The only difference I can think of is it wouldn't be simple numbers, but instead a more complex set of factors to adjust; and, of course, the A.I. that determines prices from all these factors would have to be developed. I really don't think it would make adjusting the economy any easier, much less make the game any more fun. |
In the short term, maybe. But it's the difference between digging a ditch, and building a machine that digs a ditch for you. Given proper planet metadata and a system that can effectively reason about it you can generate prices for however many commodities you like, instead of having to edit the entire galaxy every time you want to add a new one. Additionally, planet metadata is going to be needed anyway for other reasons. As an example I've given The Wringer station in Suna, which is supposed to be a seedy place where you can find shady types, but right now the game has no way of knowing it shouldn't spawn ordinary NPCs there. You could dick around with factions to accomplish it, but that would be the wrong way to go about it. |
TLDR - a code light, highly adaptable and extensible economy system I have been thinking about this ever since I came across BariumBlue's The assumptions - plus extra data that would need created: Planet Class is related to ability to produce basic goods Planet colour and background image is related to the Population determines the need for basic materials and the production The need for industrial goods would be based on the level of The need for military goods would be based on the total presence value The amount of trade in a system would depend on nebula activity and The amount of trade impacts luxury goods - the more trade the Almost everything necessary for this already exists or the system As an extension you could split trade into two different types - local All of this is relatively code light and highly extensible but it will I hope this helps and apologies for such a long essay - I didn't know I would have done this already were this my job but I';m sure you all Take care and keep up the good work :) River *<:@) *(this has stalled due to things happening at this end but I've been |
Going to use system and planet prices as *modifiers*: 1.0 is "normal", 2.0 is twice as expensive as normal, etc.
I've adjusted the prices to hopefully make them better. After a lot of experimentation trying to take advantage of the averaging system, I finally decided to just set the system prices based on faction. I could leave it this way, or I could go through all the planets and set the prices on that level as well. In any case, system and planet prices are now factors (1 for normal, 0.5 for half-price, etc), and the base costs of goods are as they were previously. |
Conflicts: src/land.c
the event lasts longer. Avoids cluttering up the news feed.
That is, each time you enter a system, there's a chance of an economic event, and it lasts until you leave the system.
To prevent grinding within one system over and over again.
I'm abandoning this economy system. At this point, I don't think it's worth it. In fact, I'm starting to question the worth of having an economy system at all. However, what I would still like, is something that allows Lua scripts to adjust prices. In particular, I'm interested in creating something similar to Dopewars: just randomly increasing or decreasing prices when changing systems, sometimes extremely. I think the randomness of something like this would be much more interesting than a static variation across the galaxy, which would just encourage you to go back and forth between the same two systems over and over again. For the record, I discovered a serious bug of some kind in this system that was making food and medicine much more expensive than they should have been in Dowue. So if we do adopt this system, that needs to be found and fixed. But again, I think the whole idea of an economy system should just be abandoned and replaced with simple Lua price adjustment capability. |
By the way, #94 really should be closed. In case someone wants to salvage this, I'm leaving my "economy" branch open. |
This is an updated #94. I merged BariumBlue's economy branch, resolved the conflicts, and reverted certain changes (namely, some changes from British English to American English in various places, and the change to commodity_renderMod). It seems to work perfectly; I don't understand why it wasn't merged when #94 was opened.