Limit a component to 1 per empire
I've seen that some components are 1 per ship, but just wondering if it is possible to limit a component so that you could only field one ship at a time with a certain component?
I've seen that some components are 1 per ship, but just wondering if it is possible to limit a component so that you could only field one ship at a time with a certain component?
This Tag:
<OnePerShip>true</OnePerShip>
should limit the game to having only one of each ship of that design. not sure if it works for all empires or just yours. this is used in the merc expansion to limit one type of merc ship per game available from bazaar
That tag prevents more than one component of a specific type from being added to a given design, it does not prevent an empire from having more than one ship which carries a given component.
hmmm. if it works to prevent one component per merc ship, whats the tagging to limit one merc of that type per gameplay?
Is it possible to make it a player achievement that you could put in everyones tech tree. Remember you need to make the ship you want in the ai ship designs. You need to put the achievement in a tech that all ais research. Or if you make it a tech then you need to change the ais research stradegy to include this.
You could include the ship you want with everyone starting ships.
You could require a resource that can only be made by the player achievement. I think you could make it untradeable. You will probably have a module on there for the whole game unless you make it obsolete by something.
The only things in the component definitions for Mercenaries which might limit a component to one per game are the <Type>Mercenary</Type> and <PlacementType>Mercenary</PlacementType> tags, though I'd be far more inclined to believe that whatever limits the mercenaries to one-per-game has to do with how the game handles purchasing things from the Mercenary Bazaar rather than being anything to do with any tag in the component definitions.
I don't really know why Stardock bothered with limiting the mercenary components to one-per-ship; the mercenaries use static blueprints and the components are not available to the player in the first place, so there's no way within the game for more than one of the components to be placed in the first place.
Including the vessel among the starting ships and not permitting the player to design new ships with said "unique" component means that you're either going to provide the player with an insanely powerful starting ship or the unique component becomes worthless in short order because the ship with the component cannot be upgraded to keep pace with player-designed ships in speed, firepower, defensive strength, or whatever else it needs. The only exception is if the unique component provides a benefit unrelated to ships, but at that point it should probably be a player-unique or galaxy-unique structure rather than a unique component.
There is one way that I can think of, though in order for it to actually work you'd need to turn off strategic resources in map generation. You can make components require strategic resources and you can make buildings provide them (at least, so I assume; never tried it, but since buildings can require strategic resources and most fields in the XML accept both positive and negative numbers without breaking the game, I'd expect that you could make a building provide strategic resources), so if there are no strategic resources on the map and you have a player-unique or galaxy-unique building which provides a specific (set of) strategic resource(s) and then have components require those resources. This would mostly work, though if you used player-unique structures to provide the resources then conquering such structures built by the other factions would allow your empire to build additional ships using those components, and there might be some issues with the computer being dumb enough to trade its resources to you long enough for you to build additional ships, or with the computer wasting the resources on something other than the special components.
If the XML allowed the creation of new strategic resources, I'd be inclined to make a special one for each empire-unique component I was adding and then see if I couldn't have one of each such strategic resource added to the faction definition (which would avoid issues with being able to capture structures generating the resources, though not with trading the resources away), but sadly as far as I know the game doesn't permit the addition of new strategic resources.
Including the vessel among the starting ships and not permitting the player to design new ships with said "unique" component means that you're either going to provide the player with an insanely powerful starting ship or the unique component becomes worthless in short order because the ship with the component cannot be upgraded to keep pace with player-designed ships in speed, firepower, defensive strength, or whatever else it needs. The only exception is if the unique component provides a benefit unrelated to ships, but at that point it should probably be a player-unique or galaxy-unique structure rather than a unique component.
There is one way that I can think of, though in order for it to actually work you'd need to turn off strategic resources in map generation. You can make components require strategic resources and you can make buildings provide them (at least, so I assume; never tried it, but since buildings can require strategic resources and most fields in the XML accept both positive and negative numbers without breaking the game, I'd expect that you could make a building provide strategic resources), so if there are no strategic resources on the map and you have a player-unique or galaxy-unique building which provides a specific (set of) strategic resource(s) and then have components require those resources. This would mostly work, though if you used player-unique structures to provide the resources then conquering such structures built by the other factions would allow your empire to build additional ships using those components, and there might be some issues with the computer being dumb enough to trade its resources to you long enough for you to build additional ships, or with the computer wasting the resources on something other than the special components.
If the XML allowed the creation of new strategic resources, I'd be inclined to make a special one for each empire-unique component I was adding and then see if I couldn't have one of each such strategic resource added to the faction definition (which would avoid issues with being able to capture structures generating the resources, though not with trading the resources away), but sadly as far as I know the game doesn't permit the addition of new strategic resources.
that would be an interesting chain to see brought to life. i am new to the modding so i was hoping the onepership could cross out to oneperempire or oneperplayer or such. its a shame it doesnt (unless you can tell me otherwise, which would be a pleasant surprise) either way sorry i couldnt help,
Well there are people making their own mercs. Can we just eliminate one resource off the game instead of shutting them all down. Can't we make player achievements that can't stack. We could make the resources so valuable that no one can afford to buy it. That way the only way the resource can change if the player sells it. Maybe something like 999999 bcs.
would the tag <IsPlayerWonder>true</IsPlayerWonder> on a ship component work? by building the ship with this component would it limit you to one?
Not yet but adding this is on our list for 1.7
Not yet but adding this is on our list for 1.7
shweet ![]()
Hoping it makes it in.
If it does I think there could be interesting things done to the tech trees for all races or even allow a bit more uniqueness to individual race trees. Maybe even add unique components as salvage from anomalies. Stuff for the team to look at doing in the future I hope.
Welcome Guest! Please take the time to register with us.