[MOD] Secret Stash

The place to discuss scripting and game modifications for X4: Foundations.

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

Assailer
Posts: 478
Joined: Sun, 25. May 14, 17:45
x4

[MOD] Secret Stash

Post by Assailer »

Secret Stash: Police will never find illegal wares. You still need to stop and let them carry out scanning.

http://game.mage-online.com/public/sst.zip

Change log:
1.05 - fixed missing 'value' bug (thanks alexalsp)
1.04 - moved texts to separate file. xml patch method was changed. (thanks Alexalsp!)

This mod is really handy together with Fly-by Looting mod: viewtopic.php?f=181&t=402821

https://www.nexusmods.com/x4foundations/mods/146
Last edited by Assailer on Sun, 16. Dec 18, 09:31, edited 3 times in total.
User avatar
Nibel
Posts: 208
Joined: Sat, 29. Apr 06, 16:53
x3ap

Re: [MOD] Secret Stash

Post by Nibel »

both mods not working for me.
process just hangs without any signs of life.
gog version if that makes any difference.
Assailer
Posts: 478
Joined: Sun, 25. May 14, 17:45
x4

Re: [MOD] Secret Stash

Post by Assailer »

I'm on Steam. I would imagine there are no differences, but you never know.

You mean they work separately, or there is problem when you have them both installed?

Try using only Fly-by Looting first.
User avatar
Nibel
Posts: 208
Joined: Sat, 29. Apr 06, 16:53
x3ap

Re: [MOD] Secret Stash

Post by Nibel »

none of them work for me.

i deleted everything but content.xml and it still wont launch. wierd...guessing there is some kind of error like encoding ? which is...wat ? i've got advancedsatelliterange and learningallthethings mod that works without problems.

i'm rofling right now...IT WAS content.xml problem. i had to redo it from one of other working mod xml and it worked...what the actual f :gruebel:
SirNukes
Posts: 549
Joined: Sat, 31. Mar 07, 23:44
x4

Re: [MOD] Secret Stash

Post by SirNukes »

Nibel wrote: Sun, 2. Dec 18, 16:06 i deleted everything but content.xml and it still wont launch. wierd...guessing there is some kind of error like encoding ? which is...wat ?
The file encoding needs to match what is declared in the xml (or generally utf-8 if not declaring, iirc).
argon_emperor
Posts: 1225
Joined: Mon, 12. Dec 05, 07:41
x4

Re: [MOD] Secret Stash

Post by argon_emperor »

Handy mod, given how... Overzealous police forces are in this game :P

Does this also extend to your other ships? Or just the ship you're in currently? Cause I've had auto traders multiple times before lose me reputation because they decided to go with illegal wares, will this save my bacon because of their stupidity as well?
[ external image ]
***modified***
"You can get more of what you want with kind words and a gun, than you can with just kind words" - Al Capone
Assailer
Posts: 478
Joined: Sun, 25. May 14, 17:45
x4

Re: [MOD] Secret Stash

Post by Assailer »

Inventory is player specific, so that will work for sure. Illegal cargo on large ships however will need some testing, maybe even changes, will see - EGO style :)
Assailer
Posts: 478
Joined: Sun, 25. May 14, 17:45
x4

Re: [MOD] Secret Stash

Post by Assailer »

Nibel wrote: Sun, 2. Dec 18, 16:06 none of them work for me.

i deleted everything but content.xml and it still wont launch. wierd...guessing there is some kind of error like encoding ? which is...wat ? i've got advancedsatelliterange and learningallthethings mod that works without problems.

i'm rofling right now...IT WAS content.xml problem. i had to redo it from one of other working mod xml and it worked...what the actual f :gruebel:
This is why i like Steam Workshop. Just one click to install mods. I understand GOG customers, but it's clearly GOG's fault not providing Workshop interface.
User avatar
Baconnaise
Posts: 766
Joined: Sat, 23. Nov 13, 15:50
x4

Re: [MOD] Secret Stash

Post by Baconnaise »

Works great with the Fly By Looting mod. Nice job.
Leithal--Weapon
Posts: 2
Joined: Thu, 22. Nov 18, 07:33
x3tc

Re: [MOD] Secret Stash

Post by Leithal--Weapon »

Well I suggest using the search function on the discord to find solutions to many issues you have and the answer to the autotraders is you can actually pick what they trade. Remove the behaviour you have of autotrade not sure why but someone mentioned this then left click trade ship and right click open space then go into info/behaviour and open up the auto trade with the + sign and remove all potentially illegal goods issue solved. :)

argon_emperor wrote: Mon, 3. Dec 18, 06:07 Handy mod, given how... Overzealous police forces are in this game :P

Does this also extend to your other ships? Or just the ship you're in currently? Cause I've had auto traders multiple times before lose me reputation because they decided to go with illegal wares, will this save my bacon because of their stupidity as well?
Assailer
Posts: 478
Joined: Sun, 25. May 14, 17:45
x4

Re: [MOD] Secret Stash

Post by Assailer »

argon_emperor wrote: Mon, 3. Dec 18, 06:07 Handy mod, given how... Overzealous police forces are in this game :P

Does this also extend to your other ships? Or just the ship you're in currently? Cause I've had auto traders multiple times before lose me reputation because they decided to go with illegal wares, will this save my bacon because of their stupidity as well?
The purpose was to hide illegal wares in player inventory from police scans, so we can freely fly around stations to scan them.

I didn't want to remove pirate scanning, as i think that is a fun gameplay mechanic and it doesn't result in faction loss like police scan does.

Police scanning should work for all ships, but logfile entry will only appear when player controlled ship was scanned - with a sizeable fleet there would be tons of log entries otherwise.
User avatar
alexalsp
Posts: 1955
Joined: Fri, 18. Jul 14, 05:28
x4

Re: [MOD] Secret Stash

Post by alexalsp »

Please compare the files, I think the scripts have changed in version 1.30.

Maybe I'm wrong.

masstraffic.police.xml

Code: Select all

<?xml version="1.0" encoding="iso-8859-1" ?>
<diff>
<replace sel="//do_if[@value='@$target.pilot.inventory.illegalto.{this.zone.policefaction} or @$target.cargo.illegalto.{this.zone.policefaction}']">
            <do_if value="@$target.pilot.inventory.illegalto.{this.zone.policefaction} or @$target.cargo.illegalto.{this.zone.policefaction}">
              <write_to_logbook category="general" title="{500000,1}" text="{500000,2}.[$target.name, this.ship.name]"/>
            </do_if>
</replace>
</diff>
masstraffic.watchdog.xml

Code: Select all

<?xml version="1.0" encoding="iso-8859-1" ?>
<diff>
<replace sel="//do_elseif[@value='@$target.pilot.inventory.illegalto.{$homebase.zone.policefaction} or @$target.cargo.illegalto.{$homebase.zone.policefaction}' and resume[@label='startobserve']]"> 
      <do_elseif value="@$target.pilot.inventory.illegalto.{$homebase.zone.policefaction} or @$target.cargo.illegalto.{$homebase.zone.policefaction}"> 
        <write_to_logbook category="general" title="{500000,3}" text="{500000,4}.[this.ship.name]"/> 
      </do_elseif> 
</replace>
</diff>
order.move.recon.xml

Code: Select all

<?xml version="1.0" encoding="iso-8859-1" ?>
<diff>
<replace sel="//do_if[@value='$localtarget == player.occupiedship and not this.mayattack.{$localtarget} and (@$localtarget.cargo.illegalto.{this.zone.policefaction} or (not $police_onlycargo? and @$localtarget.pilot.inventory.illegalto.{this.zone.policefaction}))']">
                <do_if value="$localtarget == player.occupiedship and not this.mayattack.{$localtarget} and (@$localtarget.cargo.illegalto.{this.zone.policefaction} or (not $police_onlycargo? and @$localtarget.pilot.inventory.illegalto.{this.zone.policefaction}))">
                  <write_to_logbook category="general" title="{500000,5}" text="{500000,6}.[this.ship.name]"/>
                </do_if>
</replace>
</diff>
If the text is written to the journal, you need to create text files in the / t package.
For multilingual support.

/t/0001.xml

Code: Select all

<?xml version="1.0" encoding="UtF-8"?>
<language>
  <page id="500000" voice="no">
    <t id="1">HERE A TITLE TO MESSAGE.</t>
    <t id="2">%1 was scanned by %2.</t>
    <t id="3">HERE A TITLE TO MESSAGE.</t>
    <t id="4">Inventory scanned by %1.</t>
    <t id="5">HERE A TITLE TO MESSAGE.</t>
    <t id="6">No contraband was detected by %1.</t>
  </page>
</language>
kevrlet
Posts: 13
Joined: Mon, 3. Dec 18, 03:56
x4

Re: [MOD] Secret Stash

Post by kevrlet »

Can confirm this no longer works in 1.3.
Assailer
Posts: 478
Joined: Sun, 25. May 14, 17:45
x4

Re: [MOD] Secret Stash

Post by Assailer »

kevrlet wrote: Fri, 7. Dec 18, 20:57 Can confirm this no longer works in 1.3.
I'll fix this asap. thanks for the heads up.
Assailer
Posts: 478
Joined: Sun, 25. May 14, 17:45
x4

Re: [MOD] Secret Stash

Post by Assailer »

alexalsp wrote: Fri, 7. Dec 18, 19:15 Please compare the files, I think the scripts have changed in version 1.30.

If the text is written to the journal, you need to create text files in the / t package.
For multilingual support.
How do I know if 50000 is not used by other mods? This is why i avoid T files. Is there some sort of system to this?
argon_emperor
Posts: 1225
Joined: Mon, 12. Dec 05, 07:41
x4

Re: [MOD] Secret Stash

Post by argon_emperor »

Don't know why it's not working for anyone, when I was running 1.3 in the beta it worked fine, then when it released still worked, and just confirmed then it's still working on 1.31 (new beta)

And I *definitely* have illegal stuff in my inventory, so as far as I can see, it's all good still.

Have you double checked to make sure for some strange reason the extension hasn't been disabled in game in the extensions menu?
[ external image ]
***modified***
"You can get more of what you want with kind words and a gun, than you can with just kind words" - Al Capone
kevrlet
Posts: 13
Joined: Mon, 3. Dec 18, 03:56
x4

Re: [MOD] Secret Stash

Post by kevrlet »

argon_emperor wrote: Fri, 7. Dec 18, 21:21 Have you double checked to make sure for some strange reason the extension hasn't been disabled in game in the extensions menu?
First thing I checked after being told to drop my cargo for the 3rd time. Definitely not working. Might be working for you because you didn't start a new game? I deleted my original save when switching to 1.3 because it had stalled out completely, so I started fresh in 1.3.
Assailer
Posts: 478
Joined: Sun, 25. May 14, 17:45
x4

Re: [MOD] Secret Stash

Post by Assailer »

Just compared the 1.2 and 1.3 xml files and they are almost identical. The only difference i found should not affect the mod.

Edit: Also tested and it still works for me on 1.21 save file.
kevrlet
Posts: 13
Joined: Mon, 3. Dec 18, 03:56
x4

Re: [MOD] Secret Stash

Post by kevrlet »

Yeah...no idea. I just restarted my game, making no other changes, and it seems to be working now. Issue persisted through 3 previous restarts. :gruebel:

edit: Nope...just got police'd again. No idea what is going on.
argon_emperor
Posts: 1225
Joined: Mon, 12. Dec 05, 07:41
x4

Re: [MOD] Secret Stash

Post by argon_emperor »

kevrlet wrote: Fri, 7. Dec 18, 22:25 Yeah...no idea. I just restarted my game, making no other changes, and it seems to be working now. Issue persisted through 3 previous restarts. :gruebel:
Haha, I just started a new game to test it as I upgraded to 1.3 on the same save, figured I'd test that to make sure that wasn't the reason... Took me about 11 sectors to find a police ship after picking up some illegal stuff though >.<

But good to hear it's started working for you, weird that it so randomly didn't for a bit :S
[ external image ]
***modified***
"You can get more of what you want with kind words and a gun, than you can with just kind words" - Al Capone

Return to “X4: Foundations - Scripts and Modding”