How to add an article to the BBS?

The place to discuss scripting and game modifications for X³: Reunion.

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

Post Reply
User avatar
esd
Posts: 11608
Joined: Tue, 2. Sep 03, 05:57
x3tc

How to add an article to the BBS?

Post by esd » Sun, 27. Nov 05, 04:20

Not an interactive one... just a general article about whatever, could be event triggered, random, whatever... I can look at when and where to call it later, I just want to know how at the moment.

I looked at the overtuning script by cycrow, but it's... complicated. I'm still green with all this modding malarky, so any help would be appreciated :)
esd's Guides: X² Loops - X³ MORTs

User avatar
Sandalpocalypse
Posts: 4435
Joined: Tue, 2. Dec 03, 23:28
x4

Post by Sandalpocalypse » Sun, 27. Nov 05, 04:35


Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 21061
Joined: Mon, 15. Nov 04, 00:26
x4

Post by Cycrow » Sun, 27. Nov 05, 12:38

AFAIK there are 2 methods to adding to the BBS
theres the news articles and the quest method

not sure exactly how the news article method works yet thou

but for the quest method, what you need to do is create the quest script
this has 4 arguments going into it, the Quest object, the event string, the data aray, and the answer string

then you just use the register quest script command to register that script, thats usually done in a setup script when the game loads

when it first loads, it will call the script with the event string of "init" or "reinit" when you can do any initilisation for the script

in that script, you just want to check the event script to c what event called the script. the "prio" string is sent when ever you actaully look at the BBS, and you return a number for the chance for it to be displayed, the higher the number, the more chance it will be displayed.

When it wants to display you quest, it well call the "offer" event where you can set the message you want to display, but using the set quest state with message command. The quest state is set to the constant of [Quest.Offered] and you use the quest object and the message you want to displayed.

If its a not interactive one, then you just need another command to finish the quest in the "check" event

User avatar
esd
Posts: 11608
Joined: Tue, 2. Sep 03, 05:57
x3tc

Post by esd » Sun, 27. Nov 05, 16:08

not sure exactly how the news article method works yet thou
Hmm, that's basically what I'm after... wanted to add "pointless" bbs missions that would actually hint at other things my scripts are doing.
esd's Guides: X² Loops - X³ MORTs

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 21061
Joined: Mon, 15. Nov 04, 00:26
x4

Post by Cycrow » Sun, 27. Nov 05, 16:11

i just used the quest system too add those sort things
if you dont have any questions, then it just displays like a news article, just have to remembe to set the finished state in the check event, either at a time out, or straight away

User avatar
esd
Posts: 11608
Joined: Tue, 2. Sep 03, 05:57
x3tc

Post by esd » Sun, 27. Nov 05, 16:16

Don't suppose there's a chance I could grab a copy of one of those for... erm... analysis (aka, me looking and seeing how it's done)? With all the task-related stuff in the overtuning script I can't see the script for the letters.
esd's Guides: X² Loops - X³ MORTs

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 21061
Joined: Mon, 15. Nov 04, 00:26
x4

Post by Cycrow » Sun, 27. Nov 05, 16:29

heres a quick example i made
http://ircwhore.co.uk/x3/scripts/BBSExample.rar

it has 2 files, the test.setup.bbs is what should be loaded as a setup script, this initilises the quest you want to display

the test.bbs.quest file is the script thats initilised, it has the 4 arguments that get passed to the script

it simply sets the priority and displays a message

User avatar
esd
Posts: 11608
Joined: Tue, 2. Sep 03, 05:57
x3tc

Post by esd » Sun, 27. Nov 05, 17:07

Nice one - I shall check it out when I fire up x³ next :D
esd's Guides: X² Loops - X³ MORTs

User avatar
TECSG
Posts: 1585
Joined: Tue, 17. Feb 04, 23:06
x3tc

Post by TECSG » Fri, 23. Dec 05, 17:04

I've got two problems with my BBS mission, I hope someone out there can help...

First, my BBS advert has some text, then 5 selectable options, then more text, but when the advert is displayed, it doesn't show any text after the 5th option, has anyone else had this happen? (There are no termination characters after the 5th option or anything, just a newline and the last sentence of text).

Secondly, once the option is selected, my 'okay, gonna do it' message appears, but the advert remains in the station BBS, is there a way to remove the advert/mission from the station if the player selects the mission?

Setting the instance to 1 will only work if it's not the same advert/mission as was previously displayed I think...

I've set the quest state to 'accepted' (and even 'finished'), but it remains in the station list.

Appreciate any help...

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 21061
Joined: Mon, 15. Nov 04, 00:26
x4

Post by Cycrow » Fri, 23. Dec 05, 17:07

are ur options centered ?
using the [center][/center] tags ?

coz if those are used, it doesn't show anything after for some reason, but it only occurs when you use 5 answers, using 4 answers, or using without center seems to work

when the player selects the optinos
you will get the "select" event

you must set quest state to Quest.Accepted for it to be removed
it might also work if you set Quest.Finished, but im not 100%
setting it to Accepted should remove it thou, it works on mine, did you check that ur getting the "accept" event ?

it will however get removed after a short time anyways

setting the Quest.Abort state will leave the advert on the BBS

User avatar
TECSG
Posts: 1585
Joined: Tue, 17. Feb 04, 23:06
x3tc

Post by TECSG » Fri, 23. Dec 05, 18:20

I did have the options centered, but as that caused even more problems (I could only get 4 of the options show up), I removed it.

I am setting quest.accepted, but that doesn't seem to remove the advert from the list, although I may be doing something wrong!

I haven't specifically checked for the 'accepted' event, (which I should do I suppose), but it's getting all the others.

The printing thing must be a bug then, presumably, they didn't think anyone would have more than 4 options!

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 21061
Joined: Mon, 15. Nov 04, 00:26
x4

Post by Cycrow » Fri, 23. Dec 05, 18:23

yeah it might be a good idea to check for the accept state
at least then you know that the quest was properly put into an accept state

if you dont get it, then you know theres something wrong with that

i've really found no problems yet with them not being removed once the quest was accepted, usually they r removed instantly as i select the the option

User avatar
TECSG
Posts: 1585
Joined: Tue, 17. Feb 04, 23:06
x3tc

Post by TECSG » Fri, 23. Dec 05, 18:26

Thanks Cycrow,

I'll try that asap (in the middle of 'sacred' at the mo).

Appreciate the help.

Post Reply

Return to “X³: Reunion - Scripts and Modding”