![]() |
Re: Component.txt Knowledge Base
It looks like he wants it to stay the same for several levels, THEN drop 10kt..
|
Re: Component.txt Knowledge Base
That was my impression, but how many levels till the next drop 7? I dont 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! http://forum.shrapnelgames.com/images/smilies/cool.gif |
Re: Component.txt Knowledge Base
DMM is already reserved for Deathstalker's Mount Mod. http://forum.shrapnelgames.com/images/smilies/wink.gif
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)) |
Re: Component.txt Knowledge Base
Quote:
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 http://forum.shrapnelgames.com/images/smilies/happy.gif 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 http://forum.shrapnelgames.com/images/smilies/happy.gif Quote:
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 http://forum.shrapnelgames.com/images/smilies/happy.gif |
Re: Component.txt Knowledge Base
Quote:
Quote:
|
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. |
Re: Component.txt Knowledge Base
Imperator Fyron, you are correct, as I said, my brain isn't what it used to be http://forum.shrapnelgames.com/images/smilies/happy.gif
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:
Thanks. |
Re: Component.txt Knowledge Base
Btw President_Elect_Shang, where do I find the main string?
|
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! http://forum.shrapnelgames.com/images/smilies/happy.gif
|
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 http://forum.shrapnelgames.com/images/smilies/happy.gif
PES works fine for me, just remember, copy and paste is my friend. DM. |
All times are GMT -4. The time now is 10:07 PM. |
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.