[Script] Storage spaces reports system (Warehouse reports system) 1.5.1 [05/08/2007]

The place to discuss scripting and game modifications for X³: Reunion.

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

Are you need feature: manually select fields in report . Report can have 3 fields, selected from (amount of ware units, free for ware units, limit for ware units, cost of all existing units, used cargo size, limit cargo size)

Poll ended at Sat, 24. Mar 07, 23:22

Yes
1
100%
No
0
No votes
 
Total votes: 1

User avatar
ChemODun
Posts: 435
Joined: Mon, 12. Feb 07, 21:58
x4

[Script] Storage spaces reports system (Warehouse reports system) 1.5.1 [05/08/2007]

Post by ChemODun »

Script type:Trading / Station Management Scripts

################################################################################
Script : Storage spaces reports system
Author : Chem
E-mail : chemodun@gmail.com
Web : http://www[dot]elite-games[dot]ru/x3/
Version: 1.5.1
Desc. : Storage spaces reports system - display various information about ware on your Equipment Docks and HQ (amount, limit, free, total cost)
################################################################################

_____________
Download:
Spk version
Zip version


_____________
Changelog:
  • 1.5.1 Script renamed to "Storage spaces reports system", some minor display fixes.
  • 1.4.1 Second public release. Added sorting, groupping and 6 types of reports
  • 1.0.3 Fix in text files (after change page id from free to registered in community on forum.egosoft.com)
  • 1.0.2 Initial release as Report system for Dockware Manager
_____________
Installation:

Install via Cycrow Script Manager (Plugin Manager)


______
Use:

Work only on player's Equipment Docks and Head Quarter.
Run via:
]Station Command Menu > Storage spaces reports system

After run command you see welcome splash script.
Please press Enter.
Now you see main Reports System screen with your default report.
This system has 6 predifined reports, each report have one main column - ware name, and three information columns:
  • Report 0 - Amount, Free, Limit
  • Report 1 - Amount, Limit, Total cost (default, on first start)
  • Report 2 - Cargo used, Cargo Limit, Total cost
  • Report 3 - Amout, Cargo used, Total cost
  • Report 4 - Cargo used, Cargo limit, Limit
  • Report 5 - Amout, Cargo used, Cargo limit
Column description:
  • Amount (units) - total amount of units of ware in cargo bay on Station.
  • Limit (units) -
    • Equipment Dock - it's maximum amout of units of this ware, that can be stored on
    • Head Quarter - value, was set via Dock Ware Manager[/color] (from Bonus Pack)
  • Free (units) -
    • Equipment Dock - difference between maximum amout of units of this ware, that can be stored on and Amount
    • Head Quarter -
      • if Limit was set - then difference between Limit and Amount
      • else - difference between maximum amout of units of this ware, that can be stored on and Amount
  • Cargo used (cargo space) - total cargo bay space, was used by ware
  • Cargo limit (cargo space) -
    • Equipment Dock - it's maximum space, which may be used for storage ware in cargo bay
    • Head Quarter -
      • if Limit was set via Dock Ware Manager[/color] - then Limit[/color] multiplied with space used for storage one unit of ware
      • else it's maximum space, which may be used for storage ware in cargo bay
  • Total cost - total cost of all units of ware in cargo bay (based on price of this ware on this station)
By default list of wares are groupped by ware type :
  • Lasers - all type of ship weapons, like Lasers, Cannons, etc.
  • Shields - all types of ship shields
  • Missiles - all ship missiles and torpedos
  • Energy - Energy Cells
  • Natural - Teladianum, for example
  • Food and Common - all types of foods and satellite wares
  • Minerals - ore, silicon, nividium
  • Special Equipment and Upgrade - Laser towers, Drones, and other.
  • Misc - other ware
You can enable or disable this groupping.
Each column may be used for sorting ware. If ware are groupped by type - then sorting are applicable inside of ware type groups.
Additionally you can filter all ware by ware type. In this case you see on screen only selected type ware.

Type of report, sorting definitions, grouppeng are stored, and when you start script on station - will be restored.

Screens:
Reports list:
[ external image ]
Groupped ware list, sorted by ware:
[ external image ]
Groupped ware list, sorted by Total cost:
[ external image ]
Groupped ware list, sorted by Total cost, second page:
[ external image ]
Ungroupped ware list, sorted by Total cost:
[ external image ]
Ungroupped ware list, sorted by Amount:
[ external image ]
Filtered by Minerals:
[ external image ]


_____________
Uninstallation:

Uninstall via Cycrow Script Manager (or Plugin Manager)

_____________
Languages:
Russian
English
Deutsch - thanks to Unitrader [KGB]

_____________
Info:
Uses
Command from Station Command Menu:
<t id="1154">COMMAND_TYPE_STATION_54</t> with new name <t id="1154">COMMAND_TYPE_STATION_STORAGE_REPORTS_SYSTEM</t>
Text Files Used:
8909
Text Pages Used:
8909

Additionally use lib.chem.strings with
Text Files Used:
8910
Text Pages Used:
8910

_______________________
© Chem
Last edited by ChemODun on Sun, 5. Aug 07, 01:38, edited 8 times in total.
User avatar
ChemODun
Posts: 435
Joined: Mon, 12. Feb 07, 21:58
x4

Post by ChemODun »

empty
Last edited by ChemODun on Sun, 5. Aug 07, 01:08, edited 1 time in total.
Multiply entropy by absolute zero

Freedom in space
ORIOLE
Posts: 324
Joined: Wed, 20. Oct 04, 10:34
x2

Post by ORIOLE »

I just love google:
For installation of script copy content an archive in a catalogue with the set game.
Hi Chem0Dun,

Thanks for a very useful script :!: It surely will give some order to the PHQ. Could you please also post a .spk package :?: You can use Cycrow's Plugin Manager .

:)
User avatar
ChemODun
Posts: 435
Joined: Mon, 12. Feb 07, 21:58
x4

Post by ChemODun »

ORIOLE wrote:I just love google:
[

Hi Chem0Dun,

Thanks for a very useful script :!: It surely will give some order to the PHQ. Could you please also post a .spk package :?: You can use Cycrow's Plugin Manager .

:)
Yes, in new version in will be done ;-)
Multiply entropy by absolute zero

Freedom in space
B-O'F
Posts: 724
Joined: Sat, 21. Feb 04, 02:15
x3tc

Post by B-O'F »

Hi ChemODun,

Nice little script, good layout of the output.. but

You knew that there would be a but .. the layout only works for 49 wares or less. If you have 50 or more wares ( and, of course, I have) it lists wares over 49 in green or red, between Ware and the rest of the table...

I think that this is as a result of using the 'text cols = 2' in the t-file.. it does not seem to depend on the ware (I tried your script as-is but with a count set to 49 or 50, and then after sorting the wares into alphabetical order with the same count limits) .

In both cases, 49 wares or less displayed correctly, 50 or more failed to display correctly...

Sorry to report this error,

Boron - Ol Fh'art

PS. if you want to sort wares into alphabetical order, feel free to use my scripts in "Sorts and Strings" - it may save you some work...

[Edit] by the way, the author part does not seem to work - comes up as Message from Unknown...
[/Edit]
Public Service announcement

Growing old is not a disease - it is a delayed symptom of birth trauma.
User avatar
Shovinus
Posts: 563
Joined: Sat, 9. Dec 06, 19:19
x3

Post by Shovinus »

Here is the .spk for this file for those that need it

SPK

EDIT: link removed, new version available
Last edited by Shovinus on Sun, 18. Mar 07, 14:16, edited 1 time in total.
User avatar
ChemODun
Posts: 435
Joined: Mon, 12. Feb 07, 21:58
x4

Post by ChemODun »

B-O'F wrote:Hi ChemODun,


You knew that there would be a but .. the layout only works for 49 wares or less. If you have 50 or more wares ( and, of course, I have) it lists wares over 49 in green or red, between Ware and the rest of the table...


[Edit] by the way, the author part does not seem to work - comes up as Message from Unknown...
[/Edit]
Yes :-)
I was done splitting by nesessary amount parts of ware list last night :-)

Message now fixed in new version, but tomorrow i will post updated old version with fixes :-).

Shovinus wrote:Here is the .spk for this file for those that need it
Shovinus, thanks :-)

After beta-testing new version may be done till meddle next week.

Too many work on my primary works :-)
Multiply entropy by absolute zero

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

Post by LV »

i would be interested in a PM on how you got that many values in your oncreeen msg ;)
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
Shovinus
Posts: 563
Joined: Sat, 9. Dec 06, 19:19
x3

Post by Shovinus »

Code: Select all

$ten = 10
While $ten
   dec $ten
   $MainText = sprintf: pageid=$pageid textid=$textid, $ten , MainText, null, null, null
end

send incoming message = $maintext, display it = [TRUE]
page text should be

%s\n%s

and will display a result like so

1
2
3
4
5
6
7
8
9
null





Null is there because first main text cycle will produce null for main text entry, this is an example which I'm sure you can figure out to have lots of fun :)

If you mean beacuse after so many lines text is not displayed on the players message then I dont know the answer.
User avatar
SymTec ltd.
Posts: 5285
Joined: Mon, 11. Apr 05, 21:11
x3tc

Post by SymTec ltd. »

I think there is a limit of 50 (or 100?) lines per message - no way around it, afaik
User avatar
Shovinus
Posts: 563
Joined: Sat, 9. Dec 06, 19:19
x3

Post by Shovinus »

yeh its something like that, there is a way round it, you use a script to check how many line the string has (number of \n and after so many cut it in 2 (i think that would work anyway) I plan to work on it later
Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22437
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow »

yeha LV, u can just put strings together. One i use alot of for the incomming questions.

i create a text entry like this.

Code: Select all

<t id="1">[select value="%s,%s"]%s[/select]</t>
then i can add lots of questions

Code: Select all

$text = sprintf: pageid $page.id, textid= 1, $command, $value, $string
$message = $message + $text
then u end up with using as many varibles as you like ;)

another way, say you want 7 varibles in 1 line, but of course u can only add 5. So u create 2 text entries

Code: Select all

<t id="1">1: %s, 2: %s, 3: %s 4: %s %s\n</t>
<t id="2">5: %s, 6: %s, 7: %s</t>
then u join them together

Code: Select all

$text = sprintf: page id = $page.id, textid = 2, $varible5, $varible6, $varible7, null, null
$text = sprintf: page id = $page.id, textid = 1, $varible1, $varible2, $varible3, $varible4, $text
PS, sorry to hijack your thread ChemODun
User avatar
ChemODun
Posts: 435
Joined: Mon, 12. Feb 07, 21:58
x4

Post by ChemODun »

Hi Pilots.
I fix author errors in version 1.0.2.
Please, see first post :-)
Multiply entropy by absolute zero

Freedom in space
User avatar
ChemODun
Posts: 435
Joined: Mon, 12. Feb 07, 21:58
x4

Post by ChemODun »

LV wrote:i would be interested in a PM on how you got that many values in your oncreeen msg ;)
Hi.
You wrote some great scripts :-) My fellows use its :-)

About many values.
What are you interested?
Many columns ?
I was try use

Code: Select all

[text cols="4"]some text delimeted by \n[/test]
But columns was created are identical width, it was not satisfy for me.
From version 1.0.2 now use next construction:

Code: Select all

[text cols="2"]string left column \n string right column \n string left column \n string right column \n .....[/text]
string left : [left]text[/left]
string right : [left]text[/left][center]text[/center][right]text[/right]
in version which I now do - I was add some fill function for centering text in right column (it was so irregular without it)
P.S. Importan: count of left string must be equal count of right.
Cycrow wrote:yeha LV, u can just put strings together. One i use alot of for the incomming questions.

i create a text entry like this.

Code: Select all

<t id="1">[select value="%s,%s"]%s[/select]</t>
then i can add lots of questions

Code: Select all

$text = sprintf: pageid $page.id, textid= 1, $command, $value, $string
$message = $message + $text
Yes. right.
But we have some restrictions.
We can't use more then one [select] in one string, i.e. between \n and \n
Or, only I don't now how use more then one select in one string.
YEs, I can it write in one string, and it will be displayes, but when you select foxus on first on these string, it will be selected all, together, and return value from last select in string
example:

Code: Select all

[select value="1"]1[/select][select value="2"]2[/select][select value="3"]3[/select]
when you try use select 1, it select all three, and when you press enter - it return to your script value = 3
Cycrow wrote:
PS, sorry to hijack your thread ChemODun
Don't warry about it :-)
Multiply entropy by absolute zero

Freedom in space
User avatar
ChemODun
Posts: 435
Joined: Mon, 12. Feb 07, 21:58
x4

Post by ChemODun »

Added German translation.
Thanks to UniTrader {KBG}
Multiply entropy by absolute zero

Freedom in space
User avatar
ChemODun
Posts: 435
Joined: Mon, 12. Feb 07, 21:58
x4

Post by ChemODun »

LV wrote:i would be interested in a PM on how you got that many values in your oncreeen msg ;)
Please see Chem String Functions Library v. 2.09 - you can set needed length for strings, which dispalyed in player logbook in pixels (i.e. in count of widths of symbol " ")

sorry bo bad English.
P.S. You can fill strings like it have monospace font
Last edited by ChemODun on Sun, 5. Aug 07, 01:11, edited 2 times in total.
Multiply entropy by absolute zero

Freedom in space
User avatar
ChemODun
Posts: 435
Joined: Mon, 12. Feb 07, 21:58
x4

Post by ChemODun »

New version:
  • 1.5.1 Script renamed to "Storage spaces reports system", some minor display fixes.
  • 1.4.1 Second public release. Added sorting, groupping and 6 types of reports
This system has 6 predifined reports, each report have one main column - ware name, and three information columns:
  • Report 0 - Amount, Free, Limit
  • Report 1 - Amount, Limit, Total cost (default, on first start)
  • Report 2 - Cargo used, Cargo Limit, Total cost
  • Report 3 - Amout, Cargo used, Total cost
  • Report 4 - Cargo used, Cargo limit, Limit
  • Report 5 - Amout, Cargo used, Cargo limit
Columt description:
  • Amount (units) - total amount of units of ware in cargo bay on Station.
  • Limit (units) -
    • Equipment Dock - it's maximum amout of units of this ware, that can be stored on
    • Head Quarter - value, was set via Dock Ware Manager[/color] (from Bonus Pack)
  • Free (units) -
    • Equipment Dock - difference between maximum amout of units of this ware, that can be stored on and Amount
    • Head Quarter -
      • if Limit was set - then difference between Limit and Amount
      • else - difference between maximum amout of units of this ware, that can be stored on and Amount
  • Cargo used (cargo space) - total cargo bay space, was used by ware
  • Cargo limit (cargo space) -
    • Equipment Dock - it's maximum space, which may be used for storage ware in cargo bay
    • Head Quarter -
      • if Limit was set via Dock Ware Manager[/color] - then Limit[/color] multiplied with space used for storage one unit of ware
      • else it's maximum space, which may be used for storage ware in cargo bay
  • Total cost - total cost of all units of ware in cargo bay (based on price of this ware on this station)
By default list of wares are groupped by ware type :
  • Lasers - all type of ship weapons, like Lasers, Cannons, etc.
  • Shields - all types of ship shields
  • Missiles - all ship missiles and torpedos
  • Energy - Energy Cells
  • Natural - Teladianum, for example
  • Food and Common - all types of foods and satellite wares
  • Minerals - ore, silicon, nividium
  • Special Equipment and Upgrade - Laser towers, Drones, and other.
  • Misc - other ware
You can enable or disable this groupping.
Each column may be used for sorting ware. If ware are groupped by type - then sorting are applicable inside of ware type groups.
Additionally you can filter all ware by ware type. In this case you see on screen only selected type ware.

Type of report, sorting definitions, grouppeng are stored, and when you start script on station - will be restored.
Multiply entropy by absolute zero

Freedom in space
User avatar
Shovinus
Posts: 563
Joined: Sat, 9. Dec 06, 19:19
x3

Post by Shovinus »

ah you are back, where have you been?

Return to “X³: Reunion - Scripts and Modding”