Mike Dora Posted January 14, 2019 Posted January 14, 2019 I need some advice please on the workings of the *_nations.ini file in some SF2 terrain folders. Asking because I see two different formats for the contents of the file, such as this in the "TimorNO" terrain: [LimitedNationList] FriendlyNation001=Australia FriendlyNation002=AustralianNavy FriendlyNation003=NewZealand EnemyNation001=Indonesia EnemyNation002=China and this in the "Formosa" terrain: [Nation001] NationID=024 Name=Taiwan DisplayName=Republic of China Air Force Alignment=FRIENDLY PilotNameList=NamesChineseWG.lst RankList=RanksUSAF.lst CallsignList=CallsignsUS.lst Formation.Fighter=USFighter Formation.Attack=USFighter Formation.Bomber=USBomber Formation.Transport=USBomber Formation.Tank=USTank Formation.MobileAD=USAD PilotTrainingStandard=Normal GenderRatio=0 [Nation002] NationID=023 Name=China DisplayName=PLAAF Alignment=ENEMY PilotNameList=NamesChineseYP.lst RankList=RanksPLA.lst CallsignList=CallsignsUS.lst Formation.Fighter=SovietFighter Formation.Attack=SovietFighter Formation.Bomber=SovietBomber Formation.Transport=SovietBomber Formation.Tank=SovietTank Formation.MobileAD=SovietAD PilotTrainingStandard=Normal GenderRatio=0 Which of these is the correct format please, and if they're both "correct", why are they different? Thanks Mike Quote
+Wrench Posted January 14, 2019 Posted January 14, 2019 age difference .... the lower (Formosa) is the very early style, possibly even SF1 the upper is the newer, correct SF2 style 1 Quote
Mike Dora Posted January 15, 2019 Author Posted January 15, 2019 Thanks Wrench, Very helpful. I think I’m going to have fun with this. Mike Quote
Gunrunner Posted January 15, 2019 Posted January 15, 2019 (edited) Actually, this isn't the whole truth (what Wrench said being true, but not the whole picture). The first format is for using Nations already set in the global NATIONS.INI file (this is usually all SF2 needs) or set within the local *_NATIONS.INI file (requiring further declarations). The second format is to set new Nations, not already present in the global NATIONS.INI, for use by the AI only (as you can't select the defined nation otherwise); you have to make sure it uses a unique NationID though as duplicates MAY cause problems (usually doesn't because they exist as SF1 legacy, representing the same nations with same names and IDs). I use this to prune nations I don't intend to fly from the global NATIONS.INI, while adding them to their specific terrains, allowing me to have a shorter, more pertinent service list to choose from, while keeping everything working as intended. In short, in SF2 they're complementing each other for specific purposes, not alternatives. For example you can do something like : [LimitedNationList] FriendlyNation001=Australia FriendlyNation002=AustralianNavy FriendlyNation003=NewZealand EnemyNation001=Indonesia EnemyNation002=China EnemyNation003=Mordor [Nation001] NationID=xxx (ideally a number greater than the last one used in the NATION.INI, but I haven't tested if it's required to be in sequence or if gaps in the sequence are supported, assume it's not) Name=Mordor DisplayName=Mordor Alignment=Enemy PilotNameList=NamesChineseWG.lst RankList=RanksUSAF.lst CallsignList=CallsignsUS.lst Formation.Fighter=USFighter Formation.Attack=USFighter Formation.Bomber=USBomber Formation.Transport=USBomber Formation.Tank=USTank Formation.MobileAD=USAD PilotTrainingStandard=Normal GenderRatio=0 Edited January 15, 2019 by Gunrunner 1 1 Quote
Nyghtfall Posted January 15, 2019 Posted January 15, 2019 (edited) 3 hours ago, Gunrunner said: [LimitedNationList] FriendlyNation001=Australia FriendlyNation002=AustralianNavy FriendlyNation003=NewZealand EnemyNation001=Indonesia EnemyNation002=China EnemyNation003=Mordor [Nation001] NationID=xxx (ideally a number greater than the last one used in the NATION.INI, but I haven't tested if it's required to be in sequence or if gaps in the sequence are supported, assume it's not) Name=Mordor DisplayName=Mordor Alignment=Enemy PilotNameList=NamesChineseWG.lst RankList=RanksUSAF.lst CallsignList=CallsignsUS.lst Formation.Fighter=USFighter Formation.Attack=USFighter Formation.Bomber=USBomber Formation.Transport=USBomber Formation.Tank=USTank Formation.MobileAD=USAD PilotTrainingStandard=Normal GenderRatio=0 I'm really interested, what type of planes Mordor is currently flying. Edited January 15, 2019 by Nyghtfall 1 Quote
+Wrench Posted January 15, 2019 Posted January 15, 2019 You'll find them in the "What If..." section, along with a couple others (good guys). Edit: found the "The good guys". Both these uploads had lost their images, so I had to re-upload them. 1 Quote
Mike Dora Posted January 15, 2019 Author Posted January 15, 2019 Well here's my root problem. I'm trying to fly missions as the "good guys" in the Himalayas terrain by Wrench & Maj Lee, with modern (ie post-1980) ac, with the following Himalaya_Nations.ini file: [Theater] TheaterName=Somewhere over Himalayas Location001=Nepal Location002=PRC [LimitedNationList] FriendlyNation001=USAF FriendlyNation002=USMC FriendlyNation003=RAF FriendlyNation007=Australia FriendlyNation008=Singapore EnemyNation001=China //EnemyNation002=Soviet Trouble is, the Chinese never show up. When I fly as the Chinese, though, I do meet the "Western" ac. How do I fix this please? Thanks Mike Quote
Gunrunner Posted January 15, 2019 Posted January 15, 2019 Do the Chinese have aircrafts with compatible service dates ? Do these aircrafts have missions types compatible with the player flown mission (Intercept vs Strike, CAP vs Sweep, and so on) and the terrain ? Do these aircrafts have the range required to perform assigned missions ? These are 3 things I'd check if we are to assume the problem lies with the planeset. Quote
Mike Dora Posted January 16, 2019 Author Posted January 16, 2019 Thanks Gunrunner, My next question, does China have to be the “primary” nation for an aircraft, or is it acceptable for China to be an “importee”? Because in messing around I’ve found I can make North Korea show up as an importee, but not the People’s Republic of China. Mike Quote
+baffmeister Posted January 16, 2019 Posted January 16, 2019 I vaguely recall a similar issue with my fictional terrain/countries install. Although most of the planes were all country specific, it seemed some weren't showing up as enemy AI. It "may" have been because I didn't make a UserList for them. So maybe a country specific aircraft still needs a UserList entry, maybe. Lot's of "maybe's" but might be worth checking. Quote
Mike Dora Posted January 16, 2019 Author Posted January 16, 2019 Thanks BM, Remind me please how the Userlist thing works? Mike Quote
Gunrunner Posted January 16, 2019 Posted January 16, 2019 (edited) With SF2 to guarantee a plane to show up for a specific nation reliably it must either be the primary operator or have a userlist entry for the nation. For example in your MyAircraft.INI file you need to have : [AircraftData] AircraftFullName=Whatever (...) Userlist=MyAircraft_Userlist.ini (...) then you need a MyAircraft_Userlist.ini file with content following the syntax : [China] ServiceStartYear=1980 ServiceEndYear=1990 Availability=COMMON [Russia] ServiceStartYear=1978 ServiceEndYear=1988 Availability=VERY_COMMON The nation names in brackets being the NationName used in your Nations.ini (and it works with nation declared locally in a terrain as per my previous post). Entries in the Userlist have priority over entries in the AircraftData (so the AircraftData might say the plane is not exported to the Enemy and had a service end year of 1985, but has long as there is an entry in the Userlist for an enemy nation, beyond 1985, it will be picked up nevertheless). Really, the service dates and availabilities in the AircraftData files should be considered deprecated, and a Userlist as the preferable and reliable method to do things. Seems I was wrong, the statements do not have the same usage. The service dates in the AircraftData files are for determining the availability dates for the player or, should a UserList be missing, for AI planes as well; while the UserList is used only to determine which planes to spawn for the AI. Edited March 30, 2019 by Gunrunner Corrected a statement after further tests. Quote
+baffmeister Posted January 16, 2019 Posted January 16, 2019 What Gunrunner said. I was going to post something similar. ThirdWires Lightning1 would be an example of what I called a country specific aircraft. It had no export customers but ThirdWire still made a UserList.ini for it. Quote
Nyghtfall Posted January 17, 2019 Posted January 17, 2019 (edited) On 15.1.2019 at 8:40 PM, Wrench said: You'll find them in the "What If..." section, along with a couple others (good guys). Edit: found the "The good guys". Both these uploads had lost their images, so I had to re-upload them. Thanks! Never seen them before...I thought this was a joke. P.S. And sorry for hijacking the thread! Edited January 17, 2019 by Nyghtfall 1 Quote
+Menrva Posted February 11, 2019 Posted February 11, 2019 (edited) Sorry for reviving this not so old thread, but my question is pertinent to this. I am experimenting with what was discussed here. I made a quick terrain with the following, local _NATIONS.ini: [Nation001] NationID=258 Name=Katanga DisplayName=Katangese Air Force Alignment=FRIENDLY //Mercenary=TRUE PilotNameList=NamesMercs.lst RankList=RanksUSAF.lst CallsignList=CallsignsUS.lst Formation.Fighter=USFighter Formation.Attack=USFighter Formation.Bomber=USBomber Formation.Transport=USBomber Formation.Tank=USTank Formation.MobileAD=USAD PilotTrainingStandard=EXCELLENT GenderRatio=0 DebriefSuccessMusic=DebriefSuccess.wav DebriefFailMusic=DebriefFail.wav DebriefKilledMusic=DebriefKilled.wav SpeechFile=USAFSpeech.cat SpeechTextFile=USAFSpeechText.str ActiveDate=1960 EndDate=1963 [Nation002] NationID=259 Name=ONUC DisplayName=United Nations Air Division Alignment=ENEMY Mercenary=FALSE PilotNameList=NamesMercs.lst RankList=RanksUSAF.lst CallsignList=CallsignsUS.lst Formation.Fighter=USFighter Formation.Attack=USFighter Formation.Bomber=USBomber Formation.Transport=USBomber Formation.Tank=USTank Formation.MobileAD=USAD PilotTrainingStandard=EXCELLENT GenderRatio=0 DebriefSuccessMusic=DebriefSuccess.wav DebriefFailMusic=DebriefFail.wav DebriefKilledMusic=DebriefKilled.wav SpeechFile=USAFSpeech.cat SpeechTextFile=USAFSpeechText.str ActiveDate=1961 EndDate=1964 Now, planes with the new nations spawn as they should, just like Dhimar and Paran. Problem is that I cannot get their damned decals (INSIGNIA258 and INSIGNIA259) to work. I tried different solutions. Even lower ID numbers (221 and 222 for instance) do not work. I even added said nations to the global _NATIONS.ini, but nothing. However, when I changed their ID numbers to those of Dhimar and Paran, and changing my new decals to the numbers 256 and 257, it all worked. I don't want to overwrite Paran and Dhimar. For a fictional mod I was making, I substituted the very first nations and decals of the global nations.ini file. It turns out that, for instance, INSIGNIA002 is used for countries 003 and 004 also. There is no way to force it so that countries 003 and 004 use their own decals. This makes me believe that decals have somewhat hardcoded numbering. @Gunrunner You seem to know a lot about this. Any help would be much appreciated. Edited February 11, 2019 by Menrva Quote
Gunrunner Posted February 11, 2019 Posted February 11, 2019 @Menrva, Yes, there are hardcoded behaviours, including the aliasing for NationID 002/003/004, some aliases for default decals (which is why some DECALS.INI call for insignia that don't exist but nevertheless appear, mostly for wing specific insignias or left/right variants) etc... I never bothered to establish a full list of those yet but there should be no hardcoded behaviours for NationIDs beyond 212, at least I never encountered it. I'm not aware of a limitation to the NationID, but if there is a limit it's at either 255 or more likely 256 (since the sequence starts at 1). - Are you sure the NationID you chose are in sequence without gap ? If your NationID stops at 212 and you register locally as 221, the sequence will be broken and 221 ignored, it should be 213. To avoid this you could pad your global NATIONS.ini as such : [Nation212] Name=Oman_OLD65 [Nation213] [Nation214] [Nation215] As long a the [Nationxxx] entries exists, even with nothing else in it, the sequence will be considered as ongoing, the check being done only on the NationID. It's what I do to avoid having to remember what's the next number in sequence, I just know I have space between x and y and can assign whatever ID I want in my terrains. - Are you sure you have the right DecalLevel in your DECALS.INI and have not left it at something other than 0 through copy-paste ? - Does it work when you explicitly call the ID, there might be another problem at play. I'm betting it's the sequence thing; The engine reads all relevant files that might have a Nation definition, and among them after putting all entries to a common format (with terrain-specific entries overrinding terrain-specific entries from the CAT file overriding global entries overriding global entries from the CAT file), searches for existing definitions in sequence (starting with 1) and stops once there is no definition found EVEN if there are entries beyond (I never tested it for Nations, but that's how it works for all other INI files), so if it finds a 212, but no 213, it won't bother searching for 214 even if it's there. I'll check my own install to verify if I've had to use some trickery beyond the padding, but I don't recall anything else right now. 1 Quote
+Menrva Posted February 11, 2019 Posted February 11, 2019 (edited) Of all the questions you have given me, I can sum it up by saying that yes, everything seems to be just fine on my end. I don't even bother with the decals.ini file because I am using stock aircraft, and the new decals work if I change ID number to something that already exists. I respected the sequence numbering too. It's funny because I had added the Russian Air Force as an alternate decal to the Soviet one (or the other way around) as ID 215, and it works. I am just trying to add two AI nations like Dhimar and Paran. The IDs 256 and 257 work. Other unused numbers don't, no matter what, the decals won't show up. NationDs are not limited; whichever ID I use, higher or lower than 256, planes spawn with the added nation, just no decals. It's a pity that so much stuff is hardcoded. Thanks for the help, anyway. If you want, I can send you my files (and decals) so that you can check. Edited February 11, 2019 by Menrva Quote
mue Posted February 11, 2019 Posted February 11, 2019 4 hours ago, Menrva said: For a fictional mod I was making, I substituted the very first nations and decals of the global nations.ini file. It turns out that, for instance, INSIGNIA002 is used for countries 003 and 004 also. There is no way to force it so that countries 003 and 004 use their own decals. This makes me believe that decals have somewhat hardcoded numbering. 1 hour ago, Gunrunner said: @Menrva, Yes, there are hardcoded behaviours, including the aliasing for NationID 002/003/004, some aliases for default decals (which is why some DECALS.INI call for insignia that don't exist but nevertheless appear, mostly for wing specific insignias or left/right variants) etc... I never bothered to establish a full list of those yet but there should be no hardcoded behaviours for NationIDs beyond 212, at least I never encountered it. I'm not aware of a limitation to the NationID, but if there is a limit it's at either 255 or more likely 256 (since the sequence starts at 1). I think the aliasing is defined in ALIAS.LST contained in ObjectData001.CAT. The TW cat extractor does not extract this file, but my cat extractor does. e.g. ALIAS.LST contains the following lines, that maps insignia003 and insignia004 to insignia002: Insignia003.tga Insignia002.tga Insignia004.tga Insignia002.tga 2 Quote
+Menrva Posted February 11, 2019 Posted February 11, 2019 30 minutes ago, mue said: I think the aliasing is defined in ALIAS.LST contained in ObjectData001.CAT. The TW cat extractor does not extract this file, but my cat extractor does. e.g. ALIAS.LST contains the following lines, that maps insignia003 and insignia004 to insignia002: Bloody hell! I never cared about that .LST file and its purpose. Many thanks, mue! This will surely help. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.