.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 May 23rd, 2001, 06:44 AM

Arc.Smiloid Arc.Smiloid is offline
Private
 
Join Date: Nov 2000
Location: Edmoton, AB, CA
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Arc.Smiloid is on a distinguished road
Default 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.

------------------
Reply With Quote
  #2  
Old May 23rd, 2001, 10:10 AM

Lemmy Lemmy is offline
Second Lieutenant
 
Join Date: Mar 2001
Location: Netherlands
Posts: 479
Thanks: 0
Thanked 0 Times in 0 Posts
Lemmy is on a distinguished road
Default Re: Assigning negative values to components

quote:
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.



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?


ooh, i just made corporal

[This message has been edited by LemmyM (edited 23 May 2001).]
__________________
[Boo!]
Reply With Quote
  #3  
Old May 23rd, 2001, 05:51 PM
DirectorTsaarx's Avatar

DirectorTsaarx DirectorTsaarx is offline
Major
 
Join Date: Dec 2000
Location: Northern Virginia, USA
Posts: 1,048
Thanks: 0
Thanked 0 Times in 0 Posts
DirectorTsaarx is on a distinguished road
Default Re: Assigning negative values to components

quote:
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.


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)...
__________________
L++ Se+++ GdY $++ Fr C+++ Csc Sf Ai AuO M+ MpTM S Ss RRSHP+ Pw- Fq-&gt;Fq+ Nd+++ Rp G++ Mm++ Bb---
Reply With Quote
  #4  
Old May 23rd, 2001, 06:00 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: Assigning negative values to components

Actually, I just used a very large number in a "reduction" ability.
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 07:22 PM.


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