SEV modification - engine limitation queries |

I've been poking around with a couple options for potentially fairly radical SEV modification design, but keep hitting my head up against thingies that, if possible, I've simply not figured out how just yet. Thus, I turn to you lot! Is it possible to do the following, and if so how? If folks find answers, I'll update this post to make it a useful reference for later. (Answers more in depth are further down the page)
* Shipyards that construct at (Or even better, /up to/) the rate of the planet, rather than having a fixed production value themselves.
Yes - simply set the space yard facility to build at the same rate as a planet, as stated in settings.txt. The default is usually 2000.
* Industrial Facilities that increase the construction rate of a planet/ship by a static figure, rather than a percentage, and stack with each other?
Maybe - as Fyron shows, you simply create a shipyard type module without the limitation on one-per-planet. Still uncertain as to whether it's possible to create a module that cannot build space ships too, however.
* Weapon damage multiples/divisions vs Population on planets? I've seen you can do such things vs sheilds and the like, and am wondering if it's possible vs planetary population.
Yes - Population Amount Killed Per Damage Point := 1
* Technologies with either-or requirements? (Say, a weapon that required large ranks in DUC, or ranks in some other exotic technology, rather than nessisarily both)
Yes
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 Tech Area A, or level 10 in Tech Area B.
Requirement 1 Formula := Get_Empire_Tech_Level("Tech Area A") >= 1 OR Get_Empire_Tech_Level("Tech Area B") >= 10 Thanks to Fyron.
* Mounts that change the targeting options? (For example, a 'PDS' mount that shrinks a weapons damage, and changes its targeting from bases and ships to seekers and satellites)
No - Mounts cannot change targeting rules.
* Can a ship repair itself? Can repair modules be made to repair only specific components?
Yes and no - Yes, ships with intact repair modules can repair themselves. However, there is no way to limit what they repair - they'll act like normal repair modules. Regenerating components can only regenerate themselves, while a regenerating hull will increase the regeneration rate of any regeneration components (Organic armor, for instance) on it.
* I was also wondering about a 'terraforming' option, where rather than building a specific facility, a planet pours resources and construction time into an... I dunno, an upgrade perhaps? That then improves the planets worth a fixed amount. Speaking of, is it possible to create an item that can only be upgraded to, but not built outright?
Not really - the only way to build such a thing is with a component. And upgrades are single-direction, and you always build the most recent. Pity.
* What formula do plague weapons use to inflict damage on populations?
Unkown formula, and it is unfortunately hardcoded. The SEIV rules are here, and may or may not be a useful guideline: http://wiki.spaceempires.net/index.php/Plague_%29SEIV%29
* Is it possible to change the number of colonists that take up a certain amount of cargo space once the game is started?
No - Or rather, yes, you can quit the game, alter the value of the settings.txt, and then restart the game, but you can't use technologies or components to achieve this.
Many thanks to Fyron, Isopsycho, and others for their assistance so far.
Re: SEV modification - engine limitation queries
On the subject of pagues, I'm not sure where the actual math for killing the population through plagues is located. I would like to change some of it myself.
If you want to do an experiment, see if changing Execute_Event_Planet_Population_Change() in Script_Main_ExternalEvents and see if that has any effect. I'm up to my armpits in other things right now, so I don't have time to check.
"Only by being constantly at war with evil in all things, including yourself, can you truely know peace."
Download my mod here: GidMod
or there:
Re: SEV modification - engine limitation queries
You need to open the source files, not the compiled AI scripts. 
(The text files in Utilities/ScriptParser/SE5EmpireScripts for example)
~~~~
http://wiki.spaceempires.net - Visit the SpaceEmpires Wiki and help improve it. 
http://bt.spaceempires.net/browse.php - Mods and Shipsets for SEIV and SEV

Re: SEV modification - engine limitation queries
Can you set up things that can be 'Excluded' from the Repair-pods use? ie...the Repair-pod itself. I think it was Kwok who was working on this in BM or something to make the Pod be 'Only' repairable at a planet, so it wouldn't repair itself once activated.
Forgive me, 'twas late in the eve when I poked the wrong file.
Further investigation of the component regeneration ability has proven that it will only repair the component that has the ability - putting a Regenerating Component inside your hull will not repair your armor, for instance.
However, repair modules, from what quick testing I've done, do appear to repair their own ship. In fact as far as I can tell the repair the raw tonnage, and not the structural tonnage, which is... interesting, to say the least. Now I'm just trying to work out if it's possible to create a single-use repair module - the ones I've made so far don't self-destruct to repair, nor do they need to do so, which is a shame. I'm after an 'emergency repairs' type device. Maybe I'm doing something wrong?
SE5 Files hosted on Filefront (Patches, Mods, Races, etc)
Re: SEV modification - engine limitation queries
At the risk of redundancy, I am just going to reply to the first post. I don't feel like figuring out which items have responses already. 
Name := Space Yard Expansion
Description := Small construction facility which expands the rate of construction of ships in space.
Facility Group := Space Yard
XFile Class Name := SpaceYard
Picture Number := 1
Maximum Level := 50
Tonnage Space Taken Formula := 1000
Tonnage Structure Formula := 1000 + (([%Level%] - 1) * 20)
Cost Minerals Formula := 10000 + (([%Level%] - 1) * 100)
Cost Organics Formula := 0
Cost Radioactives Formula := 0
Number Of Requirements := 1
Requirements Evaluation Availability := 1
Requirements Evaluation Allows Placement := TRUE
Requirements Evaluation Allows Usage := TRUE
Requirement 1 Description := Empire must have at least tech level 1 in Space Yards.
Requirement 1 Formula := Get_Empire_Tech_Level("Space Yards") >= (1 + ([%Level%] - 1))
Number of Abilities := 6
Ability 1 Type := Space Yard
Ability 1 Description := Can construct with [%Amount2%] minerals per turn.
Ability 1 Scope := Space Object
Ability 1 Range Formula := 0
Ability 1 Amount 1 Formula := 1
Ability 1 Amount 2 Formula := 500 + (([%Level%] - 1) * 50)
Ability 2 Type := Space Yard
Ability 2 Description := Can construct with [%Amount2%] organics per turn.
Ability 2 Scope := Space Object
Ability 2 Range Formula := 0
Ability 2 Amount 1 Formula := 2
Ability 2 Amount 2 Formula := 500 + (([%Level%] - 1) * 50)
Ability 3 Type := Space Yard
Ability 3 Description := Can construct with [%Amount2%] radioactives per turn.
Ability 3 Scope := Space Object
Ability 3 Range Formula := 0
Ability 3 Amount 1 Formula := 3
Ability 3 Amount 2 Formula := 500 + (([%Level%] - 1) * 50)
Damage Type Name := 4x To Population
Description := Weapon does 4 times regular damage to population.
Picture Number := 1
Cannot Penetrate Any Kind Of Shields := FALSE
Cannot Penetrate Any Kind Of Armor := FALSE
Number Of Vehicle Types := 0
Number of Shield Types := 0
Number of Armor Types := 0
Internal Damage Percent := 100
Facility Damage Percent := 100
Population Amount Killed Per Damage Point := 1
Crew Amount Killed Per Damage Point := 0
Is Viral Weapon := FALSE
Number Of Special Effects := 0
Number Of Requirements := 0
Number Of Abilities := 0
Now, make your genocide weapon use this damage type instead of normal. Probably want to make it do less base damage, for balance.
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 Tech Area A, or level 10 in Tech Area B.
Requirement 1 Formula := Get_Empire_Tech_Level("Tech Area A") >= 1 OR Get_Empire_Tech_Level("Tech Area B") >= 10
I'm not positive what happens to the effective level of a component, if you use a requirement like this. What happens if you meat both parts? Is it level 1, because of Tech B? or is it level 10, because of Tech A? Bears testing...
No, repair modules cannot be made to repair only specific component.
You cannot upgrade a facility from one type to another; only levels of the same type. In this way, SE5 is a bit more restrictive than SE4 was, where you could just put different types of facilities in the same "family" and upgrade them that way.
http://wiki.spaceempires.net/index.php/Plague_%28SEIV%29
Population Cargo Space Per One := 5.0
Re: SEV modification - engine limitation queries
Population bonuses apply to non-SY planets. Other than that, I don't believe so. There is only a "Space Yard" ability for construction points.
One could, however, jury-rig fake plague events that store a reference to the target planet. You'd want to add a "hurt_plagued_planets" function call in the main event script loop, run reach turn, that would have its effects on target planets. I'm not sure if there there would be an easy way to cure such "plagues" with medical bays though, so you'd probably want to make the plagues time limited.

Re: SEV modification - engine limitation queries
Population and happiness also influence construction rates.
Planets can build units and facilities without a SY.
A SY is required to build ships and bases.

Re: SEV modification - engine limitation queries
Planetary space yards can build ships and bases, in addition to the facilities and units that non-SY planets can build. Ship-based space yards can build ships, bases, and units. I'm pretty sure there's no way to change that...
edit: UNLESS - you fiddle with the costs of things and build rates of various SY's - then you could at least restrict various types of ships/bases/units to specific types of yards - for instance, if you made troops cost a lot of organics, and nothing else cost organics, and set the organics build rate of ship-based SY's really low, then troops will be only buildable (at any reasonably rate) at planets. (Thanks to PVK and his Proportions mod for this idea!
)
~~~
The power of the ancients is now yours to command. You are truly the Master... of the obvious 
Re: SEV modification - engine limitation queries
"Destroyed on use" only applies when a component is used via a button click (eg: stellar manipulation button, emergency propulsion button). Repair and medical bays are never "used" in this sense. Hence, there is never a time for them to trigger the "destroyed on use" ability.





Re: SEV modification - engine limitation queries
* Shipyards that construct at (Or even better, /up to/) the rate of the planet, rather than having a fixed production value themselves. = This has already been done in several mods and forumns.
* Technologies with either-or requirements? (Say, a weapon that required large ranks in DUC, or ranks in some other exotic technology, rather than nessisarily both) = This can be done in the components data file, see the mod pdf file for discriminators in your requirement line.
* Mounts that change the targeting options? (For example, a 'PDS' mount that shrinks a weapons damage, and changes its targeting from bases and ships to seekers and satellites) = This can't be done by virtue that the targets are not set by mounts, only in the components data file.
* Can a ship repair itself? Can repair modules be made to repair only specific components? = You can do both: either use the vehicle size data file to give the particular size the ability to regenerate over the entire hull or go to component data file and give the particular component regeneration ability. Similar options for repair ability that ill repair anything in the ships hold (units and other ships in the fleet).
* What formula do plague weapons use to inflict damage on populations? = See the damage type data file for specific damage options, there are several types of plague levels. Also the file will give you a break down of how damage is done.
* Is it possible to change the number of colonists that take up a certain amount of cargo space once the game is started? = Only if you want to exit the game via task manager and edit files then re-enter the game. Currently it is set in the settings data file (I think, either way its in a data file with a specific number listed)
I answered some of the easier questions, hope that helps. Some of the other ones will take some one that has worked with those files or Fyron/Captain Kwok that has extensive knowledge of the game to point you in the right direction.