[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 »

Agreed, good point. Just hadn't got round to adding the fiddly bits to check for relations yet. Was kinda getting main bit working first then do the addons. Will add it to the list of things to do.

@Idea,
Sorry your post re being only able to add ideas and such was kind of mowed over then.

Testing, ideas, feedback and the like are just as much help as writng code or Modding files as far as i'm concerned. Every little bit helps, no joke. I appreciate every bit anyone gives.

EDIT:
I understand what you mean with the learning to script and understand what it all about. I remember not so long ago (well damn it been nearly 12 months) asking a particular question in regards to how to get them damn 'while' loops to work. A very helpful scripter gave me an example and an explanation (helpful scripter was LA).

MarCon
User avatar
LV
Sith Lord
Posts: 8255
Joined: Wed, 6. Nov 02, 20:31
x3tc

Post by LV »

002 $g = get global variable: name='lv.gate.store'

$element > find element in array $g > $gate
if $element =1
ignore bla bla
end


would that cover the my gate script issue for tagging.

Nice work btw ;)
LV's TC Scripts
Readme's For All My Scripts


I felt a great disturbance in the forum, Like millions of voices cried out in terror, then were silenced

si tacuisses, philosophus mansisses
User avatar
EmperorJon
Posts: 9378
Joined: Mon, 29. Dec 08, 20:58
x3tc

Post by EmperorJon »

Lets see if you can sort this one out then.


2B is the max number.

So... I've spent - something on shares now. Wrap around. :rofl:
______
I'm Jon. I'm mostly not around any more. If you want to talk, please message me! It's cool.
______
User avatar
Idea
Posts: 516
Joined: Fri, 24. Oct 08, 12:14
x4

Post by Idea »

mark_a_condren wrote: @Idea,
Sorry your post re being only able to add ideas and such was kind of mowed over then.

Testing, ideas, feedback and the like are just as much help as writng code or Modding files as far as i'm concerned. Every little bit helps, no joke. I appreciate every bit anyone gives.

EDIT:
I understand what you mean with the learning to script and understand what it all about. I remember not so long ago (well damn it been nearly 12 months) asking a particular question in regards to how to get them damn 'while' loops to work. A very helpful scripter gave me an example and an explanation (helpful scripter was LA).

MarCon
Thanks mark.I will do my best as everyone else here to help you out the way we can.

Now get back to work :P
mark_a_condren
Posts: 1468
Joined: Wed, 3. Aug 05, 05:05
x3tc

Post by mark_a_condren »

@LA

Here is a fix for your issue.

As you have changed your universe to suit what you want, as far as i'm concerned the script is doing exactly as it's supposed to. You linked the 2 areas togerther via gates for trading purposes thus linking the 2 areas economies together and the script is reporting it as such.

So from my point of view the only error on behalf of the script is that it assigned the values to the wrong station. This can however be overcome by adding 2 lines in the 'plugin.mc.st.ex.loc.wares' script.

First, sell your stocks that are reporting wrong, then change the code below.

'plugin.mc.st.ex.loc.wares'

Code: Select all

135   ||
136   ||if  find $stn in array: $exch.stn.arr
137   |||$stn.id = $stn -> get ID code
138   |||$loc.var.val = sprintf: fmt='%s%s%s', 'mc.st.ex', $stn, $stn.id, null, null
139   |||$local.owned.stocks = $stn -> get local variable: name=$loc.var.val
140   |||$owned.wares.array = $local.owned.stocks[0]
141   |||$owned.ware.amounts.array = $local.owned.stocks[1]
142   |||$owned.wares.buy.price.avg.array = $local.owned.stocks[2]
143   |||$owned.ware.costs.array = $local.owned.stocks[3]
144   |||
145   |||$exch.stn = $stn
146   ||end
147   ||
ADD

Code: Select all

135   ||if not $exch.stn
and
147   ||end
This will get it to assign it to the station you chose in the 'Local Exchanges Menu' or the closest exchange to your current location if you chose your current sector from the top of the menu.

I'll update the code for the next release accordingly.

@LV

Thanks for the info, i'll keep it in mind if this becomes a bigger issue. I might also look at including that check and make it an option to combine them or not if it encounters it, not sure yet.

Thanks for the compliment.

@EJ
I knew someone would have to spend big and hit that limit sooner or later. Might have to look at introducing a number limit and anything over that starting a new entry maybe.


EDIT:
@Idea
Thanks. Now get back to Study.

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

Post by EmperorJon »

Meh, you know me. Big spender. :lol:
______
I'm Jon. I'm mostly not around any more. If you want to talk, please message me! It's cool.
______
Logain Abler
Posts: 2255
Joined: Mon, 31. Oct 05, 08:44
x4

Post by Logain Abler »

Your MoJo is working, the 2 lines of code work.

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

Post by mark_a_condren »

Logain Abler wrote:Your MoJo is working, the 2 lines of code work.

LA
Gooood MoJo :D

Only issue you still have is that for you the Argon Prime and Omicron Lyrae exchanges will both report the same figures being it's now a combined exchange. It will just depend on which one you enter from as to what Owned shares are displayed, because the one you enter from will be the one they are stored against. No real problem though that i can think of atm. But it does raise some interesting possabilities. I don't want to remove one exchange if there are 2 because if your combined exchanges become uncombined for whatever reason you could loose a lot of Share for the area that no longer has an exchange.

Like i said was the intension, to make the exchanges dynamic with the players universe, it seems to be working well. Just not the kind of extreme i had envisioned though. :P But working none the less.

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

Post by mark_a_condren »

LA

Your going to have to add 1 more line into that script. It is needed to get the local variable with the Array of owned shares to update correctly after you return from the buy / sell menu.

Code: Select all

644   |$local.owned.stocks = $exch.stn -> get local variable: name=$loc.var.val
MarCon
Logain Abler
Posts: 2255
Joined: Mon, 31. Oct 05, 08:44
x4

Post by Logain Abler »

mark_a_condren wrote:LA

Your going to have to add 1 more line into that script. It is needed to get the local variable with the Array of owned shares to update correctly after you return from the buy / sell menu.

Code: Select all

644   |$local.owned.stocks = $exch.stn -> get local variable: name=$loc.var.val
MarCon
K
mark_a_condren
Posts: 1468
Joined: Wed, 3. Aug 05, 05:05
x3tc

Post by mark_a_condren »

Preview of a prototype Detailed Summary Menu 'Details of Shares Owned' posted in OP.

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

Post by Idea »

mark_a_condren wrote:Preview of a prototype Detailed Summary Menu 'Details of Shares Owned' posted in OP.

MarCon
Looks great :wink:

When can we expect to get the new version for testing?
mark_a_condren
Posts: 1468
Joined: Wed, 3. Aug 05, 05:05
x3tc

Post by mark_a_condren »

Idea wrote: Looks great :wink:

When can we expect to get the new version for testing?
It may take as long as another 2 hours. Maybe sooner if we are lucky.

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

Post by Logain Abler »

mark_a_condren wrote:Preview of a prototype Detailed Summary Menu 'Details of Shares Owned' posted in OP.

MarCon
Looks ideal, however I'm getting the same issue as before on the new detailed screen, but again it's going to be down to having gates linking local exchange areas.

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

Post by Idea »

We have a BUG :(

Now I don't know if it dose have anything with me but when I am in menu of Detailed of Shares Owned and press refresh something weard happen.Grand total sum goes nut as you can see in the pictures,as more I press refresh the sum is biger and when I press refresh some 5 or 6 times the game CTD.

[ external image ]

[ external image ]

[ external image ]

[ external image ]
mark_a_condren
Posts: 1468
Joined: Wed, 3. Aug 05, 05:05
x3tc

Post by mark_a_condren »

LA.

Looking into it ...again :oops:

Idea.

Juat found the same doubling bug myself, think i know what is wrong and should be easy fix. brb.

EDIT:
Ok, fixed compounding Grand total problem.
Having quick look for LA's prob.
Then send out fixed file.


EDIT 2:
Hotfix sent
Includes another go at LA's problem, lets see how we go this time. :roll:

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

Post by Idea »

Bug fixed :)

Now I have q.Is it ok for us to have access to wares in stock market that we can't buy normaly because of the low notoriety with that race?
mark_a_condren
Posts: 1468
Joined: Wed, 3. Aug 05, 05:05
x3tc

Post by mark_a_condren »

Idea

Glad bugs fixed, put a 'goto label' in the wrong spot.

As for buying wares without the notoriety, good q !

You can buy shares in 'Lockheed Martin' and so forth but your not allowed to buy their missiles.

But for the puposes of X, do we want to make it a limiting factor? do we make it a selectable option?

Same goes for dealing with pirates and factions that we have got low notoriety with cas we shot a couple of their M2's full of holes :D (by mistake of course hehe)

Your thoughts?

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

Post by Idea »

mark_a_condren wrote: do we make it a selectable option?
That would be the best option,as you said you want to give more choises to the player or you could just leave at it is.Reduce the work load on you :wink:
mark_a_condren
Posts: 1468
Joined: Wed, 3. Aug 05, 05:05
x3tc

Post by mark_a_condren »

I think there is going to have to be some options somewhere along the line in the script, so if i'm going to implement a few, then a few more is not that much extra.

I can tell you something else too, i'm already missing the trend line in the Detailed summary menu. I think i'll have to make the effort and put that back in. I'm loosing credits on shares and without it it's hard to know which ones.

MarCon

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