SMES Exploit
- elantzb
- Registered user
- Posts: 95
- Joined: 11 Jul 2016, 00:36
SMES Exploit
Bug Description: Rebuilding a SMES with little to no charge left gives it some free charge.
Steps to reproduce:
1. Find empty SMES (ones near briefing ladders, for instance).
2. Deconstruct it, then rebuild it.
3. Note that it has charge now.
Steps to reproduce:
1. Find empty SMES (ones near briefing ladders, for instance).
2. Deconstruct it, then rebuild it.
3. Note that it has charge now.
- Casgair
- Registered user
- Posts: 117
- Joined: 17 Nov 2015, 09:32
Re: SMES Exploit
This is a holdover from baycode; I assume the code acts in this way so roundstart SMESes have enough power to start an engine/keep the station going long enough for solars to get wired.
- elantzb
- Registered user
- Posts: 95
- Joined: 11 Jul 2016, 00:36
Re: SMES Exploit
I'm pretty sure that you can programatically set a SMES's starting power, hence the beefy one that runs the lower deck without ever needing charging.
- Jroinc1
- Registered user
- Posts: 995
- Joined: 10 May 2016, 22:32
- Location: Changes too rapidly
- Byond: Jroinc1
Re: SMES Exploit
Yup. It's not... common here though, or pretty much ever used outside of rare circumstances (Engine blew up... aand it's been 45 min).
Mentor-
3 Nov 16-15 Jan 17
Atmos bombs built- 16
Hull breaches repaired- 6
Charged SMs manually dragged to space- 2
Backup tcomms systems set- 4
SM de-lamination weapons detonated- 0
Times I've burned half the ship to a crisp- 5
Times I've burned half the ship to a crisp ACCIDENTALLY- 2
Engine SMs de-laminated on my watch- 0
Upper deck engines made-1
Lower deck engines made-1
Total kills with SM- 6
Most surgeries done at once- 3
Most anesthetic tanks used in a round- 3
Most surgeries done using only personal supplies- 37
Most perdiox made w/in 5 min of roundstart- 540u
3 Nov 16-15 Jan 17
Atmos bombs built- 16
Hull breaches repaired- 6
Charged SMs manually dragged to space- 2
Backup tcomms systems set- 4
SM de-lamination weapons detonated- 0
Times I've burned half the ship to a crisp- 5
Times I've burned half the ship to a crisp ACCIDENTALLY- 2
Engine SMs de-laminated on my watch- 0
Upper deck engines made-1
Lower deck engines made-1
Total kills with SM- 6
Most surgeries done at once- 3
Most anesthetic tanks used in a round- 3
Most surgeries done using only personal supplies- 37
Most perdiox made w/in 5 min of roundstart- 540u
- elantzb
- Registered user
- Posts: 95
- Joined: 11 Jul 2016, 00:36
Re: SMES Exploit
I found out about this because I'm used to Yogcode where SMESes have power cells inside. I opened the emitter SMES (power was out and there had been no engineering staff for ~1hr) with the hopes of charging the cells and rebuilding the SMES, but there was a magnetic coil(sp?) inside. So I put it back together and bam free power, problem solved.
- Casgair
- Registered user
- Posts: 117
- Joined: 17 Nov 2015, 09:32
Re: SMES Exploit
True, but we are talking about code that's probably been around since the first Goonstation. That code doesn't test for how much power is in the batteries, it just creates a new one according to some preset amount of power. I can't speak with absolute authority on it, but the answer I provided seems the most likely reason it acts the way it does.elantzb wrote:I'm pretty sure that you can programatically set a SMES's starting power, hence the beefy one that runs the lower deck without ever needing charging.
- elantzb
- Registered user
- Posts: 95
- Joined: 11 Jul 2016, 00:36
Re: SMES Exploit
Right, so I suggest making freshly constructed SMESes start with 0 charge. That's got to be a single variable change.Casgair wrote:True, but we are talking about code that's probably been around since the first Goonstation. That code doesn't test for how much power is in the batteries, it just creates a new one according to some preset amount of power. I can't speak with absolute authority on it, but the answer I provided seems the most likely reason it acts the way it does.
- Casgair
- Registered user
- Posts: 117
- Joined: 17 Nov 2015, 09:32
Re: SMES Exploit
That would be the easiest way to settle it, sure.
I would say something like a SMES_Power variable that would work on battery input SMES_Power = SMES_Power + Battery_Power; while deconstructing would create/set batteries with Battery_Power equal to SMES_Power / number_batteries (because AFAIK the SMES can be deconstructed prior to completion, so / 5 isn't necessarily the best input) would be more desirable from a power conservation aspect, but then you would get into hokey stuff like Research being able to keep the ship running purely by making Super cells alone.
(Apologies for the wonky code, python amateur over here)
I would say something like a SMES_Power variable that would work on battery input SMES_Power = SMES_Power + Battery_Power; while deconstructing would create/set batteries with Battery_Power equal to SMES_Power / number_batteries (because AFAIK the SMES can be deconstructed prior to completion, so / 5 isn't necessarily the best input) would be more desirable from a power conservation aspect, but then you would get into hokey stuff like Research being able to keep the ship running purely by making Super cells alone.
(Apologies for the wonky code, python amateur over here)
- elantzb
- Registered user
- Posts: 95
- Joined: 11 Jul 2016, 00:36
Re: SMES Exploit
SMES units in CM don't have cells as their components is what I'm saying... just a research item (magnetic coil or whatever), no cells/batteries included
- Casgair
- Registered user
- Posts: 117
- Joined: 17 Nov 2015, 09:32
Re: SMES Exploit
Hah, my bad; I haven't really done much as MT/CE (certainly never had to build/decon an SMES). Hope a dev weighs in on this.
- elantzb
- Registered user
- Posts: 95
- Joined: 11 Jul 2016, 00:36
Re: SMES Exploit
Check out my Guide "Buck's Notes" in the Guides forum.Casgair wrote:Hah, my bad; I haven't really done much as MT/CE (certainly never had to build/decon an SMES).