Author Topic: FOnline Interface Editor  (Read 8087 times)

FOnline Interface Editor
« on: January 17, 2021, 08:04:25 pm »
Visual editor for interface ini file.
Sources: https://github.com/m208/fonline-interface-editor
Download link: https://github.com/m208/fonline-interface-editor/releases/download/v1.0/FOIEditor.rar

Unpack all files to the same folder.
Launch the application, open the * .ini file from the interface directory via the menu, and then navigate with the screen menu.
Move or resize controls by mouse, change pictures via open file dialog.
Or edit them by text fields on the fly.


Structure of in-game interface ini file.
Most interface screens are coded as follows:
-   Background image. Image file and screen size
-   Control areas. It can be an area for text/for drawing some in-game stuff/for buttons
In case of buttons, the control contains one or more picture (default/pressed/unavailable)
-   Custom fields which contains some value, for example, the height of inventory item or distance between AP marks

For example, inventory section
Code: [Select]
#Background---------------------------------------------------------------------
InvMainPic = INVBOX.PNG # Inventory window image
InvMain = 0 0 498 401 # Dimensions of the active area of ​​the inventory window (centered)

#Areas-----------------------------------------------------------------------
InvInv = 44 40 113 365 # Cell area coordinates
InvChosen = 174 34 235 132 # Player image coordinates
InvSlot1 = 155 310 245 370 # Coordinates of the first slot
InvSlot2 = 246 310 336 370 # Coordinates of the second slot
InvArmor = 153 208 247 272 # Armor slot coordinates
InvText = 300 48 445 253 # Text area coordinates

#Buttons---------------------------------------------------------------------
InvScrUpPic = INVUPOUT.FRM # Image of the scroll up button
InvScrUpPicDn = INVUPIN.FRM # Image of the pressed scroll up button
InvScrUpPicNa = INVUPDS.FRM # Image of inactive scroll up button
InvScrUp = 134 42 154 60 # Scroll button coordinates

InvScrDnPic = INVDNOUT.FRM # Image of the scroll down button
InvScrDnPicDn = INVDNIN.FRM # Image of the pressed scroll down button
InvScrDnPicNa = INVDNDS.FRM # Image of an inactive scroll down button
InvScrDn = 134 66 154 84 # Scroll button coordinates

InvOkPic = MENUUP.FRM # Image of the window close button
InvOkPicDn = MENUDOWN.FRM # Image of pressed window close button
InvOk = 433 349 452 367 # Coordinates of the window close button

#Custom field-----------------------------------------------------------------
InvHeightItem = 32 # Inventory cell height


Configuration schemes for different FOnline servers.
Default config file (default.cfg) contains scheme for FO2S3 server.
It describes the rules for which screens contain which elements in JSON format.

Example for inventory section
Code: [Select]
"Inventory":{
 "Main" : [ "InvMain", "InvMainPic"],
 "Controls": [ "InvSlot1", "InvSlot2","InvArmor","InvText", "InvChosen", "InvInv",
["InvOk", "InvOkPic", "InvOkPicDn"],
["InvScrUp", "InvScrUpPic", "InvScrUpPicDn", "InvScrUpPicNa"],
["InvScrDn", "InvScrDnPic", "InvScrDnPicDn", "InvScrDnPicNa"] ],
 "Custom": [ "InvHeightItem" ]
 },

Rules:
Code: [Select]
“Section name” : {
“Main”: array  [key background coords,  key background image],
“Controls”: array. Area – single element, button – array [key control coords, key image1, key image2],
“Custom”: array of elements }

Some screens do not contain a key for background coords (console, dashboard, and others). Use 0 in this case.
"Main" :  ["0", "ConsoleMainPic"]

You can edit default.cfg file, or create another file and switch between them in settings section.
Be careful when editing JSON, validation has not been implemented yet, syntax errors or missing keys may cause the application to crash.

Restrictions.
*.Frm textures do not supported.
Custom fields values do not affect app GUI visualization.

Resolution blocks.
If the ini file contains resolution blocks, the one with the highest resolution will be picked and its values will override the defaults.

Keys description.
The hintbook.ini file contains descriptions of interface elements that are displayed as tooltips.
They are google translated from Russian and may be irrelevant.
In any case, you can edit them and add new elements.


« Last Edit: January 17, 2021, 09:41:00 pm by m208 »

Offline Slowhand

  • Go for the eyes, Boo! Go for the eyes!
Re: FOnline Interface Editor
« Reply #1 on: January 22, 2021, 08:25:43 pm »
Nice work man!

Re: FOnline Interface Editor
« Reply #2 on: March 13, 2021, 03:19:36 am »
Very very useful, but right tab doesn't have horizontal slidebar, can't see names and so...
« Last Edit: March 13, 2021, 03:22:32 am by Mopok »