[MOD] Format Thousands - formats money and amounts in thousands v0.05 (14th Dec 2015)

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

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

jth
Posts: 296
Joined: Tue, 3. Jan 06, 23:31
x3

Post by jth »

UniTrader wrote:If you want some more ideas for additional functions: (made a lib with these functions in X3, but don't have any intention of implementing it in XR yet)
what about formatting numbers as roman numerals?
Or counting with A, B, C etc.? (OK, these two are only suited for small numbers)
and what about formatting it using a different base (e.g binary, octal, hexadecimal, or maybe even nonal :D) - and possibly with a different characters than usual by passing a Page ID and a starting text id
I know - especially the last one may see not much usage but when adding the possibility of arbitrary bases by cleverly (ab)using the lang file its trivial to add :D
Thanks for that

I will add these to the scales on the keeping it going side

jth
Stilgar19791
Posts: 3
Joined: Sun, 7. Sep 08, 01:54
x4

Post by Stilgar19791 »

Hallo zusammen,

Ich habe mit diesem komfortablem Mod das Problem, das meine Frachtdronen im Frachtsammelmodus nicht mehr starten.

Ich habe alle Mods nacheinander deaktivert und diesen Mod als "Übeltäter" gefunden.

Es laufen ALLE anderen Mods wieder bis auf den 1.000 und alles funktioniert.


In English now:

My Problem is if this simple mod is aktivated, my Cargo Drones wont do their work in "Cargo Collecting Mode" (Return -> 1 ->2 in german)

I have deaktivated ALL other mods and this one is the bad one
After that i have reaktivated ALL other mods again and i have no trouble
(sorry, my english isnt the best :) )
jth
Posts: 296
Joined: Tue, 3. Jan 06, 23:31
x3

Post by jth »

Stilgar19791 wrote:Hallo zusammen,

Ich habe mit diesem komfortablem Mod das Problem, das meine Frachtdronen im Frachtsammelmodus nicht mehr starten.

Ich habe alle Mods nacheinander deaktivert und diesen Mod als "Übeltäter" gefunden.

Es laufen ALLE anderen Mods wieder bis auf den 1.000 und alles funktioniert.


In English now:

My Problem is if this simple mod is aktivated, my Cargo Drones wont do their work in "Cargo Collecting Mode" (Return -> 1 ->2 in german)

I have deaktivated ALL other mods and this one is the bad one
After that i have reaktivated ALL other mods again and i have no trouble
(sorry, my english isnt the best :) )
Mein Deutsch ist von Google zu übersetzen, ich werde hier auf Englisch zu schreiben.

Thanks for posting here

I need a bit more detail about Where and What so I can reproduce the problem. I need to reproduce it to understand it and to have something to work on to test any fixes.

Reproducing problems takes a very long time so the more precise and focussed the report is the better :)

You have made an excellent start by doing the elimination of other mods and it looks like there may be something to find

Questions

Have you hacked a station or ship or did you find some containers somewhere ?

If you found some containers where were they (zone location) ?

What type of ware was in the container(s) and what type of ship are you using to collect them ?

What type of drones and how many are in the ship that you are using to collect them ?

Do the drones come out and do nothing or do they not come out at all ?

I haven't done any station hacking since I built my own reinforced metal plate factory so I haven't got a save game available.

I will have to put something together. I think there is a drop crates test mod example from Egosoft I will dig it out and drop some crates.

It would be good to know what type of crates and what to pick them up with

EDIT Please can you also confirm what version of the game you are running

Thanks

jth
jth
Posts: 296
Joined: Tue, 3. Jan 06, 23:31
x3

Post by jth »

Found the problem, working on a fix

Had some fun with the code to create a crate that was suitable for fusion reactors, the egosoft code has a different macro for the crate as its intended for smaller stuff.

Code: Select all

<create_object name="$Crate" groupname="$Crates"
      macro="macro.props_sm_container_s_generic_macro"
      zone="player.zone">
      <position object="player.ship" y="1km" z="1km" min="150m" max="400m"/>
</create_object>
<add_cargo object="$Crate" ware="ware.fusionreactor" exact="20"/>
EDIT 17:08 pm BST implemented a fix, v0.04 on Nexus
EDIT 17:13 pm BST implemented a fix, v0.04 on Steam

EDIT 18:08 pm BST

Steam documentation updated, Nexus done a little earlier

- [13.12.2015 - V0.04 Public Beta]
Provides a work around for a patching problem that took out cargo collection. The FormatThousands ai script is inserted by piggy backing off command.collect.cargo and for some reason it took it out completely if inserted before it but is fine if inserted after it

Now uses silent="true" on patch commands that are meant to fail in X Rebirth 4 which reduces the debug.log messages by 23 and means my Debug turns Green :)

I will be composing a report on the patching issue but I suspect that this mod is the only one that is affected and this work around seems to work for 3.61 and 4.00 beta 4 HF1

Regards

jth
jth
Posts: 296
Joined: Tue, 3. Jan 06, 23:31
x3

Post by jth »

v0.04 patching method fixed the drone issue and killed the FormatThousands ai script :(

- [14.12.2015 - V0.05 Public Beta]
Now apply FormatThousands ai script as a file rather than as a diff
jth
Posts: 296
Joined: Tue, 3. Jan 06, 23:31
x3

Post by jth »

Hyperion on Steam wrote:I defaultly had my game separate thousands with commas, without this addon, but I would like to replace that with blank spaces (as I'm Czech and here we usually type it like that, we use comma as a decimal separator instead). It seems to not do anything at all at the moment
If you are running X Rebirth 4.00 then the mod leaves most of the work to Egosoft, so I assume that you are running X Rebirth 4.00 beta and not 3.61

I think that Egosoft and this mod both use the translated thousands separator. The translation mechanism looks at you PC's code page and if Egosoft support the language picks an appropriate set of separators for thousands and decimal points. These translated strings are then substituted into the various game messages. If Egosoft do not provide your language and I am pretty sure that they don't for Czech then you get the default which is the commas.
Hyperion on Steam wrote:I would like to replace that with blank spaces (as I'm Czech and here we usually type it like that, we use comma as a decimal separator instead). What do I need to change in this mod to achieve this?
I am doing some experiments, will let you know what I find

jth
jth
Posts: 296
Joined: Tue, 3. Jan 06, 23:31
x3

Post by jth »

Hi Hyperion

I have made some guesses and produced you a mod called format_thousands_space_comma

This new mod does not need FormatThousands when running X Rebirth 4.00 but does need it for X Rebirth 3.61

What it does is alter the thousands separator and decimal point for English and I hope all non supported languages

its under the file download of FormatThousands as an Optional file

The direct link is

http://www.nexusmods.com/xrebirth/download/2059

Unzip it in your extensions folder and come all of the way out of X Rebirth including Stopping Steam. It should show up as a new extension next time you start X Rebirth

Its extremely difficult for me to know if it will work for you as its a pig to test as I haven't got a Czech PC. I think that I have managed to get my PC to use the fallback language support but I can't be 100% sure ....

Please try it and let me know

If it works I will decide how best to distribute it and if I want to produce the other variations

Regards

jth

PS If anyone else with a PC that isn't using one of the supported languages (English, Russian, French, Spanish, Italian, German, Chinese or Korean) wants to try this and let me know if they get spaces and commas I would appreciate it.
User avatar
Helios01
Posts: 203
Joined: Thu, 17. Mar 11, 12:55
xr

Post by Helios01 »

The thousand formatting appears to work perfectly, thanks for the solution! Czech here, English localisation of the game

- Hyperion
"If we do not destroy ourselves, we will one day venture to the stars" - Carl Sagan
User avatar
alexalsp
Posts: 1896
Joined: Fri, 18. Jul 14, 05:28
x4

Post by alexalsp »

I do not understand which of the mod to use. This or that - http://forum.egosoft.com/viewtopic.php?t=382264 ?

to replace content.xml - https://cloud.mail.ru/public/52eA/za4XUKBz7

Return to “X Rebirth - Scripts and Modding”