lltcggie / DSP_PlanetwidePlanetaryShieldGenerator

MIT License
0 stars 0 forks source link

Exception on Large Planets (+Galactic Scale) #1

Closed botenredwolf closed 9 months ago

botenredwolf commented 9 months ago

Problem: an exception is thrown when placing a shield generator on large planets.

Specifics: 1) Use Galactic Scale mod for universe generation. 2) Icarus is on a planet with a radius of 460. 3) Place shield generator anywhere. 4) Receive exception error message.

Confirmed by disabling PlanetwidePlanetaryShieldGenerator mod, reloading, and placing the generator, where it places normally. Re-enabling the mod reintroduces the error. All previously placed shields were built with no problems.

Exception error text:

IndexOutOfRangeException: Index was outside the bounds of the array. at PlanetaryShieldGenerator.PlanetaryShieldGeneratorPatches.PlanetATField_UpdateGeneratorMatrix_Postfix (PlanetATField __instance) [0x001bd] in :0 at PlanetATField.UpdateGeneratorMatrix () [0x000d2] in <9616c975fc514778a9ac8b3e821e9cd6>:0 at PlanetATField.GameTick (System.Int64 tick, System.Boolean isActive) [0x0004d] in <9616c975fc514778a9ac8b3e821e9cd6>:0 at GameData.GameTick (System.Int64 time) [0x00876] in <9616c975fc514778a9ac8b3e821e9cd6>:0 at GameMain.FixedUpdate () [0x0015a] in <9616c975fc514778a9ac8b3e821e9cd6>:0

Mods currently enabled on my client:

xiaoye97-BepInEx-5.4.17 crecheng-CloseError-1.0.0 Galactic_Scale-GalacticScale-2.12.46 tanu-CruiseAssist-0.0.37 hetima-SplitterOverBelt-1.1.5 hetima-LSTM-0.8.7 CommonAPI-DSPModSave-1.2.1 xiaoye97-LDBTool-3.0.1 CommonAPI-CommonAPI-1.6.4 kremnev8-GigaStationsUpdated-2.3.5 jinxOAO-SmartTank-1.1.3 Shad0wlife-AssemblerUI-2.3.0 hetima-PlanetFinder-1.1.3 Fireball14-DistributeSpaceWarpers-1.0.10 11matt556-ReusableMetadata-1.0.7 lltcggie-PlanetwidePlanetaryShieldGenerator-1.0.0 jinxOAO-WaterElectrolysis-1.2.3 Eirshy-LazyOutposting-1.4.2 gitetsu-Dark_Fog_Information-1.0.2 starfi5h-ModFixerOne-1.3.1 Selsion-DSPOptimizations-1.1.16 starfi5h-DeliverySlotsTweaks-1.5.0

lltcggie commented 9 months ago

GalacticScale固有の問題である可能性が高いためGalacticScaleには非対応ということにさせてください。

詳細

このMODは惑星シールドジェネレータを1つ置いたときに内部的に惑星全部を覆うように惑星シールドジェネレータを複数置いたように見せかけることで実現しています。 その際どのように配置すれば惑星全部を覆えるのかの計算はバニラのシールド範囲を目視で確認して手動でパラメータを決めています。 もしバニラのシールド範囲という前提の元に惑星シールドジェネレータを最大数(80個)置いても惑星全部を覆えない場合このMODの動作は破綻します。 GalacticScaleを触っていないので想像ですが、おそらく大きな惑星だと80個で惑星を覆いきれないということでシールド範囲に手を加えているのはないでしょうか?(もしくは最悪のケースだと惑星を覆いきれない状況を放置している) この推測が当たっていても外れていてもGalacticScale用の動作を加えないといけない可能性が高く、そこまで手を広げることは出来ないのでGalacticScaleには非対応とさせてください。

lltcggie commented 9 months ago

ちなみにこのMODが有効な状態で配置した惑星シールドジェネレータもMODを無効にすれば通常の動作に戻るので、その点は安心してください。