Goto https://www.stucuk.netGoto https://www.atlanticaonlinewiki.comGoto https://www.game-requirements.comGoto https://www.owsupport.com
It is currently Sun Nov 29, 2020 2:59 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 79 posts ]  Go to page 1, 2, 3, 4, 5, 6  Next
Author Message
PostPosted: Mon Mar 30, 2015 7:43 pm 
Offline
Soldier level 0
Soldier level 0

Joined: Mon Mar 30, 2015 7:31 pm
Posts: 42
Location: Spain
Hello Stucuk! Congrats and many thanx for all your efforts, SDK and forum!!!

I love the DH and TC games. There's only one thing I would like to change in both of them: the HUD. For my personal taste it occupies too much screen area. I would like to modify the HUD so that it only displays the data I'm interested in, thus cleaning up the general view of the game... Can this be done with your BRUEngineSDK_1.0.8.0 utility?

If so, could you give me some pointers or tuto to get things started? I've never modded before, but you gotta start sometime, right? This is the time for me: making two nearly-perfect games perfect!

I cannot find any LUA files with HUD or GUI or interface-like names... So, what file do I need to modify to change the in-game HEADS UP DISPLAY?

Kind regards,
Cornel.


Top
 Profile  
 
PostPosted: Tue Mar 31, 2015 12:59 pm 
Offline
OW Support Owner
OW Support Owner
User avatar

Joined: Wed Dec 28, 2005 11:13 pm
Posts: 5014
Location: UK, Scotland
cornel wrote:
I cannot find any LUA files with HUD or GUI or interface-like names... So, what file do I need to modify to change the in-game HEADS UP DISPLAY?

mod_main_end.lua is the best to modify. If you run TC or DH with the -devmode parameter it will allow you to experiment. devmode gives you the ability to type lua code into the devmode window to add to the game. With lua you can literally overwrite code just by entering a slightly modified version. Note that anything you do in devmode will not be saved, it just allows you to for example modify the position of elements and see that change in real-time.

Attached is a Hud modification i did a while ago as an experiment. One thing to note is that enableCockpitMode() in the mod overrides the default version. As i said before if you give it another version of something it overwrites it. So you don't actually need to modify the original lua files code.

To make a new mod you need to run the BRUSDK.exe file (Should be a shortcut in the start menu). Then click on the button with the plus sign. You will need to enter some information like its name as well as the directory the compiled code should go in. Something like the following:
Image

If you click on the green arrow it will open a window to the location of the source files. Clicking on Compile while your mod is selected will compile it, allowing you to run the game with your mod (By supplying it the -mod parameter with your mods directory as its value. I.e -mod X).

Note that there is documentation included but some of the application names may be outdated (I.E LuaPack is now BRUSDK).


Attachments:
XI.rar [800 Bytes]
Downloaded 63 times

_________________
Image
Free Map Editor - Game Requirements - Stucuk.Net
-Stu
Top
 Profile  
 
PostPosted: Tue Mar 31, 2015 8:09 pm 
Offline
Soldier level 0
Soldier level 0

Joined: Mon Mar 30, 2015 7:31 pm
Posts: 42
Location: Spain
Thank you for the files and explanations. I had already read the documentation, but must admit I'm still pretty unsure about what to do. I created the necessary mod folder structure (mods/HUD/data) in the installation directory of the game and created the HUD proyect in BRUSDK. I copied the mod_main_end.lua you send me to the mod proyect folder (HUD/scripts), compiled it, made a shortcut to the game exe with the -mod HUD parameter, started the game, saw the HUD, closed the game again... and then I got stuck.

How do I open the lua file to modify it?

I imagine you are rolling your eyes right now but please bare with me: as I said: I've never modded before...


Top
 Profile  
 
PostPosted: Wed Apr 01, 2015 2:10 am 
Offline
OW Support Owner
OW Support Owner
User avatar

Joined: Wed Dec 28, 2005 11:13 pm
Posts: 5014
Location: UK, Scotland
cornel wrote:
How do I open the lua file to modify it?

Any text editor. LUA files are plain text (Well when they are not compiled). I would personally recommend Notepad++.

You should create a second shortcut with -mod HUD -devmode . It will force the game into a window thats 1024x768 with the developer mode window visible (Irony in its name being that it was made by me and not Quazar). It helps alot with testing (For example when i was playing with the hud i would hide hud elements to see what names went with what bits). Just put any LUA lines (Like one that changes the position of something) into the big box and hit the button to see what it will do.

The set command is what you would be using alot. It allows you to change the properties of objects.

Code:
set("p_back_icon::visible",0)


For example the above line changes the visible property of p_back_icon to false (0).

P.S If you look at mod_interface.lua from Dark Horizon's source you may get more names of hud elements. LuaSearch is good at finding things, like putting in a texture name of a gui element to find out what the name of the object is in the lua code.

_________________
Image
Free Map Editor - Game Requirements - Stucuk.Net
-Stu


Top
 Profile  
 
PostPosted: Sun Apr 05, 2015 4:45 pm 
Offline
Soldier level 0
Soldier level 0

Joined: Mon Mar 30, 2015 7:31 pm
Posts: 42
Location: Spain
1st of all: SORRY ABOUT THE LARGE POST...


Hi Stu! I got as far as hiding stuff from the HUD in DEV mode :) Yipppiiii!

I can hide these (he said with pride):

set("panel_Energy::visible",0)
set("panel_Speed::visible",0)
set("panel_Temperature::visible",0)
set("GunPanel::visible",0)
set("TargetPanel::visible",0)
set("RocketPanel::visible",0)
set("ParametersPanel::visible",0)
set("FragCounterLabel::visible",0)
set("FragCounter::visible",0)
set("GameTimer::visible",0)
set("FriendList::visible",0)
set("EnemyList::visible",0)
set("TargetList::visible",0)
set("IndicatorArray::visible",0)

But I cannot find out how to hide the complete KILLS (FragCounter) pannel. Hiding "FragCounterPanel" makes the game crash. Nor can I hide the ANTI-MISSILE / TIME pannel... Any idea what the commands are for those pannels? By the way, I cannot find the LuaSearch utility. Do I have to download that seperately?

Oh yeah, and these don't seem to hide anything:

set("Pain::visible",0)
set("Heal::visible",0)
set("Stealth::visible",0)
set("Deflection::visible",0)
set("ForsageTransporant::visible",0)
set("p_back_icon::visible",0)

set("PlayerShieldBarPanel::visible",0)
set("PlayerArmorBarPanel::visible",0)
set("PlayerDurabilityBarPanel::visible",0)
set("bar_Energy::visible",0)
set("bar_Speed::visible",0)
set("point_Speed::visible",0)
set("point_MaxSpeed::visible",0)
set("MaxSpeed::visible",0)
set("Overheat::visible",0)
set("MinEnergy::visible",0)
set("MaxEnergy::visible",0)
set("TargetArmorBarPanel::visible",0)
set("TargetShieldBarPanel::visible",0)
set("TargetDurabilityBarPanel::visible",0)
set("TargetRangeBar::visible",0)
set("TargetPanelImage::visible",0)
set("TargetViewport::visible",0)
set("TargetRangeBar::visible",0)
set("TargetVelocityBar::visible",0)
set("EnemyShipInfo::visible",0)

I guess, at least for some of them, it's because I already hid the pannels (energy, speed, parameters, target) in which they reside. But what about the first six options?

Many thanks for your time and interest!!!


P.S.: Which file would be better to edit and use for my HUD mod: mod_main_end.lua or mod_interface.lua?
Also: what are the FriendFlashPanel, EnemyFlashPanel and TargetFlashPanel?


Top
 Profile  
 
PostPosted: Sun Apr 05, 2015 9:31 pm 
Offline
OW Support Owner
OW Support Owner
User avatar

Joined: Wed Dec 28, 2005 11:13 pm
Posts: 5014
Location: UK, Scotland
cornel wrote:
But I cannot find out how to hide the complete KILLS (FragCounter) pannel. Hiding "FragCounterPanel" makes the game crash. Nor can I hide the ANTI-MISSILE / TIME pannel... Any idea what the commands are for those pannels? By the way, I cannot find the LuaSearch utility. Do I have to download that seperately?

There is no FragCounterPanel. Which is why it will crash as your trying to hide something that doesn't exist.

LuaSearch is in the same Directory as the BRU SDK app and can be launched by pressing the LUA Search button on the app.

Things like Pain are likely only visible when you get hit.

cornel wrote:
P.S.: Which file would be better to edit and use for my HUD mod: mod_main_end.lua or mod_interface.lua?

mod_interface.lua is used by Dark Horizon. Which is why i suggested mod_main_end.lua .

cornel wrote:
Also: what are the FriendFlashPanel, EnemyFlashPanel and TargetFlashPanel?

They are in Objectives.lua so likely something to do with Objectives.

_________________
Image
Free Map Editor - Game Requirements - Stucuk.Net
-Stu


Top
 Profile  
 
PostPosted: Sun Apr 05, 2015 9:51 pm 
Offline
Soldier level 0
Soldier level 0

Joined: Mon Mar 30, 2015 7:31 pm
Posts: 42
Location: Spain
Thanks for the quick reply, Stu!

WOW! The LuaSearch utility is VERY handy. I found everything (meaning / pannel) I was looking for! You made all this? Incredible! With your tools, modding will be a breeze, I'm sure!!!

...

Or not: I was still able to get stuck... In the DEV mode I could hide everything I wanted just fine. But I did not see the changes in the game after entering the script lines into the mod_main_end.lua and compiling it with BRUSDK, and starting the game with the "-mod HUD -devmode" parameter. Did I forget a step?

After some trial and error I managed to screw up even more: now the mod crashes the game :(

This is the shortcut parameter: "C:\Program Files (x86)\Paradox Interactive\Dark Horizon\dark_horizon.exe" -mod HUD -devmode

This is my modified mod_main_end.lua file:

function GetShipBRU(ship)
return tostring(getVar("obj."..ship..".hex"));
end

function GetPlayerShipBRU()
return GetShipBRU(player.ship);
end

function enableCockpitMode()
iDesktop.CockpitMode = 1
engine_Execute("player","cockpitOn");
engine_BRUSetVisible(GetPlayerShipBRU(),0)
end

function disableCockpitMode()
iDesktop.CockpitMode = nil
engine_Execute("player","cockpitOff");
engine_BRUSetVisible(GetPlayerShipBRU(),1)
end

set("panel_Energy::visible",0)

set("panel_Speed::visible",0)

set("panel_Temperature::visible",0)

set("GunPanel::visible",0)

set("TargetPanel::visible",0)

set("RocketPanel::visible",0)

set("ParametersPanel::visible",0)

set("Items_Panel_Left::visible",0)

set("Frag_Panel::visible",0)

set("FriendList::visible",0)
set("EnemyList::visible",0)
set("TargetList::visible",0)

set("IndicatorArray::visible",0)

set("Hint::visible",1)
set("Hint::image","")
set("Hint::left",710)
set("Hint::top",0)

set("MissionList::visible",1)
set("MissionList::image","")
set("MissionList::left",0)
set("MissionList::top",630)

set("Radar::visible",1)
set("Radar::left",863)
set("Radar::top",633)

By the way: these lua commands worked fine in DEV MODE, but once inserted into the mod_main_end.lua file, they either did not work or they made the game crash...

Any thoughts?


Top
 Profile  
 
PostPosted: Mon Apr 06, 2015 3:10 pm 
Offline
OW Support Owner
OW Support Owner
User avatar

Joined: Wed Dec 28, 2005 11:13 pm
Posts: 5014
Location: UK, Scotland
Unless one of them is not setup at the time that your code is called it shouldn't cause any crash (Though everything should be setup by the time mod_main_end.lua is called). You would have to use Trial and Error to work out which lines are causing the problems.

_________________
Image
Free Map Editor - Game Requirements - Stucuk.Net
-Stu


Top
 Profile  
 
PostPosted: Mon Apr 06, 2015 4:15 pm 
Offline
Soldier level 0
Soldier level 0

Joined: Mon Mar 30, 2015 7:31 pm
Posts: 42
Location: Spain
That's what I'm currently doing. I'll let you know how it works out :)


Top
 Profile  
 
PostPosted: Tue Apr 07, 2015 4:13 pm 
Offline
OW Support Owner
OW Support Owner
User avatar

Joined: Wed Dec 28, 2005 11:13 pm
Posts: 5014
Location: UK, Scotland
cornel wrote:
That's what I'm currently doing. I'll let you know how it works out :)

BTW, once you have your mod to a stage you like, you could release it on ModDB. Currently their are no released mods for Tarr or Dark Horizon.

_________________
Image
Free Map Editor - Game Requirements - Stucuk.Net
-Stu


Top
 Profile  
 
PostPosted: Tue Apr 07, 2015 5:22 pm 
Offline
Soldier level 0
Soldier level 0

Joined: Mon Mar 30, 2015 7:31 pm
Posts: 42
Location: Spain
Will do! But first... let's make the mod LOL


Top
 Profile  
 
PostPosted: Wed Apr 08, 2015 11:40 pm 
Offline
Soldier level 0
Soldier level 0

Joined: Mon Mar 30, 2015 7:31 pm
Posts: 42
Location: Spain
This line was the culprit for crashing the game: set("GunPanel::visible",0) when playing the mod (although it did work in dev mode...)

Do you see a syntax error? Or is it simply a limitation of the game engine / modding availability?

I was able to make a workaround by placing the pannel outside of the screen area :)

I have now a mod that will ensure a more cinematic and arcade gameplay by removing all the on-screen displayed data (when not in cockpit mode) except for the radar and the objectives (similar to other space combat games, like Rogue Squadron).

I will test this mod thoroughly before posting it on moddb!



P.S: Stu, you wouldn't happen to know by any chance what these options from the "new.cfg" file mean: "godmode", "nozzlesEnable", "maxstars", "showBSpheres", "xmode", "maxbigstars" and "useCollision"? And the "maxmission" from "mod_main.lua" file?


Top
 Profile  
 
PostPosted: Thu Apr 09, 2015 6:54 am 
Offline
OW Support Owner
OW Support Owner
User avatar

Joined: Wed Dec 28, 2005 11:13 pm
Posts: 5014
Location: UK, Scotland
cornel wrote:
This line was the culprit for crashing the game: set("GunPanel::visible",0) when playing the mod (although it did work in dev mode...)


If i use an incorrect element name it throws an error in the error log:

Code:
Error Info
----------
ErrorText 0            : TSimpleNode.ChildByName fault: incorect name: GunPanfel


Arn't error logs being generated?

cornel wrote:
P.S: Stu, you wouldn't happen to know by any chance what these options from the "new.cfg" file mean: "godmode", "nozzlesEnable", "maxstars", "showBSpheres", "xmode", "maxbigstars" and "useCollision"?


godmode is the same as any other game, when enabled makes it so you can't die. nozzlesEnable is for the Jets that come from the engines. maxstars/maxbigstars are for the stars that show when your moving. showBSpheres i guess would display the bounds of things. useCollision enables/disables the players collision with other objects.

cornel wrote:
And the "maxmission" from "mod_main.lua" file?

The number of missions. Corresponds to Missions.lua . One of the things i did to make modding easier was to unify alot of the lua from Tarr and Dark Horizon into the Shared bit. maxmission is used in a few shared lua files, Tarr and DH have a different amount so it had to be stored in a non-shared file.

_________________
Image
Free Map Editor - Game Requirements - Stucuk.Net
-Stu


Top
 Profile  
 
PostPosted: Thu Apr 09, 2015 9:18 am 
Offline
Soldier level 0
Soldier level 0

Joined: Mon Mar 30, 2015 7:31 pm
Posts: 42
Location: Spain
Thank you very much for being so helpful, Stu!

I was wondering: you are the mod master par excellence... Why haven't you published any mods yet? Me, I'm still working on a small bug in my mod (if I click the "credits" option in the main menu, the game crashes...)

GREAT IDEA! Never thought of looking for error logs! I'll see if I can find the reason for the crashes... Thank you for your guidance!!!

I did not understand what the maxmission was for. I mean, why would you need that? To limit the game? And how many missions do TC and DH each have? Are there maybe hidden (bonus) missions?

Also: any idea what xmode could be? (topless spaceships? LOL)


Top
 Profile  
 
PostPosted: Thu Apr 09, 2015 1:48 pm 
Offline
OW Support Owner
OW Support Owner
User avatar

Joined: Wed Dec 28, 2005 11:13 pm
Posts: 5014
Location: UK, Scotland
cornel wrote:
I was wondering: you are the mod master par excellence... Why haven't you published any mods yet?

Mainly because it takes time to make a mod. I was planning on making one, but it would have required a map editor (As i don't use 3DS Max). The map editor (System Ed) was never finished as no one has done any modding that i know of. The mod i had planned was ambitious so without the motivation it never got far (I also maintain Original War so i generally focus my time on things that i know people want).

cornel wrote:
GREAT IDEA! Never thought of looking for error logs! I'll see if I can find the reason for the crashes... Thank you for your guidance!!!

When the game crashes it opens the log in a text editor. They are stored in logs\ErrorLogs\

cornel wrote:
Me, I'm still working on a small bug in my mod (if I click the "credits" option in the main menu, the game crashes...)

Credits work fine for me. Like i said when the game crashes it should create an error log and display it on the screen.
cornel wrote:
I did not understand what the maxmission was for. I mean, why would you need that? To limit the game? And how many missions do TC and DH each have? Are there maybe hidden (bonus) missions?

Its used in lua files to determine the amount of missions. Just search for it with LUASearch and you will see how its used. There are some test maps but i don't have there un-compiled lua code. They are also as far as i understand just empty systems with some different lua code.

cornel wrote:
Also: any idea what xmode could be? (topless spaceships? LOL)

Its not used.

_________________
Image
Free Map Editor - Game Requirements - Stucuk.Net
-Stu


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 79 posts ]  Go to page 1, 2, 3, 4, 5, 6  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group