[AL Plugin] Universal Banking "The Financial Revolution Continues" v502 26-01-11

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
User avatar
Samuel Creshal
Posts: 17833
Joined: Sat, 6. Mar 04, 16:38
x3tc

Post by Samuel Creshal » Thu, 11. Nov 10, 17:01

Is this script known to be incompatible with Sector Takeover? Else I've found a weird bug. The script is essentially doing nothing, I can't open accounts and station management isn't doing anything (and I get one "Play account is low on credits"-message followed by three "Player account is overflowing"-messages every few minutes).
Using the zip version (401), no other scripts except STO and bonus package installed.

Edit: Debug code removed to improve thread readability.
Last edited by Samuel Creshal on Wed, 17. Nov 10, 01:10, edited 1 time in total.

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

Post by mark_a_condren » Fri, 12. Nov 10, 02:22

Samuel Creshal

It's not incompatable with STO as far as i know, and it shouldn't be.

What the debug is telling me (thanks for that btw) is the script that handles all the initial array setups for all the account types has failed misserably. No arrays have been created or they can't be found thus nothing can work. AFAIK no one else has had this prob so it may be a bad DL or faulty install. Can i get you to start by re DLing the script and reinstalling it from that DL if you havn't tried that as yet. (prob the first thing you tried though)

It is a bit strange though, the AL script is running every 1 minute as it's supposed to, however, if the array sizes are 'zero' it should auto shutdown (no point it running if it's doing nothing) but it's still running. :? Very strange !!!

Did the AL plugin auto start, or did you start it from the Game play / AL menu?

The AL plugin shouldn't start until an account has been created, if no arrays, 'Account Name Array Not Found, Going to Exit : ' there are no accounts so the AL plugin should not have even started.

The more i look at the debug and run through how things are supposed to work the stranger this gets.

[Joke]
You broke it! and don't come the "Wasn't me, i didn't do it" line :wink:
[/Joke]

I'll look into it further and see what i can come up with.

MarCon

russbo
Posts: 862
Joined: Sat, 12. Nov 05, 21:53
x4

Post by russbo » Fri, 12. Nov 10, 10:05

Seems to be working fine for me; I've used STO for quite a while, have many sectors that belong to me, and this banking script seems to be doing what it is supposed to be doing.

Installed using Cycrow's latest beta plug in manager, and spk file. Maybe an issue with the zip file contents?

User avatar
Samuel Creshal
Posts: 17833
Joined: Sat, 6. Mar 04, 16:38
x3tc

Post by Samuel Creshal » Fri, 12. Nov 10, 10:46

mark_a_condren wrote:It is a bit strange though, the AL script is running every 1 minute as it's supposed to, however, if the array sizes are 'zero' it should auto shutdown (no point it running if it's doing nothing) but it's still running. :?
It gives a shutdown message via subtitle every minute, but restarts anyway.

Reinstalled, btw, even checked the file checksum, no change.

Edit 2: Alright, figured it out. You can't link the player account into the station manager, plugin.mc.bank.stn.cr.updater.xml won't find it in the account array.

Edit 3: If you delete a linked account via the main menu, it shows up as undeleteable "null" account in the linked account list, spawning error messages again.

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

Post by mark_a_condren » Fri, 12. Nov 10, 11:35

Thanks Samuel Creshal
Edit 2: Alright, figured it out. You can't link the player account into the station manager, plugin.mc.bank.stn.cr.updater.xml won't find it in the account array.

Edit 3: If you delete a linked account via the main menu, it shows up as undeleteable "null" account in the linked account list, spawning error messages again.
Will fix this to prevent from happening again.

Going to work on script tonight (as in now), will post new version when i get these and some other niggles sorted out.

Thanks for the bug reports, time to go make it compatable with 'linux' users, not the OS, just the 'users'. :D

MarCon

User avatar
Samuel Creshal
Posts: 17833
Joined: Sat, 6. Mar 04, 16:38
x3tc

Post by Samuel Creshal » Fri, 12. Nov 10, 19:46

It has nothing to do with Linux, I just love breaking stuff. :D

Some random improvement notes:
1. Withdrawals count as deposits in the balance and account closures aren't listed at all, messing up the total balance.
2. Add an option to wipe only one type of transaction (deposit/withdraw/...).
3. Transaction time(?) is currently a ReadText

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

Post by mark_a_condren » Sat, 13. Nov 10, 04:06

1. Withdrawals count as deposits in the balance and account closures aren't listed at all, messing up the total balance.
Yep, noticed that, working on fixing it.
2. Add an option to wipe only one type of transaction (deposit/withdraw/...).
Will look into how i can do this with the current code structure.
3. Transaction time(?) is currently a ReadText
Yep spotted it and fixed it last night :oops: .


Thanks for the feedback.

Also working on,
Player account does work with station cr management.
Can define station credit managemant accounts before selecting stations to add. (done)
Fixing accounts showing as 'null' in stn cr man acc select screen when they have been deleted or closed. (done)


MarCon

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

Post by Idea » Tue, 16. Nov 10, 17:19

Hey, hey banks are here.

It's good to see you up and runing mark :D

I have been under the radar for some time.RL you know :wink:

I have one word for you 'downloading' :D

Taowulf
Posts: 34
Joined: Wed, 15. Apr 09, 07:54
x3tc

Post by Taowulf » Tue, 16. Nov 10, 23:57

I noticed that if you empty an account and do not close the account, interest on the average account balance continues to deposit.

I wish my credit union worked that way!
***modified*** means more options

User avatar
Samuel Creshal
Posts: 17833
Joined: Sat, 6. Mar 04, 16:38
x3tc

Post by Samuel Creshal » Wed, 17. Nov 10, 00:32

Taowulf wrote:I noticed that if you empty an account and do not close the account, interest on the average account balance continues to deposit.
Ohh, sweet. Now that solves all my credit problems. :D

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

Post by mark_a_condren » Wed, 17. Nov 10, 03:43

Idea wrote:Hey, hey banks are here.

It's good to see you up and runing mark :D

I have been under the radar for some time.RL you know :wink:

I have one word for you 'downloading' :D
Hey, i know you .... been a while my friend.

Yep, i know what RL can do to you! Been working on another project that has been using most of my free time, but i finally got this released (took some time off other project to do it).

I have one word for you 'feedback' :D

I'll be uploading a new version in the next day or so with quite a few bugs ... um ... 'taken care of' so to speak. So if you find anything, give a yell as usual.
Taowulf wrote:I noticed that if you empty an account and do not close the account, interest on the average account balance continues to deposit.

I wish my credit union worked that way!
This may not be a bug, when you empty an account the next interest payment period should still pay you interest on the average amount you had in the account for that period, even if only for a couple of minutes. The next period should give no interest if the account was still open but with zero funds for the period. If it pays you interest on zero funds, then there is a problem. Then yes, i wish my bank account was like that too !!!
Samuel Creshal wrote:Ohh, sweet. Now that solves all my credit problems. :D
What, running low on finances for your next bout of distruction? :P


Update on progress;
  • Player account does work with station cr management. (done)
  • Can define station credit managemant accounts before selecting stations to add. (done)
  • Fixing accounts showing as 'null' in stn cr man acc select screen when they have been deleted or closed. (done)
  • Withdrawals count as deposits in the balance and account closures aren't listed at all, messing up the total balance. (done)
  • Transaction time(?) is currently a ReadText, should be 'Playing Time :'. (done)
  • Add an option to wipe only one type of transaction (deposit/withdraw/...), via updated 'Delete Options' menu. (done)
  • Corrected and 'Reduced' the number of message you recieve re accounts have to much money or not enough. (but it will still pester you to fix it :P ) (done)
  • And there was a few minor 'cosmetic' fixed or changes to menus.

    EDIT:
  • Now will 'Auto Create' a bank account to deposit funds into if a station manager account will be 'over filled' by a deposit.

MarCon
Last edited by mark_a_condren on Wed, 17. Nov 10, 10:13, edited 1 time in total.

User avatar
Samuel Creshal
Posts: 17833
Joined: Sat, 6. Mar 04, 16:38
x3tc

Post by Samuel Creshal » Wed, 17. Nov 10, 09:21

mark_a_condren wrote:
Samuel Creshal wrote:Ohh, sweet. Now that solves all my credit problems. :D
What, running low on finances for your next bout of distruction? :P
Conquering the universe is expensive. ;)

Looking forward to the new release. :)

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

Post by mark_a_condren » Sun, 21. Nov 10, 15:51

Update - Version 5 Released

Download links in OP updated .

Version Info :
V5 - 22-Nov-10
  • Player account does work with station cr management.
  • You can define station credit managemant accounts before selecting stations to add.
  • Fixing accounts showing as 'null' in stn cr man acc select screen when they have been deleted or closed.
  • Withdrawals show correctly in 'Report' menu.
  • ReadText in 'Report' menu, should have been 'Playing Time :'.
  • Added a 'Reporting' option to wipe only one type of transaction (deposit/withdraw/...), via updated 'Delete Options' menu.
  • Corrected and 'Reduced' the number of message you recieve re accounts have to much money or not enough. (but it will still pester you to fix it )
  • Now will 'Auto Create' a bank account to deposit funds into if a station manager account will be 'over filled' by a deposit.
  • Now will 'Auto Create' a bank account to deposit funds into if an account will be 'over filled' by an 'Interest Payment'.
  • When setting credit levels in 'Station Credit Manager', all stations of a 'Class' or 'Type' can be set at the same time to the same values.
  • And there was a few minor 'cosmetic' fixed or changes to menus.
As usual, bug reports and feedback welcome.

MarCon

User avatar
vukica
Posts: 1744
Joined: Sun, 10. Aug 08, 18:05
x4

Post by vukica » Sun, 21. Nov 10, 16:20

Great! Will test imediately :)
Split say NEED MORE FIREPOWER!!

User avatar
vukica
Posts: 1744
Joined: Sun, 10. Aug 08, 18:05
x4

Post by vukica » Sun, 21. Nov 10, 16:30

vukica wrote:When you select close account you can't back out anymore. It asks to proceed or not, but it proceeds anyway or another no matter what you select.

I checked the code, and you have something like

proceed=get user input boolean/var etc..

that shoud go right behind close.account label... like this

close.account:

proceed=get user input
if proceed=true
closeAccountCode
end
return whatever

i can c/p if needed :)

p.s. I really like this script, been trying to find/ a station selling script for ages but always something messed with my evil plan.
did you by any chance forget about this? :)

here's a fix that i think works http://cylon33.googlecode.com/files/plu ... ateAcc.xml
Last edited by vukica on Sun, 21. Nov 10, 16:36, edited 1 time in total.
Split say NEED MORE FIREPOWER!!

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

Post by mark_a_condren » Sun, 21. Nov 10, 16:34

vukica

I thought i fixed that. :oops:

Just let me check and i'll see what i've done.

MarCon

User avatar
vukica
Posts: 1744
Joined: Sun, 10. Aug 08, 18:05
x4

Post by vukica » Sun, 21. Nov 10, 16:37

i posted a fix in my previos post, this is latest version.

here it is again http://cylon33.googlecode.com/files/plu ... ateAcc.xml
Split say NEED MORE FIREPOWER!!

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

Post by mark_a_condren » Sun, 21. Nov 10, 17:29

Update - Version 501 Released

Download links in OP updated .

Version Info :
V501 - 22-Nov-10
  • Confirmation on 'Close Account' not showing fixed.

@ vukica

Thanks for the kick in the pants. I had to make some minor changes to how you had fixed the script to get the comfirmation to show correctly, rather than just use your file straight up.

Thanks for the link to the file btw.

MarCon

Taowulf
Posts: 34
Joined: Wed, 15. Apr 09, 07:54
x3tc

Post by Taowulf » Tue, 23. Nov 10, 20:07

The overflow function works great!
***modified*** means more options

siath70
Posts: 459
Joined: Sun, 11. Jan 04, 03:03
x4

Post by siath70 » Wed, 24. Nov 10, 20:13

Found a rather large bug depending on how you want to exploit it.

Code: Select all

 if $ADD == [TRUE]
  if $Bank.acc.amt >= $add.amount
    $station -> add money: $add.amount
     if $acc == $txt.Player.Acc
       $Remove.amount = - $add.amount 
       add money to player: $Remove.amount
     else
       $station -> add money: $add.amount
       $Bank.acc.amt.new = $Bank.acc.amt - $add.amount
       $Acc.amt.array[$index] = $Bank.acc.amt.new

       $Bank.acc.amt.new.str =  convert number $Bank.acc.amt.new to string
       $Bank.acc.amt.new.str = sprintf: fmt=$fmt.wild.cr, $Bank.acc.amt.new.str, null, null, null, null
       $Acc.display[0][3] = $Bank.acc.amt.new.str
     end
If you look at it you'll see you have:

Code: Select all

    $station -> add money: $add.amount
Outside the argument and then inside the banking arg.

The one on the inside needs to go. Everything works fine as long as you use the players main account as the withdraw deposit. When you make a secondary account and link it and set a min on the station and it falls below the min you start getting double deposits. Not very noticeable if it's small amounts, but set it to something like 10 mil or 200 mil and suddenly you'll have 400 mil if you empty it and drop it back in the linked account you created.

Anyway I fixed it and here is the code I used.

Code: Select all

 if $ADD == [TRUE]
  if $Bank.acc.amt >= $add.amount
    $station -> add money: $add.amount
     if $acc == $txt.Player.Acc
       $Remove.amount = - $add.amount 
       add money to player: $Remove.amount
     else
       $Bank.acc.amt.new = $Bank.acc.amt - $add.amount
       $Acc.amt.array[$index] = $Bank.acc.amt.new

       $Bank.acc.amt.new.str =  convert number $Bank.acc.amt.new to string
       $Bank.acc.amt.new.str = sprintf: fmt=$fmt.wild.cr, $Bank.acc.amt.new.str, null, null, null, null
       $Acc.display[0][3] = $Bank.acc.amt.new.str
     end
Just removed the one after the else statement.

Love the script and can see it going places. I would like to see the option for a couple different banks maybe with varying intrest rates. I would say Credit Cards and maybe a limited type AI that every so many months or so changes the intrest rates on loans. Or a limited AI that uses the bank too and the bank or banks build up cash. Then they can order a Equipment Station that is randomly place in the Universe.

There is so much you can do with this script.

Post Reply

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