Type of engine on design requires specific components? |
I've come up with an idea that would require certain components to be placed on a ship design based on the type of engine being used. For example if I was using Ion engines, would it be possible to make a script that would make you place a component relating to the Ion engine on a ship design? I was just thinking about Ion Engine technology today, and we have the technology but it would require a large amount of energy. Nuclear generators can generate the kind of power to do the job. So I was thinking make a new component, nuclear generator, fusion generator etc,. that would be required to be placed on a ship design depending on the type of engine used. Anyone have any ideas?
Re: Type of engine on design requires specific components?
Actually, I already did this. I added nuclear engines, which in turn require nuclear shielding to be used. You only need one, so once you use enough nuclear engines, it makes up for the increased space requirement.
I did this by adding the following lines into the specific vehicles (basically all of them):
Requirement 6 Description := Nuclear Engines require Nuclear Shielding.
Requirement 6 Formula := iif(Get_Design_Specific_Component_Count("Nuclear Engine") >= 1, (Get_Design_Specific_Component_Count("Nuclear Shielding") = 1), TRUE)
The requirement doesn't show up unless a nuclear engine is added to the design, which works out nicely.
Re: Type of engine on design requires specific components?
Perfect. i just love it 
a question thou, how do you do with the AI then?
Re: Type of engine on design requires specific components?
You have to edit the AI scripts to make the AI always place the relevant required component on the ship. It's not much work once you get to know the script files.

Re: Type of engine on design requires specific components?
You couldn't add a requirement just onto the nuclear engine component, and have it apply to the design once the engine is added? I could have sworn I did that to prevent stealth armor and active sensors from being used on the same design... but then I think I did something with AI tags, too... does Get_Design_Specific_Component_Count work for components and not just vehicle hulls?
~~~
The power of the ancients is now yours to command. You are truly the Master... of the obvious 
Re: Type of engine on design requires specific components?
Unfortunately acceleration and turning aren't formula-accepting fields, so the only thing you can do is make a complete separate vehicle type for the various engine types.
Re: Type of engine on design requires specific components?
what I meant was instead of having Frigate, Destroyer, Cruiser, etc, you'd have:
Frigate (Ion Engine)
Frigate (Contra-Terrane engine)
Frigate (Quantum Engine)
Destroyer (Ion Engine)
..
etc.
Your iif statement is a bit off on its syntax.
It needs to be in the format iif(statement, result, result). Also, there is no ability "Quantum Engine"; you need to use specific component count and not ability count.
So you'd want: iif(Get_Design__Component_Count("Contra - Terrene Engine") >= 1, 0, iif(Get_Design__Component_Count("Jacketed Photon Engine") >= 1, 0, iif(Get_Design__Component_Count("Quantum Engine") >= 1, 0, 1)))
or
iif(Get_Design__Component_Count("Contra - Terrene Engine") >= 1, 0, 1) AND iif(Get_Design__Component_Count("Jacketed - Photon Engine") >= 1, 0, 1) AND
iif(Get_Design__Component_Count("Quantum Engine") >= 1, 0, 1)
You use the AND because otherwise it'll see "Ok, we don't have any CT engines. Done, no problem!" despite there being Quantum engines on the ship. The first setup is a bit more complicated, but it'll work more reliably I think.
Re: Type of engine on design requires specific components?
I don't quite understand the need to have multiple designs.
You can use multiple requirement fields. Requirement 1 -> if ship has ion engines, check for a reactor. Requirement 2 -> if ship has contra-terrene engines, check for a different kind of reactor, requirement 3, etc.
Re: Type of engine on design requires specific components?
Because you cannot change acceleration, turning, etc on a vehicle design. It is set, it doesn't matter what type of engine you stick on.
Re: Type of engine on design requires specific components?
Does those data fields work? Seem to remember trying to severly decrease acceleration on the ships ( i.e. make it more realistic, with acceleration, not top speed, as the differing factor ), but I can't recall if it actually had any effect.
Re: Type of engine on design requires specific components?
Oh, they work. You just can't use a formula in them.
Re: Type of engine on design requires specific components?
You are correct, the fields do not allow for formula so instead I made different vehicle types all with different statistics for its engine type. Ion Engine ships now take 10-15 seconds to reach full speed! Its opened up some small tactical considerations. A projectile ship using contra - terrene engine can now keep up with a missile ship with ion engines lol. There is still a bug I think in the deceleration, in game it appears to be instantaneous. Also I think I found the AI files to add the new vehicle types to the AI.
I also tryied to edit acceleration/ deceleration / turning rates, but the results were not what i wanted. Like you said, braking is instantanous, but there was other issues. Like a turning rate too low made the ship incapable to turn, very low acceleration could make ship to struggle just to start moving... Ships have no inertia in this game, they don't drift when their engines are destroyed or try to make sharp turns. If the game physics was more realistic, there could be interesting stuff to do with this, but right now it's quite limited...
Re: Type of engine on design requires specific components?
i tried that formula up there but it doesnt work. the requirement dont show up and is not needed




Re: Type of engine on design requires specific components?
great minds think alike