Those working on this mod do so in their own free time and for no pay.
Show your support for them by enabling ads on this site!

Author Topic: Squadron spawn information  (Read 2466 times)

0 Members and 1 Guest are viewing this topic.

May 27, 2018, 05:30:28 AM

Offline John_the_Gamer

  • Recruit
  • *
  • Posts: 3
  • Approval: +0/-0
    • View Profile
Squadron spawn information
« on: May 27, 2018, 05:30:28 AM »
Hello,

I have a question regarding the fighter squadron spawn information.

What is the reason for the faction-specific information being placed within "Config.MEG", rather than just having faction-specific variants in say, "SkirmishUnits.xml" or "Pentastar_Space.xml" or something? Is it purely to do with the new 2.2 tactical retreat ability script?

Because I just spend two hours trying to find the squadron spawn information on the Munificent, only to find it hidden away in an obscure file outside the XML folder where you would expect it to be.

Still loving the mod btw. Keep up the great work.

May 27, 2018, 05:32:43 AMReply #1

Offline kucsidave

  • Mod Team Member
  • Grand Admiral
  • ****
  • Posts: 1,018
  • Approval: +44/-4
  • Don't fear your Demons. Make them fear YOU.
    • View Profile
Re: Squadron spawn information
« Reply #1 on: May 27, 2018, 05:32:43 AM »
Yes, that is a factor as well. The other side is the boarding.
Both require it to work this way.
"He who fights with monsters should be careful lest he thereby become a monster.
And if thou gaze long into an abyss, the abyss will also gaze into thee." - Friedrich Nietzsche

May 27, 2018, 01:12:44 PMReply #2

Offline Corey

  • Mod Leader
  • Administrator
  • Emperor
  • *****
  • Posts: 7,520
  • Approval: +410/-80
  • Dream Crusher
    • View Profile
Re: Squadron spawn information
« Reply #2 on: May 27, 2018, 01:12:44 PM »
Config.meg is just where the XML and LUA script files get stored once compiled, whcih helps a bit with loading times, and is a bit cleaner. Stuff could be in the unit XML entries and still be in config.meg. There are a few reasons we switched to using the LUA-script based fighter spawns. One is for single-unit retreat, as you said, since in order to allow the script to call back fighters (functionality we can use for other stuff besides SUR, too), it needs to spawn that way. Second is for boarding, like Dave said, so that when a faction captures a ship, we can customize the fighter spawns without needing to swap the ship to a different faction variant. Thirdly, for performance and organization- by having them in the GameObjectLibrary we've created, it means instead of needing 6-7 different variants of the same unit strewn accross the files, which all need to be kept up if we needed to change something, we can have one variant. Having more unit variants significantly increases both load times, and can increase lag on the galactic map.
I also have a YouTube channel where I talk about mod development and gaming, do tutorials, and Let's Plays. If you like the content, consider supporting it on Patreon


May 27, 2018, 03:53:10 PMReply #3

Offline John_the_Gamer

  • Recruit
  • *
  • Posts: 3
  • Approval: +0/-0
    • View Profile
Re: Squadron spawn information
« Reply #3 on: May 27, 2018, 03:53:10 PM »
(snip)

Alright, thanks.

I have noticed though, that when I want to change the fighter spawn information in the Config.MEG, the game crashes on load. So when I say, want to give Maldrood full ARC-170's in place of TIE fighters on the Vindicator;

I'd add

                ["ARC_170_SQUADRON"]={
                    ["TERADOC"] = {
                        Reserve=0,
                        Initial=1
                    }
                },

Below the TIE_FIGHTER_SQUADRON code (after the TIE_FIGHTER_SQUADRON's final "},"

I get a whole bunch of XML parse/syntax errors. Is the information in the Config.MEG drawn from some other file, or is the line number set in stone somwhere that causes adding or removing lines to crash the whole thing? Because changing the number of spawned squardrons works fine. But removing, adding or changing squadrons gives the following errors:

Data\XML\Enum\AIGoalCategoryType.XML
Data\XML\Enum\PerceptionTokenType.XML
Data\XML\Enum\MovementClassType.XML
Data\XML\Enum\ObjectWeatherCategoryType.XML
Data\XML\Enum\SurfaceFXTriggerType.XML
Data\XML\Enum\GameObjectPropertiesType.XML

May 28, 2018, 09:00:57 AMReply #4

Offline Corey

  • Mod Leader
  • Administrator
  • Emperor
  • *****
  • Posts: 7,520
  • Approval: +410/-80
  • Dream Crusher
    • View Profile
Re: Squadron spawn information
« Reply #4 on: May 28, 2018, 09:00:57 AM »
How exactly did you edit the files? Diud you extract the whole config.meg file into the mod? Did you extract the one file, and then put it back in? If the latter, using what method? If you want to edit most non-AI related files, for example the GameObjectLibrary, you just need to extract it and put it in the appropriate XML/Scripts folder that it would otherwise be in, and that will override the one in config. ie save it to Data\Scripts\Library\GameObjectLibrary.lua

The errors you're seeing have nothing to do with the GameObjectLibrary files being edited, those are all separate, AI related files, many of which need to be in config.meg, and can't be loose in folders.
I also have a YouTube channel where I talk about mod development and gaming, do tutorials, and Let's Plays. If you like the content, consider supporting it on Patreon


May 28, 2018, 09:25:35 AMReply #5

Offline John_the_Gamer

  • Recruit
  • *
  • Posts: 3
  • Approval: +0/-0
    • View Profile
Re: Squadron spawn information
« Reply #5 on: May 28, 2018, 09:25:35 AM »
How exactly did you edit the files? (snip)

Aha. I see how I messed up now.

I just foolhardedly dove into the Config.MEG directly using Notepad++.  :P I guess it might help to extract the file first.

Sorry. My bad.

 

Those working on this mod do so in their own free time and for no pay.
Show your support for them by enabling ads on this site!