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

This Month's Specials

Air Assault Task Force- Save $8.00
winSPWW2- Save $5.00

   







Go Back   .com.unity Forums > Shrapnel Community > Space Empires: IV & V

Reply
 
Thread Tools Display Modes
  #1  
Old January 28th, 2001, 03:18 PM

Tenryu Tenryu is offline
Sergeant
 
Join Date: Dec 2000
Location: Uranus
Posts: 340
Thanks: 0
Thanked 0 Times in 0 Posts
Tenryu is on a distinguished road
Default Re: Modder warning - potential range check errors

Oh yeah, Bill, they're around. I've attributed some of my problems to the same cause.

I got them in Setting.txt. I think by raising the "Planet Value High Resources" to 5000000.

Don't think it liked the "Plr Planet Values" at 1000000, 3000000, and 5000000 either.

Of course, it could have been the fact that I was using these setting in a finite resource game. We know that's broken.
Reply With Quote
  #2  
Old January 28th, 2001, 03:36 PM

Barnacle Bill Barnacle Bill is offline
Sergeant
 
Join Date: Nov 2000
Location: Somewhere on the wine-dark sea...
Posts: 236
Thanks: 0
Thanked 0 Times in 0 Posts
Barnacle Bill is on a distinguished road
Default Re: Modder warning - potential range check errors

I'm not sure this really counts as a "bug" for MM to try to fix. More of a program limitation that modders need to watch out for. There was not a problem with the component being able to launch 3056 mines per turn. Where it "broke" was when the AI put 26 of those components in the same ship, which a human would not do - no need, since launching mines in combat is useless so if 1 component will launch all you can carry...you get more cargo capacity cheaper with cargo bays.

[This message has been edited by Barnacle Bill (edited 28 January 2001).]
Reply With Quote
  #3  
Old January 28th, 2001, 06:06 PM
ColdSteel's Avatar

ColdSteel ColdSteel is offline
Sergeant
 
Join Date: Dec 2000
Posts: 248
Thanks: 0
Thanked 0 Times in 0 Posts
ColdSteel is on a distinguished road
Default Re: Modder warning - potential range check errors

These aren't really bugs. All programs use tables or subscripts to store game information. Those have finate sizes. There are also defined maximum sizes for other variables used to manuipulate and access these tables as well as for other stuff as well. The point is that in most games the values that go into these are hard coded in the program or in associated data files that no one can touch or change except the developer. So, when the size of one of these tables is exceeded it means the progam has a bug because it doesn't account for a condition that wasn't anticipated. Not the case in SE4 however, we get to actually play with the data values that are acted on by the game. MM made them external. If we make them too big you blow off the end of an array in the program somewhere and get the RCEs. Probably what MM should do at some point is add a "Max Size" comment to each of the setting in the data files so that modders won't exceed the game's variable limits. Right now we have to do it by trial and error as described here.
__________________
The difference between genius and stupidity is that genius has its limits.
Reply With Quote
  #4  
Old January 29th, 2001, 10:39 PM

jimbob55 jimbob55 is offline
Corporal
 
Join Date: Jan 2001
Posts: 132
Thanks: 0
Thanked 0 Times in 0 Posts
jimbob55 is on a distinguished road
Default Re: Modder warning - potential range check errors

The mine laying problem could have been due to your DN minelayer trying to launch 79456 mines in one turn....This is a little outside the unsigned int limit of 65,536.
A minelaying component that lays 'only' 100 mines per turn would fix the problem.

Best to limit any values you edit to the restrictions of common data type.
unsigned (unsigned int) 0 to 65535
long int ± 2 billions
unsigned long int 0 to 4 billion
float 3.4 ±e38
double 1.7 ±e308

Unfortunately, I have no idea which type is used for which values in the game....
Reply With Quote
  #5  
Old January 30th, 2001, 05:11 AM

Barnacle Bill Barnacle Bill is offline
Sergeant
 
Join Date: Nov 2000
Location: Somewhere on the wine-dark sea...
Posts: 236
Thanks: 0
Thanked 0 Times in 0 Posts
Barnacle Bill is on a distinguished road
Default Re: Modder warning - potential range check errors

quote:
Originally posted by jimbob55:
The mine laying problem could have been due to your DN minelayer trying to launch 79456 mines in one turn....This is a little outside the unsigned int limit of 65,536.
A minelaying component that lays 'only' 100 mines per turn would fix the problem.

Best to limit any values you edit to the restrictions of common data type.
unsigned (unsigned int) 0 to 65535
long int ± 2 billions
unsigned long int 0 to 4 billion
float 3.4 ±e38
double 1.7 ±e308

Unfortunately, I have no idea which type is used for which values in the game....



I'm pretty sure that is the problem. Not that it tried to launch that many, as it only had 5 on board. I think when it tried to launch, though, the game checked its total capacity and found it too high. Again, when I lower the value to 459 per turn, the problem went away.

Reply With Quote
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 12:29 PM.


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