Closed MAGGen-hub closed 1 year ago
I will try to program the solution myself but I can't promise anything... Thanks for this great mod: it realy helps to store power and heat house at cold times.
Emm... Is that right?
GetResistance in generator BEBehaviour class
return this.powerSetting != 0 ? FloatHelper.Remap(this.powerSetting / 100.0f, 0.0f, 1.0f, 0.01f, 0.075f) : 0.05f;
I mean: return (self - fromSource) / (toSource - fromSource) * (toTarget - fromTarget) + fromTarget;
if this.powerSetting = 1 : return ((1/100)-0)/(1-0)*(0,075 - 0,01) + 0,01
-> 0,01/1*0,065 + 0,01
= 0,01065
And with this.powerSetting = 100 we have 0,075f
It's weird for me because when this.powerSetting = 0 it returns 0,05f and 0,01065f (when powerSetting=1) is smaller than 0.05f... If it correct then sorry (I might be stupid sometimes)...
Finaly. Perfect value. Replace GetResistance in generator BEBehaviour class with this:
public override float GetResistance() {//return this.powerSetting != 0 ? FloatHelper.Remap(this.powerSetting / 100.0f, 0.0f, 1.0f, 0.01f, 0.35f) : 0.05f;
return this.powerSetting != 0 ? (this.powerSetting / 100.0f * 0.33f + 0.05f) : 0.05f;
}
4-5 generators is enough to pereodicaly stop the gear system so... if will never over-produce power. 1 - generator with motor - 65% production 2 generators - 42-45% production 3 generators 32-33 production 4 generators 23-25 production (not enought to charge) 5 generators - partial break
It still not good enought... But I don't see other ways to fix it... May be motor speed reduce?
Solved. See pull requests...
First of all, thank you for your commitment!
I've also noticed the problem with the infinite energy - but I haven't found the time to deal with it yet, so it's very convenient for me that you've done it. ✌️
I'll take a look at your PR tonight and probably upload a new Version with the Patch to the ModDB. 😅
Sorry for asking but it is realy hard to conect two power networks throught wall so...
You've probably noticed that the cables stick out a little above the block. The idea was that any colliding pieces of cable would be connected together.
It's probably not the best solution, but I didn't want to touch the chiseled blocks (yet).
Sorry for asking but it is realy hard to conect two power networks throught wall so...
You've probably noticed that the cables stick out a little above the block. The idea was that any colliding pieces of cable would be connected together.
It's probably not the best solution, but I didn't want to touch the chiseled blocks (yet).
I know about this. Thanks for reminding me) Actualy I see a lot of potencial in your mod. The wireing system looks much better than qptech's and it's the only one mod that turn rotation energy into electro energy corectly)))
I will try to support your develop if I got more free time. There is so much things in my mind. Electro iron smelter, Oven heater (I already programed it my self [special fireplace looking like bloomery that can heat oven from outside] but I have no money to buy game so I can't upload it to official mod DB), Analog signals support, Fridge, Power Armor (Like in temporal tinker mod), Steam Generator (like in qptech), Electro fireplace...
After that Vintage Story should be renamed into Industrial Story)))
Do you know about ComputerCraft mod for Minecraft? It has CraftOS inside it programmed in lua language. Just imagine what can be posible if CraftOS will be inside more than one game. It's not easy to port it from java to C# but if it happens... Craft OS - will be the first multi-game operating system. Humanity made computers, made cool games. And now we have computers inside games, and can launch mini-games on it! Sounds weird but also cool. I realy want to see lua scripting inside vintage story... Hope one day this will be posible...
Something wrong with generator mechanical resistance: Generators must give gear system more resistance (bigger than mechanical power that one motor can apply to gear system) or else we will have this [system with two-three generators and one motor that can run infinetly] (I mean we already have =) )... Thank you for your attention. Posible solutions of the "infinte engine bug" - ~ make motor produce less power to gear sys. (i don't think that this will help) ~ make motor stop if gear sys has to much resist (one generator conected to gears must stop the motor or make it work much slower) ~ make generator produce more resist so two or more generators could stop the system with one windmiln and wind with 70-80% wind power
P.S. Feature requests: Sorry for asking but it is realy hard to conect two power networks throught wall so - posible solutions: ~ Add block that (like switch) can be placed on wires and conect with the same block (or directly to device like lamp or heater) on the other side of the wall (thought one block (or more (depends on material (coper - 1 block/iron - 2 or 3)))) ~ Make new wire system like in qptech mod (or like in "more red" mincraft mod) [this is much harder than previous solution] ~ Make block with cabel inserted inside it (for ex you can modify "game:chizeld_block" [if it contain copper-block (or other special block) as material] to spread power in all directions) - this is may require "harmony patching" but need to say... "harmony" usialy does more harm than harmony so... this is not perfect solution...