Structure components. |
Because the ship structure setting is unimplemented, i have a lot more work to do, i deceided to do this by putting in comps called {Race Ship Name} Structure or seomthing similar.
My wuestion is, how owuld i make these un-spammablke in other words, only one frigate structure goes on a frigate and cant be used by any other ship? Right now there is an individual one for each ship and race.
Ex.
Name := UNSC Frigate Structure
Description := A component used to represent a frigate class vessels structural stability. Only one per ship.
Picture Number := 44
Maximum Level := 5
Tonnage Space Taken Formula := 0
Tonnage Structure Formula := 250 + (([%Level%] - 1) * 5)
Cost Minerals Formula := 300 + (([%Level%] - 1) * 3)
Cost Organics Formula := 0
Cost Radioactives Formula := 100 + (([%Level%] - 1) * 1)
Supply Amount Used Formula := 0
Ordnance Amount Used Formula := 0
Can Be Placed On Vehicle Types := Ship
Can Be Placed In Ship Sections := Inner Hull
Component Type List := Technological
General Group := Structural Support
Custom Group := 2
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 UNSC Design.
Requirement 1 Formula := Get_Empire_Tech_Level("UNSC Design") >= (1 + ([%Level%] - 1))
Number Of Abilities := 0
Weapon Type := None
and i need it on this ship:
Name := UNSC Frigate
Short Name := Frigate
Description := Common naval vessel usually equipped with fast engines and a single small MAC gun. No match for any Covenant warship in standard combat.
Code := FG
Vehicle Type := Ship
Maximum Level := 10
Tonnage Space Formula := 250 + (([%Level%] - 1) * 25)
Tonnage Structure Formula := 450 + (([%Level%] - 1) * 25)
Cost Minerals Formula := 200 + (([%Level%] - 1) * 25)
Cost Organics Formula := 50 + (([%Level%] - 1) * 25)
Cost Radioactives Formula := 50 + (([%Level%] - 1) * 25)
Engines Per Move := 1
Maximum Model Size := 16.0
Vehicle TopDown Picture Index := 1
Vehicle Portrait Primary := [%EmpireName%]_Portrait_Frigate.bmp
Vehicle Portrait Alternate := [%EmpireName%]_Portrait_Frigate.bmp
Vehicle Portrait Default := [%EmpireName%]_Portrait_Frigate.bmp
Vehicle Large Portrait Primary := [%EmpireName%]_LargePortrait_Frigate.jpg
Vehicle Large Portrait Alternate := [%EmpireName%]_LargePortrait_Frigate.jpg
Vehicle Large Portrait Default := [%EmpireName%]_LargePortrait_Frigate.jpg
Vehicle Inv Portrait Primary := [%EmpireName%]_InvPortrait_Frigate.jpg
Vehicle Inv Portrait Alternate := [%EmpireName%]_InvPortrait_Frigate.jpg
Vehicle Inv Portrait Default := [%EmpireName%]_InvPortrait_Frigate.jpg
Vehicle Inv Configuration Layout Primary := [%EmpireName%] Frigate Layout
Vehicle Inv Configuration Layout Alternate := [%EmpireName%] Frigate Layout
Vehicle Inv Configuration Layout Default := [%EmpireName%] Frigate Layout
Vehicle XFile Class Name Primary := [%EmpireName%] Frigate
Vehicle XFile Class Name Alternate := [%EmpireName%] Frigate
Vehicle XFile Class Name Default := [%EmpireName%] Frigate
Vehicle Texture Start X := 0.25
Vehicle Texture Start Y := 0.50
Vehicle Texture End X := 0.50
Vehicle Texture End Y := 0.75
Space Combat Maximum Speed Per Movement Point := 0.001
Space Combat Turn Rate Base := 0.0013
Space Combat Turn Rate Decrease Per kT := 0.0000005
Space Combat Turn Rate Minimum := 0.0004
Space Combat Acceleration Rate Base := 0.00008
Space Combat Acceleration Rate Decrease Per kT := 0.000000034
Space Combat Acceleration Rate Minimum := 0.00004
Space Combat Deceleration Rate Base := 0.00008
Space Combat Deceleration Rate Decrease Per kT := 0.000000034
Space Combat Deceleration Rate Minimum := 0.00004
Space Combat Banks When Changing Height := FALSE
Ground Combat Maximum Speed Per Movement Point := 0.0
Ground Combat Turn Rate Base := 0.0
Ground Combat Turn Rate Decrease Per kT := 0.0
Ground Combat Turn Rate Minimum := 0.0
Ground Combat Acceleration Rate Base := 0.0
Ground Combat Acceleration Rate Decrease Per kT := 0.0
Ground Combat Acceleration Rate Minimum := 0.0
Ground Combat Deceleration Rate Base := 0.0
Ground Combat Deceleration Rate Decrease Per kT := 0.0
Ground Combat Deceleration Rate Minimum := 0.0
Ground Combat Banks When Changing Height := TRUE
Number Of Abilities := 1
Ability 1 Type := Combat To Hit Defense
Ability 1 Description := Small size makes ship [%Amount1%]% harder to hit in combat.
Ability 1 Scope := Space Object
Ability 1 Range Formula := 0
Ability 1 Amount 1 Formula := 39 + ([%Level%] - 1)
Ability 1 Amount 2 Formula := 7
Number Of Requirements := 5
Requirements Evaluation Availability := 1
Requirements Evaluation Allows Placement := 2, 3, 4, 5
Requirements Evaluation Allows Usage := TRUE
Requirement 1 Description := Empire must have at least tech level 1 in UNSC Navy.
Requirement 1 Formula := Get_Empire_Tech_Level("UNSC Navy") >= (1 + ([%Level%] - 1))
Requirement 2 Description := This vehicle must have 1 Bridge.
Requirement 2 Formula := (Get_Design_Ability_Component_Count("Control Center") = 1) or (Get_Design_Ability_Component_Count("Master Computer") >= 1)
Requirement 3 Description := This vehicle must have at least Life Support for 100 crew members.
Requirement 3 Formula := (Get_Design_Ability_Total("Life Support", 1) >= 100) or (Get_Design_Ability_Component_Count("Master Computer") >= 1)
Requirement 4 Description := This vehicle must have at least Crew Quarters for 100 crew members.
Requirement 4 Formula := (Get_Design_Ability_Total("Crew Quarters", 1) >= 100) or (Get_Design_Ability_Component_Count("Master Computer") >= 1)
Requirement 5 Description := This vehicle can only have a maximum of 18 movement.
Requirement 5 Formula := Get_Design_Ability_Component_Count("Movement Standard")

Re: Structure components.
How about a mount, say, one that increases the HP of any component, weapon or not, by N percent depending on the level of the mount?
Or a tech area you can research that gives your hulls the same delivery type damage resistance ability as used by crystalline energy refractors, but once for each weapon delivery type? Larger hulls could get more resistance per level of the tech if you want...
To use the damage resistance ability, put an ability something like this in each hull for each delivery type:
Ability 1 Type := Weapon Delivery Type Damage Received Modifier Percent
Ability 1 Description := Hull resilience enhancements reduce damage inflicted by enemy [%Amount2%] weapons by [%Amount1%]%.
Ability 1 Scope := Space Object
Ability 1 Range Formula := 0
Ability 1 Amount 1 Formula := -2 * Get_Empire_Tech_Level("Hull Resilience")
Ability 1 Amount 2 Formula := "Energy Beam"
Just make sure that ships don't become immune to weapons with too high a resistance level! 
~~~
The power of the ancients is now yours to command. You are truly the Master... of the obvious 




Re: Structure components.
Use the name-based component count requirement function to prevent the other types of "structure" components from being mounted on each vehicle size. You can also use the function to only allow one of the legitimate structure components on the corresponding ship size.
This all begs the question of why you want magic structure points in the first place; shouldn't the structure directly represent the strength of the actual stuff on the ship?
SpaceEmpires.net | Space Empires Wiki