.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
  #31  
Old December 4th, 2006, 04:05 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: Component.txt Knowledge Base

It looks like he wants it to stay the same for several levels, THEN drop 10kt..
__________________
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
  #32  
Old December 4th, 2006, 04:18 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: Component.txt Knowledge Base

That was my impression, but how many levels till the next drop 7? I don�t know why he is dividing level minus one by seven or what the int is for. Maybe he is thinking he has to tell SE5 it is an integer before he declares it? Integer or Intelligence?

Thank you for helping out Imperator Fyron. Is that what you were looking for DeadMilkMan? I dub thee DMM!
__________________
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
  #33  
Old December 4th, 2006, 11:16 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: Component.txt Knowledge Base

DMM is already reserved for Deathstalker's Mount Mod.

Ah, drop after several levels. Gotcha. Here is a horrible way to do it:

Note the if-else function:

iif(cond, A, B)

This means, if cond is true, return A. Else, return B. You can naturally put other functions in for A and/or B.

Now to apply it:

40 - iif([%Level%] >= 5, 20, iif([%Level] >= 3, 10, 0))

This will make it:

L1: 40
L2: 40
L3: 30
L4: 30
L5: 20
L6: 20
L7: 20
...


Hmm... a possibly less crazy way that gets the same progression:

iif([%Level] >= 5, 20, iif([%Level%] >= 3, 30, 40))

Or, as a purely aesthetic issue, if you want to see decreasing sizes, just invert:

iif([%Level] < 3, 40, iif([%Level%] < 5, 30, 20))
__________________
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
  #34  
Old December 5th, 2006, 12:05 AM
DeadMilkman's Avatar

DeadMilkman DeadMilkman is offline
Private
 
Join Date: Dec 2006
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
DeadMilkman is on a distinguished road
Default Re: Component.txt Knowledge Base

Quote:
President_Elect_Shang said:

Your question is a little confusing; before I can answer let me make sure I know what you want to do. You want the Master Computer to go up every level but you want the space taken to go down by 10kt every seven levels? Or do you want it to go down every level? What does the &#8220;int&#8221; you are using in your formula mean; Intelligence?

If you want it to go down every level than use: (40 &#8211; ([%Level%] * 10) but once you hit level 4 you will have a 0 ton component. You see why I am asking now?
You were correct that I wish the space taken to go down approximately every seven levels (although that number is somewhat arbitrary).

The "int()" in the formula should be an integer function, assuming that Aaron has programmed the formulas to follow standard coding practice. Which I would think he would since he is in fact a programmer

The integer function should drop anything after the decimal point, but this does not seem to be working. I was hoping maybe the trunc() function may be something similar, but it also does not seem to work.

The reason for this is if the decimal is not truncated, the value returned would not go in increments of 10Kt, but instead in smaller increments equal to the rounded value of the decimal. Which is unfortunately what it seems to be doing anyways

Quote:
Imperator Fyron said:
Erm... what is wrong with just:

40 - (([%Level%] - 1) * 10)

(excessive parenthesis cause I still don't trust SE5's order of operations...)

If that doesn't produce the desired results, you have found a bug and should report it to se5 at malfador.com (with as simple a data file as you can send).
Nothing really wrong with that formula, I just wanted it to go in increments of 10, instead of incremints of 1, which yours does.

It is no big deal really, I am just trying to get a hang of the formulas in SEV. I actually just suspect that it is a bug, and will email it in.


DOH, didnt notice that this thread was already 3 pages long, so missed some replys there.

Phoenix D basically has the idea, Imperator Fyron , that solution should work fine, I just hate nesting IIF's if avoidable, I always end up messing those up.

I put the -1 in the formula at some point because I kept getting into negative Kt otherwise (this is using the formula helper on the SEV editor).

As I said, I mainly posted the question because I suspect the INT() formula is not working as it should.

Of course it is entirely possible that I just dont remeber how int functions are supposed to work, considering my normal brain function
__________________
It's not what you know...
It's not who you know...
It's what you know about who you know.
Reply With Quote
  #35  
Old December 5th, 2006, 01:47 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: Component.txt Knowledge Base

Quote:
DeadMilkman said:
Nothing really wrong with that formula, I just wanted it to go in increments of 10, instead of incremints of 1, which yours does.
Huh? How does the level * 10 bit not go in increments of 10?

Quote:
Of course it is entirely possible that I just dont remeber how int functions are supposed to work, considering my normal brain function
I'd consider it more likely that there is no such function in SEV land. Or if there is, it was never tested...
__________________
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
  #36  
Old December 5th, 2006, 02:11 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: Component.txt Knowledge Base

Actually int is one of the functions called from the main string. Thus far everything I have tried from the main string works; once I figured how to use it that is. Now I am not saying everything there works, just that the ones I have used have all worked. Another possibility is that int works but not with components.

Hay DeadMilkMan, did you try �int()� or �Int()� because int is nothing to SE5 but Int() [notice the capital I] means round toward zero I believe. Round() should round off to the nearest whole number if that is what you want.
__________________
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
  #37  
Old December 5th, 2006, 08:26 PM
DeadMilkman's Avatar

DeadMilkman DeadMilkman is offline
Private
 
Join Date: Dec 2006
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
DeadMilkman is on a distinguished road
Default Re: Component.txt Knowledge Base

Imperator Fyron, you are correct, as I said, my brain isn't what it used to be
The formula you suggest would cause a 10kt drop in space every level, which would make the component 0kt at level 5, and then it would go into negatives after that. The reason I divided it by 7 is it would spread the reduced component size across the 20 research levels at roughly 1/3 intervals ending with a final component size of 20Kt, although I am considering dividing it by 6 instead which theoretically would cause levels 19 and 20 to result in a 10Kt component.

Quote:
President_Elect_Shang said:
Actually int is one of the functions called from the main string. Thus far everything I have tried from the main string works; once I figured how to use it that is. Now I am not saying everything there works, just that the ones I have used have all worked. Another possibility is that int works but not with components.

Hay DeadMilkMan, did you try &#8220;int()&#8221; or &#8220;Int()&#8221; because int is nothing to SE5 but Int() [notice the capital I] means round toward zero I believe. Round() should round off to the nearest whole number if that is what you want.
Nope, I've only tried int not Int, will give it a shot when I get a chance, round may work fine too, will check it out.

Thanks.
__________________
It's not what you know...
It's not who you know...
It's what you know about who you know.
Reply With Quote
  #38  
Old December 5th, 2006, 08:28 PM
DeadMilkman's Avatar

DeadMilkman DeadMilkman is offline
Private
 
Join Date: Dec 2006
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
DeadMilkman is on a distinguished road
Default Re: Component.txt Knowledge Base

Btw President_Elect_Shang, where do I find the main string?
__________________
It's not what you know...
It's not who you know...
It's what you know about who you know.
Reply With Quote
  #39  
Old December 5th, 2006, 08:43 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: Component.txt Knowledge Base

MainString.txt is one of the files in the same directory as the component file you are modding. Please remember to make a backup copy of any file you are going to mod before you mod it. Any you can just call me PES, much easier!
__________________
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
  #40  
Old December 5th, 2006, 10:13 PM
DeadMilkman's Avatar

DeadMilkman DeadMilkman is offline
Private
 
Join Date: Dec 2006
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
DeadMilkman is on a distinguished road
Default Re: Component.txt Knowledge Base

Thanks for the info, I use a mod directory for my playing around so as not to mess up my game

PES works fine for me, just remember, copy and paste is my friend.

DM.
__________________
It's not what you know...
It's not who you know...
It's what you know about who you know.
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 09:56 AM.


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