![]() |
Component.txt Knowledge Base
Has anyone else experienced this problem: In the Research Window the icon (mini pic) next to the name of the tech area is working. The icon (mini pic) in the “Expected Results” at the top of the same window is not showing the component that will be developed next. If you click on the tech area it lists the component though. Does anyone know why this is happening and what the fix is?
EDITED IN: I edited this thread with the intent that ONLY questions and solutions to problems for the Components.txt be posted here. This thread may jump around some as I intend to quote from other threads to here. |
Component.txt Knowledge Base
I figured out what the problem was. It has to do with me using duel requirements. To get the component pic to show up I had to change the Requirements Evaluation Availability to the number of the controlling requirement. In the example from my component the tech area “C&C” is the controller and the tech area “High Tech” is the restrictor so the controller can not be researched until the restrictor has been satisfied.
Number Of Requirements:= 2 Requirements Evaluation Availability:= 1 Requirements Evaluation Allows Placement:= TRUE Requirements Evaluation Allows Usage:= TRUE Requirement 1 Description:= Empire must have achieved C&C tech level 1. Requirement 1 Formula:= (Get_Empire_Tech_Level("C&C") = 1) AND (Get_Empire_Tech_Level("C&C") < 2) Requirement 2 Description:= Empire must have achieved High Tech level 1. Requirement 2 Formula:= Get_Empire_Tech_Level("High Tech") >= 1 |
Re: Component.txt Knowledge Base
You realize that setup will completely ignore the second requirement, right?
Also, if you don't use [%Level%] in at least one requirement the component will jump straight to the maximum level. |
Re: Component.txt Knowledge Base
I have to disagree with you, testing has given me other results. In fact I have been testing this successfully with six self-run test empires for over 40 turns. I have even researched and replaced this very component with no other flaws than getting the pic of it to appear in the expected results portion of the research window. The only change I made to get the pic to appear is changing the Requirements Evaluation Availability from “AND” to “1”. It is restricting the component until both are satisfied and since this is not a generational component (there is only 1 level which is phased out for another component) I don’t even have the possibility of having the max level problem.
|
Re: Component.txt Knowledge Base
PE Shang, I tried this setup but it didn't work...
|
Re: Component.txt Knowledge Base
Did you take Empire C&C to level 2 or higher when you did that test?
|
Re: Component.txt Knowledge Base
Quote:
|
Re: Component.txt Knowledge Base
lol where is the old se4 system when you need.........
That right it is in the se4 folder...... |
Re: Component.txt Knowledge Base
It shouldn't be a difficult fix for Aaron - all the pending techs are displayed when you right click on the area you're researching...
|
Re: Component.txt Knowledge Base
I noticed that the right click was working too. I wasn’t thinking it might be a fix that Aaron needed and instead thought it was a mistake I had made. The part I can’t figure is how I got the darn thing to work for 40 turns. I was using a save game so there was my mistake! So you feel that is something Aaron has to fix? Which of us should contact him and request it; both maybe?
|
Re: Component.txt Knowledge Base
It has been reported before - but some fresh e-mails might stimulate a fix.
|
Re: Component.txt Knowledge Base
Now I can’t get the generations to work? Is this something that just happened with the latest patch?
|
Re: Component.txt Knowledge Base
Generational components do not work at all! I set this up:
Number Of Requirements := 1 Requirements Evaluation Availability := AND Requirements Evaluation Allows Placement := TRUE Requirements Evaluation Allows Usage := TRUE Requirement 1 Description := Empire must have achieved C&C Tech level 1. Requirement 1 Formula := (Get_Empire_Tech_Level("C&C") <= 1) So if C&C is above tech level 1 this component should not appear in the component list. It is listed. I can’t speak for any other mods but if this doesn’t get fixed my hopes of finally creating this mod are done. I am feeling very depressed about all of this right about now! Edited in: The components will phase out as they are supposed to; however, the only way I managed to get them to work correctly was to save the game then reload it. In other words by forcing SE5 to read the Components.txt file again. That explains why all of this stuff was working for me before. During my testing I would save, quite, modify, then load the save game over and over. |
Re: Component.txt Knowledge Base
That's interesting. If you use the ALLTECH cheat, they do disappear..
EDIT: yep, confirmed. There's a couple of things that don't update until a save is reloaded. Technology that's obsolete does disappear. Pester MM about it. http://forum.shrapnelgames.com/images/smilies/happy.gif |
Re: Component.txt Knowledge Base
1 Attachment(s)
Phoenix-D: First of all full credit goes to David who made the avatar at my request. I just didn’t tell him what it was for! Anyway I added the rank, four stars for a General. So why bother you ask? I noticed that you didn’t have an Avatar and I wanted to say thanks for the help you have given me. My mod wouldn’t be this far along if it wasn’t for your help.
So thanks, Ed |
Re: Component.txt Knowledge Base
I'm trying to create a new component that is destroyed after one use, but I can't seem to get it to work correctly. It doesn't seem to get destroyed after one use. Any idea what I'm doing wrong?
Name := External Mount Missile Description := Externally mounted one-shot heavy duty missile with nuclear warhead. Picture Number := 87 Maximum Level := 11 Tonnage Space Taken Formula := 10 Tonnage Structure Formula := 10 Cost Minerals Formula := 20 + (([%Level%] - 1) * 5) Cost Organics Formula := 0 Cost Radioactives Formula := 30 + (([%Level%] - 1) * 5) Supply Amount Used Formula := 10 Ordnance Amount Used Formula := 5 Can Be Placed On Vehicle Typ := Ship, Base, Satellite, Drone Can Be Placed In Ship Sections := Outer Hull Component Type List := Technological General Group := Weapons Custom Group := 0 Number Of Requirements := 1 Requirements Evaluation Availability := AND Requirements Evaluation Allows Placement := TRUE Requirements Evaluation Allows Usage := TRUE Requirement 1 Description := Empire must have at least tech level 1 in Missile Weapons. Requirement 1 Formula := Get_Empire_Tech_Level("Missile Weapons") >= (1 + ([%Level%] - 1)) Number Of Abilities := 3 Ability 1 Type := Ordnance Storage Ability 1 Description := External Mount Missiles store [%Amount1%] units of ordnance. Ability 1 Scope := Space Object Ability 1 Range Formula := 0 Ability 1 Amount 1 Formula := 5 Ability 1 Amount 2 Formula := 0 Ability 2 Type := Component - Destroyed On Use Ability 2 Description := External Mount Missiles are destroyed on use. Ability 2 Scope := Space Object Ability 2 Range Formula := 0 Ability 2 Amount 1 Formula := 0 Ability 2 Amount 2 Formula := 0 Ability 3 Type := Description Only Ability 3 Description := External Mount Missiles travel at [%Amount1%] km/s and have [%Amount2%] points of damage resistance. Ability 3 Scope := Space Object Ability 3 Range Formula := 0 Ability 3 Amount 1 Formula := 40 Ability 3 Amount 2 Formula := 10 + (([%Level%] - 1) * 1) Weapon Type := Seeking Weapon Delivery Type := Missile Weapon Target Type List := Ship, Base, Planet Weapon Damage Type Formula := "Normal" Weapon Space At Range Distance Increment := 10.0 Weapon Space Min Damage At Range := 0.0 Weapon Space Max Damage At Range := 0.0 Weapon Space To Hit Modifier At Range := 0.0 Weapon Space Min Damage Modifier Formula := (100 + (([%Level%] - 1) * 20)) - iif([%Range%] > Min(200, (([%Level%] - 1) * 10) + 150), 10000, 0) Weapon Space Max Damage Modifier Formula := (100 + (([%Level%] - 1) * 20)) - iif([%Range%] > Min(200, (([%Level%] - 1) * 10) + 150), 10000, 0) Weapon Space To Hit Modifier Formula := 0 Weapon Reload Rate MS Formula := 5000 Weapon Display Type := Directed Torpedo Weapon Space Display Effect Name := Missile 9 Weapon Ground Display Effect Name := Missile 9 Weapon Explosion Effect Name := [Random Specific Type] Weapon Explosion Weapon Sound Effect Name := Capital Ship Missile Weapon Seeker Speed Formula := 0.04 Weapon Seeker Turn Rate := 0.01 Weapon Seeker Tonnage Structure Formula := 10 + (([%Level%] - 1) * 1) Weapon Seeker Defense Modifier Formula := 50 Moderator Mode: Post edited to fit into window (stop side scrolling). No content removed. PE Shang |
Re: Component.txt Knowledge Base
The problem is that weapons fire automatically, meaning you may target them but they fire by themselves. The ability “Component - Destroyed On Use” is a player used ability. It’s like apples and oranges (automatic and player activated) unless you can talk Aaron into re-writing the code this component won’t work the way you want it to. For my Mod I have an XO weapon too; are you copying me? http://forum.shrapnelgames.com/images/smilies/happy.gif Anyway there are two ways to work around your problem.
1. Set the “Weapon Reload Rate MS Formula to a very high number so the weapon will only fire once every combat action. I did this for a type of satellite that was intended to be a one shot deal. Since I couldn’t blow the thing up (like you are trying to do here) I just set the reload time to something absurdly huge. 2. Split your weapon into components (what I did for my XO weapons). First make an XO Rack that launches only “XO Weapons”. Then make a new vehicle called an “XO Weapon. Give the vehicle a limited number of slots and then break the type of missiles you want into components as warheads or weapons. Just remember that your drone/XO Weapon will try to ram regardless of what you put inside. The work around to that is to set the tonnage low (what I did) so when it hits it won’t do much in the way of extra damage. Or there may be a way to create a new strategy for your XO Weapon to use that keeps it from ramming. I haven’t tried this out so that may be a long shot. |
Re: Component.txt Knowledge Base
Damn. ok, thanks for the advice.
By the way, External Mount Missiles were in devnullmod for SEIV, so, no I'm not copying you. Are you copying me? http://forum.shrapnelgames.com/images/smilies/happy.gif |
Re: Component.txt Knowledge Base
I still think the 'drone' usage for missiles/seekers is a bad idea for the fact that they dont launch like seeker components like CSM, based on range and target, they will launch more like fighters. This isnt as bad probably for tactical combat, but for simultaneous combat it just doesnt work, so I would defintely go with PES's option 1 over option 2.
Now if we could launch 'drone/unit' objects based on range and target, that would be ideal, then we could make a launcher, seeker platforms, and warhead/components. Anyone in good with Aaron? http://forum.shrapnelgames.com/images/smilies/wink.gif Or do you think its just too late to program in such a thing? http://forum.shrapnelgames.com/images/smilies/wink.gif http://forum.shrapnelgames.com/images/smilies/wink.gif |
Re: Component.txt Knowledge Base
@Kana: Thanks I didn’t know about that problem in multiplayer. Now that you point it out I can see it clearly. I will adjust my XO Weapons to match my satellite component from example #1.
@Devnullicus: I never played the devnullmod. Nothing personal but by the time you released it I was knee deep in my attempt at an SE4 version of this my mod. There were other matter that keep me pretty busy at the time. Anyway what is your mod based from? |
Re: Component.txt Knowledge Base
Destroyed On use only works with items that can receive "use" orders from the player.
|
Re: Component.txt Knowledge Base
You could do the SE:IV eqivalent of making the reload time > the combat time. This would make a 1-shot weapon.
|
Re: Component.txt Knowledge Base
What am I just confusing here? First CPT Kwok repeats what I said and now you do too Slick. This is a conspiracy to drive me crazy isn’t it? All of you are trying to make me think I never said those things! I’m not losing it, I’m in perfect control! Isn’t that right PE Shang? I don’t see what you’re talking about Ed.
|
Re: Component.txt Knowledge Base
Ok, what I am attempting is to change master computers to be slightly like SEIV, meaning that as you reasearch them, the space used goes down. I have tried several variations to get the Tonnage to drop in 10Kt increments , but they do not seem to work. Here is an example:
40 - ((int(([%Level%] - 1)) / 7) * 10) have also tried it using trunc(), and several variations of nesting. The problem is that neither int() nor trunc() seem to actually work, so the tonnage is decreasing by 2 or 3 Kt increments, instead of 10Kt every few levels as intended. Any suggestions? Thanks! |
Re: Component.txt Knowledge Base
maybe an iif statement, but I don't know how it is used
|
Re: Component.txt Knowledge Base
Quote:
If you want it to go down every level than use: (40 – ([%Level%] * 10) but once you hit level 4 you will have a 0 ton component. You see why I am asking now? |
Re: Component.txt Knowledge Base
I'm not exactly sure where this question should go, but it is about the component.txt file so I suppose this is the best place.
I was told once that SEV still supports the old SE4 weapon damage system (i.e. not formulas but instead 30,30,25,25,20,20 etc). But I still cannot find a clear answer on exactly how to do it. I think Iremember you have to use the "Weapon Space Min/Max Damage At Range" fields, but no matter how I input the figures it never seems to work, I've tried spaces in between the numbers, tabs, commas, it just won't work. Any help would be much appreciated, thank you. |
Re: Component.txt Knowledge Base
I thought Imperator Fyron at one time describe a method that was a sort of back door which allowed you to do just that. Unfortunately I don’t recall how he said to do it. I have sent him a PM asking so he (or me if he sends the message to me and not here) should be getting back to you very soon. This was the right place for this question by the way. If nothing else it can be done in a formula but I suspect you already know this.
|
Re: Component.txt Knowledge Base
Technically, it was SJ.
Take a look at a snippet from the DUC: Weapon Space At Range Distance Increment := 10.0 Weapon Space Min Damage At Range := 0.0 Weapon Space Max Damage At Range := 0.0 ... Weapon Space Min Damage Modifier Formula := blah formula we don't care about Weapon Space Max Damage Modifier Formula := blah formula 2 The Damage At Range lines are exactly like SE4, except you can use decimals. They are a space-delimited listing of damage values. The range increment is moddable, as you can see from the first line. IIRC, the first value is used at ranges up to the distance increment, the second value is used at ranges up to 2x the distance increment, and so on. Damage done at any range is the sum of the appropriate value from the Damage At Range list and the result of the Damage Modifier Formula (the damage is random between the Min and Max values). Let's take an example: Weapon Space At Range Distance Increment := 20.0 Weapon Space Min Damage At Range := 50.0 40.0 30.0 Weapon Space Max Damage At Range := 50.0 40.0 30.0 ... Weapon Space Min Damage Modifier Formula := iif([%Range%] < 60, (5 * ([%Level%] - 1)), 0) Weapon Space Max Damage Modifier Formula := iif([%Range%] < 60, (5 * ([%Level%] - 1)), 0) This is a range 60 weapon that increases damage by 5 per level. A short chart of resultant damage at range values (taken at increments of 10 to look like SE4 damages): L1: 50 50 40 40 30 30 L2: 55 55 45 45 35 35 L3: 60 60 50 50 40 40 L4: 65 65 55 55 45 45 L5: 70 70 60 60 50 50 ... |
Re: Component.txt Knowledge Base
Quote:
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). |
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 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! 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. |
Re: Component.txt Knowledge Base
Update: I found the problem with my original formula, I'm an idiot as usual, and missplaced a (.
So I have runs some tests, and all 4 of the methods discussed work as they should. Method 1. using 40 - ( Int(([%Level%] - 1) / 7) * 10) Method 2. using 40 - ( Trunc(([%Level%] - 1) / 7) * 10) Method 3. using 40 - ( Round(([%Level%] - 1) / 7) * 10) Method 4. using 40 - iif([%Level%] >= 19, 30, iif([%Level%] >= 15, 20, iif([%Level%] >= 8, 10, 0))) Each method gives slightly different results as expected, except that Trunc and Int seem to be the same. Hopefully this will be usefull to everyone. |
Re: Component.txt Knowledge Base
Excellent contribution; thank you DeadMilkMan!
|
Re: Component.txt Knowledge Base
I know a lot of modders are interested in Space Yard Expansions. Once possible way to achieve that in SE:V is to use the "Space Yard Rate Modifier" ability on your expansion facility. Perhaps someone can test that and see if it works - I think it just might. http://forum.shrapnelgames.com/image...ies/tongue.gif
|
Re: Component.txt Knowledge Base
The next patch might have a very easy, clean way to do SYEs...
|
Re: Component.txt Knowledge Base
Does anyone know why this doesn't work? Specifically, it always gives shield points as if there were 0 stars in the system. [%NumberOfStars%] is used in Formulas.txt, so it should be usable in other places as well, correct?
Edit: I even tried putting the formula in formulas.txt and then using the name in components.txt and it still acts as if there are 0 stars. *sigh*. I really wish there were easy ways to add variables like this to formulae. <font class="small">Code:</font><hr /><pre> Name := Star Shield Description := Generator that creates an energy field around a starship preventing damage that gets stronger the more stars there are in the star system Picture Number := 52 Maximum Level := 20 Tonnage Space Taken Formula := 25 - trunc( ( [%Level%] - 1 ) * 0.7 ) Tonnage Structure Formula := 25 + trunc( ( [%Level%] - 1 ) * 0.75 ) Cost Minerals Formula := 200 + ( ( [%Level%] - 1 ) * 10 ) Cost Organics Formula := 100 + ( ( [%Level%] - 1 ) * 5 ) Cost Radioactives Formula := 160 + ( ( [%Level%] - 1 ) * 8 ) Supply Amount Used Formula := 0 Ordnance Amount Used Formula := 0 Can Be Placed On Vehicle Types := Ship, Base, Satellite, Weapon Platform, Drone Can Be Placed In Ship Sections := Inner Hull, Outer Hull Component Type List := Technological General Group := Shields Custom Group := 0 Number Of Requirements := 2 Requirements Evaluation Availability := AND Requirements Evaluation Allows Placement := TRUE Requirements Evaluation Allows Usage := TRUE Requirement 1 Description := Empire must have at least tech level 1 in Shields. Requirement 1 Formula := Get_Empire_Tech_Level("Shields") >= ( 1 + ( [%Level%] - 1) ) Requirement 2 Description := Empire must have at least tech level 1 in Stellar Manipulation. Requirement 2 Formula := Get_Empire_Tech_Level("Stellar Manipulation") >= ( 1 + ( [%Level%] - 1) ) Number Of Abilities := 1 Ability 1 Type := Shield Generation Ability 1 Description := Shield Generators provide [%Amount2%] normal shield points. Ability 1 Scope := Space Object Ability 1 Range Formula := 0 Ability 1 Amount 1 Formula := "Normal Shields" Ability 1 Amount 2 Formula := 100 + ( ( [%Level%] - 1 ) * 10 ) + ( ( 50 + ( ( [%Level%] - 1 ) * 10 ) ) * [%NumberOfStars%] ) Weapon Type := None </pre><hr /> |
Re: Component.txt Knowledge Base
Check pg 52 of the modding pdf file - it has a short list of string substitutes that can be used in the data files.
|
Re: Component.txt Knowledge Base
Devnullicus said:
Does anyone know why this doesn't work? Specifically, it always gives shield points as if there were 0 stars in the system. [%NumberOfStars%] is used in Formulas.txt, so it should be usable in other places as well, correct? I suspect that pretty much every data field has its own parser... or at least there are several parsers for different "types" of data fields, perhaps related to file. There is very little crossover in having functions and built-in variables that work in one place translate successfully to another. For example, only a system has any stars, so only files dealing with systems or stellar object properties would ever even need to consider having access to the [%NumberOfStars%] variable... or so Aaron's thinking seems to go. Edit: I even tried putting the formula in formulas.txt and then using the name in components.txt and it still acts as if there are 0 stars. *sigh*. I really wish there were easy ways to add variables like this to formulae. You cannot use formulas in Formulas.txt in any fields in the data files where they are not already used (pretty much just planet temperature/radiation/gravity field). There is absolutely no support for user-defined functions in the data files (only the AI/event/intel scripts). |
All times are GMT -4. The time now is 05:27 PM. |
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.