Help me with Star-Fir... I mean Stellar Fire Mod (gots to avoid the copyright ya know) |

Alright so I'm working on a mod to give the game a more star-fire-esk feel and I'm running up against a few problems/issues and looking for any flavor suggestions.
First off I should say I'm using the balance mod as a base. Secondly I'm new to this so please follow the k.i.s.s. principle
So the first issue I'm having is with the Gravity Drive systems. What I've done is made 4 components, the Gravity Manipulator (which is the normal engine set up) generates 156 base movement. Then I made the Light Gravity Drive Field Generator generates 200+25 mvt points as well as generates supplies, it weighs in at 50Kt. Then I have the Medium version 300+50 mvt points weighs in at 100Kt, and then the Heavy generating 400+75 mvt points and weighing 200Kt. The issue I'm having here is I've coded it so you can't have 2 of the same drive field generator, but is it possible to code so you can't have the other two either?
For the second issue I need to lay a little bit of background. So I've tied engines and missles into warheads, so you start with nuclear fission warheads, and nuclear fission engines, then when you unlock fusion warheads you can get fusion engines and fusion missles. And likewise for antimatter. But as you research missles all your missles level up. For some reason though the Anti-matter missle I've coded stays under warheads. Here's the code, anybody know what I've done wrong?
Name := Capital Missile AM
Description := missile with an antimatter warhead.
Picture Number := 87
Maximum Level := 11
Tonnage Space Taken Formula := 50
Tonnage Structure Formula := 50
Cost Minerals Formula := 700 + (([%Level%] - 1) * 25)
Cost Organics Formula := 0
Cost Radioactives Formula := 225 + (([%Level%] - 1) * 20)
Supply Amount Used Formula := 40
Ordnance Amount Used Formula := 10
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 := Weapons
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 Missile Weapons.
Requirement 1 Formula := Get_Empire_Tech_Level("Missile Weapons") >= [%Level%]
Requirement 2 Description := Empire must have at least tech level 8 in Warheads.
Requirement 2 Formula := Get_Empire_Tech_Level("Warheads") >= (8 + ([%Level%] - 1))
Number Of Abilities := 2
Ability 1 Type := Ordnance Storage
Ability 1 Description := Capital Missile AM store [%Amount1%] units of ordnance.
Ability 1 Scope := Space Object
Ability 1 Range Formula := 0
Ability 1 Amount 1 Formula := 100
Ability 1 Amount 2 Formula := 0
Ability 2 Type := Description Only
Ability 2 Description := Capital Missile AM have a [%Amount1%]% defense bonus, travel at 50 km/s, and have [%Amount2%] points of damage resistance.
Ability 2 Scope := Space Object
Ability 2 Range Formula := 0
Ability 2 Amount 1 Formula := 40 + (Get_Empire_Tech_Level("Defense Systems") * 2)
Ability 2 Amount 2 Formula := 10 + Trunc(Get_Empire_Tech_Level("Armor") / 2)
Weapon Type := Seeking
Weapon Delivery Type := Missile
Weapon Target Type List := Ship, Base, Satellite, Drone, 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 := (250 + (([%Level%] - 1) * 20)) - iif([%Range%] > Min(200, (([%Level%] - 1) * 10) + 100), 10000, 0)
Weapon Space Max Damage Modifier Formula := (330 + (([%Level%] - 1) * 20)) - iif([%Range%] > Min(200, (([%Level%] - 1) * 10) + 100), 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.05
Weapon Seeker Turn Rate := 0.01
Weapon Seeker Tonnage Structure Formula := 10 + Trunc(Get_Empire_Tech_Level("Armor") / 2)
Weapon Seeker Defense Modifier Formula := 40 + (Get_Empire_Tech_Level("Defense Systems") * 2)
The third thing I'm still trying to figure out is how to set range. The modding pdf isn't too clear here, if somebody to spell it out for me in laymans terms I'd be most appreciative. That's all that's keeping me from coding HBM's. And it's holding up AFHAWK development too. With the rail and plasma guns I just ripped off code from other weapons but none of the existing weapons have the range I'm looking for.
I belive that's it for all the problems right now, but some flavor input would be useful too, specifically any hints for gunboats. I'm thinking I'll just use the troop design, set it in space and allow it to have starship components. I'll have to tweak the weight on it but that's not an issue.
Anywho thanks if you made it all the way through this long-arse post, and for any help you can provide.
Re: Help me with Star-Fir... I mean Stellar Fire Mod (gots to av
1) in VehicleSizes.txt
Requirement N Description := Ship can only have a maximum of 1 engine.
Requirement N Formula := Get_Design_Ability_Component_Count("Movement Standard") Min(200, (([%Level%] - 1) * 10) + 100), 10000, 0)
Min(200, (([%Level%] - 1) * 10) + 100) - weapon range
it means that (([%Level%] - 1) * 10) + 100 - minimal range at start (100) at the end (1090)
200 - maximum range of weapon
Min() - choose minimal of this two.
[%Range%] - distance to target.
4) I think, if you don't know pascal, you will have problems with AI, because it will not work
Also try to find this program: se5editor
Re: Help me with Star-Fir... I mean Stellar Fire Mod (gots to av
I'm only vaguely familiar with modding components and such. But I will be happy to assist in modding the AI to play this mod, and any other way possible.
-Unnamed




Re: Help me with Star-Fir... I mean Stellar Fire Mod (gots to av
Ok, i'll try to help you...
First: it's possible to code what you want. You must only add a requirement field like those for not having two of the same drive, changing the number to 0. Try it and report if it will resolve your problem.
Second: try to change [%Level%] on the first requirement field to ([%Level%]). Maybe it will work. Maybe.
Third: for changing the range, you must first understand what this two field make.
Weapon Space Min Damage Modifier Formula := (250 + (([%Level%] - 1) * 20)) - iif([%Range%] > Min(200, (([%Level%] - 1) * 10) + 100), 10000, 0)
Weapon Space Max Damage Modifier Formula := (330 + (([%Level%] - 1) * 20)) - iif([%Range%] > Min(200, (([%Level%] - 1) * 10) + 100), 10000, 0)
The first part of the field (before the iif command) say how much damage your weapon make. The second (after the iif command) set the range. How it work? I'll explain:
iif ([%Range%] > Min (200, (([%Level%] - 1) * 10) + 100), 10000, 0)
if the range is minor tha the minimun between 200 and 100 + ten times the (level - 1) then subtract 10000 to the damage, else subtract 0. Then, the maximum range for your Antimatter missile is 200.
It's clear? I'm not the best in explain things...