|
|
|
|
 |
|

September 19th, 2006, 12:22 AM
|
 |
Shrapnel Fanatic
|
|
Join Date: Jul 2001
Location: Southern CA, USA
Posts: 18,394
Thanks: 0
Thanked 12 Times in 10 Posts
|
|
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.
|

September 19th, 2006, 12:29 AM
|
|
Sergeant
|
|
Join Date: Mar 2006
Location: NS, Canada
Posts: 300
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: Modding SEV Thread Questions
My head hurts...
|

September 19th, 2006, 12:34 AM
|
|
National Security Advisor
|
|
Join Date: Nov 2000
Posts: 5,085
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|

September 19th, 2006, 12:52 AM
|
 |
National Security Advisor
|
|
Join Date: Oct 2001
Location: Toronto, Canada
Posts: 5,624
Thanks: 1
Thanked 14 Times in 12 Posts
|
|
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?
|

September 19th, 2006, 12:54 AM
|
 |
Shrapnel Fanatic
|
|
Join Date: Jul 2001
Location: Southern CA, USA
Posts: 18,394
Thanks: 0
Thanked 12 Times in 10 Posts
|
|
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
|

September 19th, 2006, 12:57 AM
|
|
Sergeant
|
|
Join Date: Mar 2006
Location: NS, Canada
Posts: 300
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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* 
|

September 19th, 2006, 01:12 AM
|
 |
Shrapnel Fanatic
|
|
Join Date: Jul 2001
Location: Southern CA, USA
Posts: 18,394
Thanks: 0
Thanked 12 Times in 10 Posts
|
|
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
|

September 19th, 2006, 01:22 AM
|
|
National Security Advisor
|
|
Join Date: Nov 2000
Posts: 5,085
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|

December 19th, 2006, 02:00 AM
|
|
Private
|
|
Join Date: Dec 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|

December 19th, 2006, 03:30 AM
|
 |
Brigadier General
|
|
Join Date: Nov 2001
Location: WA
Posts: 1,894
Thanks: 5
Thanked 3 Times in 3 Posts
|
|
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
|
| Thread Tools |
|
|
| Display Modes |
Hybrid Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is On
|
|
|
|
|