Logo Platform
logo amplifiers simplified

Designating an improvmant to only be buildable in the player's home system?

Copied to clipboard!
10 years ago
Feb 4, 2015, 11:46:58 PM
I'm trying to restrict an improvement to the player's home system, but I can't find a PathsPrerequisites that will work. Any ideas?



I tried looking for unique things that might only exist in the home system to use as a flag, but I can't find any. And I don't know what class or flag the game uses to identify the home system. I'm looking for something like:



$(ClassHomeStarSystem/PlanetSizeMedium)



Unfortunately if such exists, I can't find it. Help?







EDIT: Answered here.
0Send private message
10 years ago
Feb 5, 2015, 6:11:12 PM
Not sure if this is doable but if you can have an improvement built in a players starting star system at the beginning of the game, set as something that cannot be built otherwise.

Then you could use the presence of that improvement, say a "government hub", as the prerequisite for later improvements.



This is speculation on my part never done anything with starting planet code myself.
0Send private message
10 years ago
Feb 5, 2015, 7:11:36 PM
Crymson wrote:
Not sure if this is doable but if you can have an improvement built in a players starting star system at the beginning of the game, set as something that cannot be built otherwise.

Then you could use the presence of that improvement, say a "government hub", as the prerequisite for later improvements.



This is speculation on my part never done anything with starting planet code myself.


It's definitely doable by using "AddImprovementsOnHomeSystem" command. For example:



factionTrait.xml

[CODE]







[/CODE]



The problem is, such tag improvements can be destroyed either by bombs or enemy troops and can't be restored. Designating them as unscrappable (no upkeep) won't help much smiley: frown
0Send private message
0Send private message
10 years ago
Feb 6, 2015, 4:41:19 AM
My only other thought was a hidden anomaly on all races homeworlds but that wouldnt solve the loss of the home system.
0Send private message
10 years ago
Feb 8, 2015, 1:35:36 PM
I've got an idea.



All we need is to create a hidden empire improvement unlocked from the get go and providing a new variable applied only to the home system. Then use the new variable to define PathsPrerequisites for star system improvements buildable only in the capital. Something like this:

[CODE] StarSystemDescriptor.xml







Technology.xml









StarSystemImprovement.xml





NewSSI

$(ClassStarSystem:CapitalIdentifier) ge 1



%SystemBuildingSpecial1Title

%SystemBuildingSpecial1Description









StarSystemImprovementDescriptor.xml



















EmpireImprovement.xml





HiddenEI





%MovementWarp1Title

%MovementWarp1Description









EmpireDescriptor.xml







Path="ClassEmpire/ClassStarSystem,StarSystemBonusHome" />



[/CODE]





Edit: it's working!
0Send private message
10 years ago
Feb 9, 2015, 7:05:21 AM
Vicarious wrote:
I've got an idea.



All we need is to create a hidden empire improvement unlocked from the get go and providing a new variable applied only to the home system. Then use the new variable to define PathsPrerequisites for star system improvements buildable only in the capital. Something like this:

[CODE] StarSystemDescriptor.xml







Technology.xml









StarSystemImprovement.xml





NewSSI

$(ClassStarSystem:CapitalIdentifier) ge 1



%SystemBuildingSpecial1Title

%SystemBuildingSpecial1Description









StarSystemImprovementDescriptor.xml



















EmpireImprovement.xml





HiddenEI





%MovementWarp1Title

%MovementWarp1Description









EmpireDescriptor.xml







Path="ClassEmpire/ClassStarSystem,StarSystemBonusHome" />



[/CODE]





Edit: it's working!




YES!



Just one thing I'd mention for others, in StarSystemDescriptor.xml needs to be inside the wrapper for this to work. It won't work if you simply paste the text in, a mistake I made without thinking first go round.



But yes, this works! Haven't tested it losing the capital or anything but I assume it should work given the pointers involved. Thank you sir, i'll be adding you to the AGED credits for the next release.
0Send private message
?

Click here to login

Reply
Comment

Characters : 0
No results
0Send private message