[Script]Headquarters Company Management System

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

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

What do you think of this script

Great Idea where do i download?
44
76%
hmm interesting, i may use it
14
24%
i dont care
0
No votes
why? im never going to use that
0
No votes
terrible idea wheres the back button
0
No votes
 
Total votes: 58

Osiris_sam
Posts: 422
Joined: Thu, 24. Aug 06, 13:45
x4

[Script]Headquarters Company Management System

Post by Osiris_sam » Fri, 14. Dec 07, 21:41

********************************************************************************
Headquarters and company Management by Osiris_Sam
Version: 0.90b
E-mail: Osirissamelite@googlemail.com
Download: [.RAR]
********************************************************************************

NOTE: .SPK version is included as part of the .RAR file.

Any Queries, Please contact me either by PM on the EGOSOFT forum, or by email. Please include 'script' as the topic to assist my spam filtering (i get lots of spam :()

Description:
This script is designed to add true functionality to the player Headquarters complex. The script will handle tasks such as:
=>TS distribution amongst ALL player stations
=>Money distribution amongst ALL player stations (amount variable)
=>Automated setup of CAgs (from the bonus pack) and ESTs (if possible)
=>Various reports
=>Station and TS renaming
___________________________________________________
Installation:
rar: Extract rar contents to *\EGOSOFT\X3 Reunion
SPK: Double click on file with Cycrows' script installer installed.
___________________________________________________
Usage:

The script has 2 Commands (details below) found in the Station menu:

=>HQ -> Company Management – Found on the the Player headquarters facility, this command installs the suite aboard the headquarters, which then begins managing your empire.

=>Setup Company Details - Found on a player owned dock class station station, this command prompts the user to enter a company name, initials (no more than 4 characters) and a home system.

The script also installs several hotkeys:

=>HQ Management: Pause – this hotkey pauses the headquarters management so changes can be made to a station

=>HQ Management: Report – this hotkey generates a report on the players empire.

=>HQ Management: Options Menu – This hotkey opens the Message system user interface (MSUI) (more below)

=>HQ Management: Player Sector Assessment – this hotkey generates a report of the sector the player was in when the hotkey was pressed. This takes a long time to do, due to the nature of the report.

=>HQ Management: Race Ware Analysis – this hotkey reports the race ware percentage for all the standard races (including Terran's and Pirates).

=>HQ Management: Select Shipyard – Select the targeted shipyard as the default shipyard to buy ships for the company from.

The MSUI controls the settings of the script, and enables and disables the interactions between it and other scripts

=> settings menu – Change settings such as the max amount of credits to be distributed to a station and turn station naming on/off.
=> Software menu – Turn interaction with Commercial Agent script and Economy and supply trader script on/off

=> Reporting – Change the style of report received when a sector assessment is generated. This can be long or short

The script also has various AL Plugins:

=>HQ Management: Profit Management – this re-analyses the player empire every 150 seconds, these statistics are used in the report.


=>HQ Management: Auto Report – A report of the player empire is generated and sent to the player.

=>HQ Management: Auto Attack Detection – Detects any stations which are under attack, and adds them to the reporting system, so the player can act on this information

=>HQ Management: Random Sector Assessment – Randomly generates the report on a sector and sends it to the player.

=>HQ Management: Station Rename Timer – Controls the automatic renaming of stations and TS class ships owned by those stations
___________________________________________________

Uninstallation:
Place the uninstall scripts in the scripts file and run the game
For zip - Remove the script/t files from the respective folders
for spk – Uninstall the script using Cycrow's Plugin manager
___________________________________________________
Revision History:

V0.90b – initial beta release

___________________________________________________
Technical info:
Text files used:
448889.xml

text pages used:
8889

Commands used:
1132 – COMMAND_TYPE_STATION_32 - HQ -> Company Management
1116 - COMMAND_TYPE_STATION_16 - Setup Company Details

credits:
Symtec ltd. - used some of his libraries again
X-Freak Cartman - Used some of his libraries

User avatar
Malakie
Posts: 1061
Joined: Tue, 13. Apr 04, 23:08
x4

Re: [Script]Headquarters Company Management System

Post by Malakie » Fri, 14. Dec 07, 21:50

Osiris_sam wrote:********************************************************************************
Headquarters and company Management by Osiris_Sam
Version: 0.90b
E-mail: Osirissamelite@googlemail.com
Download: [.RAR]
********************************************************************************

NOTE: .SPK version is included as part of the .RAR file.

Any Queries, Please contact me either by PM on the EGOSOFT forum, or by email. Please include 'script' as the topic to assist my spam filtering (i get lots of spam :()

Description:
This script is designed to add true functionality to the player Headquarters complex. The script will handle tasks such as:
=>TS distribution amongst ALL player stations
=>Money distribution amongst ALL player stations (amount variable)
=>Automated setup of CAgs (from the bonus pack) and ESTs (if possible)
=>Various reports
=>Station and TS renaming
___________________________________________________
Installation:
rar: Extract rar contents to *\EGOSOFT\X3 Reunion
SPK: Double click on file with Cycrows' script installer installed.
___________________________________________________
Usage:

The script has 2 Commands (details below) found in the Station menu:

=>HQ -> Company Management – Found on the the Player headquarters facility, this command installs the suite aboard the headquarters, which then begins managing your empire.

=>Setup Company Details - Found on a player owned dock class station station, this command prompts the user to enter a company name, initials (no more than 4 characters) and a home system.

The script also installs several hotkeys:

=>HQ Management: Pause – this hotkey pauses the headquarters management so changes can be made to a station

=>HQ Management: Report – this hotkey generates a report on the players empire.

=>HQ Management: Options Menu – This hotkey opens the Message system user interface (MSUI) (more below)

=>HQ Management: Player Sector Assessment – this hotkey generates a report of the sector the player was in when the hotkey was pressed. This takes a long time to do, due to the nature of the report.

=>HQ Management: Race Ware Analysis – this hotkey reports the race ware percentage for all the standard races (including Terran's and Pirates).

=>HQ Management: Select Shipyard – Select the targeted shipyard as the default shipyard to buy ships for the company from.

The MSUI controls the settings of the script, and enables and disables the interactions between it and other scripts

=> settings menu – Change settings such as the max amount of credits to be distributed to a station and turn station naming on/off.
=> Software menu – Turn interaction with Commercial Agent script and Economy and supply trader script on/off

=> Reporting – Change the style of report received when a sector assessment is generated. This can be long or short

The script also has various AL Plugins:

=>HQ Management: Profit Management – this re-analyses the player empire every 150 seconds, these statistics are used in the report.


=>HQ Management: Auto Report – A report of the player empire is generated and sent to the player.

=>HQ Management: Auto Attack Detection – Detects any stations which are under attack, and adds them to the reporting system, so the player can act on this information

=>HQ Management: Random Sector Assessment – Randomly generates the report on a sector and sends it to the player.

=>HQ Management: Station Rename Timer – Controls the automatic renaming of stations and TS class ships owned by those stations
___________________________________________________

Uninstallation:
Place the uninstall scripts in the scripts file and run the game
For zip - Remove the script/t files from the respective folders
for spk – Uninstall the script using Cycrow's Plugin manager
___________________________________________________
Revision History:

V0.90b – initial beta release

___________________________________________________
Technical info:
Text files used:
448889.xml

text pages used:
8889

Commands used:
1132 – COMMAND_TYPE_STATION_32 - HQ -> Company Management
1116 - COMMAND_TYPE_STATION_16 - Setup Company Details

credits:
Symtec ltd. - used some of his libraries again
X-Freak Cartman - Used some of his libraries

Downloading and giving it a run.. it looks nice!

Malakie

dogmaclement
Posts: 72
Joined: Tue, 2. Oct 07, 11:19
x4

Post by dogmaclement » Sun, 16. Dec 07, 21:31

let me know how it goes, i may try it.
Those who jump and run away, live to fight another day...

Lancefighter
Posts: 3144
Joined: Sun, 19. Dec 04, 02:41
x4

Post by Lancefighter » Sun, 16. Dec 07, 21:38

it wants a shipyard to buy ships from? what will be done with these ships? what equipment does it buy for them? what ship types will be purchased?

Osiris_sam
Posts: 422
Joined: Thu, 24. Aug 06, 13:45
x4

Post by Osiris_sam » Sun, 16. Dec 07, 21:56

the shipyard buys ships from a user selected shipyard... (see hotkeys)
once you find the shipyard you want, target it and press the hotkey.
bring up the options menu after, select 'settings' and check that the selected shipyard is correct.
the ships are automatically assigned a homebase after purchase. These are outfitted with standard equipment, weapons and shields. if no factories need new TS class ships, then it will make them into ESTs or TMK3s (depending on if EST is installed)
it buys the first type of TS class ship it comes to... in other words its random, however, it will always buy the same type of ship, providing you dont change the shipyard

hope that answers your questions

thanks

Lancefighter
Posts: 3144
Joined: Sun, 19. Dec 04, 02:41
x4

Post by Lancefighter » Sun, 16. Dec 07, 22:05

so if i tell it to use the SY in family nyj, it will randomly chose between the camain SF and tanker? but it will keep using the one it choses forever?

How does it get TMK3 software? spawns it out of thin air and deducts 500k from the HQ account? Jumpdrives? shields? weapons?

Im not trying to tear your script apart, i just want to know exactly what it will do before it does something terribly wrong.

And as well, can it operate mobile miners too? :wink:

Osiris_sam
Posts: 422
Joined: Thu, 24. Aug 06, 13:45
x4

Post by Osiris_sam » Mon, 17. Dec 07, 00:31

it cant operate mobile miners, but i may be able to work that into the script. it is a beta version. The ship is outfitted at the shipyard. so effectively it is 'bought' (all transactions are actually just spawning things out of thin air)
the script goes through the list of wares at the shipyard until it finds one of class TS, then it buys it
How does it get TMK3 software? spawns it out of thin air and deducts 500k from the HQ account? Jumpdrives? shields? weapons?

all of the above ;P... this is a beta version there may be some bugs, but if people tell me what they are i can try and fix them before something major goes wrong.
there is always the pause function if something does go wrong... this stops any further actions being taken by the HQ (although the reports will still work)

Lancefighter
Posts: 3144
Joined: Sun, 19. Dec 04, 02:41
x4

Post by Lancefighter » Mon, 17. Dec 07, 01:00

Osiris_sam wrote:it cant operate mobile miners, but i may be able to work that into the script. it is a beta version. The ship is outfitted at the shipyard. so effectively it is 'bought' (all transactions are actually just spawning things out of thin air)
the script goes through the list of wares at the shipyard until it finds one of class TS, then it buys it
Will it be possible to let the player pick what ship to have the ship buy, from a list of available TS ships at the yard? I personally am not a fan of arbitrarily chosen ships...
But to clarify, it just picks the first TS on the list, so if i go to the shipyard, and the caimain SF is at the top, and the tanker is at the bottom, it will buy the SF before the tanker? If so, that should work.
Osiris_sam wrote:
Lancefighter wrote:How does it get TMK3 software? spawns it out of thin air and deducts 500k from the HQ account? Jumpdrives? shields? weapons?

all of the above ;P... this is a beta version there may be some bugs, but if people tell me what they are i can try and fix them before something major goes wrong.
there is always the pause function if something does go wrong... this stops any further actions being taken by the HQ (although the reports will still work)
Mm ok. At least now I dont have to worry about my ships deciding to take a trip through some random xenon sector to get jumpdrives.

Ok, now with that little bit of clarification, It seems like this script takes away most of the micromanagement of everything that I hate with such a passion. Now, I can just buy a station, place it, and let my HQ sort everything else out \o/. Good on you :)

dogmaclement
Posts: 72
Joined: Tue, 2. Oct 07, 11:19
x4

Post by dogmaclement » Mon, 17. Dec 07, 03:40

That sounds great, less micro managment=more time to smote pirates and bounties.
Those who jump and run away, live to fight another day...

BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7411
Joined: Mon, 15. Dec 03, 18:53
x4

Post by BlackRain » Mon, 17. Dec 07, 04:40

I cant download the file, keeps saying error on filefront, any other download links?

Lancefighter
Posts: 3144
Joined: Sun, 19. Dec 04, 02:41
x4

Post by Lancefighter » Mon, 17. Dec 07, 05:10

wait a second. I just had a horrible thought. what happens when your HQ and the ship you purchased on are opposite sides of, say, pirate alley? or xenon 347? and then what happens when the station the ship is supposed to go is on the other side of some more xenon/pirates?

Will the script use the newly purchased ship's jumpdrive to get it to where it needs to go?

Osiris_sam
Posts: 422
Joined: Thu, 24. Aug 06, 13:45
x4

Post by Osiris_sam » Mon, 17. Dec 07, 17:57

wait a second. I just had a horrible thought. what happens when your HQ and the ship you purchased on are opposite sides of, say, pirate alley? or xenon 347? and then what happens when the station the ship is supposed to go is on the other side of some more xenon/pirates?
sorry, but atm, the ship will go by fastest route to the sector its homebase is in... (if that is the hq then it will go straight there)...
however, since the player selects the shipyard, it is very much down to the player to arrange for this eventuality, either by choosing a different shipyard, or killin all the xenons (its not that hard 2bh). i WILL be addressing this issue... it is on my buglist.

Im sorry to say that i only have this one download location atm, i havnt had the time to organize a second one as of yet, i will look into this, but im quite busy atm. (I have other priorities)

at this time, the script will buy the ship which is actually at the bottom of the list... i have put some time into thinking of a solution, where the player chooses the class from a list that is generated by the script.

i will add here, that if your Company (i.e. stations and HQ) has a value which is greater than 2000000000, it will spend some money on more TS's which will automatically be setup as ESTs (providing the respective options are enabled)

Lancefighter
Posts: 3144
Joined: Sun, 19. Dec 04, 02:41
x4

Post by Lancefighter » Mon, 17. Dec 07, 19:45

I have a wonderful place to store it, but im sure if chribba finds out he would kill me(naw he is a big carebear. pm me for info :D )

Lancefighter
Posts: 3144
Joined: Sun, 19. Dec 04, 02:41
x4

Post by Lancefighter » Tue, 18. Dec 07, 16:28

mmm looking through your scripts, i notice that there is a command you use,

Code: Select all

START $tmp.ship -> call script '!move.movetoposition' :  sector=$sec  position x=0  position y=0  position z=0  precision=1500  forbid jumpdrive=[TRUE]
So, why not spawn the ship with ~500 e-cells, get the sector position of the place you are trying to send it, then use that command, with forbid jumpdrive = FALSE?

Would think work?

edit

something rather like so? (argument on top)

Code: Select all

3: hb , Var/Ship/Station owned by Player , 'homebase' 

$sechq = $hq -> get sector
START $tmp.ship -> call script '!move.movetoposition' :  sector=$sechq  position x=0  position y=0  position z=0  precision=1500  forbid jumpdrive=[FALSE]
START $tmp.ship -> call script '!move.returntohomebase' : 

User avatar
-Ford-
Posts: 2064
Joined: Wed, 18. Jan 06, 18:40
x4

Post by -Ford- » Tue, 18. Dec 07, 16:35

Lancefighter wrote:mmm looking through your scripts, i notice that there is a command you use,

Code: Select all

START $tmp.ship -> call script '!move.movetoposition' :  sector=$sec  position x=0  position y=0  position z=0  precision=1500  forbid jumpdrive=[TRUE]
So, why not spawn the ship with ~500 e-cells, get the sector position of the place you are trying to send it, then use that command, with forbid jumpdrive = FALSE?

Would think work?

edit

something rather like so? (argument on top)

Code: Select all

3: hb , Var/Ship/Station owned by Player , 'homebase' 

$sechq = $hq -> get sector
START $tmp.ship -> call script '!move.movetoposition' :  sector=$sechq  position x=0  position y=0  position z=0  precision=1500  forbid jumpdrive=[FALSE]
START $tmp.ship -> call script '!move.returntohomebase' : 
Would be cheating. ;) When you buy a ship, does it got an Jumpdrive and E-Cells auto? No dont think so. :wink:

Btw. sounds just GREAT! If you would allow, i would love to host the script as a mirror for you. :)

GreeZ
Ponyfabulous

Lancefighter
Posts: 3144
Joined: Sun, 19. Dec 04, 02:41
x4

Post by Lancefighter » Tue, 18. Dec 07, 16:37

-Ford- wrote:
Lancefighter wrote:mmm looking through your scripts, i notice that there is a command you use,

Code: Select all

START $tmp.ship -> call script '!move.movetoposition' :  sector=$sec  position x=0  position y=0  position z=0  precision=1500  forbid jumpdrive=[TRUE]
So, why not spawn the ship with ~500 e-cells, get the sector position of the place you are trying to send it, then use that command, with forbid jumpdrive = FALSE?

Would think work?

edit

something rather like so? (argument on top)

Code: Select all

3: hb , Var/Ship/Station owned by Player , 'homebase' 

$sechq = $hq -> get sector
START $tmp.ship -> call script '!move.movetoposition' :  sector=$sechq  position x=0  position y=0  position z=0  precision=1500  forbid jumpdrive=[FALSE]
START $tmp.ship -> call script '!move.returntohomebase' : 
Would be cheating. ;) When you buy a ship, does it got an Jumpdrive and E-Cells auto? No dont think so. :wink:

GreeZ
errr.

His script already does spawn a ship with all the equipment it needs, and then deduct the money from the player account. Why not just add another easy line or two, (or few...) that does e-cells as well?
And yes, his script does buy ships with jumpdrives... <.< read above

Osiris_sam
Posts: 422
Joined: Thu, 24. Aug 06, 13:45
x4

Post by Osiris_sam » Tue, 18. Dec 07, 17:49

I know the equip library is not complete... I did this intentionally, so i could find out what the community (who are going to use it) want to put in the library, then i can add it all at once to save hassle.
while i was testing this particular part of the code, i found that the ship actually crashes into the station when launching unless i put the move in... I will consider adding jumpdrive usage in ( i might make my own return to homebase script, and incorporate jumps in. That means that i could include a safe path finding algorithm also, to avoid unfriendly sectors.

thankyou for your imput tho, it is most appreciated

Lancefighter
Posts: 3144
Joined: Sun, 19. Dec 04, 02:41
x4

Post by Lancefighter » Tue, 18. Dec 07, 19:51

no problem :)

So, add that bit of code after the move.pos command to the sector it is currently in... that makes sence, i suppose. I was wondering why that command was there.

BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7411
Joined: Mon, 15. Dec 03, 18:53
x4

Post by BlackRain » Wed, 19. Dec 07, 02:47

Hey I have been using your script for a couple days and I just want to report on what I have found so far. I don't know if you are aware of these things already

The script doesn't handle complexes, it assigns ships to individual factories within the complex rather then the complex itself which means the ts's will just do nothing because they can't dock with the individual factories.

Once I activated the hq management on my headquarters I could no longer dock capital ships with the station. The only way I could dock ships was if they had a docking computer, but otherwise they wont dock they will just sit there.

Also I am using the independent shipyard script which adds a shipyard that you can send ships to and it will reverse engineer them and then you can buy the ships from the station. I set this station as the station to buy for my hq management script and it has not bought any ships from that station yet so I don't know if it works with that or maybe it has enough TS ships and doesn't need anymore.


Anyway that is it for now, otherwise seems to be working okay, except it hasn't made me any money yet haha.

Osiris_sam
Posts: 422
Joined: Thu, 24. Aug 06, 13:45
x4

Post by Osiris_sam » Wed, 19. Dec 07, 13:43

firstly, the problem with complexes is a known problem, i have thought about the code to correct this problem, but i forgot to implement it in this release.

ive not had a problem like this before, when i tried this script out for the first times, i could always dock capital ships.
could you pm me a list of scripts you are using, in hopes of identifiying the problem. I dont think its my script, since it does not alter any of the stock egosoft commands, or scripts.

The shipyard selected must be a non-player shipyard. This is coded into the library i created to buy ships. I cannot make a script which buys ships from a player shipyard since, player owned shipyards dont act as shipyards like the NPC ones do.

thanks

sam

Post Reply

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