.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 > SEV Modders Knowledge Base

Reply
 
Thread Tools Display Modes
  #1  
Old October 14th, 2006, 01:35 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

Wait no; I just don’t get that line. What is it doing? I read the description earlier but it makes no sense. For example:

0 – ([%Range%] * .5)

Is this saying that at range 50 I lose x accuracy? What value is x and how can I change it?

Can I make a weapon that will have the following hit probability?

Range : 0 – 10 – 20 – 30 – 40 – 50 – 60 – 70 – 80 – 90 – 100
% to hit: 90 – 90 – 90 – 80 – 80 – 80 – 70 – 60 – 50 – 30 – 10
__________________
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
  #2  
Old October 14th, 2006, 01:45 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

That line is sayng that you'll lose 0.5% of accuracy per LS of distance. So at 50 LS you'll have a -25% modifier. You change the X by changing .5 to something else, or inputing a different forumla.

Doing that line won't be easy and it won't be short- you'll need lots of tested ifs.
__________________
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
  #3  
Old October 14th, 2006, 02:18 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

The final forumla, or one way of doing it, looks like this:
0 - iif([%Range%] < 30, 10, iif([%Range%] < 60, 20, iif([%Range%] < 80, (30 + ([%Range%] - 60)), (50 + (([%Range%] - 80) * 2)))))

Just a bit messy. Most forumlas will not be anywhere NEAR this complicated, you just happened to pick a difficult one to do.

Here's the breakdown..
Code:

0 -
iif([%Range%] < 30, 10,
iif([%Range%] < 60, 20,
iif([%Range%] < 80, (30 + ([%Range%] - 60)),
(50 + (([%Range%] - 80) * 2)))))



First, a little note: %RANGE% is a variable- it is whatever the current range to the target is. If he's at 50ls its 50, if he's at 10ls its 10, 5 at 5ls, etc.

First line: 0 is just there to make the rest of the numbers negative by using the following - sign. The base to-hit in SE5 is 100%, so what this means is "100% - the result of the following formula" (call that X).

Second line: iif is an if/then statement. The format is iif(value (sign), (then), else). This says IF the range is less than 30, THEN X is 10. ELSE it runs the next IF statement. Why 30? Because that's where your values start to change from that flat -10% chance. Same with all of the breakpoints below- the value checked for is the value where the result changes.

Third line: Same thing. IF the range is less than 60, THEN x is 20. ELSE it runs the next IF statement.

Fourth line: Last if/then. This one says IF the range is less than 80, THEN run the formula (30 + ([%Range%] - 60) and set X to that. If not run the formula (50 + (([%Range%] - 80) and set X to that.

The tricky part is keeping all the blasted parathesis straight..

Elsemeravin: you've got it pretty much right. By default all SE5 weapons hit all the time; unless there's some negative number in the to-hit field you'll never miss.
__________________
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 October 14th, 2006, 08:23 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

Ok now I understand and I have to say that formula is a work of beauty. I printed it out as a guide for future formulas. One more question and I think I will be up to par with range.

Let’s say for example that I want to hit a target at range 30 for -20 (80% accuracy). When I set up my formula wouldn’t I want to write the formula for:

Greater than or equal to 21 and less than or equal to 30.

If I don’t explicitly restrict the range I want that one accuracy percent at won’t SE spill it over to the next range IF the next range is undefined? One more time using the example formula you gave; SE will apply the -10 to hit on all ranges from 0 to 30 since your formula said <30 correct?

New question I was reading an earlier post in this thread I came to the impression SE does all ranges in 10’s; which I assume is what you are calling 10 LS, by default. You can change the max range but the base 10’s is programmed. What is the max range; 290 LS?
__________________
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
  #5  
Old October 14th, 2006, 01:12 PM
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

President_Elect_Shang said:
SE will apply the -10 to hit on all ranges from 0 to 30 since your formula said <30 correct?


Actually, it will apply -10 from ranges 0 to 29. At range 30, you get -20. That is what your chart asked for, right? If it said "<= 30", it would be -10 from 0 to 30 instead.

New question I was reading an earlier post in this thread I came to the impression SE does all ranges in 10’s

No, it does not. Range has a degree of 1, not 10. Actual damage done will be whatever is calculated at the exact range, for example. The damage charts for component display only display every 10 ls because it would be insane to try to show every 1 LS. Also, I think Aaron didn't want to confuse new players by showing the actual formulas.
__________________
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 October 14th, 2006, 06:47 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:
Imperator Fyron said:
No, it does not. Range has a degree of 1, not 10. Actual damage done will be whatever is calculated at the exact range, for example. The damage charts for component display only display every 10 ls because it would be insane to try to show every 1 LS.
So what value will it display per each 10 LS, if there are different values from 1-10 etc...?
Reply With Quote
  #7  
Old October 14th, 2006, 07:05 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: Modding SEV Thread Questions

The value AT range 10, 20, etc I believe.

http://imagemodserver.mine.nu/other/...angeLister.zip
Reply With Quote
  #8  
Old October 14th, 2006, 07:08 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

It displays the value AT ten.

As for the forumla..

iff %range% <=10 ,30,iff %range% <=40 , 20,iff %range% <=120,10,0

aside from the formating, that should work. The spaces have to be in the proper spot and you're missing ( and ) marks as well as the [ around %range%
iff([%range%] <= 10, 30, iff([%range%] <= 40, 20, iff( [%range%] <= 120, 10, 0))) should work.

EDIT:
>=121, 10000, 0
The >= is for the cut off point.
The 10000 is to change all damage to 0 past that point.
I have no idea why the last 0 is in there(?).

You set the range limit in the DAMAGE forumla, not the to hit formula. EDIT2: and that's what you did. Oops. Anyway, despite SJ's protest 10000 works fine in that role.

Even if the to-hit is -99999, a ship will still fire and waste supplies, and the "max range" strategy will use that to determine its range.

The second 0 is the ELSE part of the statement; its what the formula uses if the range isn't above 120.
__________________
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 October 14th, 2006, 02:38 PM
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

Quote:
Phoenix-D said:
The final forumla, or one way of doing it, looks like this:
0 - iif([%Range%] < 30, 10, iif([%Range%] < 60, 20, iif([%Range%] < 80, (30 + ([%Range%] - 60)), (50 + (([%Range%] - 80) * 2)))))
In the case of the example I gave below couldn’t I do something like:

0- iif ([%Range%] <30, 10, iif ([%Range%] <60, 20, iif ([%Range%] <70, 30, iif ([%Range%] <80, 40, iif ([%Range%] <90, 50, iif ([%Range%] <100, 70, iif ([%Range%] <110, 90)))))))
__________________
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
  #10  
Old October 14th, 2006, 02:48 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

Looks ok to me.
__________________
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
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 11:18 AM.


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