• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

OTClient [OTCV8]New health/manabar margin problem

Felipe93

Ghost Member
Joined
Mar 21, 2015
Messages
1,990
Solutions
9
Reaction score
334
Location
Chile
Hi


I have changed my modules/game_healthinfo folder from the one of this project Otclient Classic UI (https://otland.net/threads/otclient-classic-ui.279994)
and did the same inside with data/styles/40-healthinfo.otui and inside layouts/retro/40-healthinfo.otui.
Did this because I wanted the bars being displayed like in the Cipsoft client, everything seems to work good, the health, and mana bar (full)are being displaying good
And the health bar is being displayed good while is getting drained. But THIS DOES NOT WORK IN THE SAME WAY WITH THE MANA BAR. I have changed margin to various files to make display 4 slots in the backpack also changed the way the inventory looks, and I think that this might be the problem.
I'm not quite sure where to look of if in fact this is the problem...., this is strange because this happens only when the manabar is being getting drained but not when is full, as soon as I waste a bit of mana the bar begins to dissapear completely till at certain point, when finally the empty manabar is beginning to be displayed, as I said this does not happen with the health bar.
 

Attachments

can you show me your 40-healthinfo.otui (from data/styles) and your healthinfo.otui from modules/healthinfo, please
Sure
here is data/styles/healthinfo
Code:
FullHealthBar < ProgressBar
  height: 11
  image-source: /images/ui/emptybar
  anchors.top: parent.top
  anchors.left: parent.left
  margin-left: 24
  margin-top: 4
  margin-right: 51

HealthBar < ProgressBar
  id: healthBar
  image-source: /images/ui/fullhealthbar
  height: 11
  anchors.top: parent.top
  anchors.left: parent.left
  margin-left: 24
  margin-top: 4
  margin-right: 51

ManaBar < ProgressBar
  id: manaBar
  image-source: /images/ui/fullmanabar
  height: 11
  anchors.top: healthBar.bottom
  anchors.left: parent.left
  margin: 2
  margin-left: 24
  margin-top: 4
  margin-right: 72

FullManaBar < ProgressBar
  height: 11
  image-source: /images/ui/emptybar
  anchors.top: healthBar.bottom
  anchors.left: parent.left
  anchors.right: parent.right
  margin: 2
  margin-top: 4
  margin-right: 72
  margin-left: 24

ManaLabel < GameLabel
  id: manaLabel
  color: #AFAFAF
  font: verdana-11px-antialised
  text-offset: 140 0
  anchors.left: parent.left
  anchors.right: parent.right
  anchors.top: manaBar.top
  anchors.bottom: manaBar.bottom
  margin-top: -2
  margin-left: -20

HealthLabel < GameLabel
  id: healthLabel
  color: #AFAFAF
  font: verdana-11px-antialised
  text-offset: 140 0
  anchors.left: parent.left
  anchors.right: parent.right
  anchors.top: healthBar.top
  anchors.bottom: healthBar.bottom
  margin-top: -2
  margin-left: -20

ConditionWidget < UIWidget
  size: 10 8

  $!first:
    margin-left: 2

HealthInfoWindow < HeadlessMiniWindow
  icon:
  text:
  height: 50
  &forceOpen: true
  icon: /images/topbuttons/healthinfo
  !text: tr('Health Info')

  MiniWindowContents
    margin-top: 1
    FullHealthBar
    HealthBar
    FullManaBar
    ManaBar
    HealthLabel
    ManaLabel

    Label
      height: 24
      image-source: /images/ui/progress_icons
      anchors.top: parent.top
      anchors.left: manaBar.left
      margin-left: -16
      margin-top: 5

  Panel
    id: conditionPanel
    layout:
      type: horizontalBox
    height: 0
    margin-top: -10
    padding: 0
    anchors.top: prev.bottom
    anchors.left: parent.left
    anchors.right: parent.right
    border-width: 0
    border-color: #00000077
    background-color: #ffffff11
here is layouts/healthinfo
Code:
FullHealthBar < ProgressBar
  height: 11
  image-source: /images/ui/emptybar
  anchors.top: parent.top
  anchors.left: parent.left
  margin-left: 24
  margin-top: 4
  margin-right: 51

HealthBar < ProgressBar
  id: healthBar
  image-source: /images/ui/fullhealthbar
  height: 11
  anchors.top: parent.top
  anchors.left: parent.left
  margin-left: 24
  margin-top: 4
  margin-right: 51

ManaBar < ProgressBar
  id: manaBar
  image-source: /images/ui/fullmanabar
  height: 11
  anchors.top: healthBar.bottom
  anchors.left: parent.left
  margin: 2
  margin-left: 24
  margin-top: 4
  margin-right: 72

FullManaBar < ProgressBar
  height: 11
  image-source: /images/ui/emptybar
  anchors.top: healthBar.bottom
  anchors.left: parent.left
  anchors.right: parent.right
  margin: 2
  margin-top: 4
  margin-right: 72
  margin-left: 24

ManaLabel < GameLabel
  id: manaLabel
  color: #AFAFAF
  font: verdana-11px-antialised
  text-offset: 140 0
  anchors.left: parent.left
  anchors.right: parent.right
  anchors.top: manaBar.top
  anchors.bottom: manaBar.bottom
  margin-top: -2
  margin-left: -20

HealthLabel < GameLabel
  id: healthLabel
  color: #AFAFAF
  font: verdana-11px-antialised
  text-offset: 140 0
  anchors.left: parent.left
  anchors.right: parent.right
  anchors.top: healthBar.top
  anchors.bottom: healthBar.bottom
  margin-top: -2
  margin-left: -20

ConditionWidget < UIWidget
  size: 10 8

  $!first:
    margin-left: 2

HealthInfoWindow < HeadlessMiniWindow
  icon:
  text:
  height: 50
  &forceOpen: true
  icon: /images/topbuttons/healthinfo
  !text: tr('Health Info')

  MiniWindowContents
    margin-top: 1
    FullHealthBar
    HealthBar
    FullManaBar
    ManaBar
    HealthLabel
    ManaLabel

    Label
      height: 24
      image-source: /images/ui/progress_icons
      anchors.top: parent.top
      anchors.left: manaBar.left
      margin-left: -16
      margin-top: 5

  Panel
    id: conditionPanel
    layout:
      type: horizontalBox
    height: 0
    margin-top: -10
    padding: 0
    anchors.top: prev.bottom
    anchors.left: parent.left
    anchors.right: parent.right
    border-width: 0
    border-color: #00000077
    background-color: #ffffff11
and in modules healthinfo.otui ( just like in in the main files from Otclient Classic UI (https://otland.net/threads/otclient-classic-ui.279994/)) is like this
Lua:
HealthInfoWindow
  id: healthInfoWindow
  @onClose: modules.game_healthinfo.onMiniWindowClose()
  &save: true
  &autoOpen: 2

if i paste this
Code:
FullHealthBar < ProgressBar
  height: 11
  image-source: /images/ui/emptybar
  anchors.top: parent.top
  anchors.left: parent.left
  margin-left: 24
  margin-top: 4
  margin-right: 51

HealthBar < ProgressBar
  id: healthBar
  image-source: /images/ui/fullhealthbar
  height: 11
  anchors.top: parent.top
  anchors.left: parent.left
  margin-left: 24
  margin-top: 4
  margin-right: 51

ManaBar < ProgressBar
  id: manaBar
  image-source: /images/ui/fullmanabar
  height: 11
  anchors.top: healthBar.bottom
  anchors.left: parent.left
  margin: 2
  margin-left: 24
  margin-top: 4
  margin-right: 72

FullManaBar < ProgressBar
  height: 11
  image-source: /images/ui/emptybar
  anchors.top: healthBar.bottom
  anchors.left: parent.left
  anchors.right: parent.right
  margin: 2
  margin-top: 4
  margin-right: 72
  margin-left: 24

ManaLabel < GameLabel
  id: manaLabel
  color: #AFAFAF
  font: verdana-11px-antialised
  text-offset: 140 0
  anchors.left: parent.left
  anchors.right: parent.right
  anchors.top: manaBar.top
  anchors.bottom: manaBar.bottom
  margin-top: -2
  margin-left: -20

HealthLabel < GameLabel
  id: healthLabel
  color: #AFAFAF
  font: verdana-11px-antialised
  text-offset: 140 0
  anchors.left: parent.left
  anchors.right: parent.right
  anchors.top: healthBar.top
  anchors.bottom: healthBar.bottom
  margin-top: -2
  margin-left: -20

ConditionWidget < UIWidget
  size: 10 8

  $!first:
    margin-left: 2

HealthInfoWindow < HeadlessMiniWindow
  icon:
  text:
  height: 50
  &forceOpen: true
  icon: /images/topbuttons/healthinfo
  !text: tr('Health Info')

  MiniWindowContents
    margin-top: 1
    FullHealthBar
    HealthBar
    FullManaBar
    ManaBar
    HealthLabel
    ManaLabel

    Label
      height: 24
      image-source: /images/ui/progress_icons
      anchors.top: parent.top
      anchors.left: manaBar.left
      margin-left: -16
      margin-top: 5

  Panel
    id: conditionPanel
    layout:
      type: horizontalBox
    height: 0
    margin-top: -10
    padding: 0
    anchors.top: prev.bottom
    anchors.left: parent.left
    anchors.right: parent.right
    border-width: 0
    border-color: #00000077
    background-color: #ffffff11
code in there, i get instant error and client wont open
 
Sure
here is data/styles/healthinfo
Code:
FullHealthBar < ProgressBar
  height: 11
  image-source: /images/ui/emptybar
  anchors.top: parent.top
  anchors.left: parent.left
  margin-left: 24
  margin-top: 4
  margin-right: 51

HealthBar < ProgressBar
  id: healthBar
  image-source: /images/ui/fullhealthbar
  height: 11
  anchors.top: parent.top
  anchors.left: parent.left
  margin-left: 24
  margin-top: 4
  margin-right: 51

ManaBar < ProgressBar
  id: manaBar
  image-source: /images/ui/fullmanabar
  height: 11
  anchors.top: healthBar.bottom
  anchors.left: parent.left
  margin: 2
  margin-left: 24
  margin-top: 4
  margin-right: 72

FullManaBar < ProgressBar
  height: 11
  image-source: /images/ui/emptybar
  anchors.top: healthBar.bottom
  anchors.left: parent.left
  anchors.right: parent.right
  margin: 2
  margin-top: 4
  margin-right: 72
  margin-left: 24

ManaLabel < GameLabel
  id: manaLabel
  color: #AFAFAF
  font: verdana-11px-antialised
  text-offset: 140 0
  anchors.left: parent.left
  anchors.right: parent.right
  anchors.top: manaBar.top
  anchors.bottom: manaBar.bottom
  margin-top: -2
  margin-left: -20

HealthLabel < GameLabel
  id: healthLabel
  color: #AFAFAF
  font: verdana-11px-antialised
  text-offset: 140 0
  anchors.left: parent.left
  anchors.right: parent.right
  anchors.top: healthBar.top
  anchors.bottom: healthBar.bottom
  margin-top: -2
  margin-left: -20

ConditionWidget < UIWidget
  size: 10 8

  $!first:
    margin-left: 2

HealthInfoWindow < HeadlessMiniWindow
  icon:
  text:
  height: 50
  &forceOpen: true
  icon: /images/topbuttons/healthinfo
  !text: tr('Health Info')

  MiniWindowContents
    margin-top: 1
    FullHealthBar
    HealthBar
    FullManaBar
    ManaBar
    HealthLabel
    ManaLabel

    Label
      height: 24
      image-source: /images/ui/progress_icons
      anchors.top: parent.top
      anchors.left: manaBar.left
      margin-left: -16
      margin-top: 5

  Panel
    id: conditionPanel
    layout:
      type: horizontalBox
    height: 0
    margin-top: -10
    padding: 0
    anchors.top: prev.bottom
    anchors.left: parent.left
    anchors.right: parent.right
    border-width: 0
    border-color: #00000077
    background-color: #ffffff11
here is layouts/healthinfo
Code:
FullHealthBar < ProgressBar
  height: 11
  image-source: /images/ui/emptybar
  anchors.top: parent.top
  anchors.left: parent.left
  margin-left: 24
  margin-top: 4
  margin-right: 51

HealthBar < ProgressBar
  id: healthBar
  image-source: /images/ui/fullhealthbar
  height: 11
  anchors.top: parent.top
  anchors.left: parent.left
  margin-left: 24
  margin-top: 4
  margin-right: 51

ManaBar < ProgressBar
  id: manaBar
  image-source: /images/ui/fullmanabar
  height: 11
  anchors.top: healthBar.bottom
  anchors.left: parent.left
  margin: 2
  margin-left: 24
  margin-top: 4
  margin-right: 72

FullManaBar < ProgressBar
  height: 11
  image-source: /images/ui/emptybar
  anchors.top: healthBar.bottom
  anchors.left: parent.left
  anchors.right: parent.right
  margin: 2
  margin-top: 4
  margin-right: 72
  margin-left: 24

ManaLabel < GameLabel
  id: manaLabel
  color: #AFAFAF
  font: verdana-11px-antialised
  text-offset: 140 0
  anchors.left: parent.left
  anchors.right: parent.right
  anchors.top: manaBar.top
  anchors.bottom: manaBar.bottom
  margin-top: -2
  margin-left: -20

HealthLabel < GameLabel
  id: healthLabel
  color: #AFAFAF
  font: verdana-11px-antialised
  text-offset: 140 0
  anchors.left: parent.left
  anchors.right: parent.right
  anchors.top: healthBar.top
  anchors.bottom: healthBar.bottom
  margin-top: -2
  margin-left: -20

ConditionWidget < UIWidget
  size: 10 8

  $!first:
    margin-left: 2

HealthInfoWindow < HeadlessMiniWindow
  icon:
  text:
  height: 50
  &forceOpen: true
  icon: /images/topbuttons/healthinfo
  !text: tr('Health Info')

  MiniWindowContents
    margin-top: 1
    FullHealthBar
    HealthBar
    FullManaBar
    ManaBar
    HealthLabel
    ManaLabel

    Label
      height: 24
      image-source: /images/ui/progress_icons
      anchors.top: parent.top
      anchors.left: manaBar.left
      margin-left: -16
      margin-top: 5

  Panel
    id: conditionPanel
    layout:
      type: horizontalBox
    height: 0
    margin-top: -10
    padding: 0
    anchors.top: prev.bottom
    anchors.left: parent.left
    anchors.right: parent.right
    border-width: 0
    border-color: #00000077
    background-color: #ffffff11
and in modules healthinfo.otui ( just like in in the main files from Otclient Classic UI (https://otland.net/threads/otclient-classic-ui.279994/)) is like this
Lua:
HealthInfoWindow
  id: healthInfoWindow
  @onClose: modules.game_healthinfo.onMiniWindowClose()
  &save: true
  &autoOpen: 2

if i paste this
Code:
FullHealthBar < ProgressBar
  height: 11
  image-source: /images/ui/emptybar
  anchors.top: parent.top
  anchors.left: parent.left
  margin-left: 24
  margin-top: 4
  margin-right: 51

HealthBar < ProgressBar
  id: healthBar
  image-source: /images/ui/fullhealthbar
  height: 11
  anchors.top: parent.top
  anchors.left: parent.left
  margin-left: 24
  margin-top: 4
  margin-right: 51

ManaBar < ProgressBar
  id: manaBar
  image-source: /images/ui/fullmanabar
  height: 11
  anchors.top: healthBar.bottom
  anchors.left: parent.left
  margin: 2
  margin-left: 24
  margin-top: 4
  margin-right: 72

FullManaBar < ProgressBar
  height: 11
  image-source: /images/ui/emptybar
  anchors.top: healthBar.bottom
  anchors.left: parent.left
  anchors.right: parent.right
  margin: 2
  margin-top: 4
  margin-right: 72
  margin-left: 24

ManaLabel < GameLabel
  id: manaLabel
  color: #AFAFAF
  font: verdana-11px-antialised
  text-offset: 140 0
  anchors.left: parent.left
  anchors.right: parent.right
  anchors.top: manaBar.top
  anchors.bottom: manaBar.bottom
  margin-top: -2
  margin-left: -20

HealthLabel < GameLabel
  id: healthLabel
  color: #AFAFAF
  font: verdana-11px-antialised
  text-offset: 140 0
  anchors.left: parent.left
  anchors.right: parent.right
  anchors.top: healthBar.top
  anchors.bottom: healthBar.bottom
  margin-top: -2
  margin-left: -20

ConditionWidget < UIWidget
  size: 10 8

  $!first:
    margin-left: 2

HealthInfoWindow < HeadlessMiniWindow
  icon:
  text:
  height: 50
  &forceOpen: true
  icon: /images/topbuttons/healthinfo
  !text: tr('Health Info')

  MiniWindowContents
    margin-top: 1
    FullHealthBar
    HealthBar
    FullManaBar
    ManaBar
    HealthLabel
    ManaLabel

    Label
      height: 24
      image-source: /images/ui/progress_icons
      anchors.top: parent.top
      anchors.left: manaBar.left
      margin-left: -16
      margin-top: 5

  Panel
    id: conditionPanel
    layout:
      type: horizontalBox
    height: 0
    margin-top: -10
    padding: 0
    anchors.top: prev.bottom
    anchors.left: parent.left
    anchors.right: parent.right
    border-width: 0
    border-color: #00000077
    background-color: #ffffff11
code in there, i get instant error and client wont open
Well as i can see, you are not using the correct files.
If you are using "layout" on your client, I think you must use the correct "40-healthinfo.otui" file, which is the one located at "data/styles" from classic UI dewral's client.

Also, i think you must replace folder "game_healthinfo" (keep a backup from all files before doing all)
Take a look to this thread. Maybe you can have some help

 
Well as i can see, you are not using the correct files.
If you are using "layout" on your client, I think you must use the correct "40-healthinfo.otui" file, which is the one located at "data/styles" from classic UI dewral's client.

Also, i think you must replace folder "game_healthinfo" (keep a backup from all files before doing all)
Take a look to this thread. Maybe you can have some help

That's what I did, I replaced the whole folder modules/game_healthinfo by dewral's one
and copied the code of 40-healthinfo.otui data/styles/40-healthinfo.
And inside the another folder called layouts where i have my retro and black layout that contains another folder to modify the 40-healthinfo.otui
I'm using my own otcv8 downloaded from here
GitHub - OTCv8/otclientv8: Clean, ready to use version of OTClientV8 - Alternative, highly optimized Tibia client (https://github.com/OTCv8/otclientv8) but it has editions and might
Post automatically merged:

is super weird because with normal code this does not happens
Post automatically merged:

Solved had to edit margin right of empty mana bar because my inventory size was different
Lua:
FullManaBar < ProgressBar
  height: 11
  image-source: /images/ui/emptybar
  anchors.top: healthBar.bottom
  anchors.left: parent.left
  anchors.right: parent.right
  margin: 1
  margin-top: 4
  margin-right: 49
  margin-left: 24
But when a player reach MANA 0 the bar looks empty and not with a full blue color if other player have level 1 and 0 mana it works

This same thing occur in dewral's client
 
Last edited:
That's what I did, I replaced the whole folder modules/game_healthinfo by dewral's one
and copied the code of 40-healthinfo.otui data/styles/40-healthinfo.
And inside the another folder called layouts where i have my retro and black layout that contains another folder to modify the 40-healthinfo.otui
I'm using my own otcv8 downloaded from here
GitHub - OTCv8/otclientv8: Clean, ready to use version of OTClientV8 - Alternative, highly optimized Tibia client (https://github.com/OTCv8/otclientv8) but it has editions and might
Post automatically merged:

is super weird because with normal code this does not happens
Post automatically merged:

Solved had to edit margin right of empty mana bar because my inventory size was different
Lua:
FullManaBar < ProgressBar
  height: 11
  image-source: /images/ui/emptybar
  anchors.top: healthBar.bottom
  anchors.left: parent.left
  anchors.right: parent.right
  margin: 1
  margin-top: 4
  margin-right: 49
  margin-left: 24
But when a player reach MANA 0 the bar looks empty and not with a full blue color if other player have level 1 and 0 mana it works

This same thing occur in dewral's client
noo, with fullmana = 0 bar looks full
 

Attachments

Back
Top