The Browser Extension Framework provides an easy way to add your custom Web Sites to the main browser page: “NETdir://ncity.pub”. It also collects and displays all vanilla sites defined in the game’s resources as journal entries.
Creator: r457 and gh057
Browser Extension Framework
REQUIREMENTS
Nowmods requirements
Mods requiring this file
Mod name | Notes |
Life Insurance (TANSTAAFL Part 2) | |
Vehicle Insurance (TANSTAAFL Part 1) | |
Virtual Atelier | |
Virtual Car Dealer |
PERMISSIONS AND CREDITS
Credits and distribution rights
- Assets of other users: All of the assets in this Browser Extension Framework file are either the author’s or free-to-use modder’s resources.
- Upload authorization: Under no circumstances may you upload this file to other websites.
- Permission to modify: You must obtain my permission before modifying my files in order to improve them.
- Permission to convert: Under no circumstances are you permitted to convert this file for use in other games.
- Permission to use an asset: You must obtain my permission before using any of the assets in this Browser Extension Framework file.
- Asset use permission in purchased mods/files: This file’s assets may not be used in any mods or files that are sold for money on Steam Workshop or other platforms.
- Permission to use assets in mods/files that earn donation points: You cannot earn Donation Points for your mods if they use my assets.
Notes from the Author
This author has made no additional notes about file permissions.
File credits
This author has not credited anyone else in this Browser Extension Framework file.
CHANGELOGS
- Version 0.9.3
- the new webpage is no longer active on V’s office computer during corpo’s lifepath quest
- added page counter to homepage
- added an optional file to block sites by address
- Version 0.9.2
- fixed a problem with displaying site entries added by DLC
- Version 0.9.1
- fixed a bug with site entry duplication
- Version 0.9
- initial release
DESCRIPTIONS
The Browser Extension Framework provides an easy way to add your custom Web Sites to the main browser page: “NETdir://ncity.pub”. It also collects and displays all vanilla sites defined in the game’s resources as journal entries. New sites are pushed to the homepage’s top, and the homepage can be scrolled using UI_MoveDown/UI_MoveUp actions (typically bound to the mouse wheel).
To add a new site, make a child of BrowserEventsListener, fill in the name/address/pages, and add/initiate your custom site in BrowserGameController.OnInitialize – see CustomSiteExample in the framework’s optional files section.
You have the option of building your pages from scratch (manually or using Codeware custom widgets) or reusing existing vanilla templates (see CustomSiteExample).
Details:
- The system will only pass a link address to your listener if it begins with your site’s main address: use it to define all your site pages in the GetWebPage method.
- Your custom page is reparented to the root page widget with anchor set to fill – anything else is on you: correct margins, scale, processing events, etc.
- Link your pages with the LoadPageByAddress method.
- You can override vanilla sites by address as custom sites are processed first (TODO: override system needs more work, in process).
Making your site icon:
CustomSiteExample archive from Optional files contains a WolvenKit project with the raw dds icon, xbm texture and inkatlas. Icon size is 204×229.
Notes:
- Use dds as a raw source.
- Select TEXG_Generic_UI as a texture group on import, check IsGamma and VFlip.
- Select TRF_TrueColor for RawFormat and TCM_None for compression, remove all the other checkboxes.
- Didn’t test with transparency yet – might be different!
Block sites by address:
Open r6\scripts\BlockByAddress\BlockByAddress.reds with notepad and uncomment (remove // at the start) the sites you don’t want to see in-game. It’s a simple system (might do an in-game UI later) to allow people to remove useless noise, though, we do encourage other modders to try and give those sites life.
TODO:
- Make the homepage an actual scrollable widget (now imitates scrolling by redrawing items)
- Test controller compatibility
Acknowledgements:
DJ_Kovrik for being a very helpful guide into the world of CP77 modding
psiberx for great tools and docs
INSTALLATION
- Download the main framework archive
- Extract the archive into the Cyberpunk 2077 install folder
- You can download an optional mod that allows to manually block sites by address (see instructions below)
↳Download Browser Extension Framework
Optional files: |
---|
↳Browser Extension Block By Address |
A simple script to block sites by their address (see instructions in the description). |
↳Browser Extension Example |
An example site for mod developers. |
↳Browser Extension WKitSrc |
Sample inkatlas and texture. |