|
|
|
 |

October 1st, 2006, 11:31 PM
|
 |
Sergeant
|
|
Join Date: Nov 2000
Location: USA
Posts: 368
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: SE5 - Mod Out LCX as Early Warship
Well, maybe a wiki guide will be created to help better explain how to code this. I just don't get the formulas. I'm sure they are good I just need a tutorial.
|

October 1st, 2006, 11:44 PM
|
National Security Advisor
|
|
Join Date: Nov 2000
Posts: 5,085
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: SE5 - Mod Out LCX as Early Warship
The formulas are easier if you break them down. They're a MESS by default because they have to be crammed onto one line.
A simple one:
Cost Minerals Formula :=
4000 + (([%Level%] - 1) * 40)
The cost starts out at 4000.
%Level% is a variable, it kicks out whatever the component's current level is. Then this subtracts 1 from that and multiplies the result by 40.
In other words- it increases the cost by 40 per level.
The weapons are a bit more complicated. Here's the anti-proton beam.
(20 + (([%Level%] - 1) * 5)) - (([%Range%] / 10) * 1.67) - iif([%Range%] > Min(90, (([%Level%] - 1) * 10) + 30), 10000, 0)
Breaking it down, this part:
(20 + (([%Level%] - 1) * 5)) - (([%Range%] / 10) * 1.67)
sets the damage.
(20 + (([%Level%] - 1) * 5)
works the same way as the cost function above.
- (([%Range%] / 10) * 1.67)
%Range% is another variable- the current range. This part divides it by 10, then multiples the result by 1.67. So for every 10 units of range, the beam loses 1.67 points of damage.
Now comes the weird part.
iif([%Range%] > Min(90, (([%Level%] - 1) * 10) + 30), 10000, 0)
Ok, what this is is a really convulted way of limited the maximum range.
iif is an if/then statement. What this says is:
IF the range is greater than X, subject 10000 from the damage. If the range is NOT greater than 90, do nothing.
X is defined by the Min(90, (([%Level%] - 1) statement. Min is Minimum. So it takes either 90 or ten times the level minus 1, whichever is LESS, and caps the range at that.
There will apparently be a full list of variables and such with the full game; I imagine the wiki will get more forumla information then. As long as you can keep your ( math straight it isn't complicated, just a bit tedius to puzzle through.
__________________
Phoenix-D
I am not senile. I just talk to myself because the rest of you don't provide adequate conversation.
- Digger
|

October 2nd, 2006, 12:51 AM
|
 |
Shrapnel Fanatic
|
|
Join Date: Jul 2001
Location: Southern CA, USA
Posts: 18,394
Thanks: 0
Thanked 12 Times in 10 Posts
|
|
Re: SE5 - Mod Out LCX as Early Warship
thorfrog said:
Well, maybe a wiki guide will be created to help better explain how to code this.
Good idea. I've created a basic framework for SE5 modding in the wiki. People should fill it in as they go along, with whatever they learn about each file.
http://wiki.spaceempires.net/index.p...ials_%28SEV%29
|

October 8th, 2006, 04:39 PM
|
National Security Advisor
|
|
Join Date: Nov 2000
Posts: 5,085
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: SE5 - Mod Out LCX as Early Warship
On the actual requirement:
Requirement 8 Formula := Get_Design_Ability_Percentage_Of_Hull_Space("AI Tag 01", 1) <= 10
What's the , 1 after "AI Tag 01" for? I don't see it in any other requirement.
__________________
Phoenix-D
I am not senile. I just talk to myself because the rest of you don't provide adequate conversation.
- Digger
|

October 8th, 2006, 05:47 PM
|
 |
Shrapnel Fanatic
|
|
Join Date: Jul 2001
Location: Southern CA, USA
Posts: 18,394
Thanks: 0
Thanked 12 Times in 10 Posts
|
|
Re: SE5 - Mod Out LCX as Early Warship
It is looking at type of the ability, I surmise. Witness:
Requirement 7 Formula := Get_Design_Ability_Percentage_Of_Hull_Space("Units - Launch", "Fighter") >= 50
This is looking for the Units - Launch ability, of type Fighter.
Looking at fighter bay:
Ability 1 Type := Units - Launch
Ability 1 Amount 1 Formula := "Fighter"
The second parameter of the req formula matches the ability amount 1 value. Maybe 1 just means "true," to match anything with the ability?
|
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
|
|
|
|
|