Jump to content

[MOD] Regenerative Asteroid Fields [Update 1.5.2]


Dirtyredz

Recommended Posts

Hey uhm,

 

i just updated and get the following error:

 

 

Jump in:

[pre]could not execute function 'RegenerativeAsteroidsScript.onPlayerEntered' in '"mods/RegenerativeAsteroids/scripts/sector/RegenerativeAsteroidsScript.lua"':

...Asteroids/scripts/sector/RegenerativeAsteroidsScript.lua:97: attempt to index upvalue 'logLevels' (a boolean value)

stack traceback:

        ...Asteroids/scripts/sector/RegenerativeAsteroidsScript.lua:97: in function 'GetNumberMinableAsteroids'

        ...Asteroids/scripts/sector/RegenerativeAsteroidsScript.lua:129: in function 'RegenerateAsteroids'

        ...Asteroids/scripts/sector/RegenerativeAsteroidsScript.lua:57: in function <...Asteroids/scripts/sector/RegenerativeAsteroidsScript.lua:35>

[/pre]

 

"Regen Now" Command:

[pre]

could not execute function 'RegenerativeAsteroidsCmd.initialize' in '"mods/RegenerativeAsteroids/scripts/player/RegenerativeAsteroidsCmd.lua"':

...Asteroids/scripts/sector/RegenerativeAsteroidsScript.lua:97: attempt to index upvalue 'logLevels' (a boolean value)

stack traceback:

        ...Asteroids/scripts/sector/RegenerativeAsteroidsScript.lua:97: in function 'GetNumberMinableAsteroids'

        ...Asteroids/scripts/sector/RegenerativeAsteroidsScript.lua:129: in function 'RegenerateAsteroids'

        ...iveAsteroids/scripts/player/RegenerativeAsteroidsCmd.lua:47: in function <...iveAsteroids/scripts/player/RegenerativeAsteroidsCmd.lua:18>

[/pre]

Link to comment
Share on other sites

  • Replies 94
  • Created
  • Last Reply

Top Posters In This Topic

I did. The mod worked flawlessly in version 1.4.3 and stopped working in 1.4.5. I did some research and found the problem:

 

 

mods/RegenerativeAsteroids/scripts/sector/RegenerativeAsteroidsScript.lua:

 

Version 1.4.3:

[pre]

require("PrintLog")

local logLevels = require("LogLevels")

[/pre]

 

 

Original version 1.4.5:

[pre]

local logLevels = require("PrintLog")

[/pre]

 

 

i changed it back to the lines from 1.4.3 and now it works fine. Seems you have to implement another Hotfix ;)

 

[pre]

[iNFO]    [RegenerativeAsteroids][1.4.5]  Created 129 Minable Asteroids in sector  \s(-159, 62)

[iNFO]    [RegenerativeAsteroids][1.4.5]  Created 129 Minable Asteroids in sector  \s(-159, 62)

[iNFO]    [RegenerativeAsteroids][1.4.5]  Removed 1975 excess Non-Minable Asteroids in sector  \s(-159, 62)

[iNFO]    [RegenerativeAsteroids][1.4.5]  Force Regenerating Asteroids for sector [-159, 62]

[/pre]

Link to comment
Share on other sites

Good Morning (at least its morning here ;)),

 

it seems i found another 2 things:

 

1. Even when i disabled MaintainNaturalAsteroidLimit (set to false in config), newly discovered regenerative sectors are maintaining it:

[pre]

[iNFO]    [RegenerativeAsteroids][1.4.5]  Using MaintainNaturalAsteroidLimit: 111, for sector \s(-191, 85) (If you wany yo force this region to have more manual set that limit with /regen set x)

[/pre]

 

2. Not sure it's a Bug: When enabling the Serverwide Message, only the Player who discovered the sector is getting it. (But maybe thats wanted behavior, so not sure)

 

 

Greetings,

 

Phanti

Link to comment
Share on other sites

First: Happy new Year  8)

 

Second: Sorry Mate. I found another Bug in 1.4.5:

 

The following Section exists twice in /mods/RegenerativeAsteroids/scripts/sector/RegenerativeAsteroidsScript.lua. The result is, that when a player jumps into the system, or you use the "regen now" command, the Field is generated twice  ::)

 

[pre]

if CurrentMinableAsteroids < MaxMinable then

      local AsteroidsToGenerate = MaxMinable - CurrentMinableAsteroids

      local generator = SectorGenerator(Sector:getCoordinates())

      local size = getFloat(0.5, 1.0)

      local asteroid = generator:createAsteroidFieldEx(AsteroidsToGenerate * 2,1800 * size, 5.0, 25.0, 1, 0.5)

 

      Placer.resolveIntersections()

      RegenerativeAsteroidsScript.print("Created "..MaxMinable.." Minable Asteroids in sector ",xy,logLevels.info)

    end

[/pre]

 

 

 

 

 

 

 

For everyone else, who want to have bigger Asteroids in a regenerative System, without having to install a second mod. Just replace the Block above with the following: :)

 

if CurrentMinableAsteroids < MaxMinable then

      local AsteroidsToGenerate = MaxMinable - CurrentMinableAsteroids

      local generator = SectorGenerator(Sector:getCoordinates())

      local size = getFloat(0.5, 1.0)

      local asteroid = generator:createAsteroidFieldEx(AsteroidsToGenerate * 2,3600 * size, 5.0, 50.0, 1, 0.5)

 

      Placer.resolveIntersections()

      RegenerativeAsteroidsScript.print("Created "..MaxMinable.." Minable Asteroids in sector ",xy,logLevels.info)

    end

 

 

I marked the only line which is modified. Currently testing the setting on my server. Everything seems to run fine.

Link to comment
Share on other sites

Perhaps you can add a config for the modification i did, so other players can configure the size of the roids easily? Like a factor, and use that factor for size of the field (ensure enough space between roids), min size and max size of the roids.

Link to comment
Share on other sites

Ive seen my mod being used by many servers/players, unfortunately i haven't received much in feedback, or feature requests. Do you have ideas, features, issues, or maybe you just want to tell me that you use and love the mod.  Let me know,  and thxs for your time.  I look forward to keeping this mod updated and feature packed.

 

Hi love the mod, the best around! I have been trying to find a way to make it so that players on my PVE server could fight over the regen zones but Im not nearly as good as you I am certain lol... Best Ive been able to figure out for making a pve server with pvp zone is to make the server actually PVP with insane high rates on the nuetralzone spawning. This "should" give me pockets of space where fighting can happen but not what I want which is Massive glorious faction battles to control these wonderful Regen Feilds!!!

Link to comment
Share on other sites

Just wanted to say excellent idea. :) Haven't tried the mod yet, but am going to. However... The URL for the download on the main post of this topic has an error: A letter is missing. Easy mistake to make. :) The missing letter is the v for "download/v1.4.5/" which, of course, gives people an error when trying to download the mod. x) Thankfully your post with about the stated update has the correct URL. :)

Link to comment
Share on other sites

Hmm, don't know wy but the mod isn't working for me. I made my home sector to an regenerative one with the command and also tryd start the regeneration, but it didn't worked not even with the /set command. When I jump into the system I get the massage that this is an regenerative systen but thats all, no spawns of minable asteroids not even with the /regen now command :X

Well there is also no response from the console if I use /regen set (number) or /regen now, should there be any reaction?

Still thanks for creating such awesome ideas :)

Link to comment
Share on other sites

Version 1.5.0

--Updated Loglevels

--Added 3 new config options to control the size of asteroids

--Fixed bug where MaintainNaturalAsteroidLimit was always set

--Fixed bug where server announcement wasnt working.

--Fixed bug where the asteroids were generating twice.

 

Download here:

https://github.com/dirtyredz/Regenerative-Asteroids/releases/download/v1.5.0/Regenerative-Asteroids-v1.5.0.zip

Link to comment
Share on other sites

  • 2 months later...

Unfortunately, I was happy too early.

 

I copy the files yesterday on my server and the server starts correctly, so I think its working. After my nightshift the people on my server tell me the mod isn´t working and I can confirm this.

 

I definitly copy the files wrong, all other mods working.

 

Here is what I done:

 

The .zip have the two folders, mods and data.

 

The data files copied into steamapps/common/avorion/data

The mods folder to steamapps/common/avorion

 

Or I have to copy the files in mods/regenerativeAsteroids and mods/LogLevels to the avorion/data files?

 

 

 

Link to comment
Share on other sites

  • 2 weeks later...

I did not change anything in the options yet. So if I understand right, out of 1000 sectors 300 become regenerative on the first time a players visits them. I already visited 30 sectors now for testing and none of them became regenerative.

 

In the sectorspecifics.lua I found following:

--Begin Added by RegenerativeAsteroids - Dirtyredz

exsist, RegenerativeAsteroidsConfig = pcall(require, 'mods.RegenerativeAsteroids.config.RegenerativeAsteroidsConfig')

local RegenAsteroidsSectorGenerator = RegenerativeAsteroidsConfig.SectorGenerator or true

--End Added by RegenerativeAsteroids - Dirtyredz

 

"exsist" is grammatically wrong, but may it also be wrong code?

 

 

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

×
×
  • Create New...