Author Topic: [Mod][Beta] MineCorp  (Read 54904 times)

NexusNull

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    38
  • Personal Text!
    • View Profile
on: February 08, 2017, 07:21:18 PM
!!! 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:
Spoiler: show

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



Mod structure:
Spoiler: show

Code: [Select]
├── 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

Spoiler: show

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.

Code: [Select]
*** 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:
Spoiler: show







Thanks to:

Tostov: for designing the station.
Laserzwei: continuing the work on Minecorp while I was gone.
Hammelpilaw: keeping the mod up to date.
« Last Edit: September 06, 2017, 12:27:06 AM by NexusNull »



Devious

  • Hero Member
  • *****
  • Status:
    Offline
    Posts:
    545
  • Have you seen Rusty?
    • View Profile
    • Rusty's Universe and Community
on: February 08, 2017, 09:11:05 PM
Looks good!
Is the price the same for every resource type or is there a difference between the different resources?



Juni

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    7
    • View Profile
on: February 08, 2017, 09:12:54 PM
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



Devious

  • Hero Member
  • *****
  • Status:
    Offline
    Posts:
    545
  • Have you seen Rusty?
    • View Profile
    • Rusty's Universe and Community
on: February 08, 2017, 09:16:44 PM
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.



NexusNull

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    38
  • Personal Text!
    • View Profile
on: February 08, 2017, 09:19:13 PM

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.



NexusNull

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    38
  • Personal Text!
    • View Profile
on: February 08, 2017, 09:21:36 PM
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.



Juni

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    7
    • View Profile
on: February 08, 2017, 09:22:01 PM

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



Devious

  • Hero Member
  • *****
  • Status:
    Offline
    Posts:
    545
  • Have you seen Rusty?
    • View Profile
    • Rusty's Universe and Community
on: February 08, 2017, 11:42:12 PM
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 :)
« Last Edit: February 09, 2017, 04:45:37 AM by Devious »



Kane Hart

  • Sr. Member
  • ****
  • Status:
    Offline
    Posts:
    271
  • The Talk Too Much Guy!
    • View Profile
    • My Youtube
on: February 09, 2017, 06:08:20 AM
Wow this is amazing I might use this in my LP Series since I need better methods of gaining ores :)




NexusNull

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    38
  • Personal Text!
    • View Profile
on: February 09, 2017, 10:51:45 AM
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.



Butzen

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    10
    • View Profile
on: February 09, 2017, 12:38:01 PM
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.



NexusNull

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    38
  • Personal Text!
    • View Profile
on: February 09, 2017, 12:46:01 PM
I will update the Installation shortly



Butzen

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    10
    • View Profile
on: February 09, 2017, 01:36:03 PM
wich data are importent for the server? only the both.lua form lib and player right?



LeRougePanda

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    7
    • View Profile
on: February 09, 2017, 01:45:27 PM
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.



tquiglez

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    4
    • View Profile
on: February 09, 2017, 01:46:29 PM
I will update the Installation shortly

Any update on that? Having trouble figuring it out...