Homeworld 2 continues the epic struggle of the Hiigarans and their leader Karan S'jet. Many thought their hardships would end when they returned to Hiigara, yet fate has not been so kind to the Exiles. Now the Hiigarans face a new and bitter enemy, a renegade clan from the eastern fringes of the galaxy, who wield the power of the ancients. Homeworld 2 chronicles the valiant journey of the Mothership and its crew into the oldest regions of the galaxy to confront their new foe and discover the truth behind their exile.

Description

This addon updates hw2's interface with two features present in many new rts games. An in-game Timer and a Resource display that shows your teamate's resources. With this addon you can share ru as a team without having to ask 'does anyone have any extra ru?' all the time. You can use this with with regular hw2, or any mod - online or offline.

Preview
In Game Timer with Teamate's RU
Post comment Comments
thomcomstock
thomcomstock - - 25 comments

-- Alternate (for Mod Testing) displays all allied (in yellow) and enemy (in red) resources:

function updateTimer()
dr_clear("timer")
dr_setautoclear("timer",0)
local time = Universe_GameTime()
local h = floor(time / 3600)
local m = floor(time / 60 - h * 60)
local s = floor(time - m * 60 - h * 3600)
local str = format(" GameTime: %2.0f:%2.0f:%2.0f", h, m, s)
dr_text2d("timer",0,0.98,str,255,255,255)
local rdy = 0
local playerCount = Universe_PlayerCount()
local playerIndex = 0
local PlayerRUs = 0
local me = FE_GetCurrentPlayerIndex()
while (playerIndex < playerCount) do
if (me > playerIndex or me < playerIndex) then
PlayerRUs = Player_GetRU(playerIndex)
str = format(" CPU %1.0f: %2.0f", playerIndex, PlayerRUs) -- playerIndex+1 - CPU1 is now CPU2
if (AreAllied(me, playerIndex) == 1) then
dr_text2d("timer", 0, 0.96 - (playerIndex/80), str, 255, 255, 150) -- (playerIndex/100), str, 255, 255, 150)
end
if (AreAllied(me, playerIndex) == 0) then
dr_text2d("timer", 0, 0.96 - (playerIndex/80), str, 255, 100, 50)
end
end
playerIndex = playerIndex+1
end
end

Rule_AddInterval("updateTimer", 3) -- 9

-- Sorry for the lack of formatting.

Reply Good karma Bad karma+1 vote
Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: