Author Topic: [Solved] Language file override issue  (Read 6067 times)

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1512
    • View Profile
[Solved] Language file override issue
« on: December 27, 2017, 12:02:22 am »
I'm getting a bug in which my mod's language file is being overridden by the original language file. I'm not using any other mods, and it doesn't happen in OXC. My mod's language file works fine for all new entries, but all entries that are present in the original game have their original names.
« Last Edit: February 11, 2023, 04:30:50 pm by Meridian »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9098
    • View Profile
Re: Language file override bug
« Reply #1 on: December 27, 2017, 12:09:26 am »
Link to mod download pls.
And a screenshot with example of a wrong string.
Maybe options.cfg would help too.

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1512
    • View Profile
Re: Language file override bug
« Reply #2 on: December 27, 2017, 01:11:50 am »
https://drive.google.com/file/d/0B8itkFQbhj-YdXhnZmE0eno0T3M/view


The original plasma items are supposed to be called Alien Heavy Plasma, etc.

options.cfg:
Code: [Select]
mods:
  - active: false
    id: xcom2
  - active: true
    id: xcom1
  - active: true
    id: ReaverXcom Full
  - active: false
    id: from_apoc
  - active: false
    id: XOPS
  - active: false
    id: ImprovedHandObsPack1.2
  - active: false
    id: Luke's Extra UFOs
  - active: false
    id: ReaverXcom Aircraft
  - active: false
    id: ReaverXcom AWeapons
  - active: false
    id: ReaverXcom GWeapons
  - active: false
    id: ReaverXcom GWeaponsPlus
  - active: false
    id: ReaverXcom Tanks
  - active: false
    id: ReaverXcom SoldierClasses
  - active: false
    id: ReaverXcom Facilities
  - active: false
    id: ReaverXcom Aliens
  - active: false
    id: ReaverXcom Super Rich
  - active: false
    id: AP Weakness
  - active: false
    id: Aliens_Pick_Up_Weapons
  - active: true
    id: Aliens_Pick_Up_Weapons_TFTD
  - active: false
    id: Limit_Craft_Item_Capacities
  - active: false
    id: Limit_Craft_Item_Capacities_TFTD
  - active: false
    id: PSX_Static_Cydonia_Map
  - active: true
    id: StrategyCore_Swap_Small_USOs_TFTD
  - active: false
    id: UFOextender_Gun_Melee
  - active: false
    id: UFOextender_Gun_Melee_TFTD
  - active: false
    id: UFOextender_Psionic_Line_Of_Fire
  - active: false
    id: UFOextender_Psionic_Line_Of_Fire_TFTD
  - active: false
    id: UFOextender_Starting_Avalanches
  - active: false
    id: XcomUtil_Always_Daytime
  - active: false
    id: XcomUtil_Always_Daytime_TFTD
  - active: false
    id: XcomUtil_Always_Nighttime
  - active: false
    id: XcomUtil_Always_Nighttime_TFTD
  - active: false
    id: XcomUtil_Fighter_Transports
  - active: false
    id: XcomUtil_High_Explosive_Damage
  - active: false
    id: XcomUtil_High_Explosive_Damage_TFTD
  - active: false
    id: XcomUtil_Improved_Ground_Tanks
  - active: false
    id: XcomUtil_Improved_Heavy_Laser
  - active: false
    id: XcomUtil_No_Psionics
  - active: false
    id: XcomUtil_No_Psionics_TFTD
  - active: false
    id: XcomUtil_Pistol_Auto_Shot
  - active: false
    id: XcomUtil_Pistol_Auto_Shot_TFTD
  - active: false
    id: XcomUtil_Skyranger_Weapon_Slot
  - active: false
    id: XcomUtil_Starting_Defensive_Base
  - active: false
    id: XcomUtil_Starting_Defensive_Base_TFTD
  - active: false
    id: XcomUtil_Starting_Defensive_Improved_Base
  - active: false
    id: XcomUtil_Starting_Defensive_Improved_Base_TFTD
  - active: false
    id: XcomUtil_Starting_Improved_Base
  - active: false
    id: XcomUtil_Starting_Improved_Base_TFTD
  - active: false
    id: XcomUtil_Statstrings
  - active: false
    id: terran-plasma-weapons
  - active: false
    id: RPG Classes
  - active: false
    id: Firestorm Small Scout
  - active: false
    id: AwesomeGuns.Laser
  - active: false
    id: RedBlueLasers
  - active: false
    id: TFTD_Damage
  - active: false
    id: XCOM_Damage
  - active: false
    id: XcomUtil_Improved_Gauss
  - active: false
    id: XcomUtil_Infinite_Gauss
  - active: false
    id: Advanced_Medikit_v1.0
  - active: false
    id: Laser_Sniper_Rifle
  - active: false
    id: CanadianBeaver-AwesomeGuns-1.1-0-g28595bc
  - active: false
    id: LSR Example Mod
  - active: false
    id: OpenXCom_Unlimited_Waypoints
  - active: false
    id: Bloodless Unconscious
  - active: false
    id: OpenXcom_XFiles
  - active: false
    id: XX Resource Files
  - active: false
    id: SAR
  - active: false
    id: TF-XtremeMeasures
  - active: false
    id: Hyper2Snyper images
options:
  FPS: 60
  FPSInactive: 30
  StereoSound: true
  aggressiveRetaliation: false
  alienBleeding: true
  allowBuildingQueue: true
  allowPsiStrengthImprovement: false
  allowPsionicCapture: true
  allowResize: false
  anytimeMartialTraining: true
  anytimePsiTraining: false
  asyncBlit: true
  audioBitDepth: 16
  audioChunkSize: 1024
  audioSampleRate: 22050
  autoNightVision: false
  autoSell: false
  autosave: true
  autosaveFrequency: 5
  battleAlienSpeed: 38
  battleAutoEnd: true
  battleConfirmFireMode: false
  battleDragScrollButton: 2
  battleDragScrollInvert: false
  battleEdgeScroll: 2
  battleExplosionHeight: 3
  battleFireSpeed: 3
  battleHairBleach: true
  battleInstantGrenade: false
  battleNewPreviewPath: 3
  battleNotifyDeath: false
  battleScrollSpeed: 8
  battleSmoothCamera: false
  battleTooltips: true
  battleUFOExtenderAccuracy: false
  battleXcomSpeed: 1
  battlescapeScale: 0
  bleedingIndicator: false
  borderless: false
  canSellLiveAliens: true
  canTransferCraftsWhileAirborne: true
  captureMouse: false
  changeValueByMouseWheel: 0
  checkOpenGLErrors: false
  craftLaunchAlways: true
  cursorInBlackBandsInBorderlessWindow: false
  cursorInBlackBandsInFullscreen: false
  cursorInBlackBandsInWindow: true
  customInitialBase: false
  debug: true
  debugUi: false
  disableAutoEquip: false
  displayHeight: 480
  displayWidth: 640
  dogfightSpeed: 30
  dragScrollPixelTolerance: 10
  dragScrollTimeTolerance: 300
  everyoneFightsNobodyQuits: false
  executeUnconsciousEnemies: true
  fieldPromotions: false
  forceFire: true
  fpsCounter: false
  fullNightVision: false
  fullscreen: true
  geoClockSpeed: 80
  geoDragScrollButton: 2
  geoDragScrollInvert: false
  geoScrollSpeed: 20
  geoscapeScale: 0
  globeAllRadarsOnBaseBuild: true
  globeDetail: true
  globeFlightPaths: true
  globeRadarLines: true
  globeSeasons: true
  includePrimeStateInSavedLayout: true
  keepAspectRatio: true
  keyBaseSelect1: 49
  keyBaseSelect2: 50
  keyBaseSelect3: 51
  keyBaseSelect4: 52
  keyBaseSelect5: 53
  keyBaseSelect6: 54
  keyBaseSelect7: 55
  keyBaseSelect8: 56
  keyBattleAbort: 97
  keyBattleActionItem1: 49
  keyBattleActionItem2: 50
  keyBattleActionItem3: 51
  keyBattleActionItem4: 52
  keyBattleActionItem5: 53
  keyBattleCenterEnemy1: 49
  keyBattleCenterEnemy10: 48
  keyBattleCenterEnemy2: 50
  keyBattleCenterEnemy3: 51
  keyBattleCenterEnemy4: 52
  keyBattleCenterEnemy5: 53
  keyBattleCenterEnemy6: 54
  keyBattleCenterEnemy7: 55
  keyBattleCenterEnemy8: 56
  keyBattleCenterEnemy9: 57
  keyBattleCenterUnit: 278
  keyBattleDeselectUnit: 92
  keyBattleDown: 274
  keyBattleEndTurn: 8
  keyBattleInventory: 105
  keyBattleKneel: 107
  keyBattleLeft: 276
  keyBattleLevelDown: 281
  keyBattleLevelUp: 280
  keyBattleMap: 109
  keyBattleNextUnit: 9
  keyBattleOptions: 27
  keyBattlePersonalLighting: 108
  keyBattlePrevUnit: 0
  keyBattleReload: 114
  keyBattleReserveAimed: 284
  keyBattleReserveAuto: 285
  keyBattleReserveKneel: 106
  keyBattleReserveNone: 282
  keyBattleReserveSnap: 283
  keyBattleRight: 275
  keyBattleStats: 115
  keyBattleUp: 273
  keyBattleUseLeftHand: 113
  keyBattleUseRightHand: 101
  keyBattleVoxelView: 291
  keyBattleZeroTUs: 127
  keyCancel: 27
  keyCraftLoadoutLoad: 290
  keyCraftLoadoutSave: 286
  keyDeselectAll: 120
  keyFps: 288
  keyGeoBases: 98
  keyGeoDown: 274
  keyGeoFunding: 102
  keyGeoGraphs: 103
  keyGeoIntercept: 105
  keyGeoLeft: 276
  keyGeoOptions: 27
  keyGeoRight: 275
  keyGeoSpeed1: 49
  keyGeoSpeed2: 50
  keyGeoSpeed3: 51
  keyGeoSpeed4: 52
  keyGeoSpeed5: 53
  keyGeoSpeed6: 54
  keyGeoTechTreeViewer: 113
  keyGeoToggleDetail: 9
  keyGeoToggleRadar: 114
  keyGeoUfoTracker: 116
  keyGeoUfopedia: 117
  keyGeoUp: 273
  keyGeoZoomIn: 43
  keyGeoZoomOut: 45
  keyGraphsZoomIn: 270
  keyGraphsZoomOut: 269
  keyInvApplyTemplate: 118
  keyInvAutoEquip: 122
  keyInvClear: 120
  keyInvCreateTemplate: 99
  keyInventoryArmor: 97
  keyInventoryAvatar: 109
  keyInventoryLoad: 290
  keyInventorySave: 286
  keyMarkAllAsSeen: 120
  keyNightVisionHold: 32
  keyNightVisionToggle: 302
  keyOk: 13
  keyQuickLoad: 290
  keyQuickSave: 286
  keyResetAll: 120
  keyScreenshot: 291
  keySelectAll: 120
  keySelectMusicTrack: 279
  keyToggleQuickSearch: 113
  keyboardMode: 1
  knockOutIndicator: false
  language: en-GB
  maxFrameSkip: 0
  maximizeInfoScreens: false
  minimapBorderIndicator: true
  mousewheelSpeed: 3
  musicAlwaysLoop: false
  musicVolume: 36
  newSeedOnLoad: true
  nightVisionColor: 8
  noAlienPanicMessages: true
  nonSquarePixelRatio: false
  pauseMode: 0
  playBriefingMusicDuringEquipment: false
  playIntro: true
  preferredMusic: 0
  preferredSound: 0
  preferredVideo: 0
  psiStrengthEval: true
  removeWoundedFromTraining: false
  retainCorpses: true
  rootWindowedMode: false
  saveOrder: 3
  showAllCommendations: false
  showFundsOnGeoscape: false
  showGunMeleeOnTop: true
  showItemNameAndWeightInInventory: false
  showMoreStatsInInventoryView: true
  skipNextTurnScreen: false
  sneakyAI: false
  soldierDiaries: true
  soundVolume: 49
  statisticalBulletConservation: false
  storageLimitsEnforced: true
  strafe: true
  techTreeViewerSpoilerProtection: false
  touchEnabled: false
  traceAI: false
  twoHandedIndicator: true
  twoHandedIndicatorInventory: false
  uiVolume: 39
  useHQXFilter: false
  useOpenGL: true
  useOpenGLShader: Shaders/openxcom.opengl.shader
  useOpenGLSmoothing: true
  useScaleFilter: false
  useXBRZFilter: false
  vSyncForOpenGL: true
  verboseLogging: false
  weaponSelfDestruction: false
  windowedModePositionX: -1
  windowedModePositionY: -1

Offline R1dO

  • Colonel
  • ****
  • Posts: 442
    • View Profile
Re: Language file override bug
« Reply #3 on: December 27, 2017, 01:19:19 am »
From your config it looks like your mod is on top of the list.

What happens if you push your mod to the bottom of the ingame modlist? (A reload might be necessary)

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1512
    • View Profile
Re: Language file override bug
« Reply #4 on: December 27, 2017, 01:41:23 am »
I tried it, it didn't change anything. None of the other mods in the modlist are on. Also, this issue isn't happening in OXC. It happens in OCXE+. But furthermore, as I understand it, mods higher on the list get priority over mods lower in the list.
« Last Edit: December 27, 2017, 03:16:11 am by The Reaver of Darkness »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9098
    • View Profile
Re: Language file override bug
« Reply #5 on: December 27, 2017, 10:29:28 am »
I tried it, it didn't change anything. None of the other mods in the modlist are on. Also, this issue isn't happening in OXC. It happens in OCXE+. But furthermore, as I understand it, mods higher on the list get priority over mods lower in the list.

Mods lower on the list get priority over mods higher on the list.

I will look at the language issue today.

https://drive.google.com/file/d/0B8itkFQbhj-YdXhnZmE0eno0T3M/view

The mod download please, not OXCE+ download.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9098
    • View Profile
Re: Language file override bug
« Reply #6 on: December 27, 2017, 10:43:50 am »
Found the issue.

In your options.cfg, you have language "English (UK)", but your language file in "ReaverXcom Full 0.12.1.zip" is "English (US)".
When I switch the language to en-US, I see "Alien Heavy Plasma" correctly.

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1512
    • View Profile
Re: Language file override bug
« Reply #7 on: December 27, 2017, 06:28:38 pm »
Aha. I forgot I had it set to that.

But then why doesn't it do that on regular OXC?

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9098
    • View Profile
Re: Language file override bug
« Reply #8 on: December 27, 2017, 06:59:51 pm »
But then why doesn't it do that on regular OXC?

I have just tried OXC (2017-12-22 nightly) and it works the same as OXCE+... en-UK wrong strings, en-US correct strings.

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1512
    • View Profile
Re: Language file override bug [RESOLVED]
« Reply #9 on: December 27, 2017, 09:08:04 pm »
I figured it out. The EN-GB language file has only this code:
Code: [Select]
en-GB: {}
This is what's in the 11-09-2017 and 02-09-2017 versions, but not in 06-26-2017 which has a full EN-GB file. I don't know how often OXC comes with the short version, but I got it 2 out of 3 times, and that covers about 90%+ of my use time so it's what I'm used to. That explains why I'd have never noticed this before. Despite having it set to UK English from the beginning, I don't recall ever seeing a single word with UK spelling in OXC.

I'm also switching to OXCE+ finally. It's been a long time coming but I think I'm finally ready. I don't know why it was so hard, but I think I'll make a finished OXC version of my mod before I begin adding OXCE+ features.

I have a question about OXCE+: Are there any features I can use in the mod without breaking compatibility with OXC? I'd like to start a new thread on the topic, but I figured I'd ask first, in case the answer is a flat no.

And another question: I gather that OXCE was a project by Yankes to expand OXC, but then he stopped working on it and you took over and made an extension of the extension called OXCE+. Is that accurate? Or is OXCE truly a separately-maintained thing that some people use today over OXCE+?
« Last Edit: December 27, 2017, 09:17:09 pm by The Reaver of Darkness »

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: Language file override bug [RESOLVED]
« Reply #10 on: December 27, 2017, 09:19:16 pm »
Only very few things can break compatibility, usually it happens when OXCE/OXCE+ is more permissive for some ruleset combination that can exists in OXC.
If you only add brand new properties that exists only in OXCE+ then when loaded by OXC it will be simply ignored.

Example could be `damageType`, you can skip it in OXCE and alter it using `damageAlter`.

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1512
    • View Profile
Re: Language file override bug [RESOLVED]
« Reply #11 on: December 27, 2017, 09:29:37 pm »
Alright I'll start a new thread. Thanks.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9098
    • View Profile
Re: Language file override bug [RESOLVED]
« Reply #12 on: December 27, 2017, 09:35:18 pm »
I have a question about OXCE+: Are there any features I can use in the mod without breaking compatibility with OXC? I'd like to start a new thread on the topic, but I figured I'd ask first, in case the answer is a flat no.

OXCE and OXCE+ mostly add new functionality, not change existing.
This means that in majority of cases (more than 95%) your mod will stay backwards-compatible with OXC... meaning it will still run... just the new stuff will not be "enabled".
In less than 5%, things are changed, i.e. working differently in OXC and OXCE/OXCE+... but even these should mostly work.

There is less than 1% of stuff, which will not be backwards-compatible... as an example: OXC is not able to use more than 1000 bigobs in a mod... OXCE/OXCE+ can use unlimited number of bigobs. So if your mod grows big and you'll be using 5000 bigobs... it won't work in OXC anymore.

And another question: I gather that OXCE was a project by Yankes to expand OXC, but then he stopped working on it and you took over and made an extension of the extension called OXCE+. Is that accurate? Or is OXCE truly a separately-maintained thing that some people use today over OXCE+?

Yankes is still working on OXCE (less, but still)... and I am merging his changes into OXCE+ too.
And yes, OXCE+ is extension of OXCE, which is an extension of OXC.
Most people use OXCE+, because it contains 99.8% of OXCE (there is a small 0.2% difference, where OXCE features conflicted with OXCE+ features, but nothing critical).
More info here: https://openxcom.org/forum/index.php/topic,5251.0.html