ImmersiveSolarArrays for Project Zomboid Discord Server: https://discord.gg/ePBp3hMr
radx5blue / immersivesolararrays Goto Github PK
View Code? Open in Web Editor NEWImmersiveSolarArrays for Project Zomboid
License: Apache License 2.0
ImmersiveSolarArrays for Project Zomboid
License: Apache License 2.0
ImmersiveSolarArrays for Project Zomboid Discord Server: https://discord.gg/ePBp3hMr
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
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)?
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
Error shows up repeatedly on clients (this is from the console.txt) when connecting to a server.
function: updateBank -- file: CPowerbankSystem.lua line # 213 | MOD: Immersive Solar Arrays [23.9.4]
function: updateBank -- file: CPowerbankSystem.lua line # 213 | MOD: Immersive Solar Arrays [23.9.4]
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.
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.
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
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
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!
-----------------------------------------
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
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.
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.
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:
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:
To Reproduce
Steps to reproduce the behavior:
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
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: nullLOG : General , 1639141812967> 30.553.287> -----------------------------------------
STACK TRACEfunction: registerAsLoot -- file: ISADistList.lua line # 6
function: ISADistList.lua -- file: ISADistList.lua line # 53ERROR: 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 TRACEfunction: registerAsLoot -- file: ISADistList.lua line # 6
function: ISADistList.lua -- file: ISADistList.lua line # 53Dez. 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: nullLOG : General , 1639141812942> 30.553.263> -----------------------------------------
STACK TRACEfunction: 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 TRACEfunction: 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
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
Expected behavior
when picking up battery bank all connections to solar panels should be cleared.
Screenshots
m/a
Generators to charge batteries in the battery bank
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.
Describe the bug
Solars error occasionally, and often when a powerbank is placed.
To Reproduce
Steps to reproduce the behavior:
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
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 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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.