Author Topic: [MOD] MoveUI v2.2.1  (Read 20571 times)

Dirtyredz

  • Full Member
  • ***
  • Status:
    Offline
    Posts:
    225
  • David McClain - Dirtyredz
    • View Profile
    • Dirtyredz.com
on: January 22, 2018, 03:25:22 PM
I get it, i was thinking somthing completly different.  Ive been working on improving that,  but have been busy.
David McClain - Dirtyredz
Programmer, Web Development, Modder
http://www.Dirtyredz.com




Nopal

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    1
    • View Profile
on: January 31, 2018, 11:56:03 PM
Totally new at installing mods.  Does this mod work in single player mode ?  I ask because I followed the instructions and did not notice any changes.   Do I have to hit a special key for the mod to become active ?

Sorry if these are stupid questions. I am new to this game.



Dirtyredz

  • Full Member
  • ***
  • Status:
    Offline
    Posts:
    225
  • David McClain - Dirtyredz
    • View Profile
    • Dirtyredz.com
on: February 01, 2018, 12:02:32 AM
It works on sp as long as you installed it correctly including editing server.lua, sp is technically a restricted server.

If installed propperlly you'll see a new icon in the top right, a box with a mouse icon. Click that and youll open a menu were you can enable disable various ui's
David McClain - Dirtyredz
Programmer, Web Development, Modder
http://www.Dirtyredz.com




Shrooblord

  • Hero Member
  • *****
  • Status:
    Offline
    Posts:
    578
    • View Profile
on: February 01, 2018, 11:25:45 PM
I'm here to report a bug.

Se my post on the bugs subforum for repro steps.

The script FactionNotifier.lua spazzes out when a ship being built by a Shipyard is loaded into memory after a game has been shut down while the ship was still being built. Line 180 is failing because faction.name does not exist. Seems like the ship doesn't belong to any Faction while it is being built (or at least, when it gets loaded while being built, which, as you can read in my bug report, is already super buggy), and so FactionData can't return accurate data to work with.

Consider implementing a clause to check whether the data is nil.

EDIT:
In fact, forget the repro steps I mentioned. The repro steps are:
  • Start building a Ship at a Shipyard.
  • Open Console.

EDITII:
I made a hotfix:
from
Code: [Select]
if #FactionData.OtherFactions > 0 and LoadedOptions.PF then
        drawTextRect('Factions in Sector:', HSplit:partition(2), -1, 0,ColorRGB(1,1,1), FontSize-2, 0, 0, 0)
        local i = 3
        for _,factionData in pairs(FactionData.OtherFactions) do
            local faction = Faction(factionData.index)
            local MainVSplit = UIVerticalSplitter(HSplit:partition(i), 5, 5, 0.80)
            local Name = faction.name:gsub("%/*This refers to factions, such as 'The Xsotan'.", "")
            Name = Name:gsub("%/*", "")
            Name = Name:gsub("%*", "")
            drawTextRect(Name, MainVSplit.left,1, 0,ColorRGB(GetRelationColor(factionData.relation)), FontSize-2, 0, 0, 0)
            drawTextRect(factionData.License, MainVSplit.right,-1, 0,factionData.Color, FontSize-2, 0, 0, 0)
            i = i + 1
        end
    end
to
Code: [Select]
if #FactionData.OtherFactions > 0 and LoadedOptions.PF then
        drawTextRect('Factions in Sector:', HSplit:partition(2), -1, 0,ColorRGB(1,1,1), FontSize-2, 0, 0, 0)
        local i = 3
        for _,factionData in pairs(FactionData.OtherFactions) do
            local faction = Faction(factionData.index)
            local MainVSplit = UIVerticalSplitter(HSplit:partition(i), 5, 5, 0.80)
            local Name = nil
            if faction then
                Name = faction.name:gsub("%/*This refers to factions, such as 'The Xsotan'.", "")
            else
                Name = "???"
            end
            Name = Name:gsub("%/*", "")
            Name = Name:gsub("%*", "")
            drawTextRect(Name, MainVSplit.left,1, 0,ColorRGB(GetRelationColor(factionData.relation)), FontSize-2, 0, 0, 0)
            drawTextRect(factionData.License, MainVSplit.right,-1, 0,factionData.Color, FontSize-2, 0, 0, 0)
            i = i + 1
        end
    end

But do please look at it yourself, too. I may not have covered all grounds with this one fix.
« Last Edit: February 02, 2018, 12:16:44 AM by Shrooblord »
Shrooblord



Dirtyredz

  • Full Member
  • ***
  • Status:
    Offline
    Posts:
    225
  • David McClain - Dirtyredz
    • View Profile
    • Dirtyredz.com
on: February 02, 2018, 12:23:59 AM
 Thxs i was going to push a new mo ve version here soon anyways.  I appreciate the help.
David McClain - Dirtyredz
Programmer, Web Development, Modder
http://www.Dirtyredz.com




Shinny

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    1
    • View Profile
on: February 17, 2018, 10:37:21 AM
Is this still working?
Can't get it to run...(not on 15.8 or beta branch)

Haven't played for some time but I remember using this mod in the past



Dirtyredz

  • Full Member
  • ***
  • Status:
    Offline
    Posts:
    225
  • David McClain - Dirtyredz
    • View Profile
    • Dirtyredz.com
on: February 17, 2018, 03:35:18 PM
This still works both in beta and 15.8, if your having issue please descibe what's choking on and I'll he'll out.
David McClain - Dirtyredz
Programmer, Web Development, Modder
http://www.Dirtyredz.com




RediusMaximus

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    2
    • View Profile
on: February 17, 2018, 09:24:04 PM
Small bug:

The clock never updates the hour, only the minutes.

Thanks for the hard work!



inpacem

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    2
    • View Profile
on: February 18, 2018, 07:55:17 PM
Code: [Select]
function Clock.updateClient(timeStep)
  if currentDate then
    currentDate.sec = math.floor(currentDate.sec + timeStep)
    if currentDate.sec >= 60 then
      currentDate.sec = 0
      currentDate.min = currentDate.min + 1
      if currentDate.min >= 60 then
        currentDate.min = 0
        currentDate.hours = currentDate.hour + 1
        -- TODO: add 12/24hr support
        if currentDate.hour >= 24 then
          currentDate.hour = 0
        end
      end
    end
    currentTime = string.format("%02d:%02d:%02d", currentDate.hour, currentDate.min, currentDate.sec)
  end
  AllowMoving = MoveUI.AllowedMoving()
end

        currentDate.hours = currentDate.hour + 1


Another problem: if you pause the game (ESC in SP) the clock stands still, keeps the time before the pause when you play again....
« Last Edit: February 18, 2018, 07:58:22 PM by inpacem »



Dirtyredz

  • Full Member
  • ***
  • Status:
    Offline
    Posts:
    225
  • David McClain - Dirtyredz
    • View Profile
    • Dirtyredz.com
on: February 18, 2018, 08:09:35 PM
This is an old version,  ill push the current version later today.
David McClain - Dirtyredz
Programmer, Web Development, Modder
http://www.Dirtyredz.com




Blaha

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    1
    • View Profile
on: February 23, 2018, 12:01:12 PM
Is this mod working with the beta branch?  I extracted the zip to avorion folder so now i have /avorion/MoveUI-master/.  Also copy pasted the lines of code at the end of the two .lua files after the last end statement.  Is that all you mean by dragging and dropping or do i need to overwrite/add files in the games data folder?  Or is it supposed to be /avorion/mods/MoveUI 

Instructions unclear, spilled my coffee all over keyboard.



EDIT:  Worked,  for any others having issues installing the file structure should be /avorion/mods/MoveUI.    not just an extraction of the zip to the main folder.
« Last Edit: February 23, 2018, 12:05:33 PM by Blaha »



Dirtyredz

  • Full Member
  • ***
  • Status:
    Offline
    Posts:
    225
  • David McClain - Dirtyredz
    • View Profile
    • Dirtyredz.com
on: February 25, 2018, 01:52:20 AM
2.1.1 release
get it here:  https://github.com/dirtyredz/MoveUI/releases/download/2.1.1/MoveUI.v2.1.1.zip


2.1.1
  --Fixed bug in PowerSystems
  --Changed how Clock UI gets current time
David McClain - Dirtyredz
Programmer, Web Development, Modder
http://www.Dirtyredz.com




Elvisman2001

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    6
    • View Profile
on: February 27, 2018, 02:59:04 AM
Does this need to be on both client and server or will just server side work?
Completely new to modding this game.
I installed the files in the specified directory on my dedicated server.
Added the lines to the bottom of the lua files after the last end statements.
But i am not getting the option button on screen for the mod.

I am also running beta branch.
« Last Edit: February 27, 2018, 03:08:13 AM by Elvisman2001 »



Dirtyredz

  • Full Member
  • ***
  • Status:
    Offline
    Posts:
    225
  • David McClain - Dirtyredz
    • View Profile
    • Dirtyredz.com
on: February 27, 2018, 03:10:35 AM
Mod needs both server and client side installations.
The clients dont need to do anything past placing the files in the proper location.
It also works on beta branch.
David McClain - Dirtyredz
Programmer, Web Development, Modder
http://www.Dirtyredz.com




Elvisman2001

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    6
    • View Profile
on: February 27, 2018, 03:17:57 AM
Perplexing.
Still not working.

Does it require a clean start? (Cant see why it would)

Does the game require me to do anything specific to enable mods in the mod folder?
I noticed that the mod folder didnt exist and i had to create one.
« Last Edit: February 27, 2018, 03:19:43 AM by Elvisman2001 »