Hyperlinks
Moderators: Moderators for English X Forum, Scripting / Modding Moderators, Moderators for the X3:FL Forums
Hyperlinks
In Farnham's Legacy, you can now add hyperlinks to various places like menus, description pages, incoming messages, mission breifings, etc.
The hyperlinks will appear similar to links in on a web page that you can click on with your mouse (or select with keyboard/joystick/controller) to take you to other menus. This is primary used to open help pages within the encyclopaedia, but can open most menus.
Detailed information can be found by reading the Hyperlinks page, but discussion and questions should be posted in this topic.
The hyperlinks will appear similar to links in on a web page that you can click on with your mouse (or select with keyboard/joystick/controller) to take you to other menus. This is primary used to open help pages within the encyclopaedia, but can open most menus.
Detailed information can be found by reading the Hyperlinks page, but discussion and questions should be posted in this topic.
Re: Hyperlinks
Created a link in the command description
Show
but in other menus where this description is used, the link stopped working
Show
Last edited by Terre on Thu, 14. Oct 21, 08:37, edited 1 time in total.
Reason: Images posted directly to the forums should not be greater than 640x480 or 100kb, oversize image now linked
Reason: Images posted directly to the forums should not be greater than 640x480 or 100kb, oversize image now linked
Re: Hyperlinks
In this menu, I managed to fix it with -
Show
Code: Select all
add custom menu hyperlinked info: menu=$Array, page id=0, text id=0
But I cannot influence this menu in the encyclopedia ))
Show
Re: Hyperlinks
It seems to me that the following command is simply needed here
Code: Select all
add encyclopedia command override: command=0, pageid=0, textid=0
Re: Hyperlinks
Another way you can do it is to use the automatic hyperlinks. This will replace words with a hyperlink wherever a hyperlink could appear
the page and id is the text you want to replace, and the link is the string for your hyperlink.
this way if the text is display elsewhere where it doesn't format the text the hyperlink wont appear.
But any old scripts will need to be adjust to display the formatted strings instead of a standard info line
Code: Select all
register message automatic hyperlink, page=<int>, id=<int>, link=<string>
this way if the text is display elsewhere where it doesn't format the text the hyperlink wont appear.
But any old scripts will need to be adjust to display the formatted strings instead of a standard info line
Re: Hyperlinks
This is the first thing I did.Cycrow wrote: ↑Thu, 14. Oct 21, 20:30Another way you can do it is to use the automatic hyperlinks.Code: Select all
register message automatic hyperlink, page=<int>, id=<int>, link=<string>
Registered with this command a link in the navigation command description on page 2022.
After that, I got broken links in two menus: Advanced Jumpdrive Menu and Encyclopedia Menu.
The next thing I did was change the menu, namely, I changed the script code:
Code: Select all
$text = read text: page=2022 id=226
add custom menu info line to array $menu: text=$text
Code: Select all
add custom menu hyperlinked info: menu=$menu, page id=241102, text id=38
But I cannot influence the menu of the encyclopedia. And this is where a non-existent script command would help.
Code: Select all
add encyclopedia command override: command=226, pageid=241102, textid=39
Re: Hyperlinks
This doesn't really make sense, if all you did was register the hyperlink, then it will only be displayed in menus where hyperlinks work.Deniskos wrote: ↑Fri, 15. Oct 21, 04:18This is the first thing I did.Cycrow wrote: ↑Thu, 14. Oct 21, 20:30Another way you can do it is to use the automatic hyperlinks.Code: Select all
register message automatic hyperlink, page=<int>, id=<int>, link=<string>
Registered with this command a link in the navigation command description on page 2022.
After that, I got broken links in two menus: Advanced Jumpdrive Menu and Encyclopedia Menu.
If the menu doesn't display hyperlinks, then it also wont add the automatic hyperlinks in.
Did you also add the hyperlink to the actual text ?
As you should only use one or the other, not both
Code: Select all
add encyclopedia command override: command=226, pageid=241102, textid=39
Such a command wouldn't really work to fix your issue. The command text displayed in the bottom is the same as the command text displayed in the command menu as well, so if you change 1, it will change both.
The better solution would be to allow hyperlinks to work in that menu as well, which might be an option if another patch is made at some point
Re: Hyperlinks
This should be fixed in 1.3 RC1