FreeOrion

Forums for the FreeOrion project
It is currently Thu Dec 14, 2017 7:04 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Tue Nov 08, 2016 6:15 pm 
Offline
Space Krill

Joined: Tue Nov 08, 2016 5:50 pm
Posts: 1
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:


Top
 Profile  
 
PostPosted: Tue Nov 08, 2016 8:28 pm 
Offline
AI Contributor

Joined: Tue Feb 17, 2015 11:54 am
Posts: 224
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


Top
 Profile  
 
PostPosted: Tue Nov 08, 2016 8:39 pm 
Offline
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12041
Location: Munich
Spatial Distortion Generator effects are actually in the species common macros FOCS file:

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


Top
 Profile  
 
PostPosted: Wed Nov 09, 2016 7:49 am 
Offline
Creative Contributor
User avatar

Joined: Fri Jun 28, 2013 11:45 pm
Posts: 3291
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:
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group