Jump to content

Welcome to the Forum!

The best place to exchange builds and ideas! Vote for the best ideas and suggestions here.

Join the Avorion Discord!

Connect with other passionate players and talk about the latest news.
Discord

DLC Avorion Into the Rift Out Now!

Now available on Steam!
Steam

[Mod] Infinion Irregular Goods Transportation


infal
 Share

Recommended Posts

This is a mod I made more as a proof of concept for the mod loading system I've been tinkering with, but the mod itself is a nice addon so I thought I might release it as a general mod.

 

Overview: The mod adds ways for the player to transport dangerous, stolen, illegal and suspicious goods without penalty from military ships.

 

Features:

 

New stations added randomly to regular sectors (green dots) called Infinion Corporation Outpost.

 

At the Infinion station you can purchase a permit to transport dangerous goods (but only dangerous goods, if you get caught with stolen, illegal or suspicious cargo, you're still in trouble!)

The permit is time limited so if you want continued impunity, then you have to keep paying - but it doesn't require a module slot.

 

Pirates will also randomly drop Cargo Shielding modules which give you a chance to stop a military ship from scanning your cargo. If a military ship can not scan your cargo they will not see any illicit goods at all; dangerous, stolen, illegal or suspicious.

 

Each level of module has a Shielding Factor. Each military ship has a scanning factor, based on the weight class of the ship. eg Frigates are 2, Cruisers are 3.

 

If the Shielding factor is greater than the Scanning factor, the scan will fail automatically.

 

If the Shielding factor is equal to or less than the scanning factor, the chance to block the scan is random - but you still have a chance

 

An Admin UI (aka the professional touch 8)). This lets an admin (or the player in singleplayer mode) access a UI that lets you easily select a player and give them either a shielding module or a dangerous goods permit. Great for testing before you commit to adding it to your dedicated server etc

 

 

Screenies:

 

 

mnYyaY8.jpg

Buying a dangerous goods transportation permit from an Infinion Corporation Outpost. A permit allows you to legally transport dangerous goods. You may still get into trouble if you are caught carrying illegal, stolen or suspicious goods.

 

ANgQup5.jpg

Notification that your dangerous goods transportation permit is about to expire.

 

fDJnax6.jpg

Notification that your dangerous goods transportation permit has expired.

 

Mfw9qum.jpg

Cargo shielding modules prevent military ships from scanning your cargo hold.

 

VPz54jm.jpg

You will get notified whenever a military ship scans your cargo and, if you have a cargo shielding module, you will get notified if the military ship was unable to scan your cargo.

 

Ba2cy2f.jpg

Admin UI integrated with Mod Loader Admin UI. Allows an admin to easily select a player from the list and give them a module or permit.

 

 

 

Downloads:

 

 

You'll need to get Mod Loader first

Simple Mod Loader v1.2.0

 

You'll need Infinion Mod

Infinion Corporation v1.0.2

 

and finally... You need the Infinion Irregular Goods Transportation Addon

Infinion IGTA v1.0.2

 

 

 

Version History:

v1.0.2 25Mar2017

- So many bug fixes...

- Dangerous goods permit now actually works

- Now works for military ships that spawn in, faction war etc

- Dangerous goods permit now gives a regular warning. Default is every 5 minutes, can adjust in config.lua

- Admin UI is now integrated with the Mod Loader Admin UI

- Fixed typo in check for home sector (Special thanks to Devious for pointing this out)

- Made the Cargo Shield modules very power hungry (20 something GW for legendary) but can be scaled by changing powerFactor in config.lua though they are supposed to be power intensive for balancing.

Older versions:

 

 

v1.0.1 16Mar2017

- Removed some debug server broadcast messages from playerscript

- Added timers to antismuggle to make it less annoying for the player and less demanding on server.

-- Player ship is only scanned once in 60 seconds

-- suspicion update function runs once every 5 seconds instead of every second

 

 

Link to comment
Share on other sites

I'm not able to use mod loader with my serverhost. Is there a way you could upload the files in the proper folders so I know where to put them for a manual install?

Why doesn't it work on the server?

 

The entire point of the (mod loader) project was to keep modded files seperate from base files and, then have them load without editing base files.

It would take a modest rewrite to go back to not using mod loader and if the (mod loader) system can't possibly work for dedicated server then I'd probably choose just developing mods for singleplayer until Koonschi implements a proper mod loading system (if he does at all!)

Link to comment
Share on other sites

I'm working on fixing a bug for this mod. When temporary defenders spawn in eg Faction Battle, they will ignore the permit and cargo shielding.

 

The dangerous goods permit is attached to the player and I don't think you can have a window for scripts attached to the player. (at least, I haven't been able to make it work)

 

It will give you a notice at 5, 2 and 1 minutes, but I could make it "minutes % 5 == 0" so it would be every 5 minutes eg 15, 10, 5 etc. and maybe put a config option for how often so people could change it to whatever they like if 5 minutes is too often for them.

Link to comment
Share on other sites

At the moment it seems that if the game engine can't find a script added to the player, the player respawns as a different faction. If the game engine can't find a script attached to an entity (ship, station), the entity gets deleted. This is a limitation of the game engine but I haven't had it happen when installing a mod, only uninstalling.

 

Did you delete another mod at the same time as adding this mod?

 

It's not possible to make this mod server side only, because of the dialog (buying the permit) and possibly other things

 

eg:

/Avorion/Documentation/ScriptUI.html

"ScriptUI

This object is only available on the client."

Link to comment
Share on other sites

Hey,

Installed your mod yesterday, really like the features!

 

I did notice an error in the log, I should've installed the mod correctly.

could not execute function 'onSectorEntered' in '"data/scripts/mods/infinion/playerScript.lua"':
data/scripts/mods/infinion/playerScript.lua:66: attempt to index global 'alwaysInHomeSectors' (a nil value)
stack traceback:
        data/scripts/mods/infinion/playerScript.lua:66: in function <data/scripts/mods/infinion/playerScript.lua:39>

Setting script "data/scripts/mods/infinion/playerScript.lua" to invalid.

Link to comment
Share on other sites

I did notice an error in the log
Thanks, it was the smallest of typos but I didn't notice until you pointed it out.

 

I've just put new versions of all 3 downloads with bug fixes and better features.

 

Version History:

v1.0.2 25Mar2017

- So many bug fixes...

- Dangerous goods permit now actually works!

- Now works for military ships that spawn in, faction war etc

- Dangerous goods permit now gives a regular warning. Default is every 5 minutes, can adjust in config.lua

- Admin UI is now integrated with the Mod Loader Admin UI

- Fixed typo in check for home sector (Special thanks to Devious for pointing this out)

- Made the Cargo Shield modules very power hungry (20 something GW for legendary) but can be scaled by changing powerFactor in config.lua though they are supposed to be power intensive for balancing.

 

If you're updating, get all 3 downloads!

Link to comment
Share on other sites

I downloaded, and installed all 3 mods (loader, Infinion, and license). Now, all of the planets in each sector are now square. That is to say, the background visual of the planet is square. As cool as it looks, is there something in these mods that has caused this? Any way to switch it back?

Link to comment
Share on other sites

möglich das du ein infi vergessen hast zu aktuallisieren?

 

 

<ModLoader> Initializing ModLoader

2017-04-02 08-12-34| <ModLoader> Registering mod: Infinion Corporation

2017-04-02 08-12-34| <ModLoader> Registering mod: Infinion Irregular Goods Transportation Addon

2017-04-02 08-12-34| <ModLoader> Checking dependencies for mod: Infinion Corporation

2017-04-02 08-12-34| <ModLoader> -- Required version of Simple Mod Loader: v1.2.0

2017-04-02 08-12-34| <ModLoader> -- Actual version of Simple Mod Loader: v1.2.0

2017-04-02 08-12-34| <ModLoader> Infinion Corporation found correct version of Simple Mod Loader

2017-04-02 08-12-34|

2017-04-02 08-12-34| <ModLoader> Checking dependencies for mod: Infinion Irregular Goods Transportation Addon

2017-04-02 08-12-34| <ModLoader> -- Required version of Simple Mod Loader: v1.2.0

2017-04-02 08-12-34| <ModLoader> -- Actual version of Simple Mod Loader: v1.2.0

2017-04-02 08-12-34| <ModLoader> Infinion Irregular Goods Transportation Addon found correct version of Simple Mod Loader

2017-04-02 08-12-34|

2017-04-02 08-12-34| <ModLoader> -- Required version of Infinion Corporation: v1.0.0

2017-04-02 08-12-34| <ModLoader> -- Actual version of Infinion Corporation: v1.0.2

2017-04-02 08-12-34| <ModLoader> Infinion Irregular Goods Transportation Addon found correct version of Infinion Corporation

2017-04-02 08-12-34|

2017-04-02 08-12-34| <ModLoader> mod:Infinion Corporation, is adding script:mods/infinion/playerScript.lua, to player

2017-04-02 08-12-34| <ModLoader> mod:Infinion Irregular Goods Transportation Addon, is adding script:data/scripts/mods/infinionigta/playerScript.lua, to player

2017-04-02 08-12-34| <ModLoader> Running onInitialize for mod:Infinion Irregular Goods Transportation Addon

2017-04-02 08-12-34| <ModLoader> Registering player ship script: data/scripts/modloader/lib/adminui.lua

2017-04-02 08-12-34| <ModLoader> ModLoader initialize complete

2017-04-02 08-12-34| [OOSP][0.9_7c] ======oos initialising for Player Andy-Blackknight======

2017-04-02 08-12-34| [OOSP][0.9_7c] Event cleanup: 0 | 0 | 0 E

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...