Painstakingly created script library: lib.DD.GetSectorInfo.xy and lib.DD.GetSectorInfo.name.
DOWNLOAD
These library scripts take any X3 2.0 sector as a parameter and return an array, organised as following:
[0] = Race (useful for plugins that modify the owner race of a sector and want to know the original owner race).
[1] = Population.
[2] = Number of planets.
[3] = Is a core sector: TRUE if core, FALSE if border.
[4] = Is a home sector: TRUE if part of the sector cluster surrounding the home sector of a race, FALSE otherwise.
There are two versions, both with caveats:
- lib.DD.GetSectorInfo.name: This will use the name of the sector to determine which one it is. This means mods that change the universe layout will have no effect on the result. However, it is only valid for the english language version!
- lib.DD.GetSectorInfo.xy: This will use the sector x,y coordinates to determine which one it is. This means its independent of language, however it could very well be invalidated by any mod that changes the universe layout.
I've been as meticulous as possible, but of course human error is a possibility, so please report any inaccuracies.
A HUGE thankyou to Cool_SnipeR for the X3 External Script Editor. Without a copying and pasting facility it would have taken me years rather than hours to do this.
Feel free to use/abuse/modify to suit your application. I just hope this helps spawn some interesting new plugins.
Enjoy!
[SCRIPT] Library: Get Sector Info - original race, population, etc. (31/03/2007)
The place to discuss scripting and game modifications for X³: Reunion.
Moderators: Scripting / Modding Moderators, Moderators for English X Forum
1 post
• Page 1 of 1
-
- Posts: 113
- Joined: Fri, 23. Mar 07, 23:32
[SCRIPT] Library: Get Sector Info - original race, population, etc. (31/03/2007)
Post by DangerDave »
Dave.
1 post
• Page 1 of 1
Return to “X³: Reunion - Scripts and Modding”
Jump to
- English Forums
- ↳ X4: Foundations
- ↳ X4: Foundations - Spoilers
- ↳ X4: Foundations - Technical Support
- ↳ X4: Foundations - Scripts and Modding
- ↳ Construction Community
- ↳ X Wiki Discussion
- ↳ X Rebirth Universe
- ↳ X Rebirth VR Edition
- ↳ X Rebirth - Technical Support
- ↳ X Rebirth - Scripts and Modding
- ↳ X³: Farnham's Legacy
- ↳ X³: Farnham's Legacy - Scripts and Modding
- ↳ X Trilogy Universe
- ↳ X³: Terran Conflict / Albion Prelude / Farnham's Legacy - Technical Support
- ↳ X³: Terran Conflict / Albion Prelude - Scripts and Modding
- ↳ X³: Reunion, X²: The Threat, X-T and X-BTF - Technical Support
- ↳ X³: Reunion - Scripts and Modding
- ↳ X²: The Threat - Scripts and Modding
- ↳ Creative Universe
- ↳ Off Topic English
- Deutschsprachige Foren
- ↳ X4: Foundations
- ↳ X4: Foundations - Spoilers
- ↳ X4: Foundations - Technische Unterstützung
- ↳ X4: Foundations - Scripts und Modding
- ↳ X Rebirth Universum
- ↳ X Rebirth VR Edition
- ↳ X Rebirth - Technische Unterstützung
- ↳ X Rebirth - Scripts und Modding
- ↳ X³: Farnham's Legacy
- ↳ X³: Farnham's Legacy - Scripts und Modding
- ↳ X Trilogie Universum
- ↳ X³: Terran Conflict / Albion Prelude / Farnham's Legacy - Technische Unterstützung
- ↳ X³: Terran Conflict / Albion Prelude - Scripts und Modding
- ↳ X³: Reunion, X²: Die Bedrohung, X-T und X-BTF - Technische Unterstützung
- ↳ X³: Reunion - Scripts und Modding
- ↳ X²: Die Bedrohung - Scripts und Modding
- ↳ Kreative Zone
- ↳ Off Topic Deutsch
- Forum Français
- ↳ X4: Foundations
- ↳ Support et Aide pour X4: Foundations
- ↳ Script et Modding pour X4: Foundations
- ↳ L'Univers X Rebirth
- ↳ Support et Aide pour X Rebirth
- ↳ Script et Modding pour X Rebirth
- ↳ Support et Aide pour la Trilogie X
- ↳ L'Univers de la Trilogie X
- ↳ Script et Modding pour la Trilogie X
- ↳ Off Topic Français
- Forum Italiano
- ↳ X4: Foundations
- ↳ Supporto Tecnico per X4: Foundations
- ↳ Script e Modding per X4: Foundations
- ↳ L'Universo di X Rebirth
- ↳ Script e Modding per X Rebirth
- ↳ Supporto Tecnico per X Rebirth
- ↳ L'Universo della Trilogia di X
- ↳ Script e Modding per la Trilogia di X
- ↳ Supporto Tecnico per la Trilogia di X
- ↳ Off Topic Italiano
- Polskie Fora
- ↳ Polskie / Polish X-Forum
- ↳ Polskie / Polish Off Topic
- Other Languages
- ↳ Česky / Czech X-Forum
- ↳ Dansk / Danish X-Forum
- ↳ Español / Spanish X-Forum
- ↳ Nederlands / Dutch X-Forum
- ↳ Português / Portuguese X-Forum
- ↳ Русский / Russian X-Forum
- DevNet: General
- ↳ MSCI Reference
- DevNet: X4: Foundations
- DevNet: X Rebirth
- ↳ XR - Technical Troubleshooting