[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: Moderators for English X Forum, Scripting / Modding Moderators

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

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

Post by mark_a_condren »

TC Stock Exchange "The Evolution of a Financial Revolution"

v4 Now Available.



In a little room far far away, the thought accured 'Why can't i make credits from others hard work and success', thus work began on 'TC Stock Exchange', the evolution of a financial revolution had begun.

Recently I and a very helpful group of testers have been working on a 'Stock Exchange' script.

This script allows the trading in shares of 4 Different types.

Commodities;
Wares held by stations in a Local Exchange area. The local exchange area is a group of sectors all linked and controlled by the same race. These share are related to the supply and demand of wares in the local exchange area. (Static Menu must be updated Manually)

Naturals;
Also part of 'Commodities' are wares that are not normally used in the game. These wares are what i would consider to be mostly sold in station shops and retail outlets. Their share value is based on in game numbers but not in the usual supply and demand manner. (Static Menu must be updated Manually)

Corporations;
The in game corporations have shares for sale. These share are based on the corporation actual in game value and will fluctuate in value based on what to corporation currently owns. (Dynamic Menu and will be updated Automatically)

Companies;
Companies are derived from the Forum Name lib and have extensions added to the names to create a company name as such. The values for these are derived by the script from an algorithum of my construction. They have no basis in the in game environment. (Dynamic Menu and will be updated Automatically)


Construction, Implementation and Release of Stock Exchange - Commodities Index.
Completo meter;
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Released : 26 - June - 2010

Construction, Implementation and Release of Stock Exchange - Corporate and Company Indexes.
Completo meter;
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Released : 17 - July - 2010


Mod / Script Compatability :
Tested and found to be acceptable,
FDN & PM -> by Logain Abler
Merg Mod -> by aprictslice

Not Presently compatable with,
Transend II :
Modifications have been made to the script to make it more compatable, but no testing has been performed, try at your own risk. But let me know if it works or what still needs doing if you do. (draffutt has done some testing in this regard and has pronounced it to still be in a very Borked state, much further work required apparently.)

Currently supported Languages :
English

If someone wants to translate the 't' file into other regional languages, please PM me with a link to the translated file and i will include it in the package.


Ok, now for some information you need to know.

- THIS WILL mark your game as ***modified***
- X3TC v2.5 is required, as it uses some of the new script commands.


#######################################

Current Release Version :
Stock Exchange v4

ALL PREVIOUS VERSIONS MUST BE COMPLETLY REMOVED BEFORE INSTALLING THIS VERSION:


A Patch by vukica is available for persons experiencing 0cr problems with Corporation values. See Below.


SPK :
[ external image ] -> Size 214 KB, Version 4.1.
(Spk v4 had wrong 't' file, updated to 4.1 with correct 't' file)


OR


ZIP :
[ external image ] -> Size 257 KB, Version 4.


**********************************************************




Removal and Installation :

SPK Installation and Removal :
SPK
Use Cycrows Latest Beta Release ONLY

Zip Installation and Removal :
ZIP
- Install by extracting the Zip file to your X3TC main folder or extract them to a place of your choice and manually copy them to the correct folders in your X3TC folder. Select yes to overwrite previously installed Stage 1 version.


SPK and ZIP Removal :
- Sell all currently owned shares in anything you have. (or you will loose them)
- Open Options menu and select the Uninstall option.
- Select 'I want to Upgrade' from the available options.
- The Uninstall menu will then close.
- WAIT until you see the Subtitle Text informing you the "Stock Exchange is ready for Upgrading". (This takes about 30 seconds to perform)
- All running scripts have now been stopped, not waiting will cause your game to freeze !!
- Save and Exit your Game.

SPK
Use Cycrows Latest Beta Release ONLY

ZIP
- Remove All Stock Exchange files from 'scripts' and 't' folders in your main TC directory. Script files begin with 'plugin.mc.st.ex ~', and 'setup.mc.stock.exchange' and the 't' files are 9740-L044.xml and 8806-L044.xml


Compatability :
Stock Exchange will now take advantage of Cycrow's Hotkey Manager and Community Configuration Menu if you have them installed.


**************************************************

Patches and Addons Created by Members of the Forum Community:

Alternate Company Names and Corporation 0cr patch by vukica:

Company Rename

Here's a differet version of the Company Names used in Stock Exchange

- Does not use Forum Name Library
- Uses "Realistic" company names (e.g. Diamondback Corporation, Haleos Corporation, Antigone Credit Services etc...) only MarCon Ind. and Logain Ind. from the original script are included. Also there are many smaller companies owned by large corporations (like Terracorp Mining division)
- Uses text file number 7433(some one should change that in the Library) so it wont cause problems with FNL
- Includes Corporation 0cr patch.

Instalation: Sell stock, save, exit game. Copy the Company rename to your TC folder, overwrite, and roll...

Company Rename and Corporation 0cr patch

If there are suggestions for new company names, pm me (vukica).
If you find bugs report them here!



Corporation 0cr patch by vukica:

Corporation 0cr patch

There have been problems for many people regarding the terracorp min cr going below 0. I've managed to fix it a little bit

Before the installation you want to sell all your stock. Save game, exit(or alt tab) and copy the fix to the SCRIPTS folder, overwrite when asked. Go back to game, select stock exchange options, select uninstall and "i want to upgrade". Wait until you get the message(the one in the subtitle area) and then just roll the exchange like you did before.

Corporation 0cr patch

There will not be any stock bellow 0
Terracorp stock may actually rise to about 500cr(depending on the jobs file you use).
If you don't have this problem with negative stock you do NOT need to install this.(you can but it wont change anything)
If there are any bugs please post it here in the thread ASAP.




**************************************************

Resources Used:
COMMAND SLOTS : 1
COMMAND_TYPE_CUSTOM_40 -> MARCON_STOCK_EXCHANGE

t id :
= 740

text file page id:
= 9740

[Utility] - Forum Name Library For TC 1.4 2/5/10
text file page id:
= 8806


Permissions :
You have my permission to use this Script package or part thereof in your your own work if you so wish. Please give credit if you do.

You can find an Unedited Permissions Statement Here :


Thank You's :

Many thanks to the following people for their help with Stock Exchange.

Nho, Idea, Draffutt, Logain Abler, Mutiny1, SoliDeoGloria, EmperorJon, Catra, Lordaeron and markdeno. For their testing, suggestions and help in the process of making this version. Any errors or problems that occur are entirly my fault any not due to their efforts. Thank you to these people and everyone else that has made suggestions, given feedback or pointed out errors.

LV - A very special thanks goes to LV for the use of his IL Stock Exchange scripts for ideas and motivation. Thanks LV.
vukica - Thank you for the Corporation 0cr patch.


Version Information :
Corporation 0cr patch by vukica:
25 - November - 2010

Stand Alone Version 4 Released:
17 - August - 2010

Stage 2 version 1 Released:
17 - July - 2010

Stage 1 version 1 Released:
26 - June - 2010



Script Information :

The Stock Exchange can be found in the Custom commands area of your ships Command Screen. A Hotkey option (yes another one) is available IF you wish to use it. It can be set from the Esc -> Control -> Interface screen.


User Guide by XanII.
There is a very good guide for new and previous users here.
Trade primer for new stock brokers

Many thanks to XanII for the time and effort required to produce this exellent guide.


Information and Screenshots :

Commodities Index :

The Universe is broken up into the Race controled areas and each has its own seperate Local Stock Exchange.

Stock Exchange Interface Menu :
First menu you will get, the 'Interface Menu'.
[ external image ]

Stock Exchange : - Commodities : (Stage 1) - Implemented and in the development and testing phase.
- View Local Stock Exchanges :
  • - Takes you to the 'Local Stock Exchanges' menu.
- View Summary of Shares Owned at Local Exchanges :
  • - Takes you to the 'Summary of Shares Owned' menu.
    - The View Summary option will only be available if you own Shares at an Exchange.
- View Detailed Summary of Shares Owned at Local Exchanges :
  • - Takes you to the 'Detailed Summary of Shares Owned' menu.
    - The View Details option will only be available if you own Shares at an Exchange.
Stock Exchange : - Company Index : (Stage 2)
- View Corporate / Company Indexes:
  • - Takes you to the Corporate and Company Indexes Menu.
Banking : (Stage 3)
- Bank :
  • - Only Available if "Universal Banking" is also installed.
Reports :
- View Commodities Transaction Report :
  • - Takes you to the 'Commodities Transaction Report' menu
Options :
- Goto Options Menu :
  • - Takes you to the Stock Exchange 'Options' menu.
    - A new Options menu has been introduced and further info can be found at the Options menu below.
Local Stock Exchanges Menu :
Then the List of Local Stock Exchanges Menu.
[ external image ]
[ external image ]

- This menu provides a listing of all the Local Stock Exchanges that are available and the Station the Exchange is located at. (You don't have to got to the Station however to interact with the Exchange)

- Selecting a Sector / Station from this menu will take you to that Local Exchanges menu.

- The sector listed at the top of the menu is your current sector, this has *** beside it and the Local exchange for that sector also has *** beside it.

- The Station name will be in Green if you own Shares at that Exchange, it is not an indicator of its performance. That info is available in the Shares Summary menu.


Shares Summary Menu :
Local Stock Exchange - Shares Summary, (Closed)
[ external image ]

- Goto Detailed Summary View :
  • - Takes you to the 'Detailed Summary of Shares Owned' menu.
- Show All :
  • - Opens All Expandable / Collapsable menu ares.
    - Can be set as Default Opening view in Options menu.
- Hide All :
  • - Closes All Expandable / Collapsable menu ares.
    - Can be set as Default Opening view in Options menu.
- Station names in Green
- Indicates the overall Share current values at that exchange are in Profit.

- Station names in Red
- Indicates the overall Share current values at that Exchange are in Debit.


Local Stock Exchange - Shares Summary, (Open)
[ external image ]
[ external image ]
[ external image ]
[ external image ]

- Selecting a Sector / Station from this menu will expand or collapse the exchanges info if it has a + beside it, otherwise it will take you to the Local Exchange menu.

- If you have bought any Shares at any of the Local Stock Exchanges it will be listed here as a summary.

- Selecting a ware from an expanded area will take you to the Local Exchange menu with that ware expanded for view.

- The Station Name will be in Green if you are making an overall profit at that Exchange and Red for an overall loss.

- Refresh :
  • - Selecting Refresh will update the information being displayed in the menu in its Current View.
Local Stock Exchange Menu :
Ok, then onto the Main Local Stock Exchange Menu (Closed View).
[ external image ]

- This menu will open by default in the Closed / Open View as set in the Options menu.

- Ware types can also be individually Opened and Closed.
  • - Selecting the Exchange location from the top of the menu will display a list of all sectors that are part of that exchange.
Show All :
  • - Selecting 'Show All' will Open all ware types if they are Closed. As seen in the screenshots below.
Hide All :
  • - Selecting 'Hide All' will Close all ware types if they are Open.

Main Stock Exchange Menu (Open View).
[ external image ]
[ external image ]
[ external image ]

- This menu lists all the locally available wares and works out the supply to requirement ratio and sets the Share Buy/Sell price accordingly.

- Selecting a ware from this menu will take you to the Buy / Sell Menu.

- Local Products :
- Lists all the products for this exchange that shares are purchasable for.
- Products are devided into their Ware Types.

- Stock :
- This is the Total available amount of this product in this exchanges area.

- Required :
- This is the Total Required amount of this product in this exchanges area.

- Min Cr :
- The Minimum Cr Shares will trade for.

- Max Cr:
- The Maxamum Cr Shares will trade for.

- Trading At :
- What the Shares for this Product are currently trading for.

- Index :
  • - The Index entry will be the most important entry to watch in this menu.
    - An Index of between 0 and 49 will be a good time to sell.
    - An Index of between 50 and 100 will be the best time to buy, with 100 being the optimum point.
    - An Index of between 101 and 200 is when there is an over supply of wares, this is capped at 200, being the highest value shown.
  • 'Trend Line', ^ v
    - Keeping an eye on the 'Trend Line', ^ v, will tell what movement there has been in the Index.
- Your Shares :
- If you have bought Shares in this product at this Exchange, this is how many Shares you own for this Product at This Exchange.

- Bought At :
- If you have bought Shares in this product at this Exchange, this will be the Average you paid for these Shares.

- Total Paid :
- If you have bought Shares in this product at this Exchange, this is the total you piad for the Shares you Currently own.

- Value :
- This is the Current value for any Shares you own at the current Trading At value.

- Totals :
- Totals for the above colums.

- Total Profit / Loss :
- The Total Profit / Loss for All the Shares you own at this Exchange at the Current Trading At value.


Detailed Summary Menu :
And a look at the Detailed Summary Menu, (Closed)
[ external image ]

Detailed Summary Menu, (Open) (Maximum view)
[ external image ]

Detailed Summary Menu, (Open) (Minimum view)
[ external image ]

- From here you can view a detailed account of all your share holdings from All Exchanges.

- Selecting a Share entry from this menu will take you directly to the Buy / Sell menu.

- 'Trend Line' colors are reversed in this menu due to being more from a selling perspective, rather than a buying perspective.


Commodities Transaction Report Menu :
Timeline View.
[ external image ]

Exchange View,
[ external image ]

The 'Commodities Transaction Report' Menu can be turned On or Off from the 'Options' menu.

Sorting :
- 4 Sorting methods are available , just select it from the list, all sub sorted by Timeline
  • - 'Timeline'
    - 'Exchange'
    - 'Bought / Sold'
    - 'Ware Type',
- Print to Log File :
  • - 'Print to Log File' will print a record of the menu in its current layout but without the formatting.
    - Only values for each record seperated by a ';' deliminator to their own line for use with spread sheets etc.
- Delete Transaction Records :

Individual Delete Mode,
[ external image ]

- Activate "Individual Delete Mode" from the 'Delete Transaction Records' selection at the top of the menu.

- This will bring up 'Delete ALL' and 'Turn Individual Delete Mode ON', (see below) just choose the one you want.

- To turn Individual Delete Mode OFF, Selecting 'Delete Transaction Records' again will show 'Turn Individual Delete Mode OFF' selecting it will turn this mode OFF.

[ external image ]

-If you choose 'Delete ALL' you will be asked to confirm because once their gone there is no retrieving them.

- You will know when you are in "Individual Delete Mode", You will notice the menu looks slightly different.


Corperate and Company Indexes :


[ external image ]
[ external image ]



Other Menus :

Buy / Sell Menu :
This is the Buy / Sell Menu. (No Shares of this type owned at this Exchange)
[ external image ]

Buy / Sell Menu. (With Shares of this type owned at this Exchange)
[ external image ]
[ external image ]

- This is where you get to part with all your hard earned credits or cash in on your last investment, provided you haven't made a loss.

- If you have selected to pay transaction fees in the options menu the Buy / Sell fee per share will also be displayed.


Options Menu :
Now for the Options Menu (Your gunna Love this!)
[ external image ]
[ external image ]

- This menu will open on first use for you to set all them lovely options.

- These can be changed at any time but be warned it may loose you shares and cause other unexpected results.

- Save and Exit: must be selected from the bottom of the menu for your changes to be saved.




MarCon
Last edited by mark_a_condren on Fri, 26. Nov 10, 07:04, edited 37 times in total.
Logain Abler
Posts: 2255
Joined: Mon, 31. Oct 05, 08:44
x4

Post by Logain Abler »

I'd love to return the favour mate :-)

Your turning into the stato master! Looks a very useful script.

I'll be starting a clean game tonight so can test from fresh and existing (on-going) game.

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

Post by mark_a_condren »

LA

Thanks mate, i'll PM the scripts and some more details soon.

MarCon
User avatar
SoliDeoGloria
Posts: 61
Joined: Tue, 29. Dec 09, 23:29
x3tc

Post by SoliDeoGloria »

I'd be happy to test for you as well - this reminds me of my EVE days as a shareholder ...
draffutt
Posts: 4292
Joined: Wed, 21. Feb 07, 17:46
x4

Post by draffutt »

Looks like you are working on another hit. :thumb_up:
None of us is as smart as all of us. ~Ken Blanchard

TC player bug fixes
Reunion player bug fixes
User avatar
Idea
Posts: 516
Joined: Fri, 24. Oct 08, 12:14
x4

Post by Idea »

draffutt wrote:Looks like you are working on another hit. :thumb_up:
Couldn't agree more with you :)
mark_a_condren
Posts: 1468
Joined: Wed, 3. Aug 05, 05:05
x3tc

Post by mark_a_condren »

draffutt
and
Idea

Thank you for your kind words, ..... Oh darn,... now i have expectations to live upto :headbang:

If anyone has any comments, suggestions or ideas, feel free to post them here.

MarCon
draffutt
Posts: 4292
Joined: Wed, 21. Feb 07, 17:46
x4

Post by draffutt »

mark_a_condren wrote:Thank you for your kind words, ..... Oh darn,... now i have expectations to live upto :headbang:
LoL well if you need any more help i'll try and give assistance. but make no guarantees'
None of us is as smart as all of us. ~Ken Blanchard

TC player bug fixes
Reunion player bug fixes
User avatar
Lordaeron
Posts: 501
Joined: Tue, 17. Jul 07, 16:51
x4

Post by Lordaeron »

this sounds interesting, mail it to me plz (and Ill send you a L049, so you can publish this in the german section too)
User avatar
SoliDeoGloria
Posts: 61
Joined: Tue, 29. Dec 09, 23:29
x3tc

Post by SoliDeoGloria »

sent some PM reply's - not sure where you wanted to start receiving feedback.
mark_a_condren
Posts: 1468
Joined: Wed, 3. Aug 05, 05:05
x3tc

Post by mark_a_condren »

@draffutt

Will send you a PM shortly.


@Lordaeron

Just need to add some more into the 't' file before i send it to you. Some of the txt is not in it yet.


@SoliDeoGloria

Got em and replied. Just had thought on 'Insider trading' issue, will send you another one soon. You can post here or send a PM, (if its anything real bad, send by PM, no point advertising the errors he he. :D )

Thanks All for the interest .

MarCon
Rheikon
Posts: 40
Joined: Sun, 19. Jul 09, 07:47

Post by Rheikon »

This sounds pretty nice. LV had a script that put something like this in but never finished it.

I would say I can test it but I don't know details on stock trading and such to give any good feedback. I wish all the testers the best though :)
Catra
Posts: 7754
Joined: Mon, 12. Oct 09, 21:54

Post by Catra »

TEST FASTER!
hundreds of X junkies depend on you!

(also, count me in, got a save game specifically made to lab things.)
mark_a_condren
Posts: 1468
Joined: Wed, 3. Aug 05, 05:05
x3tc

Post by mark_a_condren »

Rheikon wrote:This sounds pretty nice. LV had a script that put something like this in but never finished it.

I would say I can test it but I don't know details on stock trading and such to give any good feedback. I wish all the testers the best though :)
I can't speak for LV but his script may yet get some work done it. Since he so kindy allowed me to use it for ideas for this script (some of which are being used in this script :D ). LV incorperated his into 'Imperial Labratories' and this one is being implemented in a different manner. I'm going to see if i can get some time to do some update work on LV's in return.

As for the testing, that is part of this idea to get some testers so that you don't need knowledge of stock trading to be able to use it and have some fun with it.

Thanks for the encouragement for the testers.

MarCon
User avatar
EmperorJon
Posts: 9378
Joined: Mon, 29. Dec 08, 20:58
x3tc

Post by EmperorJon »

You didn't tell me!?
EmperorJon is sad... :( :roll:


For those of you who don't know what I'm on about... (eg. 100% of you) it was my idea to include some attempt of a stock exchange in this trade plugin of mine and Mark's however... like usual I tried it a bit then sort of went... :shock: 'Mark, can you do this bit? I'll erm... work on erm... something easier'

Gre't lad aint 'e? Everyone give 'im a round of applause! :D

*claps*
______
I'm Jon. I'm mostly not around any more. If you want to talk, please message me! It's cool.
______
mark_a_condren
Posts: 1468
Joined: Wed, 3. Aug 05, 05:05
x3tc

Post by mark_a_condren »

EmperorJon

Oh pick up ya bottom lip ...

I didn't ask anyone via PM to test this as i wanted it to be a purely volunteer thing with no presure, so i asked openly.

People either volunteer or not, easy.

And sorry to burst your bubble, and i'm trying to say this nicely,yes you mentioned a stock exchange thing, but, this particular script has been worked on by me for a long time before that.

But, thank you for the praise anyway. :D

MarCon
User avatar
SoliDeoGloria
Posts: 61
Joined: Tue, 29. Dec 09, 23:29
x3tc

Post by SoliDeoGloria »

Mark - I replied to you via PM - am going to start posting here (except for anything bad :-) )

Another thought - regarding reporting - are you planning on keeping a log of transaction via the Banking menu?

There should be the ability to go back and historically view all transaction - and then perhaps create charts (I might be able to help with this)
mark_a_condren
Posts: 1468
Joined: Wed, 3. Aug 05, 05:05
x3tc

Post by mark_a_condren »

SoliDeoGloria

Ok. posting here is no problem

Regarding reporting, hadn't given that much thought to tell the truth, seems like i will have to as people will want to know that kind of info.

Will get the core aspects of the script sorted first then look into the reporting aspect. If you want to put some thought into it and see what ideas you come up with, by all means do so.

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

Post by Idea »

Hey mark

As I am totaly unable to get my self away from this topic can you count me in to help with testing?
mark_a_condren
Posts: 1468
Joined: Wed, 3. Aug 05, 05:05
x3tc

Post by mark_a_condren »

Idea wrote:Hey mark

As I am totaly unable to get my self away from this topic can you count me in to help with testing?
LOL, no problem, will send you it soon, just making some updates from feedback from SoliDeoGloria.

MarCon
Post Reply

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