Giter VIP home page Giter VIP logo

immersivesolararrays's Introduction

immersivesolararrays's People

Contributors

avokatoo avatar danixu avatar gusperroni avatar i2dcarrasco avatar kattiko avatar kev1931 avatar photoshoplol avatar poltergeist-ix avatar radx5blue avatar vs863129 avatar xcs011 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

immersivesolararrays's Issues

typo in loot table GarageMechanic

function: registerAsLoot -- file: ISADistList.lualine # 6
function: ISADistList.lua -- file: ISADistList.lualine # 53

For line 6:
table.insert(ProceduralDistributions.list[allocation].items, item);registerAsLoot(iReg, 0,10 *

For line 53:
ISApanelLootMult, "GarageMechanic");

it should be GarageMechanics (missing S)

it occurs in few places in said file

[feature request] Wind turbines

Add wind power.

from code, this should not be too much to ask, as wind-speed is reported by getClimateManager():getWindPower() (and it's 0-1 float)
This is map-global, so need to be checked only once per all turbines, and IIRC, climateManaget is updated every 10-ingame minutes.

I've tried to do this as separate mod that would use ISA framework, but tapping into functions of what is on which grid was bit too complex.

Alternative, can you (in future) provide way of adding custom power generators (and perhaps consumers)?

Stove use electricity when powered off.

Describe the bug
Stove use electricity when powered off.

SolarMovables.lua, line 209 - checking for isPowered() will be always true as stove is on powered grid.

changing it to if instanceof(myObject, "IsoStove") and myObject:Activated() then should work correctly
also, power usage you could do by ratio of getMaxTemperature() and IIRC 300f

[ERRORS] (Loading old Files) Stack Trace using mod on MP

Error shows up repeatedly on clients (this is from the console.txt) when connecting to a server.

STACK TRACE

function: updateBank -- file: CPowerbankSystem.lua line # 213 | MOD: Immersive Solar Arrays [23.9.4]

ERROR: General , 1696887424912> 0> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: attempted index: maxBatteryCapacity of non-table: null at KahluaThread.tableget line:1689.
ERROR: General , 1696887424912> 0> DebugLogStream.printException> Stack trace:
java.lang.RuntimeException: attempted index: maxBatteryCapacity of non-table: null
at se.krka.kahlua.vm.KahluaThread.tableget(KahluaThread.java:1689)
at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:492)
at se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:163)
at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1980)
at se.krka.kahlua.vm.KahluaThread.pcallvoid(KahluaThread.java:1812)
at se.krka.kahlua.integration.LuaCaller.pcallvoid(LuaCaller.java:66)
at se.krka.kahlua.integration.LuaCaller.protectedCallVoid(LuaCaller.java:139)
at zombie.Lua.Event.trigger(Event.java:64)
at zombie.Lua.LuaEventManager.triggerEvent(LuaEventManager.java:65)
at zombie.GameTime.update(GameTime.java:671)
at zombie.gameStates.IngameState.UpdateStuff(IngameState.java:566)
at zombie.gameStates.IngameState.updateInternal(IngameState.java:1623)
at zombie.gameStates.IngameState.update(IngameState.java:1333)
at zombie.gameStates.GameStateMachine.update(GameStateMachine.java:101)
at zombie.GameWindow.logic(GameWindow.java:298)
at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:71)
at zombie.GameWindow.frameStep(GameWindow.java:765)
at zombie.GameWindow.run_ez(GameWindow.java:667)
at zombie.GameWindow.mainThread(GameWindow.java:495)
at java.base/java.lang.Thread.run(Unknown Source)
LOG : General , 1696887424913> 0> -----------------------------------------
STACK TRACE

function: updateBank -- file: CPowerbankSystem.lua line # 213 | MOD: Immersive Solar Arrays [23.9.4]

[feature request] To be possible to turn on / off battery banks

Is your feature request related to a problem? Please describe.
No.

Describe the solution you'd like
Right clicking a battey bank, allow the player to turn on / off the battery bank. Sometimes you are going to be a long time away from your base and don't need the batteries to be used or charged, so you can conserve them.

Describe alternatives you've considered
For now, i just remove the batteries from the banks.

Additional context
None.

[Question] Store data in server side

Hello,

I have tried the Discord link but looks like it doesn't work, so I ask here (maybe another people know about it and can help).

I want to continue improving a bit this project because it looks very good and I think that can be even better
To make it a bit better in the MP part, I want to move all the module logic to the server side. This will allow to avoid that if you have 20 clients in the server, to have to calculate the solar status in all of them. Also will allow to a server that doesn't have activated the pause when no clients are connected, to still calculating the energy status and batteries degradation even when no one is connected.

My problem with this is that I have not found a way to save data in server side in a permanent way to allow the module to continue working in a normal way upon restarts. On client side I know that there is an object called modData which allows to store data premanently in the client, but on server that data is only stored while the server is running. Once is restarted, that data is lost.

My question is just if someone knows a way to store data in server side, because I want to store at least the PowerBanks position in the map. Also a way to locate objects in the map will be valid, because it must be done once at server start. This will allow to scan the surrounded objects to detect the consumers and the solar panels attached to that power bank.

I have asked in the official forum, but or no one cares, or there is no way to do it.

Best regards.

Reduce battery bank range

Is your feature request related to a problem? Please describe.
I live in a community with houses pretty close to each other.

Describe the solution you'd like
I'd like to reduce the range such that I'm only powering my appliances and not everything within 20 tiles.

Describe alternatives you've considered
Moving the bank in any direction still leaves me in range of others

Additional context
image

[feature request] List Connected Devices

An option like "List connected devices" to the powerbank like the generator has to check if the bank is powering all my stuff maybe also list there how much each device is using too

[Question] Looking for a little guidance on item restrictions for containers

I know this isn't so much an issue as it is a question I am hoping you can help me with.

I noticed the battery bank will only allow the specific batteries compatible with the solar array.

Could you help guide me to a resource that shows how you accomplished that? I am creating a custom container, but I need it to only accept specific items.

Thank you in advance and I love your mod!

[Error] function: chargeBatteries -- file: ISAPowerbank_server.lua line # 132 | MOD: Immersive Solar Arrays [23.5.1]

-----------------------------------------
STACK TRACE
-----------------------------------------
function: chargeBatteries -- file: ISAPowerbank_server.lua line # 132 | MOD: Immersive Solar Arrays [23.5.1]
function: updatePowerbanks -- file: ISAPowerbankSystem_server.lua line # 166 | MOD: Immersive Solar Arrays [23.5.1]
LOG  : General     , 1682990190490> 79,402,591> -----------------------------------------
STACK TRACE
-----------------------------------------
function: chargeBatteries -- file: ISAPowerbank_server.lua line # 132 | MOD: Immersive Solar Arrays [23.5.1]
function: updatePowerbanks -- file: ISAPowerbankSystem_server.lua line # 166 | MOD: Immersive Solar Arrays [23.5.1]
ERROR: General     , 1682990190490> 79,402,591> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: Object tried to call nil in chargeBatteries at KahluaUtil.fail line:82.
ERROR: General     , 1682990190490> 79,402,591> DebugLogStream.printException> Stack trace:
java.lang.RuntimeException: Object tried to call nil in chargeBatteries
	at se.krka.kahlua.vm.KahluaUtil.fail(KahluaUtil.java:82)
	at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:973)
	at se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:163)
	at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1980)
	at se.krka.kahlua.vm.KahluaThread.pcallvoid(KahluaThread.java:1812)
	at se.krka.kahlua.integration.LuaCaller.pcallvoid(LuaCaller.java:66)
	at se.krka.kahlua.integration.LuaCaller.protectedCallVoid(LuaCaller.java:139)
	at zombie.Lua.Event.trigger(Event.java:64)
	at zombie.Lua.LuaEventManager.triggerEvent(LuaEventManager.java:65)
	at zombie.GameTime.update(GameTime.java:671)
	at zombie.gameStates.IngameState.UpdateStuff(IngameState.java:566)
	at zombie.gameStates.IngameState.updateInternal(IngameState.java:1623)
	at zombie.gameStates.IngameState.update(IngameState.java:1333)
	at zombie.network.GameServer.main(GameServer.java:903)

I'm not sure whats causing this bug, i see it every 5 seconds or so
I was using github version but was using ISA id, now i was forced to switch to ISA_41

[bug] [MP]Potential Multiplayer Issue

Discussed in #10

Originally posted by xcs011 January 9, 2022
After patching it to work with multiplayer again, a friend and I noticed a potential issue.
Does the game spawn a generator when you aren't around/the area is unloaded to keep the grid running?

Apparently in multiplayer it happens whenever the host isnt around the system, and the problem is that its condition ticks down until they come back. This could be a problem if it ticks down low enough to explode.

[feature] Provide charge rate information in "Power bank status"

Using power bank status, will tell you if change of battery is positive or negative but doesn't tell by how much - it's trial and error to know "can i run another fridge or only a lamp?"
IRL charge (and discharge) will be described by Amps difference, but in PZ this would give almost no information.

I think, using actualCharge, capacity and difference variables, time to full charge/discharge could be calculated and if so, that information can be "said".
Let's also say, that if this time is more than 24h it could say "enough to survive day", to not break immersion.

Calculating total consumption is wrong when there are multiple items of the same name

Describe the bug
When using items with the same name for example 'Popsicle Fridge' or 'White Industrial Fridge' or just lights the total consumption seems to rise exponentialy:

obraz_2024-04-29_015724883
obraz_2024-04-29_015733579
obraz_2024-04-29_015737325
obraz_2024-04-29_015742268
obraz_2024-04-29_015747289

items | consumption in Ah
0 | 16
1 | 120
2 | 224
3 | 432
4 | 744
5 | 1160
6 | 1680
desmos point plots scaled down for more representation:
image

To Reproduce
Steps to reproduce the behavior:

  1. build powerbank
  2. place few items with the same name nearby
  3. check consumption

Expected behavior
I'm expecting the consumption to be additive, and it seems to work like that with items of different names, check the attached images
image

[bug] [sprites] Loading Issues for 41.60 MP - Dedicated Server

I Just want to Inform you, awesome mod !

LOG : Lua , 1639141812966> 30.553.287> Loading: steamapps/workshop/content/108600/2623458493/mods/ImmersiveSolarArrays/media/lua/server/items/ISADistList.lua
LOG : General , 1639141812967> 30.553.287> -------------------------------------------------------------
attempted index: items of non-table: null

LOG : General , 1639141812967> 30.553.287> -----------------------------------------
STACK TRACE

function: registerAsLoot -- file: ISADistList.lua line # 6
function: ISADistList.lua -- file: ISADistList.lua line # 53

ERROR: General , 1639141812967> 30.553.288> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: attempted index: items of non-table: null at KahluaThread.tableget line:1689.
ERROR: General , 1639141812967> 30.553.288> DebugLogStream.printException> Stack trace:
java.lang.RuntimeException: attempted index: items of non-table: null
at se.krka.kahlua.vm.KahluaThread.tableget(KahluaThread.java:1689)
at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:492)
at se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:163)
at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1980)
at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1782)
at se.krka.kahlua.integration.LuaCaller.pcall(LuaCaller.java:76)
at se.krka.kahlua.integration.LuaCaller.protectedCall(LuaCaller.java:117)
at zombie.Lua.LuaManager.RunLuaInternal(LuaManager.java:549)
at zombie.Lua.LuaManager.RunLua(LuaManager.java:495)
at zombie.Lua.LuaManager.RunLua(LuaManager.java:481)
at zombie.Lua.LuaManager.LoadDirBase(LuaManager.java:328)
at zombie.Lua.LuaManager.LoadDirBase(LuaManager.java:255)
at zombie.network.GameServer.doMinimumInit(GameServer.java:1368)
at zombie.network.GameServer.main(GameServer.java:665)
LOG : General , 1639141812967> 30.553.288> -----------------------------------------
STACK TRACE

function: registerAsLoot -- file: ISADistList.lua line # 6
function: ISADistList.lua -- file: ISADistList.lua line # 53

Dez. 10, 2021 2:10:12 PM zombie.Lua.LuaManager RunLuaInternal
SCHWERWIEGEND: java.lang.RuntimeException
Dez. 10, 2021 2:10:12 PM zombie.Lua.LuaManager RunLuaInternal
SCHWERWIEGEND: java.lang.RuntimeException:
Dez. 10, 2021 2:10:12 PM zombie.Lua.LuaManager RunLuaInternal
SCHWERWIEGEND: at registerAsLoot:6
at ISADistList.lua:53

LOG : Lua , 1639141812939> 30.553.259> Loading: steamapps/workshop/content/108600/2623458493/mods/ImmersiveSolarArrays/media/lua/server/ISAPowerBank/ISAPowerSystem.lua
LOG : General , 1639141812941> 30.553.261> -------------------------------------------------------------
attempted index: transferItem of non-table: null

LOG : General , 1639141812942> 30.553.263> -----------------------------------------
STACK TRACE

function: ISAPowerSystem.lua -- file: ISAPowerSystem.lua line # 152

ERROR: General , 1639141812943> 30.553.263> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: attempted index: transferItem of non-table: null at KahluaThread.tableget line:1689.
ERROR: General , 1639141812943> 30.553.264> DebugLogStream.printException> Stack trace:
java.lang.RuntimeException: attempted index: transferItem of non-table: null
at se.krka.kahlua.vm.KahluaThread.tableget(KahluaThread.java:1689)
at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:492)
at se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:163)
at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1980)
at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1782)
at se.krka.kahlua.integration.LuaCaller.pcall(LuaCaller.java:76)
at se.krka.kahlua.integration.LuaCaller.protectedCall(LuaCaller.java:117)
at zombie.Lua.LuaManager.RunLuaInternal(LuaManager.java:549)
at zombie.Lua.LuaManager.RunLua(LuaManager.java:495)
at zombie.Lua.LuaManager.RunLua(LuaManager.java:481)
at zombie.Lua.LuaManager.LoadDirBase(LuaManager.java:328)
at zombie.Lua.LuaManager.LoadDirBase(LuaManager.java:255)
at zombie.network.GameServer.doMinimumInit(GameServer.java:1368)
at zombie.network.GameServer.main(GameServer.java:665)
LOG : General , 1639141812943> 30.553.264> -----------------------------------------
STACK TRACE

function: ISAPowerSystem.lua -- file: ISAPowerSystem.lua line # 152

Dez. 10, 2021 2:10:12 PM zombie.Lua.LuaManager RunLuaInternal
SCHWERWIEGEND: java.lang.RuntimeException
Dez. 10, 2021 2:10:12 PM zombie.Lua.LuaManager RunLuaInternal
SCHWERWIEGEND: java.lang.RuntimeException:
Dez. 10, 2021 2:10:12 PM zombie.Lua.LuaManager RunLuaInternal
SCHWERWIEGEND: at ISAPowerSystem.lua:152

picking up battery bank do not clear panel connections

Describe the bug
When you pick up battery bank and move it to new location and place it down, all previous solar panels that where connected to battery bank are still connected

To Reproduce

  1. have working ISA system
  2. remove batteries from bank
  3. pick up battery bank
    4, place battery bank (in my situation it was 4 map cells away, nowhere near old location)

Expected behavior
when picking up battery bank all connections to solar panels should be cleared.

Screenshots
m/a

[Feature Request] Move the power bank data to a new window instead to use player:say

Describe the solution you'd like
I am thinking about the posibility to move the power bank data to a new window like the status, inventory... instead to show it as a message said by the user. This will allow to show the data in a better way with info like the sun status, the current generated power by solar panels, the consumption... and of course the power bank status.

Additional context
I am not really asking for this feature. I am thinking about to implement it directly, but I want to know your opinion and if is there any kind of problem with it (for example, another plan you have in mind). Of course I am new in Project Zomboid modding and my lua level is not the best, so it will take me a bit of time.

Best regards.

[bug] [MP?] Solars crash on powerbank placement

Describe the bug
Solars error occasionally, and often when a powerbank is placed.

To Reproduce
Steps to reproduce the behavior:

  1. place powerbank
  2. See error

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version build 41 mp

Additional context
Add any other context about the problem here.

LOG BELOW
`[10-01-22 17:30:07.706] LOG : General , 1641853807706> 31,307,558> powerConsumption: 11.040000000000001.
[10-01-22 17:30:07.707] LOG : General , 1641853807707> 31,307,558> setting noOff to 0.
[10-01-22 17:30:07.707] LOG : General , 1641853807707> 31,307,559> -------------------------------------------------------------
attempted index: getX of non-table: null.
[10-01-22 17:30:07.709] LOG : General , 1641853807709> 31,307,560> -----------------------------------------
STACK TRACE

function: solarscan -- file: SolarMoveables.lua line # 64
function: liteModeFunction -- file: ISAPowerSystem.lua line # 1160
function: TurnOnPower -- file: ISAPowerSystem.lua line # 104
function: solarscan -- file: SolarMoveables.lua line # 145
function: placeMoveable -- file: SolarMoveables.lua line # 9
function: placeMoveableViaCursor -- file: ISMoveableSpriteProps.lua line # 1510
function: perform -- file: ISMoveablesAction.lua line # 96.
[10-01-22 17:30:07.714] ERROR: General , 1641853807714> 31,307,566> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: attempted index: getX of non-table: null at KahluaThread.tableget line:1689..
[10-01-22 17:30:07.714] ERROR: General , 1641853807714> 31,307,566> DebugLogStream.printException> Stack trace:.
[10-01-22 17:30:07.717] LOG : General , 1641853807717> 31,307,568> -----------------------------------------
STACK TRACE

function: solarscan -- file: SolarMoveables.lua line # 64
function: liteModeFunction -- file: ISAPowerSystem.lua line # 1160
function: TurnOnPower -- file: ISAPowerSystem.lua line # 104
function: solarscan -- file: SolarMoveables.lua line # 145
function: placeMoveable -- file: SolarMoveables.lua line # 9
function: placeMoveableViaCursor -- file: ISMoveableSpriteProps.lua line # 1510
function: perform -- file: ISMoveablesAction.lua line # 96.
[10-01-22 17:30:07.717] LOG : General , 1641853807717> 31,307,569> .
[10-01-22 17:30:07.793] LOG : General , 1641853807793> 31,307,645> creating new sourcewindow: D:/Program Files (x86)/Steam/steamapps/workshop/content/108600/2623458493/mods/ImmersiveSolarArrays/media/lua/client/Moveables/SolarMoveables.lua.
[10-01-22 17:31:15.123] LOG : General , 1641853875123> 31,374,975> 1641853875123 znet: Connection closed: reason=1 port=1.
[10-01-22 17:31:15.124] LOG : General , 1641853875124> 31,374,975> 1641853875124 znet: CancelAuthTicket .
[10-01-22 17:31:15.129] LOG : General , 1641853875129> 31,374,980> RakNetPeerInterface.connectionStateChangedCallback state=Disconnected message= thread=Thread[UdpEngine,5,Network].
[10-01-22 17:31:15.130] LOG : General , 1641853875130> 31,374,981> [VOICE MANAGER] VoiceConnectClose uuid=355784398289256576.
[10-01-22 17:31:15.130] LOG : General , 1641853875130> 31,374,982> 1641853875130 znet: Java_zombie_core_raknet_RakVoice_CloseVoiceChannel.
[10-01-22 17:31:54.343] LOG : General , 1641853914343> 31,414,195> EXITDEBUG: RenderThread.isCloseRequested 1.
`

line # 93 is bugged

Line number #93 is bugged according to project zomboid debug, that came up after I fixed line #53 by adding the missing s to the inverter spawn place
as for how to fix line #93 I have no clue as I can't even really tell whats wrong with it, but it is complaining about it
oh, the file I'm talking about is the Item distribution file, ISADistList.lua

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.