.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

Raging Tiger- Save $9.00
winSPMBT: Main Battle Tank- Save $6.00

   







Go Back   .com.unity Forums > The Camo Workshop > WinSPMBT
Notices


Reply
 
Thread Tools Display Modes
  #1  
Old January 28th, 2013, 12:02 PM

davf davf is offline
Private
 
Join Date: Jan 2013
Posts: 4
Thanks: 0
Thanked 3 Times in 3 Posts
davf is on a distinguished road
Default Help please: Rebuild Points are Negative

My rebuild points for a self-generated campaign are negative (see attached screenshot) preventing me from repairing units and upgrading. This has persisted through two battles and a number of shut downs and restarts. Please help!

(I did a forum search for this and could not find any other mention of it. Sorry if it exists elsewhere already)

Dave
Reply With Quote
  #2  
Old January 28th, 2013, 02:48 PM

Mustang Mustang is offline
BANNED USER
 
Join Date: Jan 2006
Posts: 354
Thanks: 351
Thanked 14 Times in 14 Posts
Mustang is on a distinguished road
Default Re: Help please: Rebuild Points are Negative

Sorry, I don't see a screenshot. Attaching your save files and system information would also help.
Reply With Quote
  #3  
Old January 28th, 2013, 08:05 PM

davf davf is offline
Private
 
Join Date: Jan 2013
Posts: 4
Thanks: 0
Thanked 3 Times in 3 Posts
davf is on a distinguished road
Default Re: Help please: Rebuild Points are Negative

Sorry about that. I thought I had attached. Here it is.


System is SPMBT version 26th Feb 2011 running on 64 bit Windows 7 Ultimate with Service Pack 1.

I think the save file is just over 6 meg. Is that too large to upload?

Thanks for the help!

Dave
Attached Thumbnails
Click image for larger version

Name:	SPMBT Screenshot.jpg
Views:	138
Size:	59.3 KB
ID:	12221  
Reply With Quote
The Following User Says Thank You to davf For This Useful Post:
  #4  
Old January 28th, 2013, 08:13 PM

davf davf is offline
Private
 
Join Date: Jan 2013
Posts: 4
Thanks: 0
Thanked 3 Times in 3 Posts
davf is on a distinguished road
Default Re: Help please: Rebuild Points are Negative

Aha... amazing what you can do with zip. Here is the saved game (I hope)

Dave
Attached Files
File Type: zip SpSv033.zip (293.5 KB, 89 views)
Reply With Quote
The Following User Says Thank You to davf For This Useful Post:
  #5  
Old January 28th, 2013, 11:06 PM
Mobhack's Avatar

Mobhack Mobhack is offline
National Security Advisor
 
Join Date: Mar 2005
Location: Dundee
Posts: 5,955
Thanks: 464
Thanked 1,896 Times in 1,234 Posts
Mobhack is on a distinguished road
Default Re: Help please: Rebuild Points are Negative

Quote:
Originally Posted by davf View Post
Sorry about that. I thought I had attached. Here it is.


System is SPMBT version 26th Feb 2011 running on 64 bit Windows 7 Ultimate with Service Pack 1.

I think the save file is just over 6 meg. Is that too large to upload?

Thanks for the help!

Dave
Someone else had this problem with an over-expensive core (he bought loads of artillery, hordes of the stuff, AFAIR).

That causes the integer values to overrun, and so you get negative numbers due to the 2's complement arithmetic digital computers use.

I'll be fixing the code (if it can be) so that cores cannot have > the maximum a defender can have (26000 points) - probably a bit less - as they get more expensive as they gain experience. Or restricting such expensive cores to assault missions, or something.

Meanwhile, simply sell some stuff from your core until the numbers turn positive once more (they should). Use some of that to repair any damaged units you may have left.

Then make sure your core never goes above 20-25K points or so. Otherwise in your defend missions the AI will never be able to match you.

cheers
Andy

Hmm - I just tried deleting from the sample save game. Apparently the delete option goes when you are in negative points. I'll need to debug that.

This will be a useful save file for debugging huge cores. Especially one with ~20 troops of M109s...

But it looks like that campaign is toast (unless delete core formation works with your version - it may be snafud at my end with the new arty support code).
Reply With Quote
The Following User Says Thank You to Mobhack For This Useful Post:
  #6  
Old January 28th, 2013, 08:51 PM

Mustang Mustang is offline
BANNED USER
 
Join Date: Jan 2006
Posts: 354
Thanks: 351
Thanked 14 Times in 14 Posts
Mustang is on a distinguished road
Default Re: Help please: Rebuild Points are Negative

I'm not sure what to do, you'll have to wait for Don and Andy. Thanks for informing them of the bug.
Reply With Quote
  #7  
Old January 29th, 2013, 12:16 AM
Mobhack's Avatar

Mobhack Mobhack is offline
National Security Advisor
 
Join Date: Mar 2005
Location: Dundee
Posts: 5,955
Thanks: 464
Thanked 1,896 Times in 1,234 Posts
Mobhack is on a distinguished road
Default Re: Help please: Rebuild Points are Negative

Hmm - I put the points up to the maximum, and bought a huge amount of challengers for a 64K core. Then bought 10K more at the end of the next battle and so on. Points values all were being handled well - was up to 90K core value soon enough. Points did not roll over to a negative value.

However - a mass deletion of core troops soon made the numbers go funny.. So something is wrong in there - probably old code that has not been updated to a 32 bit value for the points total, likely a 16 bit integer internal to the delete routine - will be investigating that later tomorrow.

So - did you happen to do a mass deletion at some point?
Reply With Quote
The Following User Says Thank You to Mobhack For This Useful Post:
  #8  
Old January 29th, 2013, 03:32 PM
Mobhack's Avatar

Mobhack Mobhack is offline
National Security Advisor
 
Join Date: Mar 2005
Location: Dundee
Posts: 5,955
Thanks: 464
Thanked 1,896 Times in 1,234 Posts
Mobhack is on a distinguished road
Default Re: Help please: Rebuild Points are Negative

Quote:
Originally Posted by Mobhack View Post
Hmm - I put the points up to the maximum, and bought a huge amount of challengers for a 64K core. Then bought 10K more at the end of the next battle and so on. Points values all were being handled well - was up to 90K core value soon enough. Points did not roll over to a negative value.

However - a mass deletion of core troops soon made the numbers go funny.. So something is wrong in there - probably old code that has not been updated to a 32 bit value for the points total, likely a 16 bit integer internal to the delete routine - will be investigating that later tomorrow.

So - did you happen to do a mass deletion at some point?
OK - found the culprit that was stuffing a signed 32 bit value into an unsigned 16 bit value and so blowing the delete code up.

Unfortunately, the relevant value is squirrelled away in the save game data as a 16 bit - so its a bit more involved than just changing the variable's type in a function.

I'll need to deal with legacy scenarios and saved games with the obsolete variable (and add new 32 bit ones to the save game files)... data massage tango, here we go!
Reply With Quote
The Following User Says Thank You to Mobhack For This Useful Post:
  #9  
Old January 30th, 2013, 07:40 AM
Mobhack's Avatar

Mobhack Mobhack is offline
National Security Advisor
 
Join Date: Mar 2005
Location: Dundee
Posts: 5,955
Thanks: 464
Thanked 1,896 Times in 1,234 Posts
Mobhack is on a distinguished road
Default Re: Help please: Rebuild Points are Negative

OK - points problem sorted.

The 64K maximum limit stays though.

It is part of the preferences data and that gets exchanged in a PBEM, and its a bit involved to change that.

In any case - I kludged a 64K defender mission for P1. P2 as FRG in 2013, was allowed the correct huge points total for its assault force - but it could only spend 90K or so in its AI purchase, probably due to the 500 unit limit and/or the 200 formation limit. The AI buys a balanced force, and has no way to cherry pick say a shed-load of 999 point MLRS as a human might to soak up excess points.

Adding to the 1000 unit limit is not going to happen as it nukes all existing saved games, campaigns, scenarios etc, etc..

So the points restrictions stay.

Cheers
Andy
Reply With Quote
The Following User Says Thank You to Mobhack For This Useful Post:
  #10  
Old January 30th, 2013, 11:52 PM

davf davf is offline
Private
 
Join Date: Jan 2013
Posts: 4
Thanks: 0
Thanked 3 Times in 3 Posts
davf is on a distinguished road
Default Re: Help please: Rebuild Points are Negative

Amazing! I'm sorry for being quiet over the last couple of days... I've been called away for work and am only getting back to a computer now.

In answer to your very old question, there wasn't an initial deletion but I may have gone in to check to see if there was any room for expansion.

The Core button has gone missing on mine also. I have a feeling it may have been present on the previous turn when I first found the issue. I played one more turn thinking maybe that might address the issue for some likely illogical issue.

I know I'm kind of pushing the envelope in terms of 'realism' in the first place, but after playing for so long (since the original Steel Panthers), I mostly just toy around seeing what kind of crazy things I can do. For whatever it's worth, I've played Steel Panthers since the very first incarnation and it's the one game that has outlasted all others on my system... I can't speak highly enough for just how awesome this game is. Thanks for helping keep it that way and keeping it alive!

I can't say enough just how impressed I am with the support and help in this forum, Mobhack (and others). Thanks so much!
Reply With Quote
The Following User Says Thank You to davf For This Useful Post:
Reply

Bookmarks


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 08:35 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2024, Shrapnel Games, Inc. - All Rights Reserved.