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

This Month's Specials

winSPMBT: Main Battle Tank- Save $6.00
winSPWW2- 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 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
  #2  
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
  #3  
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
  #4  
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,624
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
  #5  
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
  #6  
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
  #7  
Old September 19th, 2006, 01:12 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

I have uploaded a better version that uses number boxes instead of text boxes. I set the limits to 1000, figuring only a totally crazy person would go that high...

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
  #8  
Old September 19th, 2006, 01:22 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

Except now you can't put in exponents, etc.
__________________
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
  #9  
Old December 19th, 2006, 02:00 AM

Zed Zed is offline
Private
 
Join Date: Dec 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Zed is on a distinguished road
Default Re: Modding SEV Thread Questions

AI not Colonizing

When starting a game that allows colonization of breathable planets only, the AI doesn't colonize a single planet more than what they have at the start of the game.

I have tried to find why the colony ships are skipped when the construction queues are being set up, but haven't been successful.

Is this a bug that has to be patched, or can it be fixed via a mod?

Zed
Reply With Quote
  #10  
Old December 19th, 2006, 03:30 AM
President_Elect_Shang's Avatar

President_Elect_Shang President_Elect_Shang is offline
Brigadier General
 
Join Date: Nov 2001
Location: WA
Posts: 1,894
Thanks: 5
Thanked 3 Times in 3 Posts
President_Elect_Shang is on a distinguished road
Default Re: Modding SEV Thread Questions

Here is the link to the copy and paste of your question here

Quote:
Zed said:
AI not Colonizing

When starting a game that allows colonization of breathable planets only, the AI doesn't colonize a single planet more than what they have at the start of the game.

I have tried to find why the colony ships are skipped when the construction queues are being set up, but haven't been successful.

Is this a bug that has to be patched, or can it be fixed via a mod?

Zed
Good question and I am not sure if it is a bug. I am going to copy and paste this into the main forum since it isn’t really a question about modding. I suspect it has to do with the AI not being able to remember things once out of sight. In other words what I suspect is that the AI sees a planet it can colonize, moves out of range, and then forgets before it has even had the chance to send build orders to the queue.
__________________
President Elect Shang; Tal-Re Republic of Free Worlds
Welcome to Super Vegeta’s Big Bang Attack… Welcome to OBLIVION!
“Don Panoz made an awesome car and… an incinerator” Bill Auberlen
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 06:21 PM.


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