Ship Patching - Stage One


(Gregorymthompso1) #21

This is EXACTLY what I have been waiting for! Thank you very much.

edit: when will that LoadAliased functionality become available?


#22

Maybe never.


(Dominic) #23

So if this is “Stage One”, what’s “Stage Two”?


(Rufus Shinra) #24

Usually, it involves taking over the world.


(Snake_B5) #25

(Taiidan Republic Mod) #26

Has anyone tried this with dock paths? I just tried adding:

  hp_2 = {
    root = "Root",
    name = "HOLD_DOCK",
    pos = { 0, 0, 0 },
    rot = { 0, 0, 0 },
    axis = { 0, 0, 0 },
  },  
  
  hp_3 = {
    root = "HOLD_DOCK",
    name = "DOCK[In]_Fam[Fighter]",
    pos = { 0, 0, 0 },
    rot = { 0, 0, 0 },
    axis = { 0, 0, 0 },
  },  
  
  hp_4 = {
    root = "DOCK[In]_Fam[Fighter]",
    name = "SEG[0]_Tol[41.5]_Spd[100]_Flags[Player Queue]",
    pos = { 0, 300, 0 },
    rot = { 0, 0, 0 },
    axis = { 0, 0, 0 },
  },  
  hp_5 = {
    root = "DOCK[In]_Fam[Fighter]",
    name = "SEG[1]_Tol[25.5]_Spd[100]_Flags[Player]",
    pos = { 0, 150, 0 },
    rot = { 0, 0, 0 },
    axis = { 0, 0, 0 },
  },  
  hp_6 = {
    root = "DOCK[In]_Fam[Fighter]",
    name = "SEG[2]_Tol[10.5]_Spd[100]_Flags[Close Unfocus ClearRes]",
    pos = { 0, 10, 0 },
    rot = { 0, 0, 0 },
    axis = { 0, 0, 0 },
  },  

And the following line in sp_tanker.ship:

addAbility(NewShipType,"ShipHold",1,40,100,"rallypoint","Fighter, Corvette,Utility",35,{Fighter="36"},{Corvette="75"});

…but no luck.


(Taiidan Republic Mod) #27

Now you are back @BitVenom would you mind answering the above about dock path patching?


(BitVenom) #28

Dock paths aren’t joints - so this doesn’t work. Dock paths come in to HODOR as joints, sure - but inside a HOD they are an entirely different class of data. Ship patching for dock paths may be possible - but not without a patch, and frankly given the other (major) things to do - fairly low priority.


HWR Bugs & Solutions
(Taiidan Republic Mod) #29

Ok, well thanks for the response!


(REARM V2) #30

So things are being done?


(BitVenom) #31

As in, if I have time to work on issues, I’ll focus on things that affect more users - like #666, etc. I have put a few hours into HWRM this past week, but nothing exciting. Without a definitive patch preview -> public release schedule I will generally not talk about what may or may not be in the works - right up until it is in the patch preview build.


(El Rizzo) #32

Just knowing that you are looking into it is great news :slight_smile: I honestly can’t say how much I appreciate that you are willing to spend your own free time working on this ! You are definitely the coolest/most dedicated dev I have ever encountered on any game forum :sunglasses:


(Gregorymthompso1) #33

some questions:

  1. so if i wanted to add a turret to the underside of the sp_tanker, how do i include it within the hardpoints file? do i have to nest the hardpoint_ionbeam_direction values within the hardpoint_ionbeam_position?

my new turret appears on the tanker, but it is not oriented downwards and pointing towards the back of the ship.

i have tried editing the “rot” and “axis” array entries to no effect.

  1. @BitVenom am i correct in assuming that a ship without hard points can’t be patched (i’m guessing even the presence of a weapon hard point like the peashooter on the hgn_scout could be used to cause the refresh)?

  2. would someone mind posting default harpoint position and names for each of the ships?


(ajlsunrise) #34

Would you mind posting the patch code you have?

I’ll write a script for this… stay tuned.


Also, hey there.


(Gregorymthompso1) #36

Ok, here is the patch code (it is the code @BitVenom listed in his example with the following additional hardpoint but I have changed the hardpoint names to Hardpoint_Turret1, etc:

Patch_Priority = 3.0
Patch_Exclusive = 0
Patch_Ops =
{
hp_def =
{
root = “Root”,
name = “NavLightR6”,
pos = { -132.7466, -14.2374, -240.2300 },
rot = { 0, 0, 0 },
axis = { 0, 0, 0 },
},
hp_0 =
{
root = “Root”,
name = “Hardpoint_Turret1_Position”,
pos = { 0, 13, 280 },
rot = { 0, 0, 0 },
axis = { 0, 0, 0 },
},
hp_1 =
{
root = “Root”,
name = “Hardpoint_Turret2_Position”,
pos = { 0, 20, -207 },
rot = { 0, 0, 0 },
axis = { 0, 0, 0 },
},
hp_2 =
{
root = “Root”,
name = “Hardpoint_Turret3_Position”,
pos = { 0, -40, -182 },
rot = { 0, 0, 0 },
axis = { 0, 0, 0 },
},
hp_3 =
{
root = “Hardpoint_Turret3_Position”,
name = “Hardpoint_Turret3_Direction”,
pos = { 0, -40, -182 },
rot = { -1, 0, 0 },
axis = { 0, 0, 0 },
},
hp_4 =
{
root = “Hardpoint_Turret3_Position”,
name = “Hardpoint_Turret3_Rest”,
pos = { 0, -40, -182 },
rot = { 0, 0, 0 },
axis = { -1, 0, 0 },
},
}

The third hardpoint has a frigate turret below the ship (I won’t adjust the position of the hardpoint until I get the orientation of the turret fixed first). I want to get the turret flipped upside down and facing towards the back of the ship.

I tried using values -1 or 1 in the rot or axis arrays to see if they were using orthogonal values. I then tried using 90, 180 or 270 in case it related to degrees (I suppose it might need to be input as radians instead, I don’t know).


One reason I wanted to know the default values and names of all the hardpoints of existing ships is that I wanted to change current hardpoint postions (if this is possible). When I change two of the weapons in the hgn_destroyer.ship their position needs to be changed so that they don’t float above the ship.

When I change the Weapon_TurretBack weapon from “Hgn_KineticBurstCannonDestroyer” to “Hgn_KineticBurstCannon” and Weapon_TurretTop to “Hgn_BattleCruiserIonBeamTurret”, it get the result I described.

Btw, if I can’t modify the values of existing hardpoints using the patch file, I am perfectly happy to create new hardpoints and use them instead…


(ajlsunrise) #37

http://ajlsunrise33.webs.com/HW2%20Ship%20Joints.txt

If you have an editor like Notepad++, change the language to C or C++ or Lua, and you can collapse the groups.


(ajlsunrise) #39

Part of your issue might be the Hardpoint names you’ve assigned to the subsystems in the ship file. They should match the Hardpoint names defined in the patch file.

should be

As for the rotation, you might have to define the direction and rest joints:

hp_3 = {
    root = "Hardpoint_IonBeam3_Position",
    name = "Hardpoint_IonBeam3_Rest",
    pos = { 0, 0, -1},
    rot = { 0, 0, 0 },
    axis = { 0, 0, 0 },
},
hp_4 = {
    root = "Hardpoint_IonBeam3_Position",
    name = "Hardpoint_IonBeam3_Direction",
    pos = { 0, -1, 0},
    rot = { 0, 0, 0 },
    axis = { 0, 0, 0 },
},

Give that a shot. (I haven’t actually tested it yet).


(Gregorymthompso1) #40

I have also tried to work from your extracted hardpoints. I tried nesting the hardpoints as “children= {…},” tried using the Hardpoint_Turret3 vs Hardpoint_Turret3_Position, etc but nothing seems to take.


(ajlsunrise) #42

@BitVenom, the game is ignoring the rot/axis parameters. I even dredged the text portion of the exe to identify if it had another name (it doesn’t appear to be the case).


As a note, the game ignores invalid data (which it should).

hp_2 = 
{
    root = "Root",
    name = "Hardpoint_Turret3_Position",
    pos = "I'm invalid",
    rot = { 15, 15, 15 },
    axis = { 15, 15, 15 },
},

This spawns a hardpoint at {0, 0, 0}.


(Gregorymthompso1) #43

nice work figuring that out!