Important Message

You are browsing the archived Lancers Reactor forums. You cannot register or login.
The content may be outdated and links may not be functional.


To get the latest in Freelancer news, mods, modding and downloads, go to
The-Starport

Calling all Lancers.. Variable Economics patch for FL is pos

The general place to discuss MOD''ing Freelancer!

Post Thu Jan 22, 2004 9:30 am

Calling all Lancers.. Variable Economics patch for FL is pos

Edit: Posted here because of serious/importance of the issue at stake. Please consider stickying the thread.

Overview:
I have given some thought to making a variable economy in FreeLancer. I have here outlined the steps required for everything to work properly. It just needs the talent of some master programmers to get moving. I have never had past Algebra 2 level in High School, and I took only one statistics class several years ago in college. But as an IT professional analyst, a student of Psychology, and chess player, I know how to think systematically. I put this together in about 1 hour, and haven't proofread much. To my knowledge, this really is complete end-to-end outline of everything required to adding a variable economy. Patching this to freelancer is also perhaps one of the largest undertakings for any mod of any game to date. I'd like to see that done though. Ill contribute whatever braincells I can spare...the only problem is, I lack speaking the language of mathematicians, programmers, and others in this field. That should however, make communicating with the majority of the planet much more effective The rest of you can hopefully make something of this

What do I want? What do we need? I want to see a program that will scramble commodity prices in the ini files. Everyone knows that a variable economy means these prices have to be switched.. but it needs more than just random numbers.. it needs some kind of system.

So what am I thinking?

Begin brain dump:

Each "solar" is either a supplier or a buyer. We also know that the same product has "Green" value, "Yellow," or "Red." The bases that sell these items will have it for the cheapest. The bases furthest away from the sellers, and in demand will buy it outrageously. All other places that are between the Green and the Red solars are in the middle and labelled "YELLOW." What does this mean to me? I See a range of numbers here.. going from one extreme to the other.. I see a box and whiskers chart.. with a big yellow region as the box, and the Red and Green as the whiskers. Each commodity will vary in price relating to a box and whiskers style chart, all commodities. I want to know what the median is for each commodity. That is an anchor for this projet. The median is our fulcrum and we are going to upset the balance.

Knowing this, varying the economy in freelancer can begin with a MASSIVE spreadsheet. Ive seen some of you with INI file programs that create commodity charts for trading. Something like that is useful here for applying this quick economics class to freelancer.

Some of you older guys know of the four ways economic systems change from high school/college. We want FreeLancer to simulate reality as much as possible, so Freelancer must have each of the four dimensions of economic change as well. There arent five or six, or 2 or 3 dimensions.. but really, 4. I don't hope some of you programmers getting carried away and decide to create many more than 4 instances of commodity fluxuation, because creating just four with a program is hard, very hard. Believe me, four is enough. We see 0 (1) dimension(s) of change in freelancer.. and thats dumb. We want a simulation. We want fun. We want supply and demand So what to do???

We can alter the value of these commodities by sliding the median left and right of the box n whiskers chart.. but first Economics 101. Here are the 4 scenarios I was just blabbing about:

1) producing an abundance of apples, but nobody is interested in buying them
What happens? Buy apples cheap on manhattan, sell cheap on Malta.

2) producing an abundance of apples, and everyone is craving them
Buy apples cheap on manhattan, sell for outstanding prices on Malta.

3) producing a scarce number of apples, and nobody is interested in them
Get ripped off buying apples on manhattan, and get ripped off selling them to Malta.

4) producing a scare number of apples, but everyone is craving them
Get ripped off buying apples on manhattan, but make a decent amount of money on Malta.

But somewhere between Manhattan and Malta, there is a median. There is a point, a fulcrum where going any further out towards the edge of space, apples, apples my friend become MORE PRECIOUS THAN GOLD! But go back towards manhattan boy, and your apples are worth almost the same price for which you paid. BUT SOMEWHERE THERE IS A MEDIAN.. And not just for apples, but for EACH COMMODITY there is a median price.. and location(s) attached to this price. We need that table now, kids!

Where is this fulcrum? Rooting through the ini files in that table should show that. And thats what we want to do.

That table should resemble something like this:

SUPPLIERS MEAN(Median) BIGGEST BUYERS
Solar A Solar B Solar C Solar D Solar E
Commodity X $100 $105 $106 $500 $900
Commodity Y $100 $103 $105 $300 $500
Commodity Z $200 $210 $212 $600 $1000



The list of solars will be LONG, should be going accross the page about 150 times, or however many stations there are to land at in freelancer. It wont go from Solar A to E, I just used those labels to make it easy.

AND OF COURSE! The list of commodities go all the way down, listing everything available in the game.

The first column, Solar A, needs to be the cheapest suppliers of this commodity. Solars B and so on need to be the rest. There are other suppliers, other places that say "BASE SELLS THIS ITEM." But these others may not be the cheapest. They arent important. What we need to take note of now is the LEFT EXTREME, the RIGHT EXTREME and the MEAN.

Edited by - lvxoccvlta on 3/16/2004 4:31:33 AM

Post Thu Jan 22, 2004 9:30 am

Now what to do then with this BIG table? Remember those box and whisker charts from school? Import this big massive frikking table into Microsoft Excel's graph editor, or SPSS or something and make a box and whisker chart for EACH commodity. Maybe that isnt required, but that should give a closer idea to what I am trying to explain. Please do that just to play with the charts to get a feel for my next idea.. changing the commodity prices and making them fluxuate.

After importing this to Microsoft Excel (either in real life, or just in your head) Lets ask out loud, "How then does this alter the system of our little static economy?"

ANSWER: By altering the the size of the graphs through linear programming (changing the value ratios).

The relationship between the numbers need to be adjusted with some "heavy" mathematics. We want to change the "end prices," ie, Solar A and Solar Z's prices, while at the same time adjusting the relationship between ALL THE NUMBERS IN BETWEEN. A program that can accomplish this will save us a LOT of typing work, especially if we want to retype this chart manually 100 times or so... we need a program that will alter these numbers, these RANGES.. logically, and effectively. Maybe Excel can help, or a good calculator and some linear programming skills.

But the MEAN must always remain a MEAN and MEDIAN.
So EVERY SINGLE solar in the game will have to have his price adjusted accordingly by either RAISING OR LOWERING either SOLAR "A" or SOLAR "Z" or both A and Z. The mean-median will either remain perfectly in between the two values or slide a little left and a little right. The commodities on either side of our mean/median will fluxuate in value as well. Each scenario was discussed above with the apples.. there are four possibilities, and each four can be simulated in our table, now armed with a box and whiskers chart. This will also account for locations, and their distance away from the respective sellers and buyers. How convenient!

Here is how it relates to our Apples above:


1) having an abundance of apples, but nobody is interested in buying them
What happens? Buy apples cheap on manhattan, sell cheap on Malta.
What happens to the box and whiskers chart? Slide both Solar A and Solar Z to the left, almost equally.

SolarA "apples" SolarZ
I-------I-X-I-------I
I-------I-X-I-------I
$0-----------------------$1000

2) having an abundance of apples, and everyone is craving them
Buy apples cheap on manhattan, sell for outstanding prices on Malta.
What happens to the box and whiskers chart? Solar A and Solar Z move away from each other, about equal amounts.

I----I-X-I----I
I-----I-X-I-----I

3) having a scarce number of apples, and nobody is interested in them
Get ripped off buying apples on manhattan, and get ripped off selling them to Malta.
What happens to the box and whiskers chart? Solar A and Z both move inwards toward each other.

I------I-X-I------I
I--I-X-I--I

4) having a scare number of apples, but everyone is craving them
Get ripped off buying apples on manhattan, but make a decent amount of money on Malta.
What happens to the box and whiskers chart? Slide both A and Z to the right

I----I-X-I----I
I----I-X-I----I

Now that we know how to alter the economies.. how do we finally put this to use once and for all? THAT IS THE HARD PART.

We need to know several really NERDY things now.. things that are beyond my intelligence.
I can only provide an outline, maybe the rest of you can help.

We need to know a math formula, or algorithm used in statistics, maybe several. We need a formula that allows us to adjust the numbers for ALL commodities from A to Z, and these adjustments are made by simply raising or lowering the two extremes in our X axis (the commodity row.) Ive seen this done somewhere before, maybe Microsoft Excel does that.. It would be REALLY great if we had some formula like that to make our life easier. We need these numbers, all 150 solars per commodity to adjust a given value along the number line.. the numbers need to shift left, shift right, crunch toward the mean, or explode from the mean.

We can simplify the process even easier with a number randomizer, one that will automatically adjust these two end numbers, Solar A and z.. so that we can effectively simulate one of the four situations from above.

The randomizer needs limits though.. positive whole numbers are a good start. Give it a right biased bell shape curve..For example, Commodity X at Solar A has a 10% chance of increasing or decreasing 90% of its total value. That takes care of the producers.. now our extreme buyer Solar Z needs some lovin. Give Solar Z a 20% chance of increasing or decreasing its value up to 30%. All the numbers between A and Z should self-adjust using this algorithm devised from the formula above.

Lastly, we need a script that will write these new values into the INIs themselves! We should have a script on top of a script that will even randomize these INIs at random intervals.. maybe on a SERVER that hosts a game.. altering the economies once every few hours or couple days. That would be best.. the whole plan from top to bottom is designed as such:

FreeLancers variable economics patch:

-1 Script that writes new data to INI files
-2 Commodity program
-2a Number randomizer 1- increase or decrease maximum 90% of Solar A's price, only 30% of the time.
-2b Number randomizer 2- increase or decrease maximum 30% of Solar Z's demand, 20% of the time.
-2c Algorithm that adjusts our range of numbers for each commodity either left, right, squeezed or expanded from mean/median. The algorithm needs to change the relationship between each number as a huge variable entity.
-3 A big frikkin table with a list of each commodity in alphabetical order on the left.. and going accross the top each Solar from left to right.. beginning with the producer and ending with the solar most in demand of this commodity.

Conclusion:

Can someone put this together? Are there any sharp whiz kids out there who are mentally deft enough to get this moving? Any undertaking of this size requires a program outline.. I hope this serves the community well enough to get started.



Edited by - lvxoccvlta on 3/16/2004 4:37:12 AM

Post Tue Mar 16, 2004 4:45 am

Depends whether or not you want to be a trader. I just kill people!


The way the game is set up, once you've done the SP mission money doesn't mean much anyway. I like the idea, but would it really change the game? In MP maybe, but how much in SP???


p.s. Are you remembering Elite, where commodity prices DID change considerably?







Jose Chavez: "Trent! It's good to see my kind of scum."

Post Tue Mar 16, 2004 6:24 am

But it will change the game quite a bit. When I can no longer count on running Boron from Liberty down to Cambridge (I think), I’ll be forced to look for new markets – I’ll have to learn more about the universe to make a profit! (I mean, as a trader, not a fighter).

Having not touched freelancer modding before, I can’t help you on this venture, though. Sorry.


//------------------------------------
--the milling_hordesman

Post Tue Mar 16, 2004 9:28 am

This should be in the editing forum...

Anyway, I seem to remember someone talking about doing this before and the I believe that it had to be hard coded (ie, new exe for the game). I don't know if we have the knowledge (or the legal rights, grr... M$) to do this. The other way I seem to remember hearing about was a memory program running at the same time, but that led to instabilities.

The only feasable way I can see us doing this is to have a way to track how much of resource X is bought and sold in a given system and then have the sever admin re-compile the prices every day or so. Just my idea, and I know that'd be a lot of work for the admins, but it would be kinda cool

(This site is best viewed with your eyes open)

Post Tue Mar 16, 2004 10:00 am

Someone should definitely post this in the editing forum. If it's possible, they could probably tell you. Not sure if anyone would actually make a mod for it tho..

Great computer!
What kinda chip you got in there?
A dorito?

Post Tue Mar 16, 2004 10:01 am

Oddly one of my mags says Microsoft released the FL sourcecode

Post Tue Mar 16, 2004 1:11 pm

Ok let's get real...

What you're actually saying is that you've had an 'idea', but you have no idea how to implement this.

I bet if anyone from DA is reading this post they would just laugh.
I'm also involved in the industry using C++ as my base. I constantly read posts like this from wannbe fans about the games we have in developement. We pass/email these types of forum links around the office... for a laugh, because that's all they are. You have no idea about the amount of working man hours that it takes to put your suggestions into practice.
I don't want to sound harsh here, but if it was so easy, via the mod industry to create the points you have mentioned, then don't you think that the developers would have put forward a business plan, that is deemed profitabele, in order to do it?

It's like saying, I believe the moon could be made out of Cheese, if we all get together and make it happen. I'm sorry for the way my post sounds, but sooner or later you'll discover that real life has many more twists and turns than what you curently imgaine it has.

Hengist.

Post Tue Mar 16, 2004 2:28 pm

hola, there Hengist. i know it sounds like a lot of work, and the devs sit there and chuckle about such things; the funny part is, i'm no newbie to scripting, modding, etc. i also work with C++; consistantly, as a matter of fact, though not necessarily with as wide a range of knowledge as an industry professional would accumulate.

a mod like this is a lot of grunt work, i know, but you only have to get one working model of a single resource to get it working, and then perform a whole lot of copying/editing values in excell, or your text editor of choice. while the devs might not have the drive to do that work, a lot of people with big dreams for a game DO have that drive. i've seen it in morrowind, i've seen it in homeworld 1&2, i've seen it in X2, and i've seen it in dungeon siege. the actual concept of the implementation doesn't sound that difficult at all, as long as one talented individual knows enough about a realistic economic system to put it into code.

heck, even if you need to recompile the server every day to implment it, you could script something that accumulates the trades of each resource in each system and outputs it to text on a console command, then make the compiler do the mathematical work for you each time it rebuilds the price listings, as long as you know where they are set.

so, to sum up, it's a lot of work, yes - far too much to ask you hard-working, wise-cracking devs to do. however, i know that even i could do it, given about a week to get familiar with the local scripting language, two weeks tops to mess around with the code, another week or two to get the single model working. then, you could have a bunch of people replicate different sections of the tables for another couple of weeks, take a month to debug, go through several alphas/betas/whatever. in a few months, you'll have changed the nature of the economy in the game for as long as people keep playing.

//------------------------------------
--the milling_hordesman

Edited by - mhordes on 3/16/2004 2:31:03 PM

Post Tue Mar 16, 2004 2:57 pm

Shame Hengist, I take it you work for EA? Such a heartless person to the fans? or maybe LUCASARTs?

Undertsnad this, a great MANY compainies swallowed by these pits give more of a damn for the fans than for the cash. Fallout.

Post Wed Mar 17, 2004 5:22 am

What about the commodity prices you see when you check traderoutes by clicking a commodity. Or the tickertape readouts on stations. I'm not a programmer, but seems to me unless you can get a program to rewrite that constantly for each base and outpost and for every time someone checks to see how much they can buy or sell something via the Nural Net it would be rather difficult. Sounds like a real headache or two at this point in the Freelancer Show. Would be cool though

Post Wed Mar 17, 2004 5:29 am

"What about the commodity prices you see when you check traderoutes by clicking a commodity. Or the tickertape readouts on stations. I'm not a programmer, but seems to me unless you can get a program to rewrite that constantly for each base and outpost and for every time someone checks to see how much they can buy or sell something via the Nural Net it would be rather difficult. Sounds like a real headache or two at this point in the Freelancer Show."

nah; if it's a decently programmed engine, it should take care of that automatically each time you look at the list. it would make sense that they would check the price list when you clicked on the trade routes buttons, etc. however, i do see your point: if it's programmed to just read the static prices into memory at the start of the server (rather than on the fly during gameplay) then we might be stuck doing the daily recompile, rather than having a truly dynamic economy.

//------------------------------------
--the milling_hordesman

Post Wed Mar 17, 2004 6:26 am

Moved to the General Editing Forum

Return to Freelancer General Editing Forum