[MOD] Enhanced Money Transfer - v1.14 - 31/12/2016

The place to discuss scripting and game modifications for X Rebirth.

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

User avatar
wysiwyg
Posts: 585
Joined: Thu, 26. Feb 04, 00:08
x4

[MOD] Enhanced Money Transfer - v1.14 - 31/12/2016

Post by wysiwyg » Sun, 19. Oct 14, 21:14

Enhanced Money Transfer

== Introduction ==

MitchTech Corporation is proud to release its first update for the Pride of Albion user interface software. This small mod will improve productivity for pilots managing many stations and large accounts. The patch replaces the money transfer slider dialog with a dialog that allows the user to type in the exact amount of credits to be set in the manager's or architect's account.

== Installing ==

Simply subscribe to the mod on the Steam Workshop for x-rebirth and the mod will download and install automagically next time you start the game.

Steam Workshop Link

You can find the source files for the mod on my github repository if you're interested in seeing what changes are being made under the hood.

== Usage ==

The next time you want to transfer some money to or from a station manager or architect you will be presented with an account transaction dialog box that has a single text input box where you can type the amount that you want to set the account to. Note this is the actual amount that the account will contain and NOT the amount to be transferred. Also note that you need to press 'Enter' after typing the number. (I can't seem to get the text box to work like it does on the trade screen!)

Valid inputs:
digits 0-9 e.g. 100, 1000000, 500000
numbers in exponent format e.g. 1e6, 23.67e3
numbers followed by a suffix e.g. 1m or 1M = 1000000, 1k or 1K = 1000 1.23467k = 1234 (note decimals less than 1 are truncated)
Thousand separators are NOT allowed
Multiple prefixes are NOT allowed eg 5kk will not work

== Uninstalling ==

Simply unsubscribe from the mod on Steam and delete the mod folder
The mod is savegame compatible

== Change History ==
v1.14 - Fix For X Rebirth v4.10 beta 4
v1.13 - Update for X Rebirth v3.50 beta 3

v1.12 - Update for X Rebirth v3.50 beta 2

v1.11 - Added french translation (Many thanks to Ronkhar). Also fixed menu display bug introduced in XR 3.20 RC2

v1.10 - Small update to improve gameplay for controller users. Pressing keyboard <enter> key or controller A button whilst input box is empty sets the manager's account to the minimum required budget.(Thanks to Airstrike Ivanov for suggesting this)

v1.09 - Text input box is now active immediately (no need to click it to activate). Enter key now also mapped to OK button.

v1.08 - Fixed for XR v3.0 b6+ version - Now works with release v2.51 and v3.0 beta

v1.07 - added russian localisation (thanks to alexalsp @ego-forum) and default lang file where no translation file is available (thanks to Klaus @Egosoft for this info)

v1.06 - finally nailed the incorrect display bug (fingers crossed!!) - thanks to alexalsp for flagging this issue

v1.05, v1.04 - Bugged releases - please update!

v1.03 - minor update to include language files for other languages (no translations yet sorry! - offers welcome ;) )

v1.02 - small fix to correct display of final player balance (calculation was correct but display was wrong!)

v1.01 - small change to allow cells to update properly when invalid amount entered.

v1.0 - First Release

== CREDITS ==

Thanks to Mad_Joker for the pioneering work on the Lua interface code
Thanks to Night Nord for the excellent tool provided for converting Lua bytecode files to Lua source files
Thanks to all the modders who've already contributed (current and past) for inspiring me to get my finger out and publish something
Last edited by wysiwyg on Sat, 31. Dec 16, 15:47, edited 18 times in total.

User avatar
YorrickVander
Posts: 2702
Joined: Tue, 29. Oct 13, 21:59
x4

Post by YorrickVander » Mon, 20. Oct 14, 04:59

! I love you :) This has been so needed from the start.
X Rebirth - A Sirius Cybernetics Corporation Product

Split irritate visiting pilot with strange vocal patterns.

User avatar
XexrelFenix
Posts: 64
Joined: Sat, 11. Oct 14, 05:58
x3ap

Post by XexrelFenix » Mon, 20. Oct 14, 06:00

Omg omg omg! :lol:

Thank you so much, I will test this when I have time! :)

Zippe
Posts: 195
Joined: Sat, 31. Jan 04, 16:25
x4

Post by Zippe » Mon, 20. Oct 14, 08:19

Good job on that one.

Is it possible to provide the english language for language ID 49? It looks a bit weird with all those error messages.

User avatar
wysiwyg
Posts: 585
Joined: Thu, 26. Feb 04, 00:08
x4

Post by wysiwyg » Mon, 20. Oct 14, 09:57

Zippe wrote:Is it possible to provide the english language for language ID 49? It looks a bit weird with all those error messages.
Tested and working with ID49 now :) Sorry about that - I'm new to modding and I just assumed it would default to ID44 if I didn't include any other t files.

I've added all the other IDs in too so if anyone has any feedback for the other ones I'd be very grateful. Translations most welcome and appreciated - the source files should be on the github link soon.

KlausM
EGOSOFT
EGOSOFT
Posts: 639
Joined: Wed, 6. Nov 02, 20:31
x4

Post by KlausM » Mon, 20. Oct 14, 10:22

wysiwyg wrote:
Zippe wrote:Is it possible to provide the english language for language ID 49? It looks a bit weird with all those error messages.
Tested and working with ID49 now :) Sorry about that - I'm new to modding and I just assumed it would default to ID44 if I didn't include any other t files.
For your information, you don't have to copy the English text file for each language. If you just call the English file 0001.xml (without -L044) then it will be used for all languages, unless overridden by another 0001-L*.xml.

Also, instead of a diff XML file, you can just use the normal <language> <page> <t> structure to add new texts. It will work in other languages even with id="44". (However, a diff file with @id='44' restriction doesn't work in other languages.)

We should add a note about this in some sticky thread, probably many mods have similar text issues.

User avatar
wysiwyg
Posts: 585
Joined: Thu, 26. Feb 04, 00:08
x4

Post by wysiwyg » Mon, 20. Oct 14, 12:42

Thanks for the info Klaus :)

I'll update my templates and change the mod accordingly when I get home.

Don't suppose you can share any more nuggets with regards to the lua script used in the UI? - as mentioned above I had trouble getting the text box in the window to update when clicking elsewhere on the table view. Also I couldn't get the hotkey '0' to work as it does, for example, on the player trade offer screen.

There are lots of lua functions with variable argument lists e.g.

Code: Select all

someFunction = function ( ... )
Pretty much trial and error when trying to use them, which as you can imagine makes developing these UI mods a tad laborious. Throw us a bone please guys :D

Cheers
Wysi :)

User avatar
alexalsp
Posts: 1823
Joined: Fri, 18. Jul 14, 05:28
x4

Post by alexalsp » Mon, 20. Oct 14, 15:46

Thanks for the mod It works , but it seems to me there are small errors in the calculation.

The screenshots below.

1. Current balance
2. New balance's wrong, I think..

You can analyze the screenshots. I don't speak English , the text is translated with Google. Sorry.

<This is not the nicest of host sites. Open files or expand screenshots here at your own risk.
EDIT: Links here deleted as new and safer host given below.
Alan Phipps, Moderator>

User avatar
wysiwyg
Posts: 585
Joined: Thu, 26. Feb 04, 00:08
x4

Post by wysiwyg » Mon, 20. Oct 14, 16:03

Sorry alexalsp I can't reproduce your error and the screenshots and files are hosted on a site on my blacklist. If anyone else can confirm this error I will take another look at the code - bear in mind that it is possible that some money went in or out of your account via another route such as a captain auto-refuelling. It's also possible that the showmoney function has an issue. If someone else can confirm I will have a look.

EDIT: I also don't understand why your station manager is requesting billions of credits!!!!!

User avatar
wysiwyg
Posts: 585
Joined: Thu, 26. Feb 04, 00:08
x4

Post by wysiwyg » Mon, 20. Oct 14, 17:48

I was able to finally track this bug down - Thanks alexalsp for pointing this out - should all be fixed now.

User avatar
alexalsp
Posts: 1823
Joined: Fri, 18. Jul 14, 05:28
x4

Post by alexalsp » Mon, 20. Oct 14, 18:24

Sorry for the hosting. I have ad blockers ))

The screenshots below.

Now download the new version and check.

I added a lot of money to test. ))

http://apocalypse.moy.su/000/1.jpg
http://apocalypse.moy.su/000/2.jpg
http://apocalypse.moy.su/000/3.jpg
http://apocalypse.moy.su/000/4.jpg

PS///

I tested the new version. Works correctly. All bugs are fixed.
Thank you friend. Good work and great mod.

The Russian language file

http://apocalypse.moy.su/000/0001-L007.zip for add to a mod if possible ))


Edit: Removed img-tags from oversized images. Maximum sizes are 640 x 480 pixel and 100 KB, as noted in the forum rules. X2-Illuminatus

User avatar
wysiwyg
Posts: 585
Joined: Thu, 26. Feb 04, 00:08
x4

Post by wysiwyg » Mon, 20. Oct 14, 19:39

alexalsp wrote:I tested the new version. Works correctly. All bugs are fixed.
Thank you friend. Good work and great mod.

The Russian language file

http://apocalypse.moy.su/000/0001-L007.zip for add to a mod if possible ))
Thanks again and glad you like the mod :) - I was sneaking a few minutes during a break at work and our landlord operates a very strict firewall. When I checked the site using my own laptop using my sandboxed VM and my mobile as a hotspot it just sent me into an endless loop and I never actually got to see the pics lol.

Anyway, all's well and I'll add the t file in the next update

BR
Wysi :)

Vim Razz
Posts: 1842
Joined: Tue, 2. Nov 10, 02:20
x4

Post by Vim Razz » Mon, 20. Oct 14, 20:20

Nicely done!

User avatar
NZ-Wanderer
Posts: 1623
Joined: Thu, 5. Aug 04, 01:57
x4

Post by NZ-Wanderer » Mon, 20. Oct 14, 20:57

This is very nice, thank you very much for this, will make passing over or taking away money a lot easier :lol:

Added this mod to the Mods Working Thread :)
- Link to Mods Working Thread.
Link to the list of Mods working in X4-Foundations and also Link to the list of Mods working in X-Rebirth

NOTE: I play with a modded game, so any reports I make outlining suggestions/problems/bugs/annoyances, are made with mods installed and running.

User avatar
wysiwyg
Posts: 585
Joined: Thu, 26. Feb 04, 00:08
x4

Post by wysiwyg » Wed, 3. Dec 14, 13:23

Added temporary upload link for a version that is compatible with 3.0 Beta 6.

I'll update on Steam once 3.0 is released as this fix will break the mod in pre-beta 6 games.

EDIT (04/12/14) - fixed - temp link removed
Last edited by wysiwyg on Thu, 4. Dec 14, 22:54, edited 1 time in total.

User avatar
NZ-Wanderer
Posts: 1623
Joined: Thu, 5. Aug 04, 01:57
x4

Post by NZ-Wanderer » Wed, 3. Dec 14, 21:11

Many thanks for pushing out the update for us Beta users :) - Much appreciated...
Link to the list of Mods working in X4-Foundations and also Link to the list of Mods working in X-Rebirth

NOTE: I play with a modded game, so any reports I make outlining suggestions/problems/bugs/annoyances, are made with mods installed and running.

User avatar
alexalsp
Posts: 1823
Joined: Fri, 18. Jul 14, 05:28
x4

Post by alexalsp » Wed, 3. Dec 14, 23:03

Thank you very much for the update.

Drag00nFighter
Posts: 74
Joined: Wed, 7. Dec 05, 20:33
x4

Post by Drag00nFighter » Thu, 4. Dec 14, 20:10

use in ego_detailmonitor.xml these code, maybe as patch, then is should work without editing subst_01.cat

Code: Select all

<replace sel="/addon/file[@name='menu_moneytransfer.lua']">
 <file name="..//detailmonitor//MT_enhanced_moneytransfer.lua" />
So i have become active and it's easier to make a patch.

User avatar
wysiwyg
Posts: 585
Joined: Thu, 26. Feb 04, 00:08
x4

Post by wysiwyg » Thu, 4. Dec 14, 20:46

Drag00nFighter wrote:use in ego_detailmonitor.xml these code, maybe as patch, then is should work without editing subst_01.cat

Code: Select all

<replace sel="/addon/file[@name='menu_moneytransfer.lua']">
 <file name="..//detailmonitor//MT_enhanced_moneytransfer.lua" />
So i have become active and it's easier to make a patch.
Thanks for the tip - the difficulty I was having was actually making the mod compatible with both the release and the beta version. I have a solution now and will post when I've finished testing it. :)

User avatar
wysiwyg
Posts: 585
Joined: Thu, 26. Feb 04, 00:08
x4

Post by wysiwyg » Thu, 4. Dec 14, 22:04

Now fixed on Steam - please use workshop version for both 2.51 and 3.0.

Post Reply

Return to “X Rebirth - Scripts and Modding”