Infinite money bug with Multiple lasers OXP

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

Post Reply
ihaveamo
Above Average
Above Average
Posts: 28
Joined: Mon Feb 01, 2016 10:56 am

Infinite money bug with Multiple lasers OXP

Post by ihaveamo »

Hi all! (especially Norby, in this case)

Found an infinite money bug:

If you attempt to add lasers you could a afford on a "single slot" ,but can't afford in a multi slot ... if you press enter on the "multi slot" to mount the laser, it doesn't register that you have added (because you can't afford it), but it "has", and you can then go to "Remove laser" and remove the non-existent lasers and get heaps of free money.

For example, here's how to show the issue:

Start a new game

Original cobra starts 3 forward laser mount points with this oxp.

1. I sell my pulse laser. (which gets me 3x money back as it's a 3-point pulse laser... correct functionality)

2. I now have $1200 (not real value - example)

3. I Purchase a $1000 beam laser.

3. I am now asked where to mount ... for my "forward" location, with this OXP that will cost 3000 (1000x3).

4. I don't have $3000 to mount "foward", so I should only be able to mount on aft/sides.

5. I press enter on the forward laser point, and it seems nothing happens (correct as I don't have enough money)..

6. ...but it has actualy "registered" I have added that laser, so if i now go to "Remove lasers", the forward location is lit up, and I can "remove" the laser (well, 3 virtual forward lasers), that I never purchased ... now have $4200!! (1000x3 + my initial $1200)

7. $$$ profit!

Definitely a bug.
User avatar
Norby
---- E L I T E ----
---- E L I T E ----
Posts: 2577
Joined: Mon May 20, 2013 9:53 pm
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Contact:

Re: Infinite money bug with Multiple lasers OXP

Post by Norby »

Well, Multiple Lasers OXP is just a .plist config file with laser definitions, the hard part is done by the core game so nothing to be fixed at my side.
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6696
Joined: Wed Feb 28, 2007 7:54 am

Re: Infinite money bug with Multiple lasers OXP

Post by another_commander »

Good catch. Should be fixed in 079444e.

Edit: Actually, I messed up the commit (and made phkb put in extra work and time into it as a result). Sorry!
Correct fix should be now in 5cbf9c8.
ihaveamo
Above Average
Above Average
Posts: 28
Joined: Mon Feb 01, 2016 10:56 am

Re: Infinite money bug with Multiple lasers OXP

Post by ihaveamo »

another_commander wrote: Sat Nov 17, 2018 9:27 pm
Good catch. Should be fixed in 079444e.

Edit: Actually, I messed up the commit (and made phkb put in extra work and time into it as a result). Sorry!
Correct fix should be now in 5cbf9c8.
Thanks, another_commander .. yes I saw it in the nightly build github before seeing it here... Now that's what I call a fast fix:) Downloading now, and will test it :)
ihaveamo
Above Average
Above Average
Posts: 28
Joined: Mon Feb 01, 2016 10:56 am

Re: Infinite money bug with Multiple lasers OXP

Post by ihaveamo »

ihaveamo wrote: Sun Nov 18, 2018 11:23 am
another_commander wrote: Sat Nov 17, 2018 9:27 pm
Good catch. Should be fixed in 079444e.

Edit: Actually, I messed up the commit (and made phkb put in extra work and time into it as a result). Sorry!
Correct fix should be now in 5cbf9c8.
Thanks, another_commander .. yes I saw it in the nightly build github before seeing it here... Now that's what I call a fast fix:) Downloading now, and will test it :)

Just feeding back - Still had some issues, then I noticed two more github commits from PHKB and yourself to fix this issue. Recompiling now.
ihaveamo
Above Average
Above Average
Posts: 28
Joined: Mon Feb 01, 2016 10:56 am

Re: Infinite money bug with Multiple lasers OXP

Post by ihaveamo »

ihaveamo wrote: Mon Nov 19, 2018 12:06 pm
ihaveamo wrote: Sun Nov 18, 2018 11:23 am
another_commander wrote: Sat Nov 17, 2018 9:27 pm
Good catch. Should be fixed in 079444e.

Edit: Actually, I messed up the commit (and made phkb put in extra work and time into it as a result). Sorry!
Correct fix should be now in 5cbf9c8.
Thanks, another_commander .. yes I saw it in the nightly build github before seeing it here... Now that's what I call a fast fix:) Downloading now, and will test it :)

Just feeding back - Still had some issues, then I noticed two more github commits from PHKB and yourself to fix this issue. Recompiling now.

Once I rebuilt off the nightly .git repo (and not base - oops) & tested - all fixed. Successful with Norby multilasers OXZ as well, for testing completeness (even though that wasn't the problem).

Now I'm playing with the source code. Oh no, I've gone down rabbit-hole. Working on a couple of OXZ's that may never see the light of day, but we'll see ;)
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Infinite money bug with Multiple lasers OXP

Post by phkb »

Here, have a cookie. They're fresh-baked, a little on the dark side... :)
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6696
Joined: Wed Feb 28, 2007 7:54 am

Re: Infinite money bug with Multiple lasers OXP

Post by another_commander »

Image
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: Infinite money bug with Multiple lasers OXP

Post by Svengali »

Yummy!
User avatar
Cholmondely
Archivist
Archivist
Posts: 5381
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: Infinite money bug with Multiple lasers OXP

Post by Cholmondely »

ihaveamo wrote: Tue Nov 20, 2018 2:52 am
Now I'm playing with the source code. Oh no, I've gone down rabbit-hole. Working on a couple of OXZ's that may never see the light of day, but we'll see ;)
Anything publishable?
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
Post Reply