We really need an "Allows" effect with a corresponding "Allowed" condition.
Could you describe what this effects would do, with some examples?
Also, are you aware of the Number and NumberOf
conditions? These might be what you want.
Try as I might, I couldn't get rid of the fact that you can still use your Neutronium Processors even when the Neutronium Extractors were gone...
The processors' activation condition could be something like
Number low = 1 high = 999 condition =
Building name = "BLD_NEUTRONIUM_PROCESSOR"
OwnedBy affiliation = TheEmpire empire = Source.Owner
which matches any object, if there also exists at least one object (the same or different from the matched object) that is a neutronium processor owned by by the source object's owner, which for a tech would be the empire that researched the tech, or for a building would be the owner of the building. So if this was an building's effectsgroup activation condition, the building would function if the building's owner also owned at least one neutronium processor.
Plus, for some strange reason, whenever I starve a planet with Neutronium Extractors, the freeoriond executable shuts down. The problem appears to be the effects group that unlocks Neutronium Processing, but when I tried using a similar effects group on a different tech, there was no problem.
Could you make a minimal techs.txt and buildings.txt that can demonstrate this? Just that building and the necessary techs that causes the crash, please.
Also, the ability for an effects group to change the stats of a ship part will be extremely useful when adding refinements to the ships tree. Alternatively, making ship stats dependent on effects groups within the ship part parameters might also work.
For ship part effects that modify their ship's meters (health, stealth, fuel, shield, detection) you should be able to, but actually can't at the moment, make an effectsgroup in the part that adds +X to the relevant meter, with a scope activation of Source. This was possible, but tzlaine's partial rewrite of the way ship parts are scripted made it not possible. It will eventually be again. As a workaround, you can make the effects of the refinement tech be to give +X to the relevant meters of ships that have the part in question.
Giving bonuses to a specific part's other stats (ROF, range, capacity; missile speed and health; fighter speed, health, stealth) will hopefully be possible, but is presently not and will be a bit more complicated to add.
There also needs to be a way to make buildings use something other than Trade for maintenance. I can do it now with effects, but the change isn't included in the brackets on the resource bar, so the player will have to keep track of all his buildings that consume something other than Trade and do the arithmetic in his head. This isn't a big problem for now, since only two such buildings exist presently, but it will certainly be a problem later on.
I'm more inclined to simply remove the concept of maintenance from the game. I don't think it adds anything other than annoyance and complication, particularly when deciding what happens when maintenance isn't paid. Just checking the stockpile amount isn't really good enough, since many planets won't have access to the stockpile anyway, so it shouldn't matter what level the stockpile is at for them.
I believe it has also been mentioned before that something should be added to the UI to set targets and for activation and deactivation.
It has. No immediate plans for this, though. UI suggestions are welcome, though. Buildings and Ships could / should have a way to give them a (and probably just one) target, or cancel the target. Arguably, a fleet's target could be the system (or some other object?) that it's moving towards, and the UI could be modified similarly, in order to make things so move orders aren't given with the right mouse button, which I don't really like since right-click is not really used for any other similar function.
Being able to use another empire owning a tech or building as a condition would also be nice (being able to use one's own empire having a building as a condition would be nice, for that matter),
See above, but change TheEmpire to Enemy.
and being able to set only a lower or upper limit on values such as empire stockpile
Also on the wiki effects page:
OwnerFoodStockpile low = LOW high = HIGH
OwnerMineralStockpile low = LOW high = HIGH
OwnerTradeStockpile low = LOW high = HIGH
which match objects owned by empires that have the specified range of the relevant stockpiles.
and being able to put effects into more than one stacking group would be useful.
Why is that needed?
I'm also hoping for the ability to remove resources from another empire's stockpile and add them to one's own (will be useful when we get into diplomacy as well).
SetOwnerFoodStockpile value = VALUE
SetOwnerMineralStockpile value = VALUE
SetOwnerTradeStockpile value = VALUE
These can be easily used to set the stockpiles to a fixed value, but I'm not sure if they can be used to increment or decrement the stockpile. There are some object attributes listed in the effects page about trade, mineral and food stockpiles, but I'm not sure how they work. It might work to do
SetOwnerFoodStockpile Target.TradeStockpile + 5
but I'm not sure, so you'll have to try it and see. To transfer from one empire to another, have two effectsgroups, one of which has a scope condition to select one empire (affiliation enemy) and another which select the source object. One gets the effect above, and the other gets
SetOwnerFoodStockpile Target.TradeStockpile - 5