Jump to content
NexusNull

[Mod][Beta] MineCorp

Recommended Posts

!!! BETA: INSTALL ONLY IF YOU KNOW WHAT YOU ARE DOING !!!

 

Version: 1.4

Needed Install: Serverside/Clientside

 

This mod is still in beta so expect bugs and tell me about them.

 

I want to tackle a specific problem with this mod. For me it always seems that Avorion is to grindy and slow in resource gathering. Sometimes I get frustrated because I don't have enough resources for my ship repair and I have to go mining again. That's why I want to move the focus of Avorion from mining and salvaging to fighting and exploring.

 

So what does this mod do? Well, it adds an abandoned station into the game, which when you refurbish it gives you free resources for life.

 

After installing the mod there is a 10% chance that an Asteroid field will spawn an abandoned mine near itself.

The player will be able to refurbish the mine with varying costs. After doing so he will be rewarded with 40 resources every minute. The resource type depends on the mine type, which means that an iron mine will generate iron and so on. There is no limit on how many mines you can have working at a given time, they even deliver resources when you are not in the same sector.

 

 

 

coming features:

 

 

  • Increasing cost for high level materials.
  • Station upgrades which increase production
  • A proper ui

 

 

 

 

Mod structure:

 

 

├── data
│   └── scripts
│       ├── lib
│       │   └── SectorGenerator.lua
│       └── player
│           └── eventscheduler.lua
└── modfiles
    ├── config
    │   └── config.lua
    ├── scripts
    │   ├── callMine.lua
    │   ├── hooks.lua
    │   ├── main.lua
    │   └── StationGenerator.lua
    └── templates
        ├── Extractor2.xml
        └── Extractor.xml

 

 

Installation/Download

 

 

I tried to only make minimal changes to the actual game code and to keep everything as is. To get this mod running you have to add two chunks of code into eventscheduler.lua and one into SectorGenerator.lua.

 

 

Download:http://nexusnull.com/MineCorp/versions/MineCorp.1.4.zip

 

 

 

Older Versions:

Download:http://nexusnull.com/MineCorp/versions/MineCorp.1.3.zip

Download:http://nexusnull.com/MineCorp/versions/MineCorp.1.1.zip

 

 

How to install:

No other mods:

In case you have no other mods installed it is pretty easy. Just drag zip contents into the Avorion folder. The path to the Avorion folder should be something like this:

steam/steamapps/common/Avorion/

With other mods

!This step is only necessary when there is a conflict with another mod! e.g. another mod changes the files I am changing.

I try to separate the game files and my modfiles, hence the modfiles folder. Outside from those I implements changes with hooks. Those Hooks are marked like this.

 

*** Actucal Game Code ***

    --Inserted MineCorp Hook
    package.path = package.path .. ";modfiles/scripts/?.lua"
    require("hooks")
    initializeHook()
    --End Hook

*** Actucal Game Code ***

 

To implement the mod functionality you just have to find those pieces of code in my mod and implement them in the gamefiles.

I know it is pretty tedious but that is the way it is without the steam workshop.

 

If you have other questions ask in the comments.

 

 

 

 

Images:

 

 

FullView.jpg

interface.jpg

resources.png

 

 

 

Thanks to:

Tostov: for designing the station.

Laserzwei: continuing the work on Minecorp while I was gone.

Hammelpilaw: keeping the mod up to date.

 

Share this post


Link to post
Share on other sites

Looks good!

Is the price the same for every resource type or is there a difference between the different resources?

 

its the same price for every ressource... i would like to have it with different cost... like iron 1.000.000 and avorion like 25.000.000 just as example... :p

Share this post


Link to post
Share on other sites

Yeah, or for them to only spawn the resource that is available in that sector, so that it wouldn't be possible to get all the good farms right away.

Share this post


Link to post
Share on other sites

 

its the same price for every ressource... i would like to have it with different cost... like iron 1.000.000 and avorion like 25.000.000 just as example... :p

I could implement something like that, but not right now. I will see what other things pop up and after a couple of days I am going to implement them. Just so I don't have to make new versions constantly.

Share this post


Link to post
Share on other sites

Yeah, or for them to only spawn the resource that is available in that sector, so that it wouldn't be possible to get all the good farms right away.

It is already like this. The mine only delivers what is naturally existent in that sector.

Share this post


Link to post
Share on other sites

 

its the same price for every ressource... i would like to have it with different cost... like iron 1.000.000 and avorion like 25.000.000 just as example... :p

I could implement something like that, but not right now. I will see what other things pop up and after a couple of days I am going to implement them. Just so I don't have to make new versions constantly.

 

nice to see... i like it already :D

Share this post


Link to post
Share on other sites

Thank you for clarifying, will give it a try on our server once the other mods we have running are stable and let you know the result :)

Share this post


Link to post
Share on other sites

Wow this is amazing I might use this in my LP Series since I need better methods of gaining ores :)

Awesome, If you have any suggestions be sure to let me know.

Share this post


Link to post
Share on other sites

im not sure ist it working on my server. a little bit confused to wich path on the server i will placed the modified files.

Share this post


Link to post
Share on other sites

From the sounds of your installation instructions, you've made this mod different than others have to where you have to take an extra step whereas all other mods I have (at least a total of 10 or so) work fine together without any extra bullshit. If I can't just drag and drop it into my game folder it's not worth it. Simply because it's not necessary as other mod makes have proved.

Share this post


Link to post
Share on other sites

From the sounds of your installation instructions, you've made this mod different than others have to where you have to take an extra step whereas all other mods I have (at least a total of 10 or so) work fine together without any extra bullshit. If I can't just drag and drop it into my game folder it's not worth it. Simply because it's not necessary as other mod makes have proved.

You clearly have no idea what you are talking about. You can only drag and drop them if another mod doesn't modify the same file. Adding hooks to the existing files is a work around for mods that modify the same files conflicting.

Share this post


Link to post
Share on other sites

From the sounds of your installation instructions, you've made this mod different than others have to where you have to take an extra step whereas all other mods I have (at least a total of 10 or so) work fine together without any extra bullshit. If I can't just drag and drop it into my game folder it's not worth it. Simply because it's not necessary as other mod makes have proved.

The extra step is only necessary when another mod changes the files I am changing. It is just a compatibility feature. The simple installation should be fine.

Share this post


Link to post
Share on other sites

Managed to get the mod installed, bought up a few mines, but i'm not getting any resources at all from them?

 

Could you contact me over discord? I would take a look at the problem. My name is the same there as here.

https://discord.gg/mggdgtG

I know it sounds dumb but try restarting the server.

Share this post


Link to post
Share on other sites

From the sounds of your installation instructions, you've made this mod different than others have to where you have to take an extra step whereas all other mods I have (at least a total of 10 or so) work fine together without any extra bullshit. If I can't just drag and drop it into my game folder it's not worth it. Simply because it's not necessary as other mod makes have proved.

 

it is just drag and drop... but if another mod modifies the same lua u need to do some extra "bullshit"

 

i would like to have a "modloader" like minecraft has minecraft forge... just dragn drop files into a mod ordner... would be nice :p

Share this post


Link to post
Share on other sites

From the sounds of your installation instructions, you've made this mod different than others have to where you have to take an extra step whereas all other mods I have (at least a total of 10 or so) work fine together without any extra bullshit. If I can't just drag and drop it into my game folder it's not worth it. Simply because it's not necessary as other mod makes have proved.

A few other mods don't take in account that other mods might edit the same files, as you can see the developer of this mod made sure that wouldn't be the problem by letting you add the code yourself to the original gamefiles ;)

Good luck with drag dropping every mod you see without checking which files they might overwrite and which other mods might be using the same files lol.

Share this post


Link to post
Share on other sites

From the sounds of your installation instructions, you've made this mod different than others have to where you have to take an extra step whereas all other mods I have (at least a total of 10 or so) work fine together without any extra bullshit. If I can't just drag and drop it into my game folder it's not worth it. Simply because it's not necessary as other mod makes have proved.

 

The instructions are pretty straight forward. And apply to every other mod here, there is no "extra bullshit" involved over any other mod. In fact, OP was nice enough to provide more detailed instructions so you would not overwrite other mods due to conflicts. Most other mods here do not provide you with that information.

 

It's pretty straight forward. If mod A uses file X and mod B also uses file X, installing mod B after installing mod A will overwrite mod A and vice versa. This is not specific to just this mod.

 

 

Share this post


Link to post
Share on other sites

how do you do this?

 

i seachred two days for the codes for this. because i had the idea to bind them to a production line but was unable to do this. this is absolutly awesome and give me the hope that my idea is still possible

Share this post


Link to post
Share on other sites

how do you do this?

You should take a look at the modfiles, nothing explains better than code.

 

Basically what I do is pretty simple, Every time a player joins the world he gets initialized.

At this point I use the initializeHook to set some data to the player

    player:setValue(prefix .. "Iron" .. "MineAmount",     config.defaultIronMines) 

 

After the game has called the initialize function it will call the updateServer function every five seconds.

Here I just check how many mines of a specific amount a player has and then give him the resources for that.

Although first I wait until an internal counter has reached 60 seconds.

 

And that is basically everything beside Worldgen and UI

 

 

Share this post


Link to post
Share on other sites

Damn no luck finding these yet though I did find a normal claim asteroid without the option to claim it but no ship or anything. I'm sure I install your mod right though was odd to have some files outside the data folder. The modfiles folder.

 

Either way I'm looking forward to finding them in my LP Series over the next few days/weeks. I hope by then some the upcoming features are out too so it scales a bit better so I can't just buy best materials one for 100k.

 

I also hope that you can't go past xanion outside the ring :)

Share this post


Link to post
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

×
×
  • Create New...