.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 > Shrapnel Community > Space Empires: IV & V > SEV Modders Knowledge Base

Reply
 
Thread Tools Display Modes
  #1  
Old September 18th, 2006, 10:38 PM

StarShadow StarShadow is offline
Sergeant
 
Join Date: Mar 2006
Location: NS, Canada
Posts: 300
Thanks: 0
Thanked 0 Times in 0 Posts
StarShadow is on a distinguished road
Default Re: Modding SEV Thread Questions

Translastion (please correct me if I'm wrong)

Assume a level 1 weapon..

damage = (5 + (1 - 1) * 2) = 10 (with 0 damage past range 30)

The damage I have almost no trouble with, but I'm not too sure of anything after the 'iif' statement.
Reply With Quote
  #2  
Old September 19th, 2006, 12:22 AM
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: Modding SEV Thread Questions

The given formula is for a weapon without any range attenuation, so I will instead use this one:

Weapon Space Min Damage Modifier Formula := (55 + (([%Level%] - 1) * 5)) - (([%Range%] / 10) * 5) - iif([%Range%] > Min(90, (([%Level%] - 1) * 4) + 50), 10000, 0)

=0=

iff(CONDITION, a, b) means:

If CONDITION is true, do a. Otherwise, do b. It is a messy way to put:

if (CONDITION) {
do a
}
else {
do b
}

Sadly, it is the only way to do that when your entire "formula" has to fit on a single line.

Min(x, y) is a function that returns whichever value is smaller, x or y.

=0=

Now to look at the formula:

(55 + (([%Level%] - 1) * 5)) - (([%Range%] / 10) * 5) - iif([%Range%] > Min(90, (([%Level%] - 1) * 4) + 50), 10000, 0)

The first part is pretty straightforward:
(55 + (([%Level%] - 1) * 5))

This evaluates to 5 plus 2 times one less than component level. This part is the base damage value, the damage at range 0.

The next part is the damage attenuation rate (aka: damage reduction over range).

- (([%Range%] / 10) * 5)

For every 10 units of distance, subtract 5 damage.

The last part, the big iff, is the max range setting.

- iif([%Range%] > Min(90, (([%Level%] - 1) * 4) + 50), 10000, 0)

In this case, we have:

CONDITION = [%Range%] > Min(90, (([%Level%] - 1) * 4) + 50)
a = 10000
b = 0

When the range to the target gets larger than a certain value, 10000 will be subtracted from the damage value. This effectively cuts off damage at that range, due to negative value handling.

The CONDITION is the part that is determining the max range; it is the minimum of 90 or (([%Level%] - 1) * 4) + 50). Thus, every instance of the weapon will have at most a range of 90. The second value that we compare 90 to is the range increase via tech levels. It is 50 plus 4 times one less than the level of the component. Isn't that nice wording? hehe.

This breaks out to the following ranges at tech levels:

1: 50 + 0 = 50
2: 50 + 4 = 54
3: 50 + 8 = 58
4: 50 + 12 = 62
5: 50 + 16 = 66
...
10: 50 + 40 = 90
11: 50 + 44 = 94

Note that level 11 gets a value greater than 90, so the Min function call forces the max range down to 90.
__________________
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
  #3  
Old September 19th, 2006, 12:29 AM

StarShadow StarShadow is offline
Sergeant
 
Join Date: Mar 2006
Location: NS, Canada
Posts: 300
Thanks: 0
Thanked 0 Times in 0 Posts
StarShadow is on a distinguished road
Default Re: Modding SEV Thread Questions

My head hurts...
Reply With Quote
  #4  
Old September 19th, 2006, 12:34 AM

Phoenix-D Phoenix-D is offline
National Security Advisor
 
Join Date: Nov 2000
Posts: 5,085
Thanks: 0
Thanked 0 Times in 0 Posts
Phoenix-D is on a distinguished road
Default Re: Modding SEV Thread Questions

Would this be a bad time to point out that as weapon forumlas go, that's going to be on the SIMPLE end?
__________________
Phoenix-D

I am not senile. I just talk to myself because the rest of you don't provide adequate conversation.
-Digger
Reply With Quote
  #5  
Old September 19th, 2006, 12:52 AM
Captain Kwok's Avatar

Captain Kwok Captain Kwok is offline
National Security Advisor
 
Join Date: Oct 2001
Location: Toronto, Canada
Posts: 5,623
Thanks: 1
Thanked 14 Times in 12 Posts
Captain Kwok is on a distinguished road
Default Re: Modding SEV Thread Questions

There's actually a number of different ways to construct the formula for the case Fyron used as an example, but when you're sticking in the level and range variables, it always looks messy. But really it's easy. There's the default damage value and the amount that it increases per level; the attenuation; and lastly the range.

----

Bearclaw - There are files that describe the abilities etc., but I think they're only partially complete at this time.

----

Are there any overarching scaling factors for building prices and maintenance somewhere in the text files? - From your examples, instead of doubling build rates, why not just make maint even less like 1/12 or 1/16?
__________________
Space Empires Depot | SE:V Balance Mod
Reply With Quote
  #6  
Old September 19th, 2006, 12:54 AM
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: Modding SEV Thread Questions

How about a quick and dirty formula builder app? It requires .NET Framework 2.0.

http://www.spaceempires.net/files/te...mg_builder.zip
__________________
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
  #7  
Old September 19th, 2006, 12:57 AM

StarShadow StarShadow is offline
Sergeant
 
Join Date: Mar 2006
Location: NS, Canada
Posts: 300
Thanks: 0
Thanked 0 Times in 0 Posts
StarShadow is on a distinguished road
Default Re: Modding SEV Thread Questions

Oh sure...you give me a headache THEN you go and release a simpler way...*takes 2 advil and glares at the screen*
Reply With Quote
  #8  
Old October 11th, 2006, 06:29 PM

Baron Munchausen Baron Munchausen is offline
General
 
Join Date: Aug 2000
Location: Ohio, USA
Posts: 4,323
Thanks: 0
Thanked 0 Times in 0 Posts
Baron Munchausen is on a distinguished road
Default Re: Modding SEV Thread Questions

Quote:
StarShadow said:
My head hurts...
Here, this will make your head hurt a little more. It is possible to get tech levels from other fields than what the weapon (or other component) itself requires. For example, I like to link seeker structure to Armor tech, and defense modifier to Defense (ECM) tech.

Weapon Seeker Tonnage Structure Formula := 30 + (Get_Empire_Tech_Level("Armor") * 2)
Weapon Seeker Defense Modifier Formula := 30 + (Get_Empire_Tech_Level("Defense Systems") * 2)

A little more tweaking (such as linking damage to warhead tech or linking seeker speed to engine tech, which is tricky with each engine type being a seperate tech now) and you could have missile launchers as a stand-alone tech and missile performance being completely independent of them. In this case, I am tempted to put missile launchers into an industrial tech field because they are a sort of 'automation' technology. Missile launchers could get smaller and/or faster as tech increases, but the actual missiles would be better as soon as your propulsion or armor or ECM tech improved. Mod the ordnance storage out of the launcher and you've got a missile system ready for an "Honor Harrington" mod.
Reply With Quote
  #9  
Old October 11th, 2006, 06:32 PM

Phoenix-D Phoenix-D is offline
National Security Advisor
 
Join Date: Nov 2000
Posts: 5,085
Thanks: 0
Thanked 0 Times in 0 Posts
Phoenix-D is on a distinguished road
Default Re: Modding SEV Thread Questions

the tricky part is making this all obvious to the player, and balancing it!
__________________
Phoenix-D

I am not senile. I just talk to myself because the rest of you don't provide adequate conversation.
-Digger
Reply With Quote
  #10  
Old October 11th, 2006, 07:35 PM
Kana's Avatar

Kana Kana is offline
Captain
 
Join Date: Apr 2004
Location: Texas
Posts: 962
Thanks: 0
Thanked 3 Times in 3 Posts
Kana is on a distinguished road
Default Re: Modding SEV Thread Questions

Quote:
Baron Munchausen said:
Here, this will make your head hurt a little more. It is possible to get tech levels from other fields than what the weapon (or other component) itself requires. For example, I like to link seeker structure to Armor tech, and defense modifier to Defense (ECM) tech.

Weapon Seeker Tonnage Structure Formula := 30 + (Get_Empire_Tech_Level("Armor") * 2)
Weapon Seeker Defense Modifier Formula := 30 + (Get_Empire_Tech_Level("Defense Systems") * 2)

A little more tweaking (such as linking damage to warhead tech or linking seeker speed to engine tech, which is tricky with each engine type being a seperate tech now) and you could have missile launchers as a stand-alone tech and missile performance being completely independent of them. In this case, I am tempted to put missile launchers into an industrial tech field because they are a sort of 'automation' technology. Missile launchers could get smaller and/or faster as tech increases, but the actual missiles would be better as soon as your propulsion or armor or ECM tech improved. Mod the ordnance storage out of the launcher and you've got a missile system ready for an "Honor Harrington" mod.
Absolutely brilliant...mind if I rip it off?

I'm planning on an HH mod, and and SFB mod, and this will help tons...

Also I hope some industrious persons start adding this to the modding section of the wiki...
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 09:29 AM.


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