Jump to content

[MOD] MoveUI v2.2.1


Dirtyredz

Recommended Posts

  • Replies 58
  • Created
  • Last Reply

Top Posters In This Topic

Just upgraded to 2.1.1...

Some of the "handles" to MoveUI elements are really badly placed, like, at the top of the box, so I have a lot of difficulty to move them up :(.

The new Faction Controller is kinda cool, and the Notepad is ideal for planning objectives :).

Link to comment
Share on other sites

Lol I have encountered some trouble moving the UI in the past, actually. I end up having to drag very, very slowly with my mouse, or the UI would "fall off" of my moving mouse. Additionally, if you click on it again, the snap point is somewhere in the top center, so if you click in the middle of the UI, it would snap with its top centre point to you mouse position, effectively moving it down. These two factors combined caused me to have to take a couple of minutes to properly adjust the UI.

Link to comment
Share on other sites

  • 2 weeks later...

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.

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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

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

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.

Link to comment
Share on other sites

  • 3 weeks later...

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....

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...
  • 1 month later...

Hello !

 

i installed the MOD and it is possible to use the configuration window, but Nothing else is shown with the UI (only the normal stuff from the vanilla game of course)

 

is this still working with Version 17?

 

thx!

 

[edit]

i downloaded older Versions of the Mod, now i run 1.4 without any Problems, 2.1 and 2.1.1 are still not working for me

 

Link to comment
Share on other sites

Brand spanking new here - Got a question about the instructions.

 

When inserting the lines at the bottom of the lua files, you mean the bottom, and not inside the last function, yes? I haven't played around with lua scripts before, but I'm setting up a server for myself and a few buddies.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...