![]() |
Assigning negative values to components
There has been some people asking if this could be done. I remember from my days editing Master of Orion 2 data files that negative values for components were acheived using the formula:
65535 + <negative intended value> = the number to use. So if you wanted something that weighed -200 kT then you would do the following: 65535 + (-200) 65535 - 200 = 65335 If you used the 65335 value for the component it would weigh -200 kT in the game. Theoretically. I just tried it myself with SEIV and I ended up with 66 kT component by inputting a 65335 value for the Tonnage Space Taken plus an integer overflow message. It doesn't exactly work, but I'm posting this anyhow in case anybody else would have some insight. Maybe 65535 isn't the number and you gotta try some other exponent of 2. I'm really just taking a shot in the dark on this one. ------------------ |
Re: Assigning negative values to components
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Arc.Smiloid:
There has been some people asking if this could be done. I remember from my days editing Master of Orion 2 data files that negative values for components were acheived using the formula: 65535 + <negative intended value> = the number to use. So if you wanted something that weighed -200 kT then you would do the following: 65535 + (-200) 65535 - 200 = 65335 If you used the 65335 value for the component it would weigh -200 kT in the game. <HR></BLOCKQUOTE> this should work if SE4 uses 16 bit signed numbers. my guess is 32 bit signed numbers are used, but that wouldn't explain why you would a 66 kt component, and if 8 bit numbers were used you would get a -73kt component, not sure about that one. i think i'll try this tonight. i assume you did try to just enter -200 in the txt file right? http://www.shrapnelgames.com/ubb/images/icons/icon7.gif ooh, i just made corporal http://www.shrapnelgames.com/ubb/images/icons/icon7.gif [This message has been edited by LemmyM (edited 23 May 2001).] |
Re: Assigning negative values to components
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by LemmyM:
my guess is 32 bit signed numbers are used, but that wouldn't explain why you would a 66 kt component, and if 8 bit numbers were used you would get a -73kt component, not sure about that one.<HR></BLOCKQUOTE> Wouldn't a 65335 ton component get rounded up to 66kT? ISTR that's how other large items work... I think the Pirates & Nomads mod used some negative values (as a way to generate resources on ships)... |
Re: Assigning negative values to components
Actually, I just used a very large number in a "reduction" ability.
|
All times are GMT -4. The time now is 07:15 PM. |
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.