Page 1 of 2

[SCRIPT] Law Enforcement Device MKI - v1.00 2007-01-21

Posted: Mon, 22. Jan 07, 01:16
by Greg_G
Law Enforcement Device MKI
requires Community Mod Pack

http://x3.bitspring.com/lemki/ (The web page version is much more legible than this post.)

Thank you for your interest in the Law Enforcement Device MKI (LEMKI) by Bitspring.
LEMKI currently has one powerful capability, although development continues. LEMKI
coordinates the detection capabilities of one or more Advanced Satellites in a
sector to detect illegal goods and falsified ID signals anywhere within the range
of the satellites. When transgressors are detected, their status is immediately
reported, sector-wide, to maximize the chances of safe apprehension by forces in
the area.

Please note that sale of this product is limited to Argon police and military
authorities. At this time, LEMKI is being released for a trial test period.
LEMKI's functionality is currently limited and the user may encounter unexpected
operational issues. Please report any problems immediately.


[ external image ]

Developed for:
X3-Reunion 2.0.02 (REQUIRED)
Bonus Pack 3.1.05
Community Mod Pack 2.01 (REQUIRED)
Cycrow's Script Manager (REQUIRED)

Uses:
CMP Ware: 312 (28;0;0;0;0;312;12363;0;65735;1;1;0;65735;10000;0;0;SS_WARE_SW_CUSTOM12_12;)
T File: 8760 (448760.xml)
Page ID: 8760
Command: 645

IMPORTANT NOTE:
THIS IS MY VERY FIRST X SCRIPT. THERE MAY BE BUGS IN IT, POTENTIALLY DANGEROUS
TO YOUR SAVEGAME. PLEASE BE AWARE THAT FURTHER TESTING NEEDS TO BE DONE BEFORE
I CONSIDER THIS SCRIPT SAFE FOR THE GENERAL PUBLIC. However, I hope some of
you will test it and let me know what issues you encounter. To set some minds
at ease, however, I've been programming for over 20 years now. I chose all
currently unused command and ware slots, page ids, etc. however I will not seek
official "dibs" on them until such time as folks feel that it is worthy. Obviously,
I'd appreciate if other script authors would avoid these for the time being. At
least until we see if anyone other than me wants to use this script.

Installation:
Use Cycrow's Script Manager to install the SPK file.

Where to buy:
LEMKI should be available for purchase at all Argon Equipment docks for ~1.85M to
players of rank Federation Marshall.

How to use it:
Once the device is onboard the player's ship, LEMKI Sector Scan can be activated
in the Command Console in the Piracy section. Additionally it can be mapped to a key
in Options->Controls->Interface->Extensions. (e.g. Shift-F1)

What it does: (other functionality may be implemented in the future)
When a sector scan is activated (either via mapped keystroke or through the Piracy
command menu), this script will check all ships within range of your advanced
satellites in the current sector for one of two conditions:

1) Illegal goods
2) Forged ID signal (pirate smugglers do this, the mangy dogs)

In both cases, their freight is scanned and their false ID signal is jammed (i.e.
Pirate cover is exposed). A report is then displayed to the pilot. If the player's
ship is detected by the advanced satellites, then the results will include and be
sorted by distance to the player's ship. Additionally, if no ship is currently
selected, then the nearest detected infraction is selected.

Function notes:
1) Only ships within range of your advanced satellites will be scanned.
2) The farther the ships are from the scanning satellite, the greater the chance
that infractions will go undetected. Overlap of satellites does significantly
improve detection chance.
3) Different races only permit use of this device in their sectors if your notoriety
with them is sufficient. This varies from race to race and are understandably
high.*
4) This is an active scan and all ships will know they have been scanned. Due to
this, there is a chance that ships you have scanned will become hostile to your
satellites, or in especially rare cases to your ship. Only M5, M4, M3, TS and TP
ships will currently consider reprisals.
5) The chances of such attacks vary according to the ownership of the sector and
the notoriety of the player with the ship owner's race.
6) Non-race sectors (pirate, xenon, etc.) have no limitations on use, however,
chances of reprisals are much greater in these sectors.
7) The chances of a reprisal from scanned Xenon and Kha'ak ships is almost
guaranteed. Pirates and Yaki are significanly more likely to exhibit a hostile
response than normal race ships.
8) While pirate bases have always tolerated attacks against fighters and smugglers,
they will become hostile when you start picking off their transports carrying
legitimate goods.
9) I strongly recommend use of the satellite replacement functionality of Cycrow's
SEWN script to keep your large network of advanced satellites functioning with
a minimum of effort.

Balancing/Cheating:
As this is a fairly powerful script, I've taken many measures (some listed above,
some just in the planning stages) to balance it. Many will still consider it a
cheat script, but my goal is to balance it to the point where people feel it is
reasonably fair. (Along the balance lines of the Universe Trader, which some feel
makes things too easy, and others do not.)

Nevertheless, it will likely take me a great deal of time (and input) to get the
balancing right on this script. Right now, I think it leans toward being too
player-friendly. But I really do not want to have it labeled as a cheat script
if I can help it. Since it may be over-friendly right now, I recommend folks use
restraint in any active games. You don't want to ruin your fun!

If you aren't sure how this script can be abused, and therefore in need of
properly gameplay balancing, then you just aren't aware how many transports out
there are actually pirates transporting legitimate goods like crystals. There are
a lot of them!

My other concerns:
1) I have not finished the plot, but I worry that the fact that this script can
make some ships hostile (not Goners of course) could damage the plotline in
extremely rare circumstances. If anyone has input regarding this, be sure not
to include spoiler information as I really do plan on starting the plot soon. :)
As unlikely as I think this is, I'd recommend refraining from using the device
when on plot missions.
2) I originally envisioned this as Law Enforcement Software MKI, but, unless I'm
doing something wrong (entirely possible) the CMP wares are all 1 volume cargo.
So I changed "Software" to "Device". I may change it to "Hardware" or something
else later.
3) I've left a ton of debug comments and commented out code in the script. This
will all be cleaned out later.
4) I chose the Piracy command menu for two reasons. First, anti-piracy is
piracy related. Second, there's a lot of extra room in there.
5) I'm not entirely happy with the equation I'm using for calculating the chance
of not detecting a ship. I'd like the curve to be a little less plateaued and
therefore less player-friendly. I just discovered that there is a floating-
point library available, which would help immensely. Of course, I could also
just use a lookup table.

*Required ranks to scan in race sectors:
Argon: Federation Marshall
Boron: Queen's Knight
Split: Privileged Associated of Rhonkar
Paranid: Emperor's Protectorate
Teladi: Venture Capitalist

Known Bugs:
1) It seems that on rare occasions ghost or duplicate entries will appear in the list.
This may not be a bug but rather an indication of how X3 stores covered pirate
ships. It seems they have two entries in the sector ship list, one for the real
Pirate ship and one for the cover. This makes in-game sense and I may just leave
it or, at most, will change the way LEMKI displays them. (Should be resolved)
2) Message arrives from "Unknown". (If anyone knows how to fix this, please let me
know.)

Future:
There's a more realistic way of handling this, involving an AL script and a network
of specialized satellites (similar to Cycrow's SEWN script). This network would
collect data on ships, the longer they are in range the better the chance of detection,
and it could report to the player from any sector. The problem with this is it would
be rather CPU intensive, as they'd have to cycle very frequently, and not really worth
the heavy amount of scripting. I felt that the solution I have here is a pretty decent
balance between realism and practicality.

I may very well add new features/commands to the LEMKI, but for the time being I
just want to get the sector scan working as best I can.

Files in Package:
plugin.lemki.main.xml (main script)
setup.plugin.lemki.xml (setup script)
lib.bof.lemki.sort.num.2ar.xml (array sorting script by B-O'F)
setup.plugin.lemki.uninstall.xml (uninstall script)
448760.xml (t file)
readme-LEMKI.txt

Uninstall:
Use the Script Manager to remove script files. This should install the uninstall
script automatically. After loading a save game, this script should run and remove
the LEMKI ware from all ships and stations, and it should remove the command slot
and hotkey registration.

If this doesn't happen, manually copy the uninstall script (available for download
below) to your X3 scripts directory. Be sure to remove the uninstall script before
re-installing LEMKI. You never want both setup.plugin.lemki.xml and
setup.plugin.lemki.uninstall.xml installed in your scripts directory at the same time.

Thanks:
All the tutorial authors, I used most of 'em. ;)
Special thanks to Cycrow (for lots of things) and B-O'F (for the sorting library)

Download:
SPK Package v1.00:
http://x3.bitspring.com/files/LawEnforc ... 1.2007.spk
Uninstall Script v1.00: (Right-click->Save Target As...)
http://x3.bitspring.com/files/setup.plu ... nstall.xml

Be sure you read the IMPORTANT NOTE above. :D

Posted: Mon, 22. Jan 07, 01:54
by moggy2
interesting idea.

You can set an author for your message using this:

Code: Select all

<t id="1110">[author] Author name[/author] [text] message text[/text]</t>
I tried to look at your scripts code but the plugin.lemki.main.xml just came up blank. The file appears to be there, just not rendering properly. I don't know if this is going to cause a problem loading my game, haven't tried it yet.

Posted: Mon, 22. Jan 07, 02:17
by Greg_G
moggy2 wrote:You can set an author for your message using this:

Code: Select all

<t id="1110">[author] Author name[/author] [text] message text[/text]</t>
Thank you. I'll make that change before I release the next version.
moggy2 wrote:I tried to look at your scripts code but the plugin.lemki.main.xml just came up blank. The file appears to be there, just not rendering properly. I don't know if this is going to cause a problem loading my game, haven't tried it yet.
I'm really glad you're having a look, though, moggy as I was really hoping some experienced scripters would let me know if I was doing anything dumb. :) Anyways, I'll go check on this as that's the most important script in there.

Edit: Is this happening in the X3 Script Editor? I just reinstalled from my SPK and opened that script in the editor and everything showed up properly. I also extracted directly from the SPK and it looked okay. But, if it's still not showing for you then I'm guessing I messed something up!

Posted: Tue, 23. Jan 07, 11:50
by 999-JAY-999
Great work.... look forward to further input on this script...

Keep up with the ideas...

Posted: Tue, 23. Jan 07, 16:08
by SymTec ltd.
Why do people always release scripts I intend to write?...
Anyway, I like it. :)

Posted: Tue, 23. Jan 07, 16:24
by fredmxm354
sounds interesting...

I might give it a shot :)

Posted: Tue, 23. Jan 07, 21:07
by Greg_G
Thanks for the input, gang. I was a little worried that there would be no other interest in this.

Please let me know if it works out okay for you. So far it's running fine for me and (if I do say so myself) it's fun. :D

It lets me prey on transports like a pirate but with the auspices of the government. It's amazing how many transports out there are actually covered pirates. I had no idea until I'd written this. I always liked being a Privateer. ;)

I already have some minor tweaks in mind, but am going to hold off on anything major until we see how this much goes. Very soon, I'll release a new version that fixes the From: Unknown, tweaks the retribution chances according to sector race, and I have one harmless readtext to fix in the uninstall script (which I've already done, just not distributed).

Posted: Wed, 14. Feb 07, 12:17
by Khaak_Slayer
This sounds most awesome, i'm going to install and give it a try now! Very nice idea, and very well presented also, thanks for coming up with this, it really adds yet another dimension and interest to the game. It makes the galaxy seem more realistic and believable in a way, also gives you something else to do when flying about sectors. Not to mention added enjoyment to those of us with vivid imaginations ;d

One thing i am curious about though, destroying multiple pirates in disguise, will this affect any of the other race's relations? are these transports /actually/ of the pirate race, i'm assuming they are, and in that case, will you then increase in relationship with the race who's sector the Pirate ship is currently in?

Thanks dude.

Posted: Wed, 14. Feb 07, 18:59
by Greg_G
I'm not sure what effect it has on the economy, but I believe it's pretty negligible. It definately doesn't have any effect on normal race relations. Those really are pirates in disguise. My script doesn't create any ships or alter existing ships beyond exposing their covered status. It's pretty neat that ES put in all these secret pirate traders. They seem to traffic in legal goods when there's a shortage of illegal goods. But now that I've created a weedbooze complex I'm finding far more illegal goods throughout the universe. (I'm part of an Argon plot to bring down the pirates by providing them lots of weed and booze. Shhhhh. :p)

Because they are really pirates, you actually get the usual small boost to relations to the sector's owning race. :D

I find it pretty fun to use. It's a natural progression from the manual spot-check scans I was doing to traders earlier in the game. Enjoy!

Posted: Wed, 14. Feb 07, 19:30
by Khaak_Slayer
Yeah! nice one man! Thanks a lot ;D

Posted: Wed, 14. Feb 07, 19:37
by Gazz
Now there's a new idea!

But I already made a law enforcement script. Sorta.
I AM DEE LAW

Posted: Wed, 14. Feb 07, 21:23
by Khaak_Slayer
Rule with a very very big iron fist eh?

ARM AND STEEL! ..and nuclear oppression.

Posted: Thu, 15. Feb 07, 20:51
by japesk
Great script!!! Kind of kool being the uber-police. The only that I wish would happen would be if ONLY you new the identity of the pirates. When all the pirates switch red, it open season for all the other Border Patrols in sector. I may reveal 6 ships, and only be able to kill/capture 2 or 3 of them.

However, beggers can't be choosers, and this is still a fun script anyway. I used to sit at gates and wait/scan all ships that came through. Now, it's one hotkey away.

Also, I just can't beleive how many smugglers there are in the X-verse. In my old method, I might catch 3 or 4 smugglers every game day. Now, the whole dam sector lights up. Really makes the x-verse feel alive with criminal activity.

Posted: Thu, 15. Feb 07, 21:19
by Greg_G
japesk wrote:The only that I wish would happen would be if ONLY you new the identity of the pirates. When all the pirates switch red, it open season for all the other Border Patrols in sector. I may reveal 6 ships, and only be able to kill/capture 2 or 3 of them.
Indeed, I know what you mean. Really there was no solution to this, however, I felt that it was both a nice, minor balancing element, as well as something I wrote into the backstory of the device: "When transgressors are detected, their status is immediately reported, sector-wide, to maximize the chances of safe apprehension by forces in the area."
japesk wrote:However, beggers can't be choosers, and this is still a fun script anyway. I used to sit at gates and wait/scan all ships that came through. Now, it's one hotkey away.
I did too, and I enjoyed it from a RP perspective, but it got to be a little tedious. And so LEMKI was born. ;)
japesk wrote:Also, I just can't beleive how many smugglers there are in the X-verse. In my old method, I might catch 3 or 4 smugglers every game day. Now, the whole dam sector lights up. Really makes the x-verse feel alive with criminal activity.
I was shocked as well! However, a major reason for this is that this does detect something beyond the regular freight scan. The freight scan only detects illegal goods whereas the LEMKI can detect forged IDs as well. This way pirates transporting legal goods (but doing so with an illegal transponder!) are detected as well. :D

Posted: Fri, 16. Feb 07, 00:31
by defiant1
I like it and its an interesting concept...however the need to have another mod installed for it to work is a bit annoying since i like to travel light (IE I only want mods like this one that allow me to expand and RP in other forms with out the need to over haul the entire game) is thier a way you could remake it so if someone wanted to just use this with out anyother mod(s) they could? or does it use other things from other mods? if it does is thier a way you could include ONLY what it absolutly needs from the other mod(s)? cus i think this could be really neat thing for thoes wanting to use in other mods (yes i plan on trying to use this in a mod that ive got planed but at the moment im really heasitent about useing this since from what i can understand requires other things from other mods)...any more info you can give me would help...


THanks and great toy you got here :)

Posted: Fri, 16. Feb 07, 01:07
by siath70
X3-Reunion 2.0.02 (REQUIRED) -You should have this already
Bonus Pack 3.1.05 -You should have this already (but it isn't needed for this to work)
Community Mod Pack 2.01 {EMP} (REQUIRED) -You should seriously think about using this as a lot or scripts and Mods that add wares use it.
Cycrow's Script Manager (REQUIRED) -You should have this already as it is usually the default for installing scripts now.

From that list the only thing (Mod) you would need to add is the EMP. The EMP only adds more ware slots. It doesn't add anything but these slots so scripts can add additional wares. Without this Mod ware slots would be filled rather quickly.

It is simple to install.

P.S. If you're thinking of making a MOD you should really consider adding the EMP for the added wares support.

Edited to fix the offending CMP to EMP. :P

Siath

Posted: Fri, 16. Feb 07, 02:36
by Greg_G
Aye, support for the CMP is somewhat expected with most mods and many, many scripts use it. My subsequent scripts have used Custom Wares instead, but I don't really feel a need to change from using the CMP to using Custom Wares, unless there is continued demand. Indeed, Custom Wares essentially amounts to a mod as well, but Cycrow's installer auto-merges Custom Wares with mods so it doesn't feel like one.

From what I've read it's fairly easy to support the CMP in a mod and is a fairly good idea since so many scripts use it.

Thanks for all the input, gang.

Posted: Fri, 16. Feb 07, 05:32
by defiant1
i ment in the sence of requireing another mod to work (not expancion like the community mod thing that adds more ware slots which just "expands" the amount of slots)...got a link to the community mod pack btw?? not sure if i downloaded the correct thing...

Posted: Fri, 16. Feb 07, 05:35
by Greg_G
Here you go: http://forum3.egosoft.com/viewtopic.php?t=119914

And, just so we're clear, LEMKI doesn't require any mods besides the above Community Extended Mod Pack (I was calling it CMP, but it's EMP).

Edit: BTW, if you're running X3 2.0 (which I assume you are), be sure to get the EMP labeled "2.01 Compatable Version by Cycrow".

Posted: Fri, 16. Feb 07, 06:01
by defiant1
ok i already have the emp (your CMP threw me for a loop) :P



also did you or some one mention somthin about smerl...(i dont remember the blasted lettering combos) that delt with some kinda satelight or sat respawn [or somthin like that?] made by cy or some other person that would also make this even better??