Originally Posted by
Vyacheslav
Hello!
Excuse me if I am not on the topic. I do not know whom to address. (I know English badly I asked my friends to write the message).
The questions are
1. Have anybody decompiled the files luac games ETW? Ie I am especially interested in the files technology.luac and so on. If somebody have done them, download them on the site, please or inform me about the files.
Yes, decompiler can be build using scripts from etwng repository.
I don't know if anyone managed to build decompiler on Windows, it works on Linux and OSX fine.
Here's technology.lua from ETW:
Code:
-- Decompiled using luadec 2.0 UNICODE by sztupy (http://winmo.sztupy.hu)
-- Command line was: samples_etw/campaign ui/technology_scripts/technology.luac
local utils = require("Utilities")
local core = (require("CoreUtils"))
local CampaignUI, Localisation = nil, nil
local root = UIComponent(Component.Root())
local stealing = core.NamespaceFile("technology_stealing")
local researching = (core.NamespaceFile("technology_researching"))
local techmode = nil
ZoomToEntity = function()
techmode.ZoomToEntity()
end
ResearchingMode = function()
return techmode == researching
end
Refresh = function(l_3_0, l_3_1)
out.shane("* technology.lua - Refresh: residence = " .. tostring(l_3_0) .. ", character = " .. tostring(l_3_1))
if techmode == stealing then
local details = CampaignUI.TechnologyStealingDetails(l_3_1, l_3_0)
if details ~= nil then
Initialise(details, CampaignUI, Localisation, true)
else
panel_manager.ClosePanel("technology")
end
else
local details = CampaignUI.TechnologyResearchingDetails(l_3_1, l_3_0)
if details ~= nil then
Initialise(details, CampaignUI, Localisation, false)
else
panel_manager.ClosePanel("technology")
end
end
end
Reinitialise = function(l_4_0, l_4_1)
out.shane("* Reinitialising technology *")
Initialise(l_4_0, CampaignUI, Localisation, l_4_1)
end
Initialise = function(l_5_0, l_5_1, l_5_2, l_5_3)
out.shane("* Initialising technology *")
CampaignUI = l_5_1
upvalue_512 = l_5_2
if l_5_3 == true then
upvalue_1024 = stealing
else
upvalue_1024 = researching
end
techmode.Initialise(l_5_0, Address, Component.Root(), CampaignUI, Localisation)
end
OnEntityLClickUp = function(l_6_0)
techmode.SelectEntity(l_6_0)
end
OnEntityRClickUp = function(l_7_0)
techmode.ShowEntityDetails(l_7_0)
end
TechLeftClicked = function(l_8_0)
techmode.TechLeftClicked(l_8_0)
end
TechRightClicked = function(l_9_0)
techmode.TechRightClicked(l_9_0)
end
TurnsToResearchOrChanceToSteal = function(l_10_0)
return techmode.TurnsToResearchOrChanceToSteal(l_10_0)
end
SelectedEntityProgessingTech = function(l_11_0)
return techmode.SelectedEntityProgessingTech(Key)
end
HasFacilities = function()
return techmode.HasFacilities()
end
CreateTechEntry = function(l_13_0, l_13_1, l_13_2)
return Component.CreateComponentFromTemplate("tech_entry", l_13_0, l_13_1, 0, 0, l_13_2)
end
SelectTab = function(l_14_0)
out.shane("SelectTab called with " .. tostring(l_14_0))
techmode.SelectTab(l_14_0)
end
TechAvailable = function(l_15_0)
return techmode.TechAvailable(l_15_0)
end
TechCompleted = function(l_16_0)
return techmode.TechCompleted(l_16_0)
end
TechInProgress = function(l_17_0)
return techmode.TechInProgress(l_17_0)
end
If you have troubles setting up decompiler yourself,
PM me your email address and I'll send you an archive of all decoded lua files.
Originally Posted by
Vyacheslav
2. There are good lua files in mod APE_TI. How to make them work in Vanilla ETW without mod APE_TI?
Thanks a lot.
It's a lot of effort, and you need a fairly good understanding of lua if you hope to succeed.