Spacial Distortion Generator & random chance buildings

Creation, discussion, and balancing of game content such as techs, buildings, ship parts.

Moderators: Oberlus, Committer

Post Reply
Message
Author
Overlord
Space Krill
Posts: 1
Joined: Tue Nov 08, 2016 5:50 pm

Spacial Distortion Generator & random chance buildings

#1 Post by Overlord »

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 :wink:

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 :lol:

Morlic
AI Contributor
Posts: 296
Joined: Tue Feb 17, 2015 11:54 am

Re: Spacial Distortion Generator & random chance buildings

#2 Post by Morlic »

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.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Spacial Distortion Generator & random chance buildings

#3 Post by Geoff the Medio »

Spatial Distortion Generator effects are actually in the species common macros FOCS file:

https://github.com/freeorion/freeorion/ ... acros#L161

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: Spacial Distortion Generator & random chance buildings

#4 Post by MatGB »

Overlord 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 :wink:

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 :lol:
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 updated

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.

Post Reply