[Library] V1.0final 29.01.05 Manage forbidden areas
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
[Library] V1.0final 29.01.05 Manage forbidden areas
What's this ?
Following an idea of Lucike in the german forum to block certain sectors or stations to be used by the station traders i came up with this library which may be used commonly.
Common library for scripters to manage forbidden sectors and stations on player request
The script package contains additional user commands to forbid or allow sectors or stations to be flown to.
The library file is for scripters which want to use the player info about which sectors/stations may be accessed and which not.
Th library itself will not change anything, it depends on other script packages to use it. The game internal flight logic is not being modified. Players installing this library without any script package which uses this library will NOT take advantage of the new commands.
Download: library for managing forbidden areas
Usage (Players):
The script package will add 4 new commands, 2 in the additional ship commands and 2 in the general section of the playership.
Additional ship commmand: Allow/Forbid sector
This command will ask you to choose a sector, and block it, if it was not blocked before.
It will allow it if the sector itself or only one/more of the stations were blocked before.
Additional ship commmand: Allow/Forbid station
This command will ask you to choose a station, and block it, if it was not blocked before.
It will allow it if it was previously blocked before.
General command: Allow/Forbid sector
This command will ask you to choose a sector, and block it, if it was not blocked before.
It will allow it if the sector itself or only one/more of the stations were blocked before.
It will propagate the setting to all player owned ships. The setting depends on the effect of the command on the current playership,
so if the player ship was allowed to enter the sector before and it is now forbidden, all ships will be forbidden to enter,
regardless of their previous setting. The setting is basically overwritten on all ships.
General command: Allow/Forbid station
This command will ask you to choose a sector, and block it, if it was not blocked before.
It will allow it if the sector itself or only one/more of the stations were blocked before.
It will propagate the setting to all player owned ships. The setting depends on the effect of the command on the current playership,
so if the player ship was allowed to enter the sector before and it is now forbidden, all ships will be forbidden to enter,
regardless of their previous setting.
Usage (scripters):
The script file lib.manageForbiddenAreas contains the code to manage the forbidden areas. The parameter signature is:
Arg 1: VAR/Sector forbiddenSector, mandatory, not null
Arg 2: VAR/Station forbiddenStation
Arg 3: VAR/Number mode, possible values 0-4
mode 0: set the object (sector or station) to forbidden if it is currently allowed, set the object to allowed if it is currently forbidden. (negates current setting)
mode 1: query status of object (sector or station), see return codes
mode 2: overwrite current status on [THIS] for obejct (sector or station) to forbidden
mode 3: overwrite current status on [THIS] for obejct (sector or station) to allowed
mode 4: return current array of forbidden objects consisting of pairs of ( VAR/Sector, {ARRAY of VAR/Station}) per entry
Return value:
TRUE, if the object is blocked after the requested action
FALSE, if the object is allowed after the requested action
ARRAY, only in mode 4
Installation:
Install the package file with cycrows x3 script installer, download in this thread http://forum.egosoft.com/viewtopic.php?t=121351
Deinstallation:
Remove the package file with cycrows x3 script installer, download in this thread http://forum.egosoft.com/viewtopic.php?t=121351
Script attributes:
T File 8110 - Common library, forbid or allow sectors/stations
<t id="1221">COMMAND_TYPE_SHIP_21</t>
<t id="1222">COMMAND_TYPE_SHIP_22</t>
<t id="860">COMMAND_TYPE_GENERAL_60</t>
<t id="861">COMMAND_TYPE_GENERAL_61</t>
Page ID 8110
Commandcode 1221,1222,860 and 861
Following an idea of Lucike in the german forum to block certain sectors or stations to be used by the station traders i came up with this library which may be used commonly.
Common library for scripters to manage forbidden sectors and stations on player request
The script package contains additional user commands to forbid or allow sectors or stations to be flown to.
The library file is for scripters which want to use the player info about which sectors/stations may be accessed and which not.
Th library itself will not change anything, it depends on other script packages to use it. The game internal flight logic is not being modified. Players installing this library without any script package which uses this library will NOT take advantage of the new commands.
Download: library for managing forbidden areas
Usage (Players):
The script package will add 4 new commands, 2 in the additional ship commands and 2 in the general section of the playership.
Additional ship commmand: Allow/Forbid sector
This command will ask you to choose a sector, and block it, if it was not blocked before.
It will allow it if the sector itself or only one/more of the stations were blocked before.
Additional ship commmand: Allow/Forbid station
This command will ask you to choose a station, and block it, if it was not blocked before.
It will allow it if it was previously blocked before.
General command: Allow/Forbid sector
This command will ask you to choose a sector, and block it, if it was not blocked before.
It will allow it if the sector itself or only one/more of the stations were blocked before.
It will propagate the setting to all player owned ships. The setting depends on the effect of the command on the current playership,
so if the player ship was allowed to enter the sector before and it is now forbidden, all ships will be forbidden to enter,
regardless of their previous setting. The setting is basically overwritten on all ships.
General command: Allow/Forbid station
This command will ask you to choose a sector, and block it, if it was not blocked before.
It will allow it if the sector itself or only one/more of the stations were blocked before.
It will propagate the setting to all player owned ships. The setting depends on the effect of the command on the current playership,
so if the player ship was allowed to enter the sector before and it is now forbidden, all ships will be forbidden to enter,
regardless of their previous setting.
Usage (scripters):
The script file lib.manageForbiddenAreas contains the code to manage the forbidden areas. The parameter signature is:
Arg 1: VAR/Sector forbiddenSector, mandatory, not null
Arg 2: VAR/Station forbiddenStation
Arg 3: VAR/Number mode, possible values 0-4
mode 0: set the object (sector or station) to forbidden if it is currently allowed, set the object to allowed if it is currently forbidden. (negates current setting)
mode 1: query status of object (sector or station), see return codes
mode 2: overwrite current status on [THIS] for obejct (sector or station) to forbidden
mode 3: overwrite current status on [THIS] for obejct (sector or station) to allowed
mode 4: return current array of forbidden objects consisting of pairs of ( VAR/Sector, {ARRAY of VAR/Station}) per entry
Return value:
TRUE, if the object is blocked after the requested action
FALSE, if the object is allowed after the requested action
ARRAY, only in mode 4
Installation:
Install the package file with cycrows x3 script installer, download in this thread http://forum.egosoft.com/viewtopic.php?t=121351
Deinstallation:
Remove the package file with cycrows x3 script installer, download in this thread http://forum.egosoft.com/viewtopic.php?t=121351
Script attributes:
T File 8110 - Common library, forbid or allow sectors/stations
<t id="1221">COMMAND_TYPE_SHIP_21</t>
<t id="1222">COMMAND_TYPE_SHIP_22</t>
<t id="860">COMMAND_TYPE_GENERAL_60</t>
<t id="861">COMMAND_TYPE_GENERAL_61</t>
Page ID 8110
Commandcode 1221,1222,860 and 861
Last edited by Naffarin on Sun, 29. Jan 06, 15:27, edited 1 time in total.
Yes and no...since the mk3 is jsut a script it could be programmed to use it, but the mk3 uses a lot of basic scripts which are part of the default engine for the move to station and jump to station parts. So it could be rewritten to avoid selecting destinations, but it could not be prevented all the time that a trader wanders through a sector e.g. when he failed to jump to a sector and uses normal drives.
Nice work yet again, Naffarin. One question..how will this script work with the sattelite limited Mk 3 trader script by Zzyn?
Found here:
http://forum.egosoft.com/viewtopic.php?t=111488
Im using your station trader script for my stations and complexes(currently using ver 1.20 I believe) and Im also using Zzyn's script for my UT's.
If I set a global command to make a sector off limits, how will that affect the ships(UTs) running the sattelite limited script?
EDIT: Hmm, thinking further on it, I think the UT's wouldnt receive the command to make a sector off limits since they are not running a script with the library included. They should continue to base their moves only on the presence of a sattelite.. Am I right?
Found here:
http://forum.egosoft.com/viewtopic.php?t=111488
Im using your station trader script for my stations and complexes(currently using ver 1.20 I believe) and Im also using Zzyn's script for my UT's.
If I set a global command to make a sector off limits, how will that affect the ships(UTs) running the sattelite limited script?
EDIT: Hmm, thinking further on it, I think the UT's wouldnt receive the command to make a sector off limits since they are not running a script with the library included. They should continue to base their moves only on the presence of a sattelite.. Am I right?
I installed the forboten sectors script with station trader script. Problem is than in the ship I am flying, there are no options under General commands except for the cheats. I have LV's X3 Cheats installed. It has a bunch of commands in Genereal commands (I only use it to start up a new game since I already did a lot of work in my first game, the DDRS additional ships mod was just too tempting). So, is it possible the x3 cheat and forbidden sectors have a conflict?
Or, is it just me again? I did read the instructions this time.
Or, is it just me again? I did read the instructions this time.
---------------------------
I am Popeye of Borg
You will be askimilated!
I am Popeye of Borg
You will be askimilated!
Yes, both scripts conflict in the commands section...i only check the reservations for command slots in the regular scripts sticky and not in the cheat sticky, so i created a conflict with LVs scripts...there currently is no updated script package to resolve the conflict as cheat scripts and regular scripts
Try these two files to resolve the conflict:
This goes into the t directory:
http://home.arcor.de/Naffarin/448110.xml
This goes into the scripts directory:
http://home.arcor.de/Naffarin/setup.plu ... dAreas.xml
Use save as on both links to save them directly.
Try these two files to resolve the conflict:
This goes into the t directory:
http://home.arcor.de/Naffarin/448110.xml
This goes into the scripts directory:
http://home.arcor.de/Naffarin/setup.plu ... dAreas.xml
Use save as on both links to save them directly.
I added the changed files as directed, really.
The 2 new commands are added at the top of General Commands. When I select either one I get “Command Rejected” (from the nice lady). There is no pop up of which sector to select or anything else.
Perhaps something else is going on.
Below is a list of the scripts I am currently using:
Scripts:
StationTrader-V1.24-21.01.2006.spk
XaiCorp-FSUP-X3.2.7.zip
XaiCorp-lib-Setup-X3.310.zip
XaiCorp-MTC-X3.1.7.zip
XaiCorp-RFJ-X3.1.0.zip
XaiCorp-RTD-X3.2.3.zip
Cargo_Delivery_Service_V1.03.spk
dockts.zip
ftu1.1.spk
JumpToMeCommand-V1.10-30.01.2006.spk
mtsproductfinder.zip
RemoveHomebaseCommand-V1.01-30.01.2006.spk
Station_Complex_Relocator_V2.00.spk
Advanced Mineral Scanner
Manageforbiddensectors-V1.0-29.01.2006
AStar_Sector_Pathfinder_Commandsv1.2.renameToZip[1].zip
Flythroughgatecommand1.1.zip
SystemOverrideSoftwareMK2-V1.02-13.01.2006.spk
x3_cheats.zip (LV)
Mods:
DDRS_ShipStation_Mod_V1.0
DDRS.Fixv2-09.zip
BTW, thanks for the quick response. I appreciate all the work you and the other scripters do. Evidence, look at all of dem dar scripts I be using. X3 would not be half the great game it is if not for all the fab help.
The 2 new commands are added at the top of General Commands. When I select either one I get “Command Rejected” (from the nice lady). There is no pop up of which sector to select or anything else.
Perhaps something else is going on.
Below is a list of the scripts I am currently using:
Scripts:
StationTrader-V1.24-21.01.2006.spk
XaiCorp-FSUP-X3.2.7.zip
XaiCorp-lib-Setup-X3.310.zip
XaiCorp-MTC-X3.1.7.zip
XaiCorp-RFJ-X3.1.0.zip
XaiCorp-RTD-X3.2.3.zip
Cargo_Delivery_Service_V1.03.spk
dockts.zip
ftu1.1.spk
JumpToMeCommand-V1.10-30.01.2006.spk
mtsproductfinder.zip
RemoveHomebaseCommand-V1.01-30.01.2006.spk
Station_Complex_Relocator_V2.00.spk
Advanced Mineral Scanner
Manageforbiddensectors-V1.0-29.01.2006
AStar_Sector_Pathfinder_Commandsv1.2.renameToZip[1].zip
Flythroughgatecommand1.1.zip
SystemOverrideSoftwareMK2-V1.02-13.01.2006.spk
x3_cheats.zip (LV)
Mods:
DDRS_ShipStation_Mod_V1.0
DDRS.Fixv2-09.zip
BTW, thanks for the quick response. I appreciate all the work you and the other scripters do. Evidence, look at all of dem dar scripts I be using. X3 would not be half the great game it is if not for all the fab help.
---------------------------
I am Popeye of Borg
You will be askimilated!
I am Popeye of Borg
You will be askimilated!
Working fine now.
BTW, when I add more trade ships, will they automagically ignore the forbidden sectors already set?
BTW, when I add more trade ships, will they automagically ignore the forbidden sectors already set?
Automagically: to be able to make something occur where the method can be explained but not caring to know how it works because your happy that it does.
---------------------------
I am Popeye of Borg
You will be askimilated!
I am Popeye of Borg
You will be askimilated!
-
- Posts: 84
- Joined: Wed, 3. Dec 03, 09:48
Maybe ou could have it so sectors set to ignore from the players ship go into a global variable that all ships check, as well as having local information so you can customise ships. Or a apply to all command. I'll be downloading this when I get home.
I've used your Station Trader script since about day 1, and its been excellent. Does Station Trader include pathfinding, therefor completely avoiding ignored sectors?
I've used your Station Trader script since about day 1, and its been excellent. Does Station Trader include pathfinding, therefor completely avoiding ignored sectors?