everything concerning HAPX files

Have a question about how to mod something? Or have an issue with one of our mod tools? Post here.

Moderators: Balthagor, Moderators

Post Reply
georgios
Brigadier Gen.
Posts: 600
Joined: Aug 13 2012
Human: Yes

everything concerning HAPX files

Post by georgios »

I don't find something in the forum and the wiki so I start this thread to become the place of discussion about HAPX files.

I set the first questions to trigger it:


2) what mean the names of HAPX files?
3) how can we create new HAPX files, what can they do and what they can't?
evildari
Brigadier Gen.
Posts: 629
Joined: Aug 10 2017
Human: Yes

Re: everything concerning HAPX files

Post by evildari »

Best to start to write what .hapx files are: thats the layout of the User Interface (UI) of the game - starting with the very first main menu

answer to 2) most of the filenames seam to be an info about location or function. ie: TRE_S1 looks like the "main page" of the Finance Department which should show basic treasury data (but does not because of calculation errors |O ). Best way to identify the parts you like to mod: look for a tooltip, and search for it, if its not a part of some translation variable you may find it.

answer to 3) total new hapx files wont help you, if it is not called / used by either other UI elements or directly called by the game (hardcoded)
best way until (see my own point 4 later) is to copy and edit current .hapx and learn their effects

4) i guess thats a question to the devs: how can we run the hapx-builder (dont know your official name of it) that seems to be in the builder.hapx / builderx.hapx file
calling it through a modded mainmenu with obUdefxp didnt work - not even with a -haps shortcut (just a guess caused by the first 3 letters...)
my mods
http://www.bgforums.com/forums/viewtopi ... 79&t=25932 (even techs and units for everyone - AI will own you too)
http://www.bgforums.com/forums/viewtopi ... 79&t=29326 (MARSX2)
User avatar
Balthagor
Supreme Ruler
Posts: 22083
Joined: Jun 04 2002
Human: Yes
Location: BattleGoat Studios

Re: everything concerning HAPX files

Post by Balthagor »

The builder for hapx files is our own proprietary tool, it will not be released.

We don't mind users digging in the UI files, but this is an area we wont' be able to support. It's really easy to make the whole game crash when changing these.
Chris Latour
BattleGoat Studios
chris@battlegoat.com
Fistalis
General
Posts: 3315
Joined: Jun 23 2009
Human: Yes
Location: x:355 y:216
Contact:

Re: everything concerning HAPX files

Post by Fistalis »

Balthagor wrote: Mar 30 2018 The builder for hapx files is our own proprietary tool, it will not be released.

We don't mind users digging in the UI files, but this is an area we wont' be able to support. It's really easy to make the whole game crash when changing these.
That being said.. it is entirely possible to create new ones and or edit old ones as some of my old mods demonstrate.

Always keep back ups and trial and error are your friend.
Si vis pacem, para bellum
my Supreme Ruler mods Site - May it rest in peace
arakan94
Lieutenant
Posts: 70
Joined: Oct 10 2018
Human: Yes

Re: everything concerning HAPX files

Post by arakan94 »

Balthagor wrote: Mar 30 2018 The builder for hapx files is our own proprietary tool, it will not be released.

We don't mind users digging in the UI files, but this is an area we wont' be able to support. It's really easy to make the whole game crash when changing these.
Could you release some documentation for hapx? I'd like to make the main left window with departments bigger, so it displays more units (the sizes seem to be set so it works on HD resolution - space is wasted on my resolution).. Digging through those files without having a clue which is which doesn't sound like something I want to do though.. :/
User avatar
Balthagor
Supreme Ruler
Posts: 22083
Joined: Jun 04 2002
Human: Yes
Location: BattleGoat Studios

Re: everything concerning HAPX files

Post by Balthagor »

Sorry, like I said, we don't mind users digging in the UI files, but this is an area we won't be able to support.
Chris Latour
BattleGoat Studios
chris@battlegoat.com
evildari
Brigadier Gen.
Posts: 629
Joined: Aug 10 2017
Human: Yes

Re: everything concerning HAPX files

Post by evildari »

Balthagor wrote: Oct 12 2018 Sorry, like I said, we don't mind users digging in the UI files, but this is an area we won't be able to support.
maybe not an editor , but maybe a little documentation of the more obscure commands
like obUdefxc and obFlags

here my question - maybe it is very easy to answer for you (but iam at total loss)
i managed to get fixed data for resources working (see screenshot) with setting obUdefxc to 0,0,0,0 and using obUdef from 0 to 11 for the resources , i even managed to get the right icon and resource name with that, but unfortunately it does not work the same with the AI-minister-lock, only
here the code i used for the lock for the timber resource - but it only locks agriculture - is that maybe defined by the obAction&obData entries?

Code: Select all

&&HAPOB	6, 
obName	, 
obSysuse	83, 
obFlags	0x200001, 
obState	0x0, 
obStyle	0, 
obUdef	2, 
obUdefxc	0, 0, 0, 0, 
obAction	1749, 
obData	1749, 
obDatafmt	0, 
ToolTip	"Minister Allowed Product Controls", 
ToolTipSel	"Minister Locked from Product Controls", 
ToolTipGrid	, 
obRect	170, 0, 200, 30, 
obSyspar	81, 
hapname	"MOD_41RESDATA", 
obUdefxp	, 
bitmapstyles	26, 0, 
currframe	0,
Thank you very much for any hint!
You do not have the required permissions to view the files attached to this post.
my mods
http://www.bgforums.com/forums/viewtopi ... 79&t=25932 (even techs and units for everyone - AI will own you too)
http://www.bgforums.com/forums/viewtopi ... 79&t=29326 (MARSX2)
User avatar
Balthagor
Supreme Ruler
Posts: 22083
Joined: Jun 04 2002
Human: Yes
Location: BattleGoat Studios

Re: everything concerning HAPX files

Post by Balthagor »

If it's not working, it probably has something to do with what we call "source codes". That might be the obUdefxc variable, but I'm not sure. In our HAPX editor it has a label so I don't know it's actual variable name.

The source code system is quite complex and can easily crash the game if used improperly. I don't think we've published the details for what source code does what.
Chris Latour
BattleGoat Studios
chris@battlegoat.com
evildari
Brigadier Gen.
Posts: 629
Joined: Aug 10 2017
Human: Yes

Re: everything concerning HAPX files

Post by evildari »

is it possible to add a LB type object (habob 19) into another LB ?
like displaying the unit order queue (status) in an army list ?
(everything i tried so far - resulted in a CTD - every other non-list stat worked)
my mods
http://www.bgforums.com/forums/viewtopi ... 79&t=25932 (even techs and units for everyone - AI will own you too)
http://www.bgforums.com/forums/viewtopi ... 79&t=29326 (MARSX2)
Post Reply

Return to “Modding Issues & Support”