Countermeasures don't work in SP?!
-
Is it the case or am I just pressing the wrong key?
I equip flares on my hunter press E and nothing happens... normal?
-
@DavidFliesPlanes doesn't work. Same case for bombs.
BOOOOOOOO!
Someone probably needs to write a Script.
-
The Natives DB has functions to open and close the bomb bay doors but nothing to drop bombs or countermeasures .
-
@Cyron43 This is how it's done in the scripts (not everything but a snippet, there's much more)
void func_5011(int iParam0)//Position - 0x1D5410 { vector3 vVar0; vector3 vVar1; vector3 vVar2; vector3 vVar3; vector3 vVar4; if (func_823(iParam0, 1) || Global_1789445) { if (VEHICLE::_GET_AIRCRAFT_COUNTERMEASURE_COUNT(iParam0) <= 0) { AUDIO::PLAY_SOUND_FRONTEND(-1, "chaff_empty", "DLC_SM_Countermeasures_Sounds", 1); func_97(&uLocal_12301, 0, 0); return; } } vVar0 = { ENTITY::GET_ENTITY_ROTATION(iParam0, 2) }; func_4986(iParam0, ENTITY::GET_ENTITY_MODEL(iParam0), &vVar1, &vVar2, &vVar3, &vVar4); func_5012(iParam0, 0, vVar1, vVar2, vVar3, vVar4, vVar0); func_5012(iParam0, 1, vVar1, vVar2, vVar3, vVar4, vVar0); func_5012(iParam0, 2, vVar1, vVar2, vVar3, vVar4, vVar0); func_5012(iParam0, 3, vVar1, vVar2, vVar3, vVar4, vVar0); AUDIO::PLAY_SOUND_FROM_ENTITY(-1, "chaff_released", iParam0, "DLC_SM_Countermeasures_Sounds", 1, 0); if (NETWORK::NETWORK_HAS_CONTROL_OF_ENTITY(iParam0)) { if (ENTITY::IS_ENTITY_A_MISSION_ENTITY(iParam0)) { __463_0x1DDA078D12879EEE(iParam0, 0, 0); } } else { func_5030(func_4988(1), 1); } func_901(&uLocal_12303, 0, 0); GAMEPLAY::SET_BIT(&iLocal_12307, 0); if (func_823(iParam0, 1) || Global_1789445) { if (NETWORK::NETWORK_HAS_CONTROL_OF_ENTITY(iParam0)) { VEHICLE::_SET_AIRCRAFT_COUNTERMEASURE_COUNT(iParam0, (VEHICLE::_GET_AIRCRAFT_COUNTERMEASURE_COUNT(iParam0) - 1)); } else { func_4982(func_4988(1), 0, 1); } } if (!Global_2501777.f_5842 && !UI::IS_HELP_MESSAGE_BEING_DISPLAYED()) { func_577("CHAFF_FIRE", -1); Global_2501777.f_5842 = 1; } func_97(&uLocal_12301, 0, 0); } void func_5012(int iParam0, int iParam1, vector3 vParam2, vector3 vParam3, vector3 vParam4, vector3 vParam5, vector3 vParam6)//Position - 0x1D5591 { vector3 vVar0; vector3 vVar1; vector3 vVar2; vVar0 = { func_4984(vParam2, vParam3, 0f, 1f, func_5017(iParam0, iParam1)) }; vVar1 = { func_4984(vParam4, vParam5, 0f, 1f, func_5017(iParam0, iParam1)) }; vVar2 = { func_4984(vVar0, vVar1, 0f, 1f, func_5016(iParam0, iParam1)) }; vVar2.z = (vVar2.z + func_5015(iParam0, iParam1)); GRAPHICS::_USE_PARTICLE_FX_ASSET_NEXT_CALL("scr_sm_counter"); GRAPHICS::_START_PARTICLE_FX_NON_LOOPED_AT_COORD_2("scr_sm_counter_chaff", vVar2, Vector(vParam6.z, 0f, vParam6.x) + func_5014(iParam0, iParam1), func_5013(iParam0, iParam1), 0, 0, 0); }
-
@Unknown-Modder Thank you.
So the natives DB is outdated. GET_AIRCRAFT_COUNTERMEASURE_COUNT is not listed there.
This is a disassembled code? I am a C# guy. How do I know what func_4984 and the like are meant to be?
And what's Global_2501777.f_5842?
This is over my head.
-
@Cyron43 The global represents whether the "CHAFF_FIRE" help text was displayed at least once.
I don't have the time to check atm but func_4984 seems to return a specific offset that is then passed to the ptfx native.
Just wait until the b1180 scripts are uploaded and check for yourself or do some experimenting and use your own offsets.
Oh and by the way, the Native DB does only contain natives from the first game version.
-
@Unknown-Modder said in Countermeasures don't work in SP?!:
Oh and by the way, the Native DB does only contain natives from the first game version.
Ugh what? Is there another place where I can find the rest?
-
@CamxxCore i bet he has answers
-
@Cyron43 Afaik there isn't any public DB that has DLC natives but I (and some others too) post some of my findings here.
-
@Unknown-Modder camxxcore has a software or a way to look into exe hardcoded calls
-
@FoxtrotDelta Um, yeah, I know, me too. But that has nothing to do with the DB
-
@Unknown-Modder Thank you.
-
@Cyron43 You're welcome
Btw, these are some of the new b1180 natives. Thanks to zorg93 for figuring out what they do.// VEHICLE namespace int _GET_AIRCRAFT_COUNTERMEASURE_COUNT(Vehicle aircraft); // 0xF846AA63DF56B804 void _SET_AIRCRAFT_COUNTERMEASURE_COUNT(Vehicle aircraft, int countermeasureCount); // 0x9BDA23BF666F0855 int _GET_AIRCRAFT_BOMB_COUNT(Vehicle plane); // 0xEA12BD130D7569A1 void _SET_AIRCRAFT_BOMB_COUNT(Vehicle plane, int bombCount); // 0xF4B2ED59DEB5D774 BOOL _ARE_BOMB_BAY_DOORS_OPEN(Vehicle aircraft); // 0xD0917A423314BBA8 float _GET_PLANE_HOVER_MODE_PERCENTAGE(Vehicle plane); // 0xDA62027C8BDB326E
-
@Unknown-Modder Thanks. Any natives regarding VTOL tasks? I still struggle to get vertical autoland on the Hydra, Blimps and the Tula with my VAutodrive mod.
-
@Cyron43 I don't know know of any.