EnglishGermanFrenchRussianPolishItalianSpanish
Log inRegister
 
[SCR] The Galactic News System (BBS 2.0) (V.105)
Post new topic Reply to topic Goto page 1, 2, 3, 4, 5  Next
View previous topic :: View next topic
Author Message
enenra





Joined: 08 Apr 2005
Posts: 6152 on topic

Thank you for registering your game
modified
PostPosted: Wed, 30. Sep 09, 15:20    Post subject: [SCR] The Galactic News System (BBS 2.0) (V.105) Reply with quote Print

The Galactic News System

Welcome to the Galactic News System. As many people miss the former BBS-System in X3: Terran Conflict, we have developed a new system, which allows news to be available to the player in a similar fashion to X3: Reunion.

Installation:
Excluding the PDF which is not needed, copy all files/folders in the archive into your Terran Conflict root folder. Start a new game or load a saved game.

For players:
To open a newspaper you will need to define a hot-key in the interface section of Terran Conflict’s control set-up options menu. After this has been done, you will just need to press that key for a newspaper to open. The system will open a newspaper that will be based on the owner of the sector you are in (If a newspaper is available). The picking of articles will be random within the selection of articles that are available to that race.

For scripters:
Because for mods it may be better to open the newspaper in another way (for example MD-scripters who want to add a newspaper-seller to a station, from where you could purchase it) You would only need to adjust the set-up script for this so that the hot-key part is deactivated. The activation of the show-script can be done from any place you would like. This has been deliberately done to make this system as flexible as possible.

Some variables inside articles (not the titles!) which are added to the GNS will become replaced automatically by other content. For instance the variable $PLAYERNAME$ will be replaced by the name of the player. There are plenty of variables, all documented in the manual.
This function makes it easy to generate static articles, which change from one showing to the next.


Final Version Info:

All articles from X3: Reunion have been ported over to Terran Conflict and placed as a static type of news in the same way it was static in X3R.

However there is also a set of additional scripts that allow modders to quickly and easily add dynamic news into the system as well.

Anyone is welcome to try this system, and we are especially interested in getting feedback from scripters and modders for the dynamic news scripts. Smile

A more complete instruction set for scripters is in the included PDF.

Download links






Outdated link

Galactic News Service Version 105

Additionally we want to mention that one of our MD-scripters, Jens Ka, has written a MD-lib for use with the GNS. This can be downloaded here. By using this lib, the inclusion of new articles for missions is easier than by run_script.

This is a modders resource, so feel free to use it in your own mods.



Currently known problems:
Not all non-English txt files are fully translated. (There are a few buttons etc that are still in English, the main news is fully translated though. English and German should have complete translations.)

Change log:

Beta 1
-Initial public release.

Beta 2
- race-tagging for dynamic news didn´t work properly - fixed
- using a button in an article closed the newspaper - fixed
- news title now shown above the article, when opening it

Final Version
- added a clipboard function to save your articles and read them later
- changed the arguments of the add-script, so you can now rename the headline above the executing button, but the old argument-structure is not longer working!

Version 101
- adjusted some arguments for MD-usage, which wasn't possible in the previous version

Version 102
- fixed small bug which lead to double inclusion of first dynamic news
- added support for array of races for race.or.sector-argument (only SE)

Version 103
- added a small double check for add.news-script. (Fixes a rare bug that could show up in earlier versions of the GNS. In the earlier versions, when including an article twice (with the same id) it was included in the news list twice, without a double check. Now, the second inclusion doesn't happen any more. This was only relevant for the MD-side, as the SE-side uses a command which already had this check)
- added new functionality: Some variables inside articles (not the titles!) which are added to the GNS will become replaced automatically by other content. For instance the variable $PLAYERNAME$ will be replaced by the name of the player. There are plenty of variables, all documented in the manual.
This function makes it easy to generate static articles, which change from one showing to the next.

Version 104:
- removed the beep when opening the menu - useful, when the GNS should be opened by another task instead of the hotkey

Version 105:
- fixed a critical bug, which could occur, when the player didn't open the GNS for a long time. More and more dynamic articles got added to a list, leading to a freeze and severe lagging, when the player didn't open it early enough. This never occured in the Vanilla-version, though - there are no such dynamic articles included.

Links:

Das Galactic News System (BBS 2.0) (DE)

The X-Tended Team


Edit: Added alternative download links. X2-Illuminatus


_________________


Last edited by enenra on Fri, 23. Sep 11, 19:23; edited 10 times in total
Back to top
View user's profile Send private message
ThisIsHarsh





Joined: 19 Oct 2008
Posts: 1132 on topic

Thank you for registering your game
PostPosted: Thu, 1. Oct 09, 02:02    Post subject: Reply with quote Print

How about a little more info on usage and features?
  • Can the news reports be prioritised, "front page headline" style, for important but time-sensitive events?
  • Can a scripter fetch information on the other 'competing' articles (number, priority) to figure out where their article places in the stack?
  • Can there be restrictions or content differences based on notoriety?
  • Can articles be removed/updated dynamically?
  • Are articles only localised per race or can they be localised per sector (e.g. a battle going on in a neighbouring sector, which may not be big news on the galactic scale)?
  • Can you give some short code snippets of how the scripts are utilized, by both MSCI and MD, if possible?



_________________
There are 10 types of people in the S&M forums - those who understand binary, and those who don't.

Black holes are where God divided by zero.
Back to top
View user's profile Send private message
Trickmov



MEDALMEDALMEDAL

Joined: 07 Nov 2007
Posts: 1432 on topic
Location: AC, Germany
Thank you for registering your game
modified
PostPosted: Thu, 1. Oct 09, 09:37    Post subject: Reply with quote Print

ThisIsHarsh wrote:
How about a little more info on usage and features?
  • Can the news reports be prioritised, "front page headline" style, for important but time-sensitive events?
  • Can a scripter fetch information on the other 'competing' articles (number, priority) to figure out where their article places in the stack?
  • Can there be restrictions or content differences based on notoriety?
  • Can articles be removed/updated dynamically?
  • Are articles only localised per race or can they be localised per sector (e.g. a battle going on in a neighbouring sector, which may not be big news on the galactic scale)?
  • Can you give some short code snippets of how the scripts are utilized, by both MSCI and MD, if possible?


1. No, currently no priorization. We had discussed this, but normally all dynamic news should be displayed at once, when urgent (and in order of apperearence). The dynamic news are always more important than any static one, so it´s probably better to show them above every static one.
However, perhaps we will include this feature later, if necessary, the argument-structure is prepared for it.

2. This would make more work for the scripter of the dynamic news, if he had to control the other ranks, too. And he would have to know much more about the GNS-working than actually. Actually you need only one command to include a news.

3. No. But as you will need a controlling script anyway, which includes your dynamic news into the GNS, you could control there the notority and start the inclusion into the GNS only, if possible.

4. Yes, this is the "max.duration"-option. When activated, the article will be shown this time in the newspaper. When the time is over, it will be removed automatically. Updating is not really necessary, the static articles will remain in the GNS either until manually removed or until the optional "show.once"-argument has been used (article can be read only one time and will be removed then). If you want to reinclude an article, do this in your controlling script.

5. Yes, you can use either the "sector"-option, this news will be shown only in this sector, or use the "race"-option, this article will be shown in all sectors of this race.

6.
Unfortunatly currently only for SE

EDIT: for MD this is the same, but you will need your own id, the SE-id-command returns a number as string, so if you take a text like my.script.number... etc., there should be no problems.

EDIT2: The examples have been updated to the arguments of the final script.

This includes an article into the GNS, which is shown only in the defined $sec. This article can be read only one time and remains maximum for 8 minutes (480secs) in the GNS and will be removed then automatically:
Code:

053 @ |$id = $null -> call script 'plugin.news.getid' :
054 @ |= $null -> call script 'plugin.news.add.news' :  identifier=$id  sector or race=$sec  newstitle=$news.title  news article=$news.article  priority (0-100)=null  show only one time?=[TRUE]  max.duration to show news (secs)=480  script to start=null  headline for button=null  text for button=null


This article is shown everywhere and can be read only one time. It will remain in the GNS, until read or manually removed:
Code:

035 @ $news.id = $null -> call script 'plugin.news.getid' :
036 @ = $null -> call script 'plugin.news.add.news' :  identifier=$news.id  sector or race=null  newstitle=$news.title  news article=$news.article  priority (0-100)=$null  show only one time?=[TRUE]  max.duration to show news (secs)=$null  script to start=$null  headline for button=$null  text for button=$null


This article is shown everywhere, it remains in the GNS after read and it is automatically removed from the GNS after 10 minutes (600 secs). Also this article has a button, which activates the $script.to.start, when used.
If there would be no button, but a script defined, the script would be executed, as soon the article is shown:
Code:

005 @ $id = $null -> call script 'plugin.news.getid' :
016 @ = $null -> call script 'plugin.news.add.news' :  identifier=$id  sector or race=$null  newstitle=$news.title  news article=$news.article  priority (0-100)=null  show only one time?=[FALSE]  max.duration to show news (secs)=600  script to start=$script.to.start  headline for button=$button.headline  text for button=$news.button



7. Additions:

  • The uncolored outfit of the articles is not necessary. The current articles are the X3R-News. For XTC we will have our own ones. For including colors, the /033-codes work.



_________________
meine Scripts (my scripts)


Last edited by Trickmov on Thu, 15. Oct 09, 15:55; edited 3 times in total
Back to top
View user's profile Send private message
enenra





Joined: 08 Apr 2005
Posts: 6152 on topic

Thank you for registering your game
PostPosted: Thu, 15. Oct 09, 15:20    Post subject: Reply with quote Print

Update. Final Version released. Smile

Change log:

Final Version
- added a clipboard function to save your articles and read them later
- changed the arguments of the add-script, so you can now rename the headline above the executing button, but the old argument-structure is not longer working!


_________________
Back to top
View user's profile Send private message
Khensu





Joined: 28 Oct 2009
Posts: 110 on topic

Thank you for registering your game
PostPosted: Tue, 3. Nov 09, 19:36    Post subject: Reply with quote Print

IDEA:

you could do a player article in the news, like if the player kills an enemy of the race hi in, and the ship is bigger then M6, then there should be something in the news, like:


"RaceName" 's "SectorName" saved (as title)

The brave rising star of the "PlayerRace" has done it again. "PlayerName" killed "Number of ships killed" "ShipType" whit his "PlayerShipName" ...




or something like this, it whould be a great addon I think, but I cant make it Sad

Back to top
View user's profile Send private message
Trickmov



MEDALMEDALMEDAL

Joined: 07 Nov 2007
Posts: 1432 on topic
Location: AC, Germany
Thank you for registering your game
PostPosted: Tue, 3. Nov 09, 21:41    Post subject: Reply with quote Print

The included articles are the X3R-News and included only for Vanilla-TC. For XTC we will have our own news-articles... if and in which form such dynamic articles will be included, can´t be said atm.

For Vanilla we are not going to script dynamic news... but as this a modder's resource, everyone who wants (and can), can include his own articles or dynamic news. This system is generally made for further inclusions, and it wins from every community-news.


_________________
meine Scripts (my scripts)
Back to top
View user's profile Send private message
Khensu





Joined: 28 Oct 2009
Posts: 110 on topic

Thank you for registering your game
PostPosted: Wed, 4. Nov 09, 16:41    Post subject: Reply with quote Print

the only problem is, that I cant do it Sad (but I would if I could)


anyways, geting a dinamical version whould be better...


another Idea: could you give the news a time based opening? I mean like a subscription to the nexs, maybe every ingame week the news pops up, just like in real world u get some papers every week... it would be annoying when left in SETA, but other then that it would be great, maybe a little menu to ask if I want to get news every week Smile

Back to top
View user's profile Send private message
Trickmov



MEDALMEDALMEDAL

Joined: 07 Nov 2007
Posts: 1432 on topic
Location: AC, Germany
Thank you for registering your game
modified
PostPosted: Wed, 4. Nov 09, 17:27    Post subject: Reply with quote Print

Khensu wrote:
the only problem is, that I cant do it Sad (but I would if I could)

Yes... this is a problem... but as i said, for Vanilla we are not going to do this.
However scripting something like this is not as complicated as you might think.

it´s mainly something like this:

your code and checks
get texts for news
get id
add news...

Quote:

anyways, geting a dinamical version whould be better...

Yes, we know Wink

Quote:

another Idea: could you give the news a time based opening? I mean like a subscription to the nexs, maybe every ingame week the news pops up, just like in real world u get some papers every week... it would be annoying when left in SETA, but other then that it would be great, maybe a little menu to ask if I want to get news every week Smile


The news itself don´t have an opening time, their showing is random for static news and depending on the executing script for dynamic news. Changing this is theoretically possible, but will not be done, because this would mean to change main parts of the script.
If you want to get an automated newspaper once a week, just change the setup-script, remove the hotkey-part and replace it by a wait-a-week-loop... together with open newspaper, but the news will still be random.


_________________
meine Scripts (my scripts)


Last edited by Trickmov on Wed, 4. Nov 09, 17:32; edited 1 time in total
Back to top
View user's profile Send private message
Khensu





Joined: 28 Oct 2009
Posts: 110 on topic

Thank you for registering your game
PostPosted: Wed, 4. Nov 09, 17:32    Post subject: Reply with quote Print

Trickmov wrote:
If you want to get an automated newspaper once a week, just change the setup-script, remove the hotkey-part and replace it by a wait-a-week-loop... together with open newspaper, but the news will still be random.


and how can I do that? dunno where to start or look for it Sad

and if I want a switch to turn it off and on, how can I add that to it?

Back to top
View user's profile Send private message
Trickmov



MEDALMEDALMEDAL

Joined: 07 Nov 2007
Posts: 1432 on topic
Location: AC, Germany
Thank you for registering your game
PostPosted: Wed, 4. Nov 09, 17:38    Post subject: Reply with quote Print

I can´t explain you detailed how to do this... i don´t want to write a whole scripting tutorial... the hotkey-part is in the setup-script. For having a switch to enable/disable weekly delivery, i would use a AL-plugin, where also the wait-cycle could be defined...

But if you are asking how to do a AL-plugin, this would exceed this thread, i suggest you first start looking at other scripts that use AL-plugins for understanding, but you could also start with one of the scripting tutorials.


_________________
meine Scripts (my scripts)
Back to top
View user's profile Send private message
Khensu





Joined: 28 Oct 2009
Posts: 110 on topic

Thank you for registering your game
PostPosted: Wed, 4. Nov 09, 17:44    Post subject: Reply with quote Print

thx for the tips Smile

will try to learn from tutorials and from other scripts, then I will try to make this script better if the owner lets me Very Happy

ohh and if maybe somebody else makes something like this before me, then plz share with me to Smile

Back to top
View user's profile Send private message
Trickmov



MEDALMEDALMEDAL

Joined: 07 Nov 2007
Posts: 1432 on topic
Location: AC, Germany
Thank you for registering your game
PostPosted: Mon, 7. Dec 09, 11:33    Post subject: Reply with quote Print

Just to clarify the really easy usage of own dynamic news (click the thumbnails to see the bigger versions):

Code:

001   $null = null
002   
003 @ $id = $null -> call script 'plugin.news.getid' :
004 @ = $null -> call script 'plugin.news.add.news' :  identifier=$id  sector or race=Teladi  newstitle='this is the title of our news'  news article='this is the article of our news'  priority (0-100)=null  show only one time?=[TRUE]  max.duration to show news (secs)=3600  script to start=$script.to.start  headline for button='this is the headline above the button of our news'  text for button='this is the text for our button'
005   
006   return null


This is the look, when opening the GNS in a Teladi-sector, select the newstitle and the second pic will popup





The "button of our news" will start the defined script (which has no value in our example though)



The whole article can be viewed for one hour in all Teladi sectors and will disappear then automatically. As the "show_once"-option is set to true, the article can be viewed only one time in the newspaper. If it has been viewed, it will be removed.


_________________
meine Scripts (my scripts)
Back to top
View user's profile Send private message
enenra





Joined: 08 Apr 2005
Posts: 6152 on topic

Thank you for registering your game
PostPosted: Wed, 9. Dec 09, 19:15    Post subject: Reply with quote Print

Just something I want to add. Examples of what articles the GNS could display:

- player has accomplenished a mission - success message to the GNS
- player has failed to do a mission - fail message to GNS
- a sector has been overtaken by the player - article about this to the GNS


_________________
Back to top
View user's profile Send private message
Khensu





Joined: 28 Oct 2009
Posts: 110 on topic

Thank you for registering your game
PostPosted: Wed, 9. Dec 09, 19:18    Post subject: Reply with quote Print

enenra wrote:
Just something I want to add. Examples of what articles the GNS could display:

- player has accomplenished a mission - success message to the GNS
- player has failed to do a mission - fail message to GNS
- a sector has been overtaken by the player - article about this to the GNS


I already had this idea, but they wont do it, this script is for the original messages, but I think anybody could use it for other scripts as a base...


_________________
Sry for my bad english ^^"
Back to top
View user's profile Send private message
Trickmov



MEDALMEDALMEDAL

Joined: 07 Nov 2007
Posts: 1432 on topic
Location: AC, Germany
Thank you for registering your game
PostPosted: Wed, 9. Dec 09, 19:37    Post subject: Reply with quote Print

Yes, this is a modder's resource, so everyone can include it into his own scripts or mods without having to ask for it.


_________________
meine Scripts (my scripts)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic Reply to topic Goto page 1, 2, 3, 4, 5  Next
 
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 vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum
Control Panel
Login Data
The time now is Mon, 23. Oct 17, 13:36

All times are GMT + 2 Hours


Board Security

Copyright © EGOSOFT 1989-2017
Powered by phpBB © 2001, 2005 phpBB Group
Template created by Avatar & BurnIt!
Debug: page generation = 0.92154 seconds, sql queries = 29