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

This Month's Specials

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

   







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

Reply
 
Thread Tools Display Modes
  #1  
Old December 13th, 2002, 03:10 AM
Dan C.'s Avatar

Dan C. Dan C. is offline
Private
 
Join Date: Oct 2002
Location: London, Ont.
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Dan C. is on a distinguished road
Default Mod error

I am working on a mod for SEIV:Gold and I have run into a strange error. All the datafiles load without any warnings, but when I start a game (say after selecting 2-3 player races, and no NPC's) the program gets to around 50% of player placement and then gives an "Integer Overflow" error popup and stops.

Has anyone seen something like this before? I have changed the facilites, and perhaps it is having trouble selecting facilities for the homeworld? - Actually does anyone know how the program selects which facilities will be used on homeworlds??
__________________
-Dan

L++++ GdY $!+ Fr- C--- SdP T!- Sf A M++ Mp! RNSP Pw? Fq Nd Rp G++++ AuO
Reply With Quote
  #2  
Old December 13th, 2002, 03:42 AM
Krsqk's Avatar

Krsqk Krsqk is offline
Lieutenant Colonel
 
Join Date: Jul 2001
Location: Orlando, FL
Posts: 1,259
Thanks: 0
Thanked 0 Times in 0 Posts
Krsqk is on a distinguished road
Default Re: Mod error

Original facility choice is hardcoded. The game will place 1 facility with the Spaceport ability (if your race requires spaceports), 1 with the Supply Generation ability (i.e., resupply depot), 1 with Space Yard ability, one with organics generation, one with radioactives generation, and then splits the remaining about half and half between minerals production and research production. Of course, with some tricky playing with the abilities, you can tweak what appears on each planet (see Proportions Facility.txt for examples).
__________________
The Unpronounceable Krsqk

"Well, sir, at the moment my left processor doesn't know what my right is doing." - Freefall
Reply With Quote
  #3  
Old December 13th, 2002, 10:53 PM
capnq's Avatar

capnq capnq is offline
General
 
Join Date: Feb 2001
Location: Pittsburgh, PA, USA
Posts: 3,070
Thanks: 13
Thanked 9 Times in 8 Posts
capnq is on a distinguished road
Default Re: Mod error

"Integer Overflow" implies that it's seeing a number somewhere that's bigger than it can handle. Check your modded file for typos involving large numbers.
__________________
Cap'n Q

"Good morning, Pooh Bear," said Eeyore gloomily. "If it is a good morning," he said. "Which I doubt," said he.
Reply With Quote
  #4  
Old December 13th, 2002, 11:09 PM
Dan C.'s Avatar

Dan C. Dan C. is offline
Private
 
Join Date: Oct 2002
Location: London, Ont.
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Dan C. is on a distinguished road
Default Re: Mod error

Quote:
"Integer Overflow" implies that it's seeing a number somewhere that's bigger than it can handle. Check your modded file for typos involving large numbers.
Thanks, I looked through but I didn't see any particularly large numbers, but I'll have to look again. The strange thing is that it occura halfway though player placement, not in reading the files in the first place, I assume it is selecting a world, upgrading it to the start conditons and then placing the facilities on the world. I can't think what could be too large a value there...
__________________
-Dan

L++++ GdY $!+ Fr- C--- SdP T!- Sf A M++ Mp! RNSP Pw? Fq Nd Rp G++++ AuO
Reply With Quote
  #5  
Old December 15th, 2002, 12:18 AM
capnq's Avatar

capnq capnq is offline
General
 
Join Date: Feb 2001
Location: Pittsburgh, PA, USA
Posts: 3,070
Thanks: 13
Thanked 9 Times in 8 Posts
capnq is on a distinguished road
Default Re: Mod error

Quote:
I assume it is selecting a world, upgrading it to the start conditons and then placing the facilities on the world. I can't think what could be too large a value there...
Hmm... That sounds like some kind of cumulative effect. Maybe the problem is coming from the combined total production of several of the same facility on one homeworld going over some limit.

Two common integer limits are 255 (2^8-1) and 65535 (2^16-1); the latter seems more likely in this situation.
__________________
Cap'n Q

"Good morning, Pooh Bear," said Eeyore gloomily. "If it is a good morning," he said. "Which I doubt," said he.
Reply With Quote
  #6  
Old December 15th, 2002, 05:56 AM
Krsqk's Avatar

Krsqk Krsqk is offline
Lieutenant Colonel
 
Join Date: Jul 2001
Location: Orlando, FL
Posts: 1,259
Thanks: 0
Thanked 0 Times in 0 Posts
Krsqk is on a distinguished road
Default Re: Mod error

I've had planets producing at least 62K of single resources Last I checked, which was several turns ago. I'll check, but I don't think that's limited.
__________________
The Unpronounceable Krsqk

"Well, sir, at the moment my left processor doesn't know what my right is doing." - Freefall
Reply With Quote
  #7  
Old December 15th, 2002, 06:43 PM
Suicide Junkie's Avatar
Suicide Junkie Suicide Junkie is offline
Shrapnel Fanatic
 
Join Date: Feb 2001
Location: Waterloo, Ontario, Canada
Posts: 11,451
Thanks: 1
Thanked 4 Times in 4 Posts
Suicide Junkie is on a distinguished road
Default Re: Mod error

Mineral Miner 1's (700) x 100% x Sphereworld (200) = 140,000 resources per turn.

People have built sphereworlds, and filled them up before.

The maximum resource production would have to be something like 16 Million (256^3) or 4 Billion (256^4) or (4x10^9)
Reply With Quote
  #8  
Old December 15th, 2002, 09:36 PM
Dan C.'s Avatar

Dan C. Dan C. is offline
Private
 
Join Date: Oct 2002
Location: London, Ont.
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Dan C. is on a distinguished road
Default Re: Mod error

Hmmm, in order to track down this error I took the stock facilities file and put it in place for my mod (after changing all the facility tech requirements to "Hull Constrction x" as the mod has a significantly altered tech tree).

Result? Same error. So what else could it be doing half-way thorough the player placement? I haven't played with planet size or sector type files (or for that matter the sytem/Quadrant data - which would have had a problem during quadrant creation anyways)in fact it has to be one of: CompEnhancement, Components, DefaultColonyTypes, DefaultDesignTypes, DefaultStrategies, Events, (Facility), IntelProjects, RacialTraits, Settings, TechArea or Vechicle size.

I guess I'll have to replace them with the originials one-by-one until I find the culprit...
__________________
-Dan

L++++ GdY $!+ Fr- C--- SdP T!- Sf A M++ Mp! RNSP Pw? Fq Nd Rp G++++ AuO
Reply With Quote
  #9  
Old December 15th, 2002, 11:36 PM
Dan C.'s Avatar

Dan C. Dan C. is offline
Private
 
Join Date: Oct 2002
Location: London, Ont.
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Dan C. is on a distinguished road
Default Re: Mod error

Quote:
Originally posted by Dan C.:

I guess I'll have to replace them with the originials one-by-one until I find the culprit...
There must be something against quoting yourself...
Anyway I finally found the error, and I am explaining this in case anyone else sees this problem.

Replacing the files one-by-one led me to the fact that it was my TechArea.txt file that was in error. So thinking I had some sort of loop I fire up the mod editor by DavidG. So I see that a number of "leads to" techs are not being displayed So noteing that one tech is a prerequisite for 20 techs per level for 3 levels, I am thinking maybe this is the source of my overflow. I reduce the number down to 5 each, and set the other 15 techs to no-prereq, and nope. But I did find a limit in the mod program that it only displays 20 leads to techs... (must be some sort of internal array limit

After much reviewing of the file, dropping pre-reqs, dropping branches of the tree (and all derived components, facilities etc), I see the error. I somehow typed a -1 instead of a 1 for maximum level. This tech was a minor tech (actually Fighter Missiles) not granted at the start of the game, (requiring 7 levels from 3 different techs) but I guess when the program was setting up the initial tech for the players, it hit this level issue and even without the pre-req's it crapped out (better at the beginning than in the middle of a game though). So I don't know why it wasn't caught when the file was initially read in, but there it is.
__________________
-Dan

L++++ GdY $!+ Fr- C--- SdP T!- Sf A M++ Mp! RNSP Pw? Fq Nd Rp G++++ AuO
Reply With Quote
  #10  
Old December 15th, 2002, 11:56 PM
Fyron's Avatar

Fyron Fyron is offline
Shrapnel Fanatic
 
Join Date: Jul 2001
Location: Southern CA, USA
Posts: 18,394
Thanks: 0
Thanked 12 Times in 10 Posts
Fyron is an unknown quantity at this point
Default Re: Mod error

The game must not check techarea.txt very thoroughly when starting up.
__________________
It's not whether you win or lose that counts: it's how much pain you inflict along the way.
--- SpaceEmpires.net --- RSS --- SEnet ModWorks --- SEIV Modding 101 Tutorial
--- Join us in the #SpaceEmpires IRC channel on the Freenode IRC network.
--- Due to restrictively low sig limits, you must visit this link to view the rest of my signature.
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:56 PM.


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