[WIP] Midway step in refactoring trade

Thinking about improving the Artwork in Vega Strike, or making your own Mod? Submit your question and ideas in this forum.

Moderator: pyramid

Re: Midway step in refactoring trade

Postby loki1950 » Mon Mar 05, 2012 7:18 pm

Maybe they are like camp followers in the middle ages :D And just tag along in plowshares and such :wink:
Most command types might hope for a friendly fire incident involving the the petty coat brigade.

Enjoy the Choice :)
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 18/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and DELL E6400 4GB ram/100 GB HD Mint 17.3 6
User avatar
loki1950
The Shepherd
 
Posts: 5715
Topics: 51
Joined: Fri May 13, 2005 1:37 pm
Location: Ottawa

Share On:

Share on Facebook Facebook Share on Twitter Twitter Share on Digg Digg

Re: Midway step in refactoring trade

Postby travists » Mon Mar 05, 2012 7:47 pm

Now there is a new upgrade class! Recreation facilities. What would the Luddites do if they found you with some of them? :twisted: Still good way to make a few credits if you can avoid being shot. No rec centers is fine with me. We'll do planets later.
User avatar
travists
Expert Mercenary
Expert Mercenary
 
Posts: 893
Topics: 33
Joined: Thu Jul 08, 2010 4:43 pm
Location: Sol III North American Continent

Re: Midway step in refactoring trade

Postby travists » Mon Mar 05, 2012 7:55 pm

OK, Some sectors have repeats but here is my production list
Code: Select all
Basic Goods Types
I: Primary Producers
   A: Mining
      1: Small Asteroids
      2: Ore
      3:Mixed Gasses
      4: Space Ice
   B: Agricultural
      1: Raw Foodstuff
      2: Plants
      3:Animals
II: Secondary Producers
   A:  Refining
      1: Metals
      2: Alloys
      3: Chemicals
      4: Separated Gasses and Gas Blends
      5: Drinkable Water
   B: Food Processing
      1: Processed Foods
      2: Animal Feed
      3: Food Byproduct (industrial additives)
III: Manufacturing:
   A: Shipyard
      1: Ships
      2: Recycled Materials
   B: Factory (Consumer)
      1: Consumer Goods
      2: Recycled materials
      3: Food Packs/ Highly processed or synthesized food
   C: Factory (Industrial)
      1: Mining Equipment
      2: Ag Equipment
      3: Refining Equipment
      4: Food processing Equipment
      5: Recycled Materials
   D: Factory (Ships)
      1: ship upgrades
      2: ship Subassemblies
      3: very small ships
      4: recycled materials
   E: Factory (munitions)
      1: Guns
      2: Missiles
      3: Other weapons
      4: recycled materials
   C: Pharmaceutical
      1: Drugs
      2: Medical Items
IV: End consumer
   A: fighter base
      1: Surplus/outdated milspec upgrades
      2: Decommissioned ships
      3: Recycled materials
   B: Star fortress
      1: Recycled Materials
      2: Bio waste
   C: Outpost
      1: Recycled Materials
   D: Residential
      1: recycled materials
      2: Bio-waste
V: Special
   A: Medical
      1: Recycled Materials
      2: Bio waste
      3: Passengers
B: Research
   1: researched material
User avatar
travists
Expert Mercenary
Expert Mercenary
 
Posts: 893
Topics: 33
Joined: Thu Jul 08, 2010 4:43 pm
Location: Sol III North American Continent

Re: Midway step in refactoring trade

Postby klauss » Mon Mar 05, 2012 10:20 pm

travists wrote:Shaper Bio-Adaptation: Just what are these anyway? Without a known function (or canonical necessity) I'm inclined to use the model for Shaper bases and drop this one.

From what I've heard of shaper, maybe something in-between medical and factory?

Anyway, there doesn't have to be a model per station type. The model for a medical would work for many applications, within reason.

So, a shipyard would most likely be always a shipyard, because it's quite specialized. But medical could stray a bit into other tasks, as well as commerce and many other types.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
User avatar
klauss
Elite
Elite
 
Posts: 7243
Topics: 55
Joined: Mon Apr 18, 2005 7:40 am
Location: LS87, Buenos Aires, República Argentina

Re: Midway step in refactoring trade

Postby travists » Thu Mar 08, 2012 3:46 pm

Now what is the best direction for implementation?
Ideally we will have several factions, each having several base types, and each type with multiple iterations, and every individual iteration has production, consumption, import, export values for every purchasable item and every item references other items for price.

Saving can add a CSV file with entries like
Base Name, Base type, Location, Good1(P,C,I,E),Good2((P,C,I,E),etc.
And I suppose a basic
Base type, Good1(P,C,I,E,variance),Good2(P,C,I,E,variance), will work for initial values
But do we count a Machinist mining base and a Purist mining base as two different base types or have a faction modification table? What happens when a base changes hands?

How about production and cost tables? Does someone have a better way then

good1 | %good1 | %good2 | %good3 | etc
good2 | %good1 | %good2 | %good3 | etc
good3 | %good1 | %good2 | %good3 | etc
etc.

Do we want to include a faction specific contraband list with this? Such a list would include each faction along with items that that group deems illegal. A related list could include systems and banned goods in that system. For example In system "A" "Guns" are perfectly legal and quite cheep. They are legal in system "C" as well, but rather expensive. However to get from "A" to "C" you must travel through system "B" where "Guns" are utterly banned except for those mounted on passing ships.

Lastly, how much of the data am I making on my own? Without help, this may take a while...
User avatar
travists
Expert Mercenary
Expert Mercenary
 
Posts: 893
Topics: 33
Joined: Thu Jul 08, 2010 4:43 pm
Location: Sol III North American Continent

Re: Midway step in refactoring trade

Postby klauss » Thu Mar 08, 2012 4:16 pm

travists wrote:Now what is the best direction for implementation?
Ideally we will have several factions, each having several base types, and each type with multiple iterations, and every individual iteration has production, consumption, import, export values for every purchasable item and every item references other items for price.


First, I think, would be deciding on the data format for the economic database. I mean, base classification, which base produces which out of what, production formulas (what needs to be consumed to produce what), etc.

The format should be the easiest for modding, base scripts (python) can read whatever you throw at it.

travists wrote:Saving can add a CSV file with entries like
Base Name, Base type, Location, Good1(P,C,I,E),Good2((P,C,I,E),etc.
And I suppose a basic
Base type, Good1(P,C,I,E,variance),Good2(P,C,I,E,variance), will work for initial values
But do we count a Machinist mining base and a Purist mining base as two different base types or have a faction modification table? What happens when a base changes hands?


The savegame should simply contained a serialized version of the economic structures. There's already a lot of code for space-efficient serialization, and even better ways can be developed if needed. Savegame data does not need to be moddable, and storing a serialized representation of in-memory structures will help preserve all the subtleties of the economic system.

travists wrote:How about production and cost tables? Does someone have a better way then

good1 | %good1 | %good2 | %good3 | etc
good2 | %good1 | %good2 | %good3 | etc
good3 | %good1 | %good2 | %good3 | etc
etc.


Production formulas should be a representation of:

Product = Q1 x Consumable 1 + Q2 x Consumable 2 + ... + Qn x Consumable n

However, it should be easily moddable. Maybe a structureless CSV, maybe just a text file with some easy to read/mod format.

travists wrote:Do we want to include a faction specific contraband list with this? Such a list would include each faction along with items that that group deems illegal. A related list could include systems and banned goods in that system. For example In system "A" "Guns" are perfectly legal and quite cheep. They are legal in system "C" as well, but rather expensive. However to get from "A" to "C" you must travel through system "B" where "Guns" are utterly banned except for those mounted on passing ships.


I don't think so. Contraband needs tighter integration with the engine, so that police AI can spot contraband. ATM, I think, contraband is detected by belonging to the "Contraband/" category, but that's not faction-dependant AFAIK. So Rlaan AI would be sensitive to all kinds of contraband, not just Rlaan contraband. We would have to check/expand on this though.

travists wrote:Lastly, how much of the data am I making on my own? Without help, this may take a while...


Right now, the priority is getting the release out. I'm working on finishing gas giant shaders (which are almost ready but I haven't committed yet because of lack of testing), because I'd like to be able to release with them.

After the release, I can certainly help implementing all the necessary code for that. Data production, however, is not my strong side.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
User avatar
klauss
Elite
Elite
 
Posts: 7243
Topics: 55
Joined: Mon Apr 18, 2005 7:40 am
Location: LS87, Buenos Aires, República Argentina

Re: Midway step in refactoring trade

Postby travists » Thu Mar 08, 2012 5:06 pm

So far I have Bases categorized into economic sector and general type. I've also got several generalized goods types. One of my questions remains though, is a base type from one faction fundamentally different from the analogous type from another faction (especially the different human groups) and thus requiring lengthy development of each base-faction combination, or are faction preferences and base type general production values separate?

klauss wrote:Production formulas should be a representation of:

Product = Q1 x Consumable 1 + Q2 x Consumable 2 + ... + Qn x Consumable n


Simple text file with one line per good listing on that line component goods and qty?

klauss wrote:I don't think so. Contraband needs tighter integration with the engine, so that police AI can spot contraband. ATM, I think, contraband is detected by belonging to the "Contraband/" category, but that's not faction-dependant AFAIK. So Rlaan AI would be sensitive to all kinds of contraband, not just Rlaan contraband. We would have to check/expand on this though.

Understandable for this issue, but the present implementation is less than ideal and should be addressed at some point.

klauss wrote:(D)eciding on the data format for the economic database.

I suspect a base type listing with each good and data would easy, but some input from modders would be great. I keep coming back to starting with two lists, a starting point and a faction modifier.
User avatar
travists
Expert Mercenary
Expert Mercenary
 
Posts: 893
Topics: 33
Joined: Thu Jul 08, 2010 4:43 pm
Location: Sol III North American Continent

Re: Midway step in refactoring trade

Postby klauss » Fri Mar 09, 2012 11:20 am

travists wrote:So far I have Bases categorized into economic sector and general type. I've also got several generalized goods types. One of my questions remains though, is a base type from one faction fundamentally different from the analogous type from another faction (especially the different human groups) and thus requiring lengthy development of each base-faction combination, or are faction preferences and base type general production values separate?

It may be, but perhaps we'd be better off handling those differences as different entries in units.csv that just happen to share a mesh and most stats.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
User avatar
klauss
Elite
Elite
 
Posts: 7243
Topics: 55
Joined: Mon Apr 18, 2005 7:40 am
Location: LS87, Buenos Aires, República Argentina

Re: Midway step in refactoring trade

Postby travists » Fri Mar 09, 2012 11:49 am

My thinking is what happens when a base changes ownership? If it can be seamlessly be swapped to the corresponding base type of another faction great, otherwise it is possible to have a Luddite Pharmaceutical station producing Machinist type full body augmentation!
User avatar
travists
Expert Mercenary
Expert Mercenary
 
Posts: 893
Topics: 33
Joined: Thu Jul 08, 2010 4:43 pm
Location: Sol III North American Continent

Re: Midway step in refactoring trade

Postby klauss » Fri Mar 09, 2012 11:53 am

It can, bases are recreated from what is saved on savegames, so the information should be rather easily mutable.

However, I don't think a base's function can change so easily. Function is a function (pun is merely accidental) of internal layout and equipment. If a base is adapted to work as medical or factory, that fact can't change as easily as the people who control it.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
User avatar
klauss
Elite
Elite
 
Posts: 7243
Topics: 55
Joined: Mon Apr 18, 2005 7:40 am
Location: LS87, Buenos Aires, República Argentina

Re: Midway step in refactoring trade

Postby travists » Fri Mar 09, 2012 12:08 pm

No, but a production facility can change it's output. In the above pharmaceutical plant, the implant manufacturing equipment can be dismantled and the drug portion expanded and converted to more naturalistic remedies. A Consumer Goods Factory Run by High-Born and a less opulent group like unadorned both have the same equipment, but vary in output greatly.
User avatar
travists
Expert Mercenary
Expert Mercenary
 
Posts: 893
Topics: 33
Joined: Thu Jul 08, 2010 4:43 pm
Location: Sol III North American Continent

Re: Midway step in refactoring trade

Postby klauss » Fri Mar 09, 2012 12:24 pm

Then I guess faction and a couple more factors should influence production.

I'd say, this should be dynamic, and the data files should only contain production capabilities.

Say, the file says the base can produce N man-hours worth of goods per week, and lists the cost (in man-hours and consumables) to produce each item. Then, available man-hours are spread as faction preferences, and local political and economic factors dictate.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
User avatar
klauss
Elite
Elite
 
Posts: 7243
Topics: 55
Joined: Mon Apr 18, 2005 7:40 am
Location: LS87, Buenos Aires, República Argentina

Re: Midway step in refactoring trade

Postby travists » Fri Mar 09, 2012 12:47 pm

That's my thinking anyway. There's time to sort out the details, I think I can just about finalize bases now, goods categories are fairly fleshed out, so then we (I) can cross check against current entries in the data and figure out what we need, what gets eliminated, etc.
User avatar
travists
Expert Mercenary
Expert Mercenary
 
Posts: 893
Topics: 33
Joined: Thu Jul 08, 2010 4:43 pm
Location: Sol III North American Continent

Re: Midway step in refactoring trade

Postby travists » Thu Mar 15, 2012 3:31 pm

OK, I've compiled a faction list from the wiki and tried to assign them to the propper grouping and posted it here, on the factions page. Anyone that sees a group that does not need to be considered for inclusion in base type/owner listings for distinct goods production mark it with a strike-through, preferably in red.
User avatar
travists
Expert Mercenary
Expert Mercenary
 
Posts: 893
Topics: 33
Joined: Thu Jul 08, 2010 4:43 pm
Location: Sol III North American Continent

Re: Midway step in refactoring trade

Postby loki1950 » Thu Mar 15, 2012 7:55 pm

Like your spreadsheet just because a faction does produce distinct products/goods does not mean that they don't need and produce common stuff for local consumption ie. beer,foods and furniture.They may not be profitable for interstellar trade but very useful in-system trade(remember the runs between Serenity Mining base and Atlantis :wink: )or some enterprising privateer grabbing some cheap stuff and selling it in next jump over where there happens to be a shortage and a high asking price.And I wonder if some of the goods might deteriorate/spoil from rough handling or storage system failures.

Enjoy the Choice :)
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 18/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and DELL E6400 4GB ram/100 GB HD Mint 17.3 6
User avatar
loki1950
The Shepherd
 
Posts: 5715
Topics: 51
Joined: Fri May 13, 2005 1:37 pm
Location: Ottawa

Re: Midway step in refactoring trade

Postby travists » Thu Mar 15, 2012 9:12 pm

My reasoning is that all (or most) Human, Rlaan, and Area factions will, within their group, have many of the same production/consumption needs. Yet many will differ in particulars. Question is how many of the forty or so deserve to be separately handled and how many can just be lumped in with their group?

loki1950 wrote:And I wonder if some of the goods might deteriorate/spoil from rough handling or storage system failures.

Interesting thought. Many drugs have very short half-lives. Some products don't take well to high Gs, others are ruined by freezing, radiation exposure, thawing. I am quite open to this idea, but I wonder about the practicalities in the code. Tracking so many statistics for every cargo item... Though I suppose if we hull passengers we will need to track life support and quarters functionality, so a refrigeration unit or other "special handling" upgrade could be used, that failure of it "kills" the cargo.
User avatar
travists
Expert Mercenary
Expert Mercenary
 
Posts: 893
Topics: 33
Joined: Thu Jul 08, 2010 4:43 pm
Location: Sol III North American Continent

Re: Midway step in refactoring trade

Postby pheonixstorm » Thu Mar 15, 2012 9:21 pm

If you look at X3 Terran Conflict, they have you buy passenger quarters before you can haul people around. From the most basic up to the presidential suite (don't remember the ingame designations). Vega Strike is setup for this as far as the commodities exchange, but I don't know if the code is setup to handle this or not. Either the feature was never added/worked on or it was just never turned on. I would say we need to look into adding some functionality as far as passenger quarters, refrigeration, etc. Just remember we can't go overboard with it or the players won't care for it one bit.

Maybe use something like...

Passengers/Livestock = Crew quarters/pens just lump the basic set into one common name then have higher classes for the more discerning passengers (who don't want to smell like a pig upon arrival).
Perishable foods = Refer units
?
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
User avatar
pheonixstorm
Elite
Elite
 
Posts: 1567
Topics: 113
Joined: Mon Jan 25, 2010 7:03 pm

Re: Midway step in refactoring trade

Postby klauss » Fri Mar 16, 2012 8:49 am

From what I could see in code, the presence of passenger quarters affects mission availability only.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
User avatar
klauss
Elite
Elite
 
Posts: 7243
Topics: 55
Joined: Mon Apr 18, 2005 7:40 am
Location: LS87, Buenos Aires, República Argentina

Re: Midway step in refactoring trade

Postby travists » Fri Mar 16, 2012 10:32 am

If true, this should be addressed. Along with handling for "if destroyed in-route". The most straight forward approach would be, as we need to add some extra descriptors for cargo anyway, is have a list of cargo requiring special equipment and a handler that cross checks that list at purchase time and again after damage events. Such an approach should give UtCS the ability to use it while limiting the scope while allowing modders to expand it infinitely if desired.

say:
Cargo name 1, required upgrade
Cargo name 2, required upgrade

I question buying non-slave people as cargo, but as long as people are a cargo item (paying passengers or what have you) you should need the right equipment.

(A tangent to this is should the "enslave/free slaves" option be included? Get a load of passengers that think they are heading to a resort then sell them as slaves! Or, buy slaves then grant them their freedom.)
User avatar
travists
Expert Mercenary
Expert Mercenary
 
Posts: 893
Topics: 33
Joined: Thu Jul 08, 2010 4:43 pm
Location: Sol III North American Continent

Re: Midway step in refactoring trade

Postby klauss » Fri Mar 16, 2012 11:32 am

That modus operandi raises another possible problem, with prices.

Profit in carrying passangers would be the result of "selling them" at higher prices than they were bought. Buying price should be 0, and selling price should be a function of distance. Certainly something the engine can't do now in the commodities trade screen.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
User avatar
klauss
Elite
Elite
 
Posts: 7243
Topics: 55
Joined: Mon Apr 18, 2005 7:40 am
Location: LS87, Buenos Aires, República Argentina

Re: Midway step in refactoring trade

Postby travists » Fri Mar 16, 2012 11:48 am

I think we can safely ignore passengers as commodities, that always has struck me as odd. They needs must be treated as cargo with special needs, but unless enslaved and thus in effect becoming property, passengers should only be handled through missions.
Possible new fixers:
  • Tour group leader
  • Immigration advocate
  • Political prisoner contact
  • Random person needing a ride
User avatar
travists
Expert Mercenary
Expert Mercenary
 
Posts: 893
Topics: 33
Joined: Thu Jul 08, 2010 4:43 pm
Location: Sol III North American Continent

Re: Midway step in refactoring trade

Postby klauss » Fri Mar 16, 2012 12:05 pm

Taxi guild?
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
User avatar
klauss
Elite
Elite
 
Posts: 7243
Topics: 55
Joined: Mon Apr 18, 2005 7:40 am
Location: LS87, Buenos Aires, República Argentina

Re: Midway step in refactoring trade

Postby travists » Fri Mar 16, 2012 12:25 pm

A good thought, though I'd be careful with "guild" unless, Privateer style guilds are in the works. (Hunters would work well for this from how the description reads in the wiki.) The term guild seems to indicate something similar to a trade union that you gain entry to, rather than being hired by, for a job.
User avatar
travists
Expert Mercenary
Expert Mercenary
 
Posts: 893
Topics: 33
Joined: Thu Jul 08, 2010 4:43 pm
Location: Sol III North American Continent

Re: Midway step in refactoring trade

Postby travists » Fri Mar 16, 2012 12:29 pm

Pan-Galactic Passenger Transport Brokers.
User avatar
travists
Expert Mercenary
Expert Mercenary
 
Posts: 893
Topics: 33
Joined: Thu Jul 08, 2010 4:43 pm
Location: Sol III North American Continent

Re: Midway step in refactoring trade

Postby klauss » Fri Mar 16, 2012 1:01 pm

travists wrote:Pan-Galactic Passenger Transport Brokers.


Nice one
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
User avatar
klauss
Elite
Elite
 
Posts: 7243
Topics: 55
Joined: Mon Apr 18, 2005 7:40 am
Location: LS87, Buenos Aires, República Argentina


PreviousNext

Return to Content Vetting

Who is online

Users browsing this forum: No registered users and 4 guests

cron