[idea] Trade Mod

A place to discuss mods in development and concepts for new mods.
User avatar
Aury
Fleet Admiral
Fleet Admiral
Posts: 5421
Joined: Tue Feb 05, 2008 1:10 am
Location: Somewhere in the Frontier on a Hycrotan station, working on new ships.

This mod, which started out as an idea for part of TX2 and alterecco's Galactic Traders in a thread regarding an old ship graphic (an old implementation of the EI100), is designed to expand the ability for trade and promotes the player to ship cargo and stuff around.

There's several ways to do this:
Trade of actual items (ie, you buy a bunch of R1 deflectors from a warehouse station, and deliver them to an armor and shields vendor)
Trade via korolov (you would ship cargo containers from a korolov station to one of their customers)

as well as other possibilities, feel free to discuss, come up with new ideas...
(shpOrder gPlayership 'barrelRoll)
(plySetGenome gPlayer (list 'Varalyn 'nonBinary))
Homelab Servers: Xeon Silver 4110, 16GB | Via Quadcore C4650, 16GB | Athlon 200GE, 8GB | i7 7800X, 32GB | Threadripper 1950X, 32GB | Atom x5 8350, 4GB | Opteron 8174, 16GB | Xeon E5 2620 v3, 8GB | 2x Xeon Silver 4116, 96GB, 2x 1080ti | i7 8700, 32GB, 6500XT
Workstations & Render machines: Threadripper 3990X, 128GB, 6900XT | Threadripper 2990WX, 32GB, 1080ti | Xeon Platinum 8173M, 48GB, 1070ti | R9 3900X, 16GB, Vega64 | 2x E5 2430L v2, 24GB, 970 | R7 3700X, 32GB, A6000
Gaming Systems: R9 5950X, 32GB, 6700XT
Office Systems: Xeon 5318Y, 256GB, A4000
Misc Systems: R5 3500U, 20GB | R5 2400G, 16GB | i5 7640X, 16GB, Vega56 | E5 2620, 8GB, R5 260 | P4 1.8ghz, 0.75GB, Voodoo 5 5500 | Athlon 64 x2 4400+, 1.5GB, FX 5800 Ultra | Pentium D 3.2ghz, 4GB, 7600gt | Celeron g460, 8GB, 730gt | 2x Athlon FX 74, 8GB, 8800gts 512 | FX 9590, 16GB, R9 295x2 | E350, 8GB | Phenom X4 2.6ghz, 16GB, 8800gt | random core2 duo/atom/i5/i7 laptops
User avatar
Prophet
Militia Captain
Militia Captain
Posts: 826
Joined: Tue Nov 18, 2008 6:09 pm

Well I have considered this for quite a while and have found many posts regarding trade improvements so I'm just gonna get the ball rolling by tossing down a bunch of ideas.

There is also the possibility of introducing stations for the player to operate their own business. Mining ore, farming, collect water, raise livestock, produce items. The player could mine some ore and either sell it immediately, or pay to have it made into a useable product and then try to sell those, eventually buying a factory to use their ore and make their own factory, maybe an auton factory, or a research facility, which will allow the factory to make better products, maybe even a couple of Fusionfire Howitzers that you can take over to the auton factory for installation....
maybe not so extensive:)

Of course, the backbone of trade is the commodities and conecting suppliers to consumers. Large stations would require thousands of food, medical supplies, passenger transportation, fuel/energy. The corporate stations need to be restocked, Shipyards need parts to assemble.

Ideally, the life of a succesful trader should produce a large surplus of credits (that IS the idea) so a number of 'sinks' need to be made for the player to re-invest their profits.
Each playership is hardcoded to limit the cargo it can carry, so a 5000 Ton cargo hold won't help. The only other ship upgrade to make trading easier would be an engine.

Transportating crates could require a license for different types: hazardous/toxic, live animals (needs a heated & sealed cargo hold), tourists. Each license would have certain requirements as well as a hefty purchase price, but your profit/ton would be larger. The life of a transporter is sometimes dangerous. Pirate attacks, can be very bad for business as are stowaways, damaged cargo, or the buy price plummets because another freighter arrived yesterday with products that you are trying to sell.

Well, I think that's enough to get others ideas started. Let's here some
Coming soon: The Syrtian War adventure mod!
A Turret defense genre mod exploring the worst era in Earth's history.
Can you defend the Earth from the Syrtian invaders?
Stay tuned for updates!
User avatar
Atarlost
Fleet Admiral
Fleet Admiral
Posts: 2391
Joined: Tue Aug 26, 2008 12:02 am

You forgot taxes. They're really the most plausable unlimited cash drain. It'd be hard to track some income sources, but any sale at a confederacy or corporate station could be logged and taxed. A progressive tax rate of some sort could limit your ability to easily get limitless money.
User avatar
alterecco
Fleet Officer
Fleet Officer
Posts: 1658
Joined: Wed Jan 14, 2009 3:08 am
Location: Previously enslaved by the Iocrym

I think one of the most important aspects of a trade system is that it breathes life into old systems (systems you have already visited and sacked). A healthy trade system implies that you are not the only one trading, so a way of setting up reliable npc inter-system trade routes is important. This does not mean that ships will fly certain routes on clockwork, but that it should be possible for stationA in systemA to know of stationB in systemB, and for stationA to know that stationB needs meds, and then direct a trade route with meds to that location. This would also open up for wholesale pirateering (a good thing, imo)

The way I see it, the whole trade system hinges on a controlling entity. Typically this would be a hidden station in every system, running a set of timers and setting up events.

A way to masquerade the timer stations, is to make trading controlled by a guild. Say, the Traders Guild. By default they would have a strong prescence in Commonwealth systems, and much less so in anarchistic, antagonistic factions systems. The player could however expand trade to other systems by completing some missions or like. This would spawn a TradeGuild station in the system, thereby starting the trade clock there....

As for playerships and cargo, there are ways around it. You can actually stuff a ridiculous amount of cargo onto any ship, the net result is just that it wont move. In reality trade cargo could be comprised of dummy items, and a list on the playership. The dummy items would control weight, and the list would maintain the trade manifest. As for browsing the inventory, either trade cargo is kept separate (and has a separate inventory screen) or replacement is done when in the dockscreen. Either way it can be done (I have used this technique a lot in the god mod item browsing screens). Cargo could also be transported on new dedicated hauler autons or similar.

So... limitless money. First off I think it is less of an issue that most others I have talked to about it. In the end there is no way to avoid letting the player have infinite money, short of cheating (hey, someone stole 1 billion from you. Curious, eh?) The goal is just to make it rediculously tedious and slow. And provide lots of more interesting actions for the player that are money sinks. Good sugestions have been posted before. Letting the player become a tycoon and own his own stations could become a huge money sink (and ofc a huge money boost). Rising in rank inside a Traders Guild could prove a very costly affair, with possible large benefits. And in the end, large sums of money is what a trade player plays for. Of course he can buy the most expensive weaponry in the galaxy, but why would he, he's not a fighter. A military victory is usually not the goal for a trader. In the worst case it will make for a different way to acheive a military victory. And i guess, short of bribing the Iocrym to let you go through the gate (you do know how they love chocolate, don't you?), there is no way to win the game as a pure trader...

I will try to make a detailed write up with some code bits of how I had originally intended to make a trade mod, if anyone is interested?. Maybe it can serve as a starting point, and get us started on discussing actual implementation details...

.]
User avatar
Atarlost
Fleet Admiral
Fleet Admiral
Posts: 2391
Joined: Tue Aug 26, 2008 12:02 am

You might custom outfit mercenaries or special autons to kill the Iocrym I suppose. If all shops refreshed you could do ore to ringer runs to get rins and buy a bunch of IM90s for hired wingmen. You'd have to pay a big premium to get most people to follow you into Heretic, though. On the bright side if all your firepower was external to your ship you could actually use the Lazarus.
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

I would like to throw in another idea.
In the past threads has always been considered for the player to:
-do the freighter and trade
-do the escort and defend the freighter that hired you (like korolov)

What about the contrary ? Hiring a freighter for your personal trade station ?
You get money, yes, but you have to pay the freighter and find a profitable route (that is not going to be obvious for high money or fairly easy to figure out for low money or non-profitable routes)
You can always pay for turrets for the station, hire more escort or do yourself the escort.
User avatar
Aury
Fleet Admiral
Fleet Admiral
Posts: 5421
Joined: Tue Feb 05, 2008 1:10 am
Location: Somewhere in the Frontier on a Hycrotan station, working on new ships.

Still, the amount a ship can carry should be limited to something proportional to the playership's capacity...
A wolfen should NOT be able to carry as much cargo as an EI500...
Also, since I'm working on this for it to be both a stand-alone mod AND an integrated part of TX2, it needs to be compatible with the wide range of playerships and how some are freighters, meant to carry cargo, while others are fighters, meant to blow stuff up, but neither to act interchangeably- the Antares VIII and the EI200 (I swapped the names of the 200 and 500, so it's still the same old EI500, just renamed) both are meant to ship freight around: the Antares VIII trundling along slowly with 4000 tons of cargo (up to 5000), and the EI200 speeding along with a good 300 to 500 tons of cargo, though the EI200 is much more versatile, seeing as it has a speed of .18c(?) and a small profile, it can weakly fill a gunship type role, thus its cargo capacity is still relativly near to the other ships, still higher though (The next highest capacity being 200 max tons on the yacht(?)). The Kineticores I and II are not meant to haul freight (max cargo being 100 and 120 respectively), and are designed to act as fighters...
(shpOrder gPlayership 'barrelRoll)
(plySetGenome gPlayer (list 'Varalyn 'nonBinary))
Homelab Servers: Xeon Silver 4110, 16GB | Via Quadcore C4650, 16GB | Athlon 200GE, 8GB | i7 7800X, 32GB | Threadripper 1950X, 32GB | Atom x5 8350, 4GB | Opteron 8174, 16GB | Xeon E5 2620 v3, 8GB | 2x Xeon Silver 4116, 96GB, 2x 1080ti | i7 8700, 32GB, 6500XT
Workstations & Render machines: Threadripper 3990X, 128GB, 6900XT | Threadripper 2990WX, 32GB, 1080ti | Xeon Platinum 8173M, 48GB, 1070ti | R9 3900X, 16GB, Vega64 | 2x E5 2430L v2, 24GB, 970 | R7 3700X, 32GB, A6000
Gaming Systems: R9 5950X, 32GB, 6700XT
Office Systems: Xeon 5318Y, 256GB, A4000
Misc Systems: R5 3500U, 20GB | R5 2400G, 16GB | i5 7640X, 16GB, Vega56 | E5 2620, 8GB, R5 260 | P4 1.8ghz, 0.75GB, Voodoo 5 5500 | Athlon 64 x2 4400+, 1.5GB, FX 5800 Ultra | Pentium D 3.2ghz, 4GB, 7600gt | Celeron g460, 8GB, 730gt | 2x Athlon FX 74, 8GB, 8800gts 512 | FX 9590, 16GB, R9 295x2 | E350, 8GB | Phenom X4 2.6ghz, 16GB, 8800gt | random core2 duo/atom/i5/i7 laptops
User avatar
alterecco
Fleet Officer
Fleet Officer
Posts: 1658
Joined: Wed Jan 14, 2009 3:08 am
Location: Previously enslaved by the Iocrym

Wolfy wrote:Still, the amount a ship can carry should be limited to something proportional to the playership's capacity...
A wolfen should NOT be able to carry as much cargo as an EI500...
I agree completely. I was just stating the fact that we were not limited by the built in cargo capacity. Since it is not possible to change ships in mid game it might be interesting to examine other venues of how to let a player switch styles. If he chose a wolfen from the start, but finds out he wants to trade, he will have a very tough time. Some "upgrades" might actually make it a posibility, although he should by no means be as effective as a true freighter.
Wolfy wrote:Also, since I'm working on this for it to be both a stand-alone mod AND an integrated part of TX2, it needs to be compatible with the wide range of playerships and how some are freighters, meant to carry cargo, while others are fighters, meant to blow stuff up, but neither to act interchangeably
The way I hope to see this mod develop, using it for different purposes should be very simple. Most things should be configurable though easy to access global variables or staticdata, both to serve the purpose of making it possible for you to integrate it, and to ease the testing the mod will have to go though to make it balanced.
User avatar
Aury
Fleet Admiral
Fleet Admiral
Posts: 5421
Joined: Tue Feb 05, 2008 1:10 am
Location: Somewhere in the Frontier on a Hycrotan station, working on new ships.

Would the static data be built into the ships or the item itself?
(shpOrder gPlayership 'barrelRoll)
(plySetGenome gPlayer (list 'Varalyn 'nonBinary))
Homelab Servers: Xeon Silver 4110, 16GB | Via Quadcore C4650, 16GB | Athlon 200GE, 8GB | i7 7800X, 32GB | Threadripper 1950X, 32GB | Atom x5 8350, 4GB | Opteron 8174, 16GB | Xeon E5 2620 v3, 8GB | 2x Xeon Silver 4116, 96GB, 2x 1080ti | i7 8700, 32GB, 6500XT
Workstations & Render machines: Threadripper 3990X, 128GB, 6900XT | Threadripper 2990WX, 32GB, 1080ti | Xeon Platinum 8173M, 48GB, 1070ti | R9 3900X, 16GB, Vega64 | 2x E5 2430L v2, 24GB, 970 | R7 3700X, 32GB, A6000
Gaming Systems: R9 5950X, 32GB, 6700XT
Office Systems: Xeon 5318Y, 256GB, A4000
Misc Systems: R5 3500U, 20GB | R5 2400G, 16GB | i5 7640X, 16GB, Vega56 | E5 2620, 8GB, R5 260 | P4 1.8ghz, 0.75GB, Voodoo 5 5500 | Athlon 64 x2 4400+, 1.5GB, FX 5800 Ultra | Pentium D 3.2ghz, 4GB, 7600gt | Celeron g460, 8GB, 730gt | 2x Athlon FX 74, 8GB, 8800gts 512 | FX 9590, 16GB, R9 295x2 | E350, 8GB | Phenom X4 2.6ghz, 16GB, 8800gt | random core2 duo/atom/i5/i7 laptops
User avatar
alterecco
Fleet Officer
Fleet Officer
Posts: 1658
Joined: Wed Jan 14, 2009 3:08 am
Location: Previously enslaved by the Iocrym

Wolfy wrote:Would the static data be built into the ships or the item itself?
Neither. Configuration should be handled by a virual item that serves no other purpose put carry configuration. It is just a way of avoiding poluting the global namespace with tons of variables. You can look at BattleZone as an example of what i mean. Ideally we don't overwrite any ships or items or stations to make this work.
User avatar
Aury
Fleet Admiral
Fleet Admiral
Posts: 5421
Joined: Tue Feb 05, 2008 1:10 am
Location: Somewhere in the Frontier on a Hycrotan station, working on new ships.

alterecco wrote:
Wolfy wrote:Would the static data be built into the ships or the item itself?
Neither. Configuration should be handled by a virual item that serves no other purpose put carry configuration. It is just a way of avoiding poluting the global namespace with tons of variables. You can look at BattleZone as an example of what i mean. Ideally we don't overwrite any ships or items or stations to make this work.
It's this item to which I was referring.
(shpOrder gPlayership 'barrelRoll)
(plySetGenome gPlayer (list 'Varalyn 'nonBinary))
Homelab Servers: Xeon Silver 4110, 16GB | Via Quadcore C4650, 16GB | Athlon 200GE, 8GB | i7 7800X, 32GB | Threadripper 1950X, 32GB | Atom x5 8350, 4GB | Opteron 8174, 16GB | Xeon E5 2620 v3, 8GB | 2x Xeon Silver 4116, 96GB, 2x 1080ti | i7 8700, 32GB, 6500XT
Workstations & Render machines: Threadripper 3990X, 128GB, 6900XT | Threadripper 2990WX, 32GB, 1080ti | Xeon Platinum 8173M, 48GB, 1070ti | R9 3900X, 16GB, Vega64 | 2x E5 2430L v2, 24GB, 970 | R7 3700X, 32GB, A6000
Gaming Systems: R9 5950X, 32GB, 6700XT
Office Systems: Xeon 5318Y, 256GB, A4000
Misc Systems: R5 3500U, 20GB | R5 2400G, 16GB | i5 7640X, 16GB, Vega56 | E5 2620, 8GB, R5 260 | P4 1.8ghz, 0.75GB, Voodoo 5 5500 | Athlon 64 x2 4400+, 1.5GB, FX 5800 Ultra | Pentium D 3.2ghz, 4GB, 7600gt | Celeron g460, 8GB, 730gt | 2x Athlon FX 74, 8GB, 8800gts 512 | FX 9590, 16GB, R9 295x2 | E350, 8GB | Phenom X4 2.6ghz, 16GB, 8800gt | random core2 duo/atom/i5/i7 laptops
User avatar
Prophet
Militia Captain
Militia Captain
Posts: 826
Joined: Tue Nov 18, 2008 6:09 pm

Here's some links to some other ideas:

http://neurohack.com/transcendence/foru ... ight=trade

- haul freight for Korolov, become a pirate raiding transports

http://neurohack.com/transcendence/foru ... ight=trade

- remove/raise the station credit cap, increase amount of trade goods available

http://neurohack.com/transcendence/foru ... ight=trade

- adjust prices according to availability within a system

http://neurohack.com/transcendence/foru ... ight=trade

- indirect trade routes (intermediate industry)

http://neurohack.com/transcendence/foru ... ight=trade

- an NPC ship that can buy/sell

http://neurohack.com/transcendence/foru ... ight=trade

- a good post by George regarding 'how' the player gets creds and more
ways are needed to take creds from the player

http://neurohack.com/transcendence/foru ... ight=trade

- Periculi's Environmental trade mod


http://neurohack.com/transcendence/foru ... ight=trade

- George's thoughts (pre version .98 ) on restocking stations and trade missions and some good ideas


some stuff that isn't mentioned

- have prices fluctuate randomly +/- 1%-25%
- fill out the economy (who makes all the weapons? where do they get ore?)
- wholesale pricing when buying/selling in bulk
- hiring/buying your own freighters to transport goods ( I want an Antares V wingman!)
Last edited by Prophet on Wed Jun 03, 2009 1:30 pm, edited 2 times in total.
Coming soon: The Syrtian War adventure mod!
A Turret defense genre mod exploring the worst era in Earth's history.
Can you defend the Earth from the Syrtian invaders?
Stay tuned for updates!
User avatar
Aury
Fleet Admiral
Fleet Admiral
Posts: 5421
Joined: Tue Feb 05, 2008 1:10 am
Location: Somewhere in the Frontier on a Hycrotan station, working on new ships.

oh yes, cargo wingmen - that would help reduce the major problem with having tons of cargo. Of course, hiring an antares would be rather expensive- it'd probably start with some small cargo drones (being the cheapest), then moving up to EI100's all the way to the antares V (in vanilla anyways, TX2 would have more options due to the additional freighter) :D
(shpOrder gPlayership 'barrelRoll)
(plySetGenome gPlayer (list 'Varalyn 'nonBinary))
Homelab Servers: Xeon Silver 4110, 16GB | Via Quadcore C4650, 16GB | Athlon 200GE, 8GB | i7 7800X, 32GB | Threadripper 1950X, 32GB | Atom x5 8350, 4GB | Opteron 8174, 16GB | Xeon E5 2620 v3, 8GB | 2x Xeon Silver 4116, 96GB, 2x 1080ti | i7 8700, 32GB, 6500XT
Workstations & Render machines: Threadripper 3990X, 128GB, 6900XT | Threadripper 2990WX, 32GB, 1080ti | Xeon Platinum 8173M, 48GB, 1070ti | R9 3900X, 16GB, Vega64 | 2x E5 2430L v2, 24GB, 970 | R7 3700X, 32GB, A6000
Gaming Systems: R9 5950X, 32GB, 6700XT
Office Systems: Xeon 5318Y, 256GB, A4000
Misc Systems: R5 3500U, 20GB | R5 2400G, 16GB | i5 7640X, 16GB, Vega56 | E5 2620, 8GB, R5 260 | P4 1.8ghz, 0.75GB, Voodoo 5 5500 | Athlon 64 x2 4400+, 1.5GB, FX 5800 Ultra | Pentium D 3.2ghz, 4GB, 7600gt | Celeron g460, 8GB, 730gt | 2x Athlon FX 74, 8GB, 8800gts 512 | FX 9590, 16GB, R9 295x2 | E350, 8GB | Phenom X4 2.6ghz, 16GB, 8800gt | random core2 duo/atom/i5/i7 laptops
User avatar
alterecco
Fleet Officer
Fleet Officer
Posts: 1658
Joined: Wed Jan 14, 2009 3:08 am
Location: Previously enslaved by the Iocrym

Prophet had a great idea and we have been working on implementing it over the last couple of days and it has actually turned out to be very usable. We have dubbed it DynamicPricingFramework, since it is not in itself a trade mod, but supposed to provide the underpinnings for the complex price fluctuations required in a trade mod.

You can find the current version here: http://github.com/johanfriis/TranscendenceExtensions/ (scroll down the directory listing and click on DynamicPricingFramework.xml. To download it right-click the `raw` link and choose `Save As`.)

I have tried to include enough comments in the header to make it clear what is going on. Atm Prophet is building more mechanisms and brainstorming trade ideas in general, and I will see if there are ways we can make the framework more extensible. We would welcome feedback on what has been done, and a discussion of how to make good mechanisms would be cool.

**Edit: change in nomenclature

.]
User avatar
alterecco
Fleet Officer
Fleet Officer
Posts: 1658
Joined: Wed Jan 14, 2009 3:08 am
Location: Previously enslaved by the Iocrym

Prophet convinced me to describe the framework here:

The core of the mod works by overriding 3 built in functions (only 2 in the mod atm). The built in functions are (itmGetPrice) and (objGetSellPrice). These functions are used in the Buy/Sell dockscreens to return the price of an item. An example of overriding a function is:

Code: Select all

;; save a copy of the original function
(setq original_itmGetPrice itmGetPrice)

;; build and override
(setq itmGetPrice (lambda (itm)
    (multiply 10 (original_itmGetPrice itm))
))
This is a simplistic example, but it is the base we have used.

We have then defined a MasterList, which contains a list of all stations, and for each station, a list of mechanisms that affect the price of an item at that station. Mechanisms are the heart of this mod.
They are defined as functions which take two arguments and return a price (they must always return a price). Any type of calculation can be done in a mechanism. A small example, using a mining colony as station:

Code: Select all

(setq MasterList (list
    &stMiningColony; '(oreDependent fearEffect)
))

(setq oreDependent (lambda (itm price)
  (block (oreInSystem isOre)
    ;; find out how much ore in system
    (setq oreInSystem (cleverOreFinder))
    
    ;; is the itm we are getting the price
    ;; for ore related
    (setq isOre (isItemOre itm)

    (if isOre
       (if (gr oreInSystem 5000)
         ;; there is alot of ore in system
         ;; lower the price
         (setq price (divide price 2))
         ;; there is a shortage of ore in the system
         ;; raise the price
         (setq price (multiply price 2))
       )
       ;; it's not ore, just return base price
       Nil
    )
    ;; always return the price
    price
  )
))

(setq fearEffect (lambda (itm price)
  (block (enemy)
    ;; item price goes up if system has
    ;; a large enemy prescence
  
    (setq enemy (cleverEnemyFinder))

    (if (gr enemy 100)
      ;; the people are really afraid
      (setq price (muliply price 4))
    )
    ;; always return the price
    price
  )
))
The example above is a bit simplistic, but it shows the power of mechanisms.

If the system is high on ore, the price of ore at MiningColony stations will go down. If there are a lot of enemies in the system, prices will go up.

The list of mechanisms is processed in order, so the price the first mechanism returns will be passed on to the second mechanism and so forth. The last mechanism will return the final price. (This system is up for debate!)

We will try to make it easy to extend the mechanisms applied to a station, but at the moment there is no way to do this easily.

I know that some will think it evil to override the base methods, but the only other way of doing this is by overriding every station in game, or all trade dock screens. Either way is not optimal, and this one seemed less invasive. If you are asking for a price outside of a station with mechanisms nothing will have changed.
Post Reply