Hey, forgive me if I say something stupid. This is my first post and I haven't modified any Free Orion code before. With that out of the way, I was wondering where buildings have their code for actions stored so I could view or modify it. For example, the text on the Spacial Distortion Generator reads that 'Any enemy ships attempting to reach the system containing this building will be redirected back the way they came, or to a random adjacent star.' I was wondering whether it meant a star adjacent to the ship's origin or the system containing the building. It appears to be a system adjacent to the one containing the building after some testing, but I would appreciate being pointed to that code in the game files. I looked for a little while and was unable to find where the actual actions of buildings take place. Thanks for taking the time to read this block of text
EDIT: Subject title typo fixed. Let's see if I can set a record for the number of times someone modifies a post because of mistakes
Spacial Distortion Generator & random chance buildings
Moderators: Oberlus, Committer
Re: Spacial Distortion Generator & random chance buildings
The game content scripts are found in the directory \default\scripting. Building scripts in particular are found in \default\scripting\buildings.
Most buildings have their own file ending with .focs.txt. The scripting language is FOCS.
Most buildings have their own file ending with .focs.txt. The scripting language is FOCS.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: Spacial Distortion Generator & random chance buildings
Spatial Distortion Generator effects are actually in the species common macros FOCS file:
https://github.com/freeorion/freeorion/ ... acros#L161
https://github.com/freeorion/freeorion/ ... acros#L161
Re: Spacial Distortion Generator & random chance buildings
As far as I can see, that text is quite old, the spatial distortion effects were changed during the last cycle and the descriptions were updatedOverlord wrote:Hey, forgive me if I say something stupid. This is my first post and I haven't modified any Free Orion code before. With that out of the way, I was wondering where buildings have their code for actions stored so I could view or modify it. For example, the text on the Spacial Distortion Generator reads that 'Any enemy ships attempting to reach the system containing this building will be redirected back the way they came, or to a random adjacent star.' I was wondering whether it meant a star adjacent to the ship's origin or the system containing the building. It appears to be a system adjacent to the one containing the building after some testing, but I would appreciate being pointed to that code in the game files. I looked for a little while and was unable to find where the actual actions of buildings take place. Thanks for taking the time to read this block of text
EDIT: Subject title typo fixed. Let's see if I can set a record for the number of times someone modifies a post because of mistakes
Code: Select all
BLD_SPATIAL_DISTORT_GEN_DESC
Manipulates the dimensional properties of adjacent starlanes. Enemy ships moving towards the system containing this building will be pushed back 40uu the way they came after they have moved as long as they have not completed their journey and arrived in system. This is activated with the Spatial Distortion focus.
LRN_SPATIAL_DISTORT_GEN_DESC
By manipulating the dimensional properties of a starlane, it would be possible to selectively bend it. Slow incoming ships may be returned to their previous system of departure, and faster ships may be substantially delayed.
Mat Bowles
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.