[MOD] (Alpha 5) BetterPower+ (V5.0.0): Updated 16/07/14

Started by Architect, February 28, 2014, 07:36:51 PM

Previous topic - Next topic

Architect

Quote from: ShaggyD00 on June 24, 2014, 09:37:31 AM
Hey another thing with BP+ is how messes with traders. Anyway you could get it so combat traders will deal with commodities again. I use the artillery mod and in need of shells, space debree hasn't dropped it yet. Not to mention med kits sell nicely. And wood would be nice to trade again with indust.

I'm gonna remove the traders bit until I can sort them out properly I think, as my current approach to dealing with traders has been the same since Alpha 2, and the system has changed quite dramatically since then.

Quote from: Arcalane on June 24, 2014, 12:47:33 PM
Wall lighting turning red when consumption exceeds production but you still have a sizeable energy reserve is a bit... obnoxious?

Also, they cast enough light to obsolete sun lamps in growing rooms.

Also also, I've been running some minor testing, and they appear to be rather broken? They have a pretty serious negative impact on performance, and removing several wall lights did not reduce the light level of the area until the map was reloaded.

The wall lights have always been a sticking point for me, as RimWorld does not support changing light colour dynamically. Subsequently, there're a bit of trickery and general bludegoning of common sense to get it to work, and with every update I've done it has broken in some way. If you could give me more detail, such as how many lights you have, what the circumstances were, etc, etc, I'd be happy to work on the fix instantly.

Quote from: nmid on June 24, 2014, 02:05:31 AM
Nah, I didn't mean it (conveyor belt) as criticism..
I just can't figure out how to use it in an efficient manner.

I know :P just sayin'

Quote from: pop on June 24, 2014, 09:01:15 AM
What can i do with nuclear waste?

Nothing currently, but in the update I am working on now, after it has depleted you can use it to make lights that will in cause fear in colonists, but will also require no power to work.
Check out BetterPower+ and all its derivatives by clicking the picture below.

It adds many new methods of power generation and uses for it, as well as other things such as incidents.


mrofa

Lol you should have said so mate i would add some blood stain or spikes on them :D
All i do is clutter all around.

Arcalane

Quote from: Architect on June 24, 2014, 12:59:25 PM
The wall lights have always been a sticking point for me, as RimWorld does not support changing light colour dynamically. Subsequently, there're a bit of trickery and general bludegoning of common sense to get it to work, and with every update I've done it has broken in some way. If you could give me more detail, such as how many lights you have, what the circumstances were, etc, etc, I'd be happy to work on the fix instantly.

"A lot" is the easiest way to put it; I only used regular lamps for coloured effects where possible, since wall lights don't take up any space. They were placed pretty... freely? I wanted places to be well-lit and the light positions to make sense and aesthetic decisions like that.

At a guess, for a reasonably-sized colony, that's in the region of a few dozen, possibly closer to 100? Since I've torn most of them down (though I do have an older save with several intact) and you can't mass-select them like normal lights, it's hard to say without going through and carefully counting every single one of the bloody things.

I'd ditch the 'emergency lighting' feature, personally - if I had to guess, its interactions with the power networks are what's causing the slowdown.

Architect

Quote from: Arcalane on June 24, 2014, 01:23:51 PM
Quote from: Architect on June 24, 2014, 12:59:25 PM
The wall lights have always been a sticking point for me, as RimWorld does not support changing light colour dynamically. Subsequently, there're a bit of trickery and general bludegoning of common sense to get it to work, and with every update I've done it has broken in some way. If you could give me more detail, such as how many lights you have, what the circumstances were, etc, etc, I'd be happy to work on the fix instantly.

"A lot" is the easiest way to put it; I only used regular lamps for coloured effects where possible, since wall lights don't take up any space. They were placed pretty... freely? I wanted places to be well-lit and the light positions to make sense and aesthetic decisions like that.

At a guess, for a reasonably-sized colony, that's in the region of a few dozen, possibly closer to 100? Since I've torn most of them down (though I do have an older save with several intact) and you can't mass-select them like normal lights, it's hard to say without going through and carefully counting every single one of the bloody things.

I'd ditch the 'emergency lighting' feature, personally - if I had to guess, its interactions with the power networks are what's causing the slowdown.

I'm... unwilling to give up the emergency lighting feature, but I agree it obviously needs some work, and if it continues to be a problem, I shall definitely remove it. As much as I want to keep it, I'm not willing to let it be a problem for BP+ users. Not gonna be a hot fix for this issue I'm afraid as I'm too far down the line with the next BP+ version, but I'll add it to my list of changes for the 4.1.0
Check out BetterPower+ and all its derivatives by clicking the picture below.

It adds many new methods of power generation and uses for it, as well as other things such as incidents.


Arcalane

Understandable. It's neat, and all, but it's murderous for performance.

Perhaps there could be two versions? One which generates a less light and lacks the emergency function, and one that generates a very decent amount of light and has the emergency light? That way, you could put down the latter in key/high-traffic areas (so you can make use of the high light generation and notice power output drops at a glance) without the added weight from the entire wall-light system demanding updates from the power net.

Architect

Quote from: Arcalane on June 24, 2014, 01:58:03 PM
Understandable. It's neat, and all, but it's murderous for performance.

Perhaps there could be two versions? One which generates a less light and lacks the emergency function, and one that generates a very decent amount of light and has the emergency light? That way, you could put down the latter in key/high-traffic areas (so you can make use of the high light generation and notice power output drops at a glance) without the added weight from the entire wall-light system demanding updates from the power net.

My current plan is to optimise the code now, and spread the checks out so that the power net isn't factored in constantly. That should quite happily fix any issues, but failing that I will just remove the feature altogether. If I can't make it work properly, I'm not gonna have two half arsed versions :P

Remind me, what was the other issue with the lights not updating correctly on the map?
Check out BetterPower+ and all its derivatives by clicking the picture below.

It adds many new methods of power generation and uses for it, as well as other things such as incidents.


Arcalane

Hey, just trying to find a decent compromise. :P

The light status simply wasn't clearing after some of the walls were deconstructed, leading to phantom illumination without power.

Seemingly solved by saving and reloading, at least. Not sure what the problem was and it doesn't seem to be occurring again now I've cut down on the number of lightwalls.

Architect

Quote from: Arcalane on June 24, 2014, 02:39:07 PM
Hey, just trying to find a decent compromise. :P

The light status simply wasn't clearing after some of the walls were deconstructed, leading to phantom illumination without power.

Seemingly solved by saving and reloading, at least. Not sure what the problem was and it doesn't seem to be occurring again now I've cut down on the number of lightwalls.

Sorry, just re-read my comment and it did seem a bit blunt, that's not what i meant to come across as. I just meant that it would be unfair to offer a potentially broken thing to people knowingly.

Anyway, I've assaulted it with optimisations, so it now doesn't check 60 times a second, and when it does check, it does so efficiently. Also fixed some hidden errors with it that could have been causing more framerate issues too. I can't seem to recreate the phantom light issue, but it used to phantom light all the time, and I literally spent an entire week trying to fix it before alpha 3 was officially release, so I can fully believe that it would start doing it again just to spite me XD If you or anyone for that matter see it doing it again, let me know, and I'll have another stab at making it work properly.

Point is, it "should" work properly again now :P
Check out BetterPower+ and all its derivatives by clicking the picture below.

It adds many new methods of power generation and uses for it, as well as other things such as incidents.


mrofa

You can  just add overide despawn and overide destroy to wall code for glow.lit = false. Did have the same problem with plasma sponges when they dissapire.

Edit:
       public override void Destroy(DestroyMode mode = 0)
{
                        this.glowerComp.Lit = false;
base.Destroy(mode);
                       
                }


mode = 0 is vanish if i remmber correctly
Same thing with despawn
All i do is clutter all around.

Architect

Quote from: mrofa on June 24, 2014, 02:58:45 PM
You can  just add overide despawn and overide destroy to wall code for glow.lit = false. Did have the same problem with plasma sponges when they dissapire.

Edit:
       public override void Destroy(DestroyMode mode = 0)
{
                        this.glowerComp.Lit = false;
base.Destroy(mode);
                       
                }


mode = 0 is vanish if i remmber correctly
Same thing with despawn

Cheers mrofa, but that's not the cause. The problem used to occur when the lights stopped being powered after they'd already changed once, not when it was destroyed.
Check out BetterPower+ and all its derivatives by clicking the picture below.

It adds many new methods of power generation and uses for it, as well as other things such as incidents.


Architect

#505
ummm, oops? New feature anyone? XD

Check out BetterPower+ and all its derivatives by clicking the picture below.

It adds many new methods of power generation and uses for it, as well as other things such as incidents.


mrofa

Plasma storm, or birth of insane squierrl, cant really say from this distance :D
All i do is clutter all around.

Architect

Quote from: mrofa on June 24, 2014, 04:24:06 PM
Plasma storm, or birth of insane squierrl, cant really say from this distance :D

Neither, the lightning rod went into overdrive when I tried to balance it out a little better XD Whoever it was that thought hey were having an issue with lightning rods, you're absolutely right. Found a significant issue with them and wind turbines when testing today meaning that they literally ignored the weather completely. It's now fixed for the next version.
Check out BetterPower+ and all its derivatives by clicking the picture below.

It adds many new methods of power generation and uses for it, as well as other things such as incidents.


StorymasterQ

I like how this game can result in quotes that would be quite unnerving when said in public, out of context. - Myself

The dubious quotes list is now public. See it here

nmid

Quote from: Architect on June 24, 2014, 04:37:21 PM
Quote from: mrofa on June 24, 2014, 04:24:06 PM
Plasma storm, or birth of insane squierrl, cant really say from this distance :D

Neither, the lightning rod went into overdrive when I tried to balance it out a little better XD Whoever it was that thought hey were having an issue with lightning rods, you're absolutely right. Found a significant issue with them and wind turbines when testing today meaning that they literally ignored the weather completely. It's now fixed for the next version.

/raises hand.
I tried out God mode and assaulted my lightning rods so many times that it broke.. but it generated no power.

I basically placed 1 rod + couple of batteries wired in an independent circuit. The lightnings didn't result in any power being stored in the batteries.

ps - Trying out god mode rather sadly removed the fun of Rimworld for me... I'm going to take a mini break and come back after a few weeks for BP+ & Colonist creation updates. :)
I like how this game can result in quotes that would be quite unnerving when said in public, out of context. StorymasterQ