Author Topic: Unit GUI Editing? [Migrated from ModDB]  (Read 1007 times)

Offline Migrator [Bot]

  • Foreigner
  • *
  • Posts: 0
Unit GUI Editing? [Migrated from ModDB]
« on: March 04, 2017, 02:23:51 pm »
As an amateur modder I have added several ships into my own personal versions of ICW and RAW. However, certain ships appear in the selection cue out of order for where I wish them to be located. For example, lets say I wanted to move all fighters to the second bar in the space units tab. I do not know what to edit exactly in the unit's xml file. How would I go about doing this?

Offline Migrator [Bot]

  • Foreigner
  • *
  • Posts: 0
Re: Unit GUI Editing? [Migrated from ModDB]
« Reply #1 on: March 04, 2017, 02:23:59 pm »
Look in the unit's code where it says "GUI_ROW" and change the 1 to a 0.

Offline Migrator [Bot]

  • Foreigner
  • *
  • Posts: 0
Re: Unit GUI Editing? [Migrated from ModDB]
« Reply #2 on: March 04, 2017, 02:24:06 pm »
Thanks! I have a follow up question: Lets say I wanted to organize ships from small to large, say corvette to capital ship in one gui row. How would I?

Offline Wariscool

  • Staff
  • Ensign
  • ***
  • Posts: 34
Re: Unit GUI Editing? [Migrated from ModDB]
« Reply #3 on: March 04, 2017, 02:24:14 pm »
In the gameobjects.xml file, make sure the units that you want first are at the top of the list of unit xml documents. It then reads and implements them in that order.

Offline Migrator [Bot]

  • Foreigner
  • *
  • Posts: 0
Re: Unit GUI Editing? [Migrated from ModDB]
« Reply #4 on: March 04, 2017, 02:24:29 pm »
Thanks this helped a lot guys!

Offline Striker

  • Regular Member
  • Cadet
  • *
  • Posts: 17
Re: Unit GUI Editing? [Migrated from ModDB]
« Reply #5 on: April 25, 2017, 04:40:38 pm »
Just curious if anyone knows somewhere mid way down a unit xml code there's a GUI model line and for the most part I see that has the ship model.ALO listed there though other times it is a different unit and it doesn't seem to really matter what ship model is listed there. Is that just a meaningless line of code or does somebody know what it does?

Offline Kad_Venku

  • Administrator
  • Senior Lt.
  • ******
  • Posts: 85
Re: Unit GUI Editing? [Migrated from ModDB]
« Reply #6 on: May 01, 2017, 12:09:21 pm »
We're not too sure what it does. It seems to be a remnant of an abandoned idea regarding the GUI. We decided to keep it there and fill in the model name, just in case the game needs the line.
@Wariscool  has done some more research in that area, so he might be able to help more than I can.

Offline Wariscool

  • Staff
  • Ensign
  • ***
  • Posts: 34
Re: Unit GUI Editing? [Migrated from ModDB]
« Reply #7 on: May 01, 2017, 01:30:32 pm »
@Kad_Venku good to know these fancy tags work :D

As for the GUI Code
Code: [Select]
<GUI_Model_Name>w_galaxy00.alo</GUI_Model_Name>
<GUI_Distance>2300</GUI_Distance>
<GUI_Offset>0 30 0</GUI_Offset>
<GUI_Velocity>45</GUI_Velocity>
I have done countless testing and even setting it as the galaxy model seemingly has no effect. I would recommend you just put a default model in there, then the game can happily load it up and not worry about a missing line of code. I suspect it is leftover code that would have maybe made the model appear orbiting the planet or something similar to the fleet icon when moving from planet to planet. Either way you can probably remove the code if you want.