Mission Tie Hook / Stats Profiles

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

Moderator: JeremyaFr

Re: Mission Tie Hook

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

Post by JeremyaFr » Sat Aug 08, 2020 7:16 pm

WIP

Hello,
Here is a WIP version of the mission tie hook.

I've fixed a crash that happens in the Pilot Proving Ground when the HangarMap contains more than 30 objects.

EDIT: link removed

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

Post by JeremyaFr » Thu Aug 13, 2020 8:26 am

UPDATE

Hello,
I've merged the changes from the WP version into the stable version.

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

Post by JeremyaFr » Mon Nov 02, 2020 8:34 pm

UPDATE

Hello,
I've updated the mission tie hook.

I've fixed a bug with the music in the game where a mission starts with wait state instead of intro state.

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

Post by JeremyaFr » Sat Mar 20, 2021 1:31 pm

UPDATE

Hello,
I've updated the mission tie hook.

This hook now contains a new feature: Stats Profiles
Stats Profiles permit to define different profiles to customize the characteristics of a craft. Then you can use these profiles on a per mission basis.

Suppose that the craft is "FlightModels\[Model].opt".
To create a stats profile named "Profile1", create a file named "FlightModels\[Model]StatsProfile_Profile1.txt" or create a section named "StatsProfile_Profile1" in "FlightModels\[Model].ini".
The format is
Speed = integer
Acceleration = integer
SpeedIncrement = integer
Deceleration = integer
SpeedDecrement = integer
Pitch = integer
Roll = integer
Yaw = integer
ExplosionStrength = integer
HullStrength = integer
SystemStrength = integer
ShieldStrength = integer
HasShieldGenerator = integer
HasHyperdrive = integer

Suppose that the mission is "[MissionDir]\[Mission].tie".
To define a stats profile for a craft, create a file named "[MissionDir]\[Mission]_StatsProfiles.txt" or create a section named "[StatsProfiles]" in "[MissionDir]\[Mission].ini".
The format is
CraftOptName_fgc_# = ProfileName
PlayerSpeedPercent = integer
PlayerAccelerationPercent = integer
PlayerDecelerationPercent = integer
PlayerPitchPercent = integer
PlayerRollPercent = integer
PlayerYawPercent = integer
PlayerExplosionStrengthPercent = integer
PlayerHullStrengthPercent = integer
PlayerSystemStrengthPercent = integer
PlayerShieldStrengthPercent = integer
# in CraftOptName_fgc_# is an integer for the opt color marking index, starting at 0.
To define a profile for the player craft, set "CraftOptName_fg_player = ProfileName".
The default ProfileName is "Default".

The raw values are calculated as follow:

stats.Speed = (int)(stats.Speed * 2.25f + 0.5f);
stats.Acceleration = (int)(stats.Acceleration * 2.25f + 0.5f);
stats.Deceleration = (int)(stats.Deceleration * 2.25f + 0.5f);
stats.Pitch = stats.Pitch * 256;
stats.Roll = stats.Roll * 256;
stats.Yaw = stats.Yaw * 256;
stats.ExplosionStrength = stats.ExplosionStrength * 105;
stats.HullStrength = stats.HullStrength * 105;
stats.ShieldStrength = stats.ShieldStrength * 50;

if( ShipCategory == ShipCategory_Starship || ShipCategory == ShipCategory_Platform )
{
HullStrength /= 16;
ShieldStrength /= 16;
ExplosionStrength /= 16
}

if( ShipCategory == ShipCategory_Freighter || ShipCategory == ShipCategory_Container )
{
HullStrength /= 4;
ShieldStrength /= 4;
ExplosionStrength /= 4
}

User avatar
Ace Antilles
Admiral (Moderator)
Posts: 6091
Joined: Sat Jan 22, 2000 12:01 am
Contact:

Post by Ace Antilles » Sun Mar 21, 2021 11:55 pm

I will elaborate a little on Jeremys previous post. Stats Profiles is something we've been testing and refining for a while and finally the bugs have been worked out.
There will be a proper tutorial posted on the main pages once Update 2 is out but here's a little more explanation into how it works.

Stats Profiles: This mode allows you to give a ship different Statistics or performance in a mission without affecting the default ship.
For example you can set up a TIE Fighter to have added Shields or Hyperdrive, or decreased hull strength, speed and handling.
This is all controlled from the StatsProfiles section in the Opts INI file. You don’t need run an editor to change the ship stats first.
You can choose from the different Craft performance modes that have been made available by the creator in their relevant INI file.
You can also use MXvTED for reference to create new performance models to characterize your vehicle.

Mxvted.jpg
Yaw.jpg
Here's a guide to which numbers in MXvTED refer to the sections needed in the INI file.
1: Speed = 100
2: Acceleration = 16
3: Deceleration = 27
4: Roll = 36
5: Pitch = 20
6: Yaw = 40
7: HasShieldGenerator = 1....0 = No. 1 = Yes
8: HasHyperdrive = 1......... 0 = No. 1 = Yes
9: ShieldStrength = 50
10: HullStrength = 20
11: SystemStrength = 10
12: ExplosionStrength = 7

I've updated many model INI files from Updates 1 and 2 to include a "Default" profile listing.
This means you can easily see the original Stats without opening MXvTED.
There's a lot of models in the game but we will update more INI files with default templates as we go.

I hope that gives a little more explanation into the new feature but there will be a tutorial posted in the near future.
You do not have the required permissions to view the files attached to this post.
Chief XWAU Team annoying nitpicker.
Ace Antilles - The X-Wing Outpost
Image

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

Post by JeremyaFr » Fri May 28, 2021 2:04 pm

UPDATE

Hello,
I've updated the mission tie hook.

I've added percents for stats for all crafts.

Code: Select all

SpeedPercent = integer
AccelerationPercent = integer
DecelerationPercent = integer
PitchPercent = integer
RollPercent = integer
YawPercent = integer
ExplosionStrengthPercent = integer
HullStrengthPercent = integer
SystemStrengthPercent = integer
ShieldStrengthPercent = integer
*Percent applies to all crafts.

You can define them in the misson ini or in the global default.ini:
create a file named "FlightModels\StatsProfiles.txt" or create a section named "[StatsProfiles]" in "FlightModels\default.ini".

User avatar
Haakan
Cadet 2nd Class
Posts: 76
Joined: Sun Jul 14, 2019 1:36 am

Post by Haakan » Wed Jul 07, 2021 1:31 pm

JeremyaFr wrote:
Fri May 28, 2021 2:04 pm
UPDATE

Hello,
I've updated the mission tie hook.

I've added percents for stats for all crafts.

Code: Select all

SpeedPercent = integer
AccelerationPercent = integer
DecelerationPercent = integer
PitchPercent = integer
RollPercent = integer
YawPercent = integer
ExplosionStrengthPercent = integer
HullStrengthPercent = integer
SystemStrengthPercent = integer
ShieldStrengthPercent = integer
*Percent applies to all crafts.

You can define them in the misson ini or in the global default.ini:
create a file named "FlightModels\StatsProfiles.txt" or create a section named "[StatsProfiles]" in "FlightModels\default.ini".
Is it feasible to allow for defining craft name and ID ?
Lt. Colonel A. Araujo
Commander, 7th SpecOps Squadron "Alpha"
Assistaant to the Recon Office
Emperor's Hammer.

CMDR-ROA/LC Alejandro Araujo/Alpha/Wing I/ISDII Hammer

User avatar
capitanguinea
Galactic Empire
Posts: 207
Joined: Sun Aug 30, 2015 3:59 pm

Post by capitanguinea » Wed Jul 07, 2021 7:58 pm

How this would work in multiplayer enviroment? If in pvp two use xwings and one has an edited profile the mission would load the changes for one, both, noone or simply would it crash?

User avatar
Haakan
Cadet 2nd Class
Posts: 76
Joined: Sun Jul 14, 2019 1:36 am

Post by Haakan » Sat Jul 10, 2021 4:04 am

capitanguinea wrote:
Wed Jul 07, 2021 7:58 pm
How this would work in multiplayer enviroment? If in pvp two use xwings and one has an edited profile the mission would load the changes for one, both, noone or simply would it crash?
If it is a coop mission, both would have the info on profiles for each FG. But if you edited on your own the profile...I don't know, it might desynch.
Lt. Colonel A. Araujo
Commander, 7th SpecOps Squadron "Alpha"
Assistaant to the Recon Office
Emperor's Hammer.

CMDR-ROA/LC Alejandro Araujo/Alpha/Wing I/ISDII Hammer

User avatar
Driftwood
Admiral (Moderator)
Posts: 2150
Joined: Wed Oct 22, 2003 11:01 pm
Contact:

Post by Driftwood » Tue Jul 13, 2021 4:58 am

I would tend to agree with Mr Araujo, my experience with multiplayer days in XWA informs me that any kind of differences between players negatively impacts the netcode performance.

If you are suggesting that there are two FGs of X-Wings and both players have the same profiles on their system, but each FG uses a different FG based on those profiles, then theoretically being 1:1 identical files on each system the game should not desync. If one computer does not have 1:1 identical profile, but has an unaltered one vs a player with a modified one, at worst the game will hard crash, and at best will likely desync and you will suffer poor performance.

If you are playing multiplayer, all game files must be 1:1 the same in regards to EXE stats for things featured in the skirmish/mission, and all text files related to every opt utilized in the mission, ranging from almost all text files, especially strings.txt (with the exception of the flyable/gunnerflyable/nonflyable portions of the shiplist), all must be 100% identical or the game will suffer massive desync, and in some cases (missing opt on one player side for example) the game will hard crash to desktop.

I had this documented somewhere, but I believe my old clan site is down and I don't think I have any backups to share. We used XWAU/UCP heavily back in the day and mitigated all desync issues via much trial and error. 1:1 game installations among players removes virtually all desync issues.

Strings.txt is actually one of the worst offenders, even changing the pilot rank names desyncs the game in multiplayer. So one player using the default XWA concourse and another playing with Imperial Concourse is enough to desync the game, even with otherwise 1:1 install.

Hooks and object profiles and stats are entirely new tech and I haven't personally had the opportunity, or made the opportunity to test the multiplayer features in relation to these functions so much research needs to be done, and while many things passively "just work" behind the scenes, certain things I'm sure do and will break the game in multiplayer either period, or if things aren't tested and configured properly on both ends of the players systems.

If you play with a regular group it should be no issue to create an XWA install and share the folder and contents with your group, or at least the mod install settings, to entirely mitigate any user created conflicts by ensuring that every game install 1:1 matches every other install among group members. If you're doing pickup games then the parties involved need to coordinate game settings and get a standard of mod to use to avoid issues; otherwise stick to vanilla or default XWAU install settings to avoid conflicts.

Post Reply