[SCR] The Galactic News System (BBS 2.0) (V.105)

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

User avatar
Trickmov
Posts: 1431
Joined: Wed, 7. Nov 07, 19:48
x3tc

Post by Trickmov » Sun, 3. Jan 10, 17:37

Ok, I think the race-specific articles could be done as static ones. Let me give an example from the 9500-file:

Code: Select all

		<t id="99">404</t>
		<t id="100">galnet</t>
		<t id="101">Terran/Solaran conflict gets front page news</t>
		<t id="102">With the tension between Terrans and Solarans in the new universe a special team has been established to make reports and explorations of this new fight. The XTC team will send you into the deepest of the thick of things and return you with fresh info into the happenings in and around the X universe.\n\nSign up for XTC today and see what is really going on in Solaran space, and who, if any, will come out on top.\n\nRity Fist, Galnet News</t>
id 99 is the number of articles in this file.
100 is the tagging, this can include also race tagging, for instance "galnet,trade:Argon,Boron"
101 is the title of the article
102 is the article itself

this is described in the manual more extensive, the next set would be from 110 to 112, then 120 to 122 and so on. Have a look at the 9500-file to understand the tagging.


You can use your own t-file, no need to change the 9500-file... even this example (with id 99=1) would work... lets say this is file 9800, then the script should be:

Code: Select all

001   $null = null
002   
003 @ = $null -> call script 'plugin.news.add.newsfile' :  text-file number=9800
004   return null
Then all articles in your file will be added to the Vanilla-texts and randomly shown.



For the second part, the economic news, which should of course only be shown, when such an event occurs, a new script (AL or something similar) would be handy... for XTC we have already done such an event, dealing with ware shortage or overflow, but this will not become released out from XTC, so you are free to do so ;)

About your questions:
Several miscellaneous questions:
  • Can the news be formatted in columns as was in X3R's BBS? I haven't studied the MSCI in detail, thought I'd just ask here.
  • The max.duration option affects an entry's display duration within a game session, but the show-once argument will determine if an entry is displayed only once within a single player campaign (unless re-added by the controlling script). Am I correct?
  • If an article is clipboarded, will GNS remember the variables' values?
  • No, the new custom menues don't allow direct formatting in columns like it was for the X3R-BBS, theoretically possible, but too difficult and unhandy to include.
  • max duration = maximal time until the article is removed automatically (0=endless)
    show-once = article will be removed, when player has opened it, so when wanting to reopen it, the control script has to include it again, or you could disable this feature and remove the article by the included remove.news-script (with the used id)
  • The clipboard saves only text, so all text which is shown when seeing the article can be saved into the clipboard, but not the enhanced features for using a button for starting another script from an article.
    These parts in the example from the earlier post, the "this is the headline above the button of our news" and "this is the text for our button" cannot be seen, when the article is viewed from the clipboard... but as the dynamic articles are time-sensitiv, this makes sense, imo.

moot
Posts: 129
Joined: Sun, 29. Jul 07, 16:19
x3tc

Post by moot » Sun, 3. Jan 10, 17:54

Trickmov wrote:max duration = maximal time until the article is removed automatically (0=endless)
show-once = article will be removed, when player has opened it, so when wanting to reopen it, the control script has to include it again, or you could disable this feature and remove the article by the included remove.news-script (with the used id)
If I understand you correctly, "remove" here means "remove from display on the GNS", but it could appear again later at random? And max duration = article will be "removed" after some time, regardless of whether the player has opened it, whereas show-once = article is removed once player has opened it, even if max duration has not expired?

Thanks very much for your clarification, I'll start work on the conversion and come back when I've other questions. I've also some suggested modifications for GNS, but first I should deal with the meat and potatoes. :)

User avatar
Trickmov
Posts: 1431
Joined: Wed, 7. Nov 07, 19:48
x3tc

Post by Trickmov » Sun, 3. Jan 10, 18:03

moot wrote:
Trickmov wrote:max duration = maximal time until the article is removed automatically (0=endless)
show-once = article will be removed, when player has opened it, so when wanting to reopen it, the control script has to include it again, or you could disable this feature and remove the article by the included remove.news-script (with the used id)
If I understand you correctly, "remove" here means "remove from display on the GNS", but it could appear again later at random? And max duration = article will be "removed" after some time, regardless of whether the player has opened it, whereas show-once = article is removed once player has opened it, even if max duration has not expired?
The removal of dynamic articles is for ever - not only for display now, when you want to see it more often or longer, include it again or don't use a remove-feature.
The second sentence is absolutly correct ;)
Thanks very much for your clarification, I'll start work on the conversion and come back when I've other questions. I've also some suggested modifications for GNS, but first I should deal with the meat and potatoes. :)
Feel free to do so ;)

User avatar
Trickmov
Posts: 1431
Joined: Wed, 7. Nov 07, 19:48
x3tc

Post by Trickmov » Mon, 4. Jan 10, 17:44

Update to version 1.02:

http://downloads.thexuniverse.us/XTC_GN ... temV102.7z

Change log:

- 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)

User avatar
Locksley
Posts: 371
Joined: Fri, 18. Mar 05, 16:26
x3tc

Post by Locksley » Wed, 3. Mar 10, 15:41

Great stuff here!
I first read about it over at the XTM site but didn't really "read".

This is a very welcome addition for adding atmosphere and allot more roleplaying rewarding when one starts adding articles that reflects the player actions.

I will have a look at this after I reinstalled and played for a while. I think the scripting aught to be in my division (amateur, drop the ball - division).

Cheers!
Projects:
Onhold..... time time....

User avatar
Trickmov
Posts: 1431
Joined: Wed, 7. Nov 07, 19:48
x3tc

Post by Trickmov » Wed, 3. Mar 10, 16:19

Locksley wrote:Great stuff here!
I first read about it over at the XTM site but didn't really "read".

This is a very welcome addition for adding atmosphere and allot more roleplaying rewarding when one starts adding articles that reflects the player actions.

I will have a look at this after I reinstalled and played for a while. I think the scripting aught to be in my division (amateur, drop the ball - division).

Cheers!
Thank you :)

As far as we know, there are two scripts out there, that include support for this script:

1. enenra's Rescue Princess MD Mission
2. my sectortakeover-script STO

In XTC we will have also some other "events", that add articles and simulate a non-player-centric universe.

And in XTC we are using the same GNS-version, so if you have scripted something for Vanilla, it will run also in XTC (from the viewing side).

BlackRazor
Posts: 4708
Joined: Tue, 20. Apr 04, 17:39
x4

Post by BlackRazor » Thu, 22. Apr 10, 10:36

The Italian text file contains an error that causes the file not to be loaded and all text to be replaced by ReadText errors.
The problem is in 't id 1042':

Code: Select all

direttore del settore R&S della Arminet
That '&' charachter has to be escaped like in the English Text file, i.e. it has to become

Code: Select all

&amp;
Can I redistribute the correct Italian text file or do you prefer to publish your own fix ?

BTW I noted that several text entries in the Italian file are actually in Spanish, is this correct ?
"For the love of the Fish-Queen!"

User avatar
Trickmov
Posts: 1431
Joined: Wed, 7. Nov 07, 19:48
x3tc

Post by Trickmov » Thu, 22. Apr 10, 11:32

Hm, that's problematic.... the &-bug could be easily fixed, but the spanish texts inside the italian file are another thing.

It's a quite huge work to extract these from X3R and put them into a new file. As we don't use the X3R-files in XTC anyway, we cannot spend time on the italian file now... so, if possible, we would appreciate, if you could take care of that problem.

All we could do, is fixing the &-bug, but if you provide a complete italian file, we will include it in the archive.

Sorry ;)

BlackRazor
Posts: 4708
Joined: Tue, 20. Apr 04, 17:39
x4

Post by BlackRazor » Thu, 22. Apr 10, 16:07

Well I have no idea how I can extract these texts from Reunion and put them in a text file so I can't provide you with the correct Italian file. I just got a report from an Italian user saying that he was getting ReadText errors when using this script, investigated and reported here my findings :wink:
"For the love of the Fish-Queen!"

User avatar
Trickmov
Posts: 1431
Joined: Wed, 7. Nov 07, 19:48
x3tc

Post by Trickmov » Thu, 22. Apr 10, 16:29

Yeah, we feared so... you can tell him, that we could fix the &-bug, but extracting the italian X3R-newstexts and creating a new italian file without spanish texts is out of our resources atm, so it would be up to him, if he wants to get an italian file online.

The X3R-newstexts are included in the 0001.xml-file, so the work is mainly copying and pasting them out of there (where a bug must have happened at us).
These are 404 articles and it's a really big load of work and time, which we can't afford atm.
Also in XTC we don't use these articles, so it's a bit lost time for us ;)

User avatar
Trickmov
Posts: 1431
Joined: Wed, 7. Nov 07, 19:48
x3tc

Post by Trickmov » Mon, 24. May 10, 12:10

Updated to version 1.03:

GNS v1.03

Change log:

- 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.



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.

User avatar
Locksley
Posts: 371
Joined: Fri, 18. Mar 05, 16:26
x3tc

Post by Locksley » Mon, 24. May 10, 12:17

This is great news (get it? news... :roll: )

I have grand plans for X3TC. In fact they are so grand they will never come to fruitfulness, but hopefully I will learn something along the way at least.

Cheers!
Projects:
Onhold..... time time....

Requiemfang
Posts: 3206
Joined: Thu, 16. Jul 09, 12:24
x4

Post by Requiemfang » Mon, 24. May 10, 13:22

SPK pack :roll:

link removed

first time I've done such a thing... so don't complain if it says 1.02 version... I guess this will do until someone more professional ups a new SPK pack to the OP

Edit: removed the link... I screwed up :oops: guess we'll wait until someone more professional does a SPK pack :roll:

User avatar
enenra
Posts: 7150
Joined: Fri, 8. Apr 05, 19:09
x4

Post by enenra » Tue, 25. May 10, 12:05

OP updated with the new information and version. :)

Strategist
Posts: 103
Joined: Wed, 6. May 09, 00:44
x4

Post by Strategist » Mon, 28. Jun 10, 14:28

Is there any to package this into a spk file?

User avatar
Aragon Speed
Posts: 818
Joined: Sat, 10. Dec 05, 13:30
x4

Post by Aragon Speed » Mon, 28. Jun 10, 14:45

Here is an SPK for the 1.03 version of the GNS.

I have just this second banged this together, so it is untested. Also the manual is not included as I couldn't see a way of adding a .pdf.

GNS 1.03 spk

User avatar
Joubarbe
Posts: 4796
Joined: Tue, 31. Oct 06, 12:11
xr

Post by Joubarbe » Thu, 16. Dec 10, 19:44

When I try to open the GNS, I only hear a buzz sound and nothing more happens. I'm running X3 3.0.

User avatar
Trickmov
Posts: 1431
Joined: Wed, 7. Nov 07, 19:48
x3tc

Post by Trickmov » Thu, 16. Dec 10, 20:05

Did it work first, or existed this issue directly after install?

User avatar
Joubarbe
Posts: 4796
Joined: Tue, 31. Oct 06, 12:11
xr

Post by Joubarbe » Thu, 16. Dec 10, 23:17

Directly after, it never worked.

User avatar
Trickmov
Posts: 1431
Joined: Wed, 7. Nov 07, 19:48
x3tc

Post by Trickmov » Fri, 17. Dec 10, 10:49

Sorry, I can't help you with this issue.
Try using the uninstall-script from the ScriptEditor, save and reload - if this doesn't fix the problem, it's definatly on your side, as we are using the GNS in XTC and it was used and tested over and over and never an issue like this occured.

Post Reply

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”