[Script] TC Stock Exchange "The Evolution of a Financial Revolution" v4 Full Release.

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

mark_a_condren
Posts: 1468
Joined: Wed, 3. Aug 05, 05:05
x3tc

Post by mark_a_condren »

JFM

unfortunatly it's not you, Filefront strikes again !!!!

I'll upload to a different site (googlecode) and repost some download links. They have about yanked my chain for the last time, sorry.


LA

Was wonding if anyone would notice that little accounting value. But i never said the words "High Maintainance", you did.. :twisted:
(i just hope she doesn't find out about the Booz fund :D )

MarCon
Logain Abler
Posts: 2255
Joined: Mon, 31. Oct 05, 08:44
x4

Post by Logain Abler »

mark_a_condren wrote:JFM

unfortunatly it's not you, Filefront strikes again !!!!

I'll upload to a different site (googlecode) and repost some download links. They have about yanked my chain for the last time, sorry.
MarCon
I have FTP resources kindly provided by StormMagi. Happy to host your script if you want?

LA
mark_a_condren
Posts: 1468
Joined: Wed, 3. Aug 05, 05:05
x3tc

Post by mark_a_condren »

LA wrote:I have FTP resources kindly provided by StormMagi. Happy to host your script if you want?

LA
Thank you for your very kind offer, didn't see it until after had uploaded to googlecode. Can i take a raincheck for a bit?


TEMP DOWNLOAD LINKS:

SPK:
Stock Exchange Stage 2 v1 (Spk version)

ZIP:
Stock Exchange Stage 2 v1 (Zip version)

These links will also be posted in the OP.

Info,
While i'm posting, the Bank 'accounts' part of Stage 3 will be available for testing very shortly. Just doing some final tests before releasing it as an open beta.


MarCon
mark_a_condren
Posts: 1468
Joined: Wed, 3. Aug 05, 05:05
x3tc

Post by mark_a_condren »

Stage 3 beta v1 'Bank Accounts' is now available for download from the OP beta test versions available section.

See the bottom of the OP for some screenshots of the menus.

Installation instructions can be found with the Download links.

Any questions, don't hessitate to ask.

I think it's all pretty straight forward to use the new bank features, but i would :) .

Give it a test and see what you think, but it's only worthwhile if you let me know too!

EDIT:
Note to beta Downloaders:
An over use of SETA would be a BAD IDEA, SETA tends to skip cycles in the interest updater script, resulting in your interest payments being reduced for that period (interest period is 1 game hour). Nothing i can do about it at this time, just use SETA on very low, or better still, don't use it at all. :P

MarCon
Last edited by mark_a_condren on Fri, 23. Jul 10, 12:45, edited 1 time in total.
User avatar
Idea
Posts: 516
Joined: Fri, 24. Oct 08, 12:14
x4

Post by Idea »

Downloading now :D
Alexfighter
Posts: 37
Joined: Wed, 22. Aug 07, 01:50

Post by Alexfighter »

Is it possible to implement a notification feature?

For example: I want to be notified when the price of that share/commodity goes down to X or goes up to Y, so that I can buy or sell at the price I'm interested.

That's one of the features we have in real life trading solutions.

Thanks.
mark_a_condren
Posts: 1468
Joined: Wed, 3. Aug 05, 05:05
x3tc

Post by mark_a_condren »

@ Idea

Go you good tester you :D
See what you tink and if you think it's balanced or not with the interest rate. (I think there is a lot of balancing still to be done in the rest of the script also)


@ Alexfighter

It's one of the features on the 'To Do' list yes.
There are quite a number of things that can still be implemented yet. I just can't get them all done at once. I'm trying to get the core areas of the script done and released.

Then i'll go back and start to intduce the added features. But, you have done exactly what i need doing, use the script, come up with an addon or idea and put it forward so it can be added later if possable. So thanks for the feedback.

I should start a section in the OP that lists the suggested features awaiting implementation. That way we can all see just how much work i still have to do :( and what others have suggested :) , might lead to some spin off ideas. :idea:

Note to beta Downloaders:
An over use of SETA would be a BAD IDEA, SETA tends to skip cycles in the interest updater script, resulting in your interest payments being reduced for that period (interest period is 1 game hour). Nothing i can do about it at this time, just use SETA on very low, or better still, don't use it at all. :P

MarCon
Saint-Ashley
Posts: 1267
Joined: Sat, 3. Dec 05, 03:40
x4

Re: [Script] TC Stock Exchange "The Evolution of a Financial Revolution" Stage 3 beta v1

Post by Saint-Ashley »

mark_a_condren wrote:Note to beta Downloaders:
An over use of SETA would be a BAD IDEA, SETA tends to skip cycles in the interest updater script, resulting in your interest payments being reduced for that period (interest period is 1 game hour). Nothing i can do about it at this time, just use SETA on very low, or better still, don't use it at all. :P
One thing you can do, is store the game time in a variable and compare next time the script runs, to see how many hours have passed, then compute accordingly.
mark_a_condren
Posts: 1468
Joined: Wed, 3. Aug 05, 05:05
x3tc

Post by mark_a_condren »

Saint-Ashley

I've just reread my own quote there, and i've worded that very badly i'm afraid.

You make a good point and thats basically what i've done, but without overdoing it, it's hard to get perfect.

This is how it works,


The period start time + 3600 (1 hour) is saved in a variable. Every cycle this value is checked to see if it has expired against the current playing time.

Interest is calculated on the average account balance over this 1 hour period.

This is achieved by every 60 seconds (1 minute) checking the account balance and dividing it by 60 and adding thaat value to a variable containing the previous values for the same account.

At the end of the 1 hour period it pays the interest on the amount stored in this variable.

But without keeping masses of information it is hard to determine if it was the player who changed the account value or the script skipping a cycle.

To keep the script as light weight as possable all accounts are checked by the one script, Each account does not have its own cycle running. It was a choice between performance and accuracy, i tried to find a middle ground.

Don't forget the player can change the account balance up and down all over the place in that one hour period.

I've spent the last couple of days rewriting formulas and scripting to try to keep the code as light weight as possable but still keep it accurate. Sounds easy but can be a bit harder to do in practice.

Hay, it could be that i've done it badly, but for now that's how it is until i can find a better way to do it.

MarCon
rymmie1981
Posts: 15
Joined: Wed, 9. Dec 09, 06:40
x3tc

Post by rymmie1981 »

This actually one of the best ways to make money early game(as long as you don't have Nividium mining operation going). It usually doesn't take much more than 100k to fill your Mercury's hold with the Humble Trader start. I used to hold on to those extra credits and slowly upgrade my engine and cargo bay, but now I put that money to work until I roll into an equipment dock again.

Also, the bank idea is good, but I use the stock exchange as a bank already. I invest in the lowest buys on the corporation page through a large spread of companies(later game, of course). When I need money, I go to the exchange and pull out whatever money I need from the stocks that have done best. This takes turning stock limits off, but it works.
User avatar
Idea
Posts: 516
Joined: Fri, 24. Oct 08, 12:14
x4

Post by Idea »

Hey mark

Nothing to report :) Works as it should.

When can we expect the final piece of the puzzle(loans)?
mark_a_condren
Posts: 1468
Joined: Wed, 3. Aug 05, 05:05
x3tc

Post by mark_a_condren »

Idea wrote:Hey mark

Nothing to report :) Works as it should.

When can we expect the final piece of the puzzle(loans)?
Thanks Idea for that brief and to the point report. :o Improvements? Changes? Likes? Dislikes? Ease of use? Interest to high / low? .......

I've been a busy little beaver working on the loans. It's coming along but it will be a little while yet before you get to try and rip the bank off :shock:

I suppose you would like some info on it so far?
Of course you do, don't you!

* Done and working
* Being done and somewhat working
* Yeah i'm getting to it!

Where do i start as a bank customer?
- You will have a credit rating of 0 to 15 (0 BAD, 15 GOOD) *
- You will start with a credit rating of 5 (i don't know if your a good risk or not, YET :wink: ) *
- Get loan and pay it back on time (not 1 second late) but not before loan period is half wat through, credit rating goes up 1 point. *
- Get Loan and pay it back late (even 1 second) but less than 1 hour late, credit rating goes down 1 point. *
- Get loan and pay it back in under half loan time, credit rating goes down 1 point. (still charged full interest though :P ) *
Why is my credit rating important?
- Loans come in 3 flavours. *
- 1, Credit Loan - You can borrow upto 80% of the credits in your 'Player Account' bank accounts are ignored. *
- 2, Station Morgage - You borrow 80% of the value of a Station, calculated at its 'Min' value, including stock on hand. *
- 3, Ship Morgage - You borrow 80% of the value of a Ship, calculated at its 'Min' value, wares in its cargo hold are NOT included. *
- Each flavour has 3 toppings, this is where your credit rating comes in. *
- All 3 will be Offered at the time of application if your eligible and you get to choose the one you want. *
- 1 to 8 credit rating gets you 1 Loan Offer. *
- 9 to 12 gets you 2 Loan Offers. *
- 13 to 15 gets you 3 Loan Ofers. *
- Oh, and 0 gets you NO loan offers cos your on a 2 Hour Loan Ban, at the end of which you will get a credit rating of 1. *
- First Loan Offer, 1 Hour loan time, Interest rate = Base 15 - credit rating, down to a min of 7% (so you start on 10%) this is the only offer you get at the start, you have to work for the rest. *
- Second Loan Offer, 2 Hour loan time, Interest rate = Base 20 - credit rating, down to a min of 10% *
- Third Loan Offer, Unlimited loan time (actually 30 game years if you play that long), Interest rate = Base 25 - credit rating, down to a min of 10%. But !! the Interest has to be paid hourly as per normal repayment or a loan default will occure and penalties applied. when Interest and Loan Amount are paid off the loan is finalised. *

And if i'm a bit late with my loan payments, but less than an hour.
- Pestering messages from collection agents and a loss of 1 credit rating point, and you still have to pay the loan and interest don't forget! *

So what happens if i don't pay a loan or i'm over 1 Hour late?
- You will have a bounty placed on you. Yes i will pay out more credits to bounty hunters even though i've already lost credits. Examples of loan defaulters are the best deterents to future loan defaulters :twisted: *
- If it's a Credit Loan - First freeze and impound your player credits, Then your bank accounts. Then if you still owe credits, Repo agents will vist your Stations and Impound wares from their cago holds. If this doesn't cover the debt they will start Repo'ing you Stations and Ships to cover the Debt, even your [PLAYERSHIP]. *
- If it's a Station Morgage - debt collectors will arrive at you Stion to impound the debt amount, firstly they will try to cover it from the wares in the Stations cargo hold. If this does not cover it, they REPO the Station! *
- If it's a Ship Morgage - Repo agents will try to REPO the Ship, then anything else i can think of. *
- And, you get the 0 credit rating 2 Hour Loan Ban.

So, any thoughts or ideas from what you have read???

And you would like an ETA on the loans release? :) I'm working on it. :wink: *

MarCon
User avatar
Idea
Posts: 516
Joined: Fri, 24. Oct 08, 12:14
x4

Post by Idea »

mark_a_condren wrote: Thanks Idea for that brief and to the point report. :o Improvements? Changes? Likes? Dislikes? Ease of use? Interest to high / low? .......
:oops:

Now that you mentioned, I did notice one thing.In some periods the menu of bank accounts freeze for couple of second(three second top) an unfreeze after.I asume this has some connection with script calculations?

As I can see on the 'litlle info' :wink: about loans part you cover a lot of ground just one thought. 'bounty hunters', are they realy necessary?
I mean banks in real life just take everything you have(which as I see you allready include in loans part) soo could you left the bounty hunters out as they can lead you to hole new level of scripting, but as allways it's your call.

Cheers
mark_a_condren
Posts: 1468
Joined: Wed, 3. Aug 05, 05:05
x3tc

Post by mark_a_condren »

Idea wrote:Now that you mentioned, I did notice one thing.In some periods the menu of bank accounts freeze for couple of second(three second top) an unfreeze after.I asume this has some connection with script calculations?
Do you have a lot of bank accounts?
Is it only when you have a Bank menu open.
How often does it happen, every minute or now and then?

The interest timer runs every 1 minute. The dynamic player credits runs a lot more often, every 5 seconds, but only when a stock Exchange menu is open, then it shuts down if the menus are closed.
'bounty hunters', are they realy necessary?
No, not really, we'll see what happens :)
but as allways it's your call.
I believe about 80% of Stock Exchange is based on user and forum member input, just they way i wanted it. I might as well script what players would like rather than waste my time on something that wont getting used.

MarCon
User avatar
Idea
Posts: 516
Joined: Fri, 24. Oct 08, 12:14
x4

Post by Idea »

mark_a_condren wrote: Do you have a lot of bank accounts?
Is it only when you have a Bank menu open.
How often does it happen, every minute or now and then?
I had time to play today and coulden't recreate the problem.

I had 6 accounts, the freezes happend while I was in bank menu when I create the first two accounts.

Now after I load the savegame everything is ok, no freezes.
mark_a_condren wrote: I believe about 80% of Stock Exchange is based on user and forum member input, just they way i wanted it. I might as well script what players would like rather than waste my time on something that wont getting used.
:thumb_up:
Alexfighter
Posts: 37
Joined: Wed, 22. Aug 07, 01:50

Post by Alexfighter »

You COULD set Bounty Hunters as an option in the script.
mark_a_condren
Posts: 1468
Joined: Wed, 3. Aug 05, 05:05
x3tc

Post by mark_a_condren »

@ Idea

Glad the freeze issue can't be repeated. I've had 30 accounts running while testing and no probs, so i was a bit concerned that you had had a problem.

Glad it's sorted now.

@ Alexfighter
:D

Update while posting,
Loans is coming together after chasing a pain in the a@@ bug for 2 days.
Made some minor changes to interest rates and Mogage valuations than is listed in previous post. Interest by a percent or 3 and now if your credit rating goes over 12 your assets are valued at Average price, so the loans you get offered the credits will be a little bit more (good customer bonus).

Loans reporting is now done.

All the annoying messages for late payments are in.

Putting some extra options in atm :D

Looking at changing the interest paid for very early loan repayment to only half interest charged,(if paid in under half loan period time) your taking a hit to your credit rating anyway.

Have to start work on the credit recouping for non payment now. Just what will i come up with. :wink:

MarCon
Joubarbe
Posts: 4796
Joined: Tue, 31. Oct 06, 12:11
xr

Post by Joubarbe »

Thanks for this script !

I've been playing 9 in-game hours and I see no change in the stock exchange. Is this normal ? How often does it update ?
mark_a_condren
Posts: 1468
Joined: Wed, 3. Aug 05, 05:05
x3tc

Post by mark_a_condren »

Joubarbe

The Commodities Index has to be manually updated. This is done by Selecting any of the lines with Refresh on them or by opening / closing that menu or moving to any other menu and then coming back to it.

Only the Company and Corporation indexes are auto updating.

If this is not what you are meaning, or you are already doing this, then please explain what is happening, because thats not right for it to go 9 hours and not change. It should be constantly changing as the universe changes.

And your welcome for the script.

MarCon
Joubarbe
Posts: 4796
Joined: Tue, 31. Oct 06, 12:11
xr

Post by Joubarbe »

Yes I saw the refresh button for the commodities, but I'm speaking of the company / corporation indexes. I confirm that nothing has changed in 9 hours.
I've installed the Stage 1 (.spk) and added the Stage 2 (.zip and manually ovewrite).

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”