Backdrops Hook

A Forum dedicated to the Suggestion, Creation and Editing of XWA Dynamic Link Library Files

Moderator: JeremyaFr

Post Reply

Backdrops Hook

User avatar
JeremyaFr
XWAU Member
Posts: 3922
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Sun Oct 09, 2022 7:50 am

UPDATE

Hello,
I've updated the backdrops hook.

This hook adds starfield backdrops to skirmish mission and permits to replace .dat files for a given mission.

Suppose that the mission is "[MissionDir]\[Mission].tie".

To replace dat images, create a file named "[MissionDir]\[Mission]_Resdata.txt" or create a section named "[Resdata]" in "[MissionDir]\[Mission].ini" and list your new dat files.
The format of this file is the same as "Resdata.txt".

To override the mission data, create a file named "[MissionDir]\[Mission].txt" or create a section named "[mission_tie]" in "[MissionDir]\[Mission].ini".
The format is a line per replacement.

To define the origin region for backdrops, the format is: "backdrop", backdrop fg, "from_region", region index.
The backdrop fg starts from 0.
The region index starts from 0.

To define the destination region name for buoys, the format is: "buoy", buoy fg, "region_name", region name.
The buoy fg starts from 0.

User avatar
JeremyaFr
XWAU Member
Posts: 3922
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Sat Jan 07, 2023 11:41 am

UPDATE

Hello,
I've updated the backdrops hook.

You can now define arrival delay for backdrops.

User avatar
JeremyaFr
XWAU Member
Posts: 3922
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Sat May 20, 2023 1:08 pm

UPDATE

Hello,
I've updated the backdrops hook.

You can now define scaling on a per-backdrop basis.

To define the scale of the backdrops, edit the "Resdata\BackdropScales.txt" file.
You can also define the scales on a per-mission basis. Edit "[MissionDir]\[Mission]_BackdropScales.txt" or create a section named "[BackdropScales]" in "[MissionDir]\[Mission].ini".
If no scale is defined for a backdrop then the global scale value is used.
The default scale value in vanilla game is 256.
To use higher sized backdrops use a smaller value.

Batou
Cadet 4th Class
Posts: 12
Joined: Sun Feb 17, 2019 5:18 pm

Post by Batou » Sat May 20, 2023 2:31 pm

JeremyaFr wrote:
Sat Jan 07, 2023 11:41 am
UPDATE

Hello,
I've updated the backdrops hook.

You can now define arrival delay for backdrops.
Hello,
What is the script for this function ?

User avatar
JeremyaFr
XWAU Member
Posts: 3922
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Sat May 20, 2023 2:41 pm

Hello,
The arrival delay is defined for flight groups in the mission file.
You can set it with a mission editor.

Bman
Lieutenant Commander
Posts: 1167
Joined: Mon Apr 05, 2004 11:01 pm

Post by Bman » Sat May 20, 2023 10:32 pm

Thanks and great job Jeremy. Question... if the scaling of a FG BACKDROP is set via AlliED/Yogeme editor via the Backdrop "Size" field, does that mess up the hook's settings ? Should the size field be left bank for all BACKDROP FG's in all mission.tie files ?

B/t/w, the current default scaling size for XWAUPG and TFTC is 128.0 based on DTM's SuperBackdrop project which kicked off about 10 years ago or so and carries forward today.
Reminds me, should we change the patch settings below back to the vanilla default "256.0" for this new updated xwa_backdrops_hook ?

Code: Select all

<Patch Name ="Backdrop scaling factor from 256.0f to 512.0f">
    <Item Offset="1A83AC" From="00008043" To="00000044"/>
</Patch>
<Patch Name ="Backdrop scaling factor from 256.0f to 128.0f">     <---- this is current defacto value most everyone is using.
    <Item Offset="1A83AC" From="00008043" To="00000043"/>
</Patch>
<Patch Name ="Backdrop scaling factor from 256.0f to 64.0f">
    <Item Offset="1A83AC" From="00008043" To="00008042"/>
</Patch>
<Patch Name ="[SKIP]backdrop scaling factor from 256.0f to 32.0f">
    <Item Offset="1A83AC" From="00008043" To="00000042"/>
</Patch>
.
Thanks
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

User avatar
JeremyaFr
XWAU Member
Posts: 3922
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Sun May 21, 2023 7:24 am

When a custom scale is defined in the txt/ini file for a backdrop it replace the global scale for this backdrop.
This scale is then multiplied with the scale defined in the mission editor for the backdrop flight group.

Bman
Lieutenant Commander
Posts: 1167
Joined: Mon Apr 05, 2004 11:01 pm

Post by Bman » Sun May 21, 2023 5:34 pm

I see, so the above patcher "global" code is basically outdated/not needed anymore. Thanks for explanation. So to recap, high def resolution backdrops imported into .dat files ... the larger they are say 1024x1024, 2048x2048, 4096x4096 etc. ... we need a smaller scaling factor to keep the images sharper, and can be tweaked via mission editors. Sounds great.
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

User avatar
JeremyaFr
XWAU Member
Posts: 3922
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Sat Sep 02, 2023 10:30 am

UPDATE

Hello,
I've updated the backdrops hook.

Changes are:
- per-image scale
- up to 256 backdrops

User avatar
JeremyaFr
XWAU Member
Posts: 3922
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Sat Sep 30, 2023 3:32 pm

UPDATE

Hello,
I've updated the backdrops hook.

Changes are:
- fix the "up to 256 backdrops" feature

User avatar
JeremyaFr
XWAU Member
Posts: 3922
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Wed Oct 11, 2023 6:20 pm

UPDATE

Hello,
I've updated the backdrops hook.

Changes are:
- disable the "up to 256 backdrops" feature as it seems to not work fine

User avatar
JeremyaFr
XWAU Member
Posts: 3922
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Mon Dec 11, 2023 7:34 pm

UPDATE

Hello,
I've updated the backdrops hook.

Changes are:
- enable the "up to 256 backdrops" feature

Post Reply