[1.1] Real Fog of War (v1.8.0) - The Unknown

Started by Luka Kama, July 29, 2017, 12:11:14 PM

Previous topic - Next topic

Sniper Pilot

Interesting idea! Maybe I can make a sub mod....

TryB4Buy

#46
"System.IndexOutOfRangeException: Array index is out of range.
  at RimWorldRealFoW.SectionLayers.SectionLayer_FoVLayer.Regenerate () [0x00000] in <filename unknown>:0
  at Verse.Section.RegenerateAllLayers () [0x00000] in <filename unknown>:0
  at Verse.MapDrawer.RegenerateEverythingNow () [0x00000] in <filename unknown>:0
  at RimWorldRealFoW.MapComponentSeenFog.init () [0x00000] in <filename unknown>:0
  at RimWorldRealFoW.MapComponentSeenFog.MapComponentUpdate () [0x00000] in <filename unknown>:0
  at Verse.MapComponentUtility.MapComponentUpdate (Verse.Map map) [0x00000] in <filename unknown>:0
TickMultiThread.SpecialInjector_TickMultiThreadDetour24:_Error(String)
Verse.MapComponentUtility:MapComponentUpdate(Map)
Verse.Map:MapUpdate()
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()
"
Seems like a conflict with an the mod settings itself. Before that it worked fine with my 50 other B18 mods.

Luka Kama

Quote from: TryB4Buy on December 05, 2017, 09:32:55 PM
"System.IndexOutOfRangeException: Array index is out of range.
  at RimWorldRealFoW.SectionLayers.SectionLayer_FoVLayer.Regenerate () [0x00000] in <filename unknown>:0
  at Verse.Section.RegenerateAllLayers () [0x00000] in <filename unknown>:0
  at Verse.MapDrawer.RegenerateEverythingNow () [0x00000] in <filename unknown>:0
  at RimWorldRealFoW.MapComponentSeenFog.init () [0x00000] in <filename unknown>:0
  at RimWorldRealFoW.MapComponentSeenFog.MapComponentUpdate () [0x00000] in <filename unknown>:0
  at Verse.MapComponentUtility.MapComponentUpdate (Verse.Map map) [0x00000] in <filename unknown>:0
TickMultiThread.SpecialInjector_TickMultiThreadDetour24:_Error(String)
Verse.MapComponentUtility:MapComponentUpdate(Map)
Verse.Map:MapUpdate()
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()
"
Seems like a conflict with an the mod settings itself. Before that it worked fine with my 50 other B18 mods.

In order to try to workaround this error I must know exactly which is the other mod that causes it (I'm sorry, but really I can't track it down all by myself). You could try disabling one other mod at time, then the one disabled when the error does not show up is the incompatible one. Once done that, if the error show up with only FoW mod and this other mod, than report its name and I will try to identify and workaround the problem.

frenchiveruti

Hey there Luka! Your mod seems like the kind of mod I'll test once Combat Extended reaches B18.  It will be a very rough mod to play around with. But Also very useful.
Three quick questions:
Do "military aid" pawns sent by friendly colonies add to my field of view?
Also, will you consider adding ModSync Ninja support for your mod?
Do the "advanced bionic eyes" from EPOE count towards the "nightvision"? Do they increase the field of view of the pawn?

Thanks! I love that you thought about a lot of things like the bionic eyes and also when a pawn is sleeping.

TryB4Buy

Quote from: Luka Kama on December 06, 2017, 04:43:22 PM
Quote from: TryB4Buy on December 05, 2017, 09:32:55 PM
"System.IndexOutOfRangeException: Array index is out of range.
  at RimWorldRealFoW.SectionLayers.SectionLayer_FoVLayer.Regenerate () [0x00000] in <filename unknown>:0
  at Verse.Section.RegenerateAllLayers () [0x00000] in <filename unknown>:0
  at Verse.MapDrawer.RegenerateEverythingNow () [0x00000] in <filename unknown>:0
  at RimWorldRealFoW.MapComponentSeenFog.init () [0x00000] in <filename unknown>:0
  at RimWorldRealFoW.MapComponentSeenFog.MapComponentUpdate () [0x00000] in <filename unknown>:0
  at Verse.MapComponentUtility.MapComponentUpdate (Verse.Map map) [0x00000] in <filename unknown>:0
TickMultiThread.SpecialInjector_TickMultiThreadDetour24:_Error(String)
Verse.MapComponentUtility:MapComponentUpdate(Map)
Verse.Map:MapUpdate()
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()
"
Seems like a conflict within the mod settings itself. Before that it worked fine with my 50 other B18 mods.

In order to try to workaround this error I must know exactly which is the other mod that causes it (I'm sorry, but really I can't track it down all by myself). You could try disabling one other mod at time, then the one disabled when the error does not show up is the incompatible one. Once done that, if the error show up with only FoW mod and this other mod, than report its name and I will try to identify and workaround the problem.
Understood. I've been hesitant to look more in depth at it myself due to all the mods I'm using. Here's the list:
Achtung-Mod-master
AllowDeadMansApparel
AllowTool
AnimalTab
AntiAutoUnload
AreaUnlocker
Autopsy-master
AvoidFriendlyFire
BetterPawnControl
BillysCaravanFormation
BillysLoadTransportPod
Blueprints
CameraPlus-master
Cheaper Components
CleaningArea
Clutter Structure_doorStuff
CrashLanding
CustomDeathRandomness
DD WorkTab
DefensivePositions
DESurgeries
Dodging Rebalanced
DryLeaves_b18.1.0
EdBPrepareCarefully
ED-ReverseCycleCooler
ED-SafeTraps
ED-TurretControl
ExpandedContextMenu
Firefoam Belt
FluffyBreakdowns
FollowMe
FreshStockpileFilter-master
Hand Me That Brick
HaulToStack
HugsLib
Hunting Alert
ICanFixIt
IdleFix
ImpassableMapMaker
ImprovedWorkbenches
IndustrialRoller
IThinkYouMissclicked
JustIgnoreMePassing-master
LongRangePodLauncher
Manhunter Fix
MapReroll
MarvsUghYouGotMe
MedicalTab
Mending_easy
Miniaturisation
Miniaturisation-0.18.0
MiningCo. MMS
Moody
More Meltdowns
Nandonalt - Set-up Camp
OmniLocator
Passive-Coolers-Refuelable-0.18.1.2
PathAvoid
PetMute
PlantSaver
PowerSwitch
PrepareLanding
QualityBuilder
QualityCooldown-1.0
RealFoW
ReplaceWalls
ReverseCommands
RF - Configurable Maps
RF - Consolidated Traits
RF - More Trait Slots
RF - Smooth Stone Walls
Rimfire Custom Charge Deadeye
RimSearch
Rimworld_ModSyncNinja
RimworldStackXXL
RotTickFix
RT_Fuse-B18-1.1.1
RuntimeGC
RW_RefugeeStats
SameSpot-master
Shuttlecraft
Smart Speed
static_quality_plus_B18
Super Soil
TableDiner_Simple
TechAdvancing
Therapy
TickMultiThread
TradingSpot
UniversalFermenter
VGP_Tools
WanderingCaravans [B18]
WheresTheGravel
WhileYoureUp
WildlifeTab
WorldPawnGC
zombieland-master

Rimworld Mod Checker reports no conflicts, although it reports none for all my turned off mods. I'm not sure If I have to enable them for it to actually check them. It does correctly display the number of XML files in the directory, though. As best I can tell Rimworld is fairly resilient to XML conflicts anyway. Only name-matched text inside XMLs are actually overwritten so everyone can just add their own stuff for Defs\ResearchProjectDefs\Research.xml or whatever. And everyone uses the most up to day Huglib and Harmony, so those load orders don't matter.

Anyways, I'll retry adding this mod to the pile slower next time with B19.

Luka Kama

#50
Quote from: TryB4Buy on December 24, 2017, 12:03:21 PM
Understood. I've been hesitant to look more in depth at it myself due to all the mods I'm using. Here's the list:
Achtung-Mod-master
AllowDeadMansApparel
AllowTool
AnimalTab
AntiAutoUnload
AreaUnlocker
Autopsy-master
AvoidFriendlyFire
BetterPawnControl
BillysCaravanFormation
BillysLoadTransportPod
Blueprints
CameraPlus-master
Cheaper Components
CleaningArea
Clutter Structure_doorStuff
CrashLanding
CustomDeathRandomness
DD WorkTab
DefensivePositions
DESurgeries
Dodging Rebalanced
DryLeaves_b18.1.0
EdBPrepareCarefully
ED-ReverseCycleCooler
ED-SafeTraps
ED-TurretControl
ExpandedContextMenu
Firefoam Belt
FluffyBreakdowns
FollowMe
FreshStockpileFilter-master
Hand Me That Brick
HaulToStack
HugsLib
Hunting Alert
ICanFixIt
IdleFix
ImpassableMapMaker
ImprovedWorkbenches
IndustrialRoller
IThinkYouMissclicked
JustIgnoreMePassing-master
LongRangePodLauncher
Manhunter Fix
MapReroll
MarvsUghYouGotMe
MedicalTab
Mending_easy
Miniaturisation
Miniaturisation-0.18.0
MiningCo. MMS
Moody
More Meltdowns
Nandonalt - Set-up Camp
OmniLocator
Passive-Coolers-Refuelable-0.18.1.2
PathAvoid
PetMute
PlantSaver
PowerSwitch
PrepareLanding
QualityBuilder
QualityCooldown-1.0
RealFoW
ReplaceWalls
ReverseCommands
RF - Configurable Maps
RF - Consolidated Traits
RF - More Trait Slots
RF - Smooth Stone Walls
Rimfire Custom Charge Deadeye
RimSearch
Rimworld_ModSyncNinja
RimworldStackXXL
RotTickFix
RT_Fuse-B18-1.1.1
RuntimeGC
RW_RefugeeStats
SameSpot-master
Shuttlecraft
Smart Speed
static_quality_plus_B18
Super Soil
TableDiner_Simple
TechAdvancing
Therapy
TickMultiThread
TradingSpot
UniversalFermenter
VGP_Tools
WanderingCaravans [B18]
WheresTheGravel
WhileYoureUp
WildlifeTab
WorldPawnGC
zombieland-master

Rimworld Mod Checker reports no conflicts, although it reports none for all my turned off mods. I'm not sure If I have to enable them for it to actually check them. It does correctly display the number of XML files in the directory, though. As best I can tell Rimworld is fairly resilient to XML conflicts anyway. Only name-matched text inside XMLs are actually overwritten so everyone can just add their own stuff for Defs\ResearchProjectDefs\Research.xml or whatever. And everyone uses the most up to day Huglib and Harmony, so those load orders don't matter.

Anyways, I'll retry adding this mod to the pile slower next time with B19.

On Steam I released an update that fixes the "Array index is out of range" error (caused by a bug when disabling the fade effect), but hadn't the time yet to release the standalone zip.

If you can, try to use the Steam version, or re-enable the fog fade effect.

Harry_Dicks

Will predator animals that you have tamed still be able to hunt prey that is outside of anyone's line of sight? I ask because I have so many colony animals that there isn't much wildlife. So as soon as a few squirrels or rabbits spawn in, I have a pack of hungry wolves and bears booking it to that edge of the map right away. Will they still be able to do this with this mod, but if no one has sight of the prey animals?

Mod looks fantastic by the way. I'm thinking that maybe if you could disable the "Raid!" alarm, that you could have a new job of guard duty or something? Monitoring the CCTV cameras, or for neolithic standing in the guard tower as a lookout.

TryB4Buy

Quote from: Luka Kama on December 24, 2017, 12:09:13 PMOn Steam I released an update that fixes the "Array index is out of range" error (caused by a bug when disabling the fade effect), but hadn't the time yet to release the standalone zip.
Thanks! Let us know when its on a publicly available platform (steam is not a public platform).

Luka Kama

Update 1.3.0

Change log:

  • Fixed a bug occurring when disabling the fog fade effect which broke the map
  • Some performance improvements
  • Removed the FoW check for home area placing/clearing

Steam page
Zip to manually install here

Harry_Dicks

QuoteAnimals participate to Faction Fog of War only if trained for release and with a master set.

So does that mean all of my wolves will be able to hunt new prey animals that are spawned in, but not in anyone's line of sight, as long as they don't have a master set? Thanks!

Luka Kama

The FoW is applied only for aiming and firing. Target tracking and looking goes beyond the fog, so your wolves should be able to hunt by their self, trained or not.

Harry_Dicks

Hell yeah, awesome man!  My future dreams for this mod have a new work type added, guard duty/sentry. Then you could have your sheriffs and other would-be-hat pawns patrol along a wall, or stand guard at the main gate! Or maybe they have to monitor the CCTVs and open/close remote doors from the "security" room ala Prison Architect. Setup custom sentry time schedules with Fluffy's WorkTab, and custom zones for all of the guards. Turn off raid warning with ED-EhancedOptions. Add in that truly "dark" mod or whatever it is. AND SPOTLIGHT TURRETS from Rikiki! HHHHHHHHNNNNNNNNNNNGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG! WANT... SO... BAD!!!!!

Aslowturtleayylmao

game almost unplayable without this mod..
pls tynan add this mod to base game as optional thing.


DJMurtz

#59
EDIT: Turns out this was related to the latest version of "Jec's Tools". Reverting to an older version fixed the problem. Sorry for that.

I started a new game today with this mod, and it works, except for when I draft two of my four starting pawns. It logs (excessively) different errors for each of the two pawns, one being:


Cannot cast from source type to destination type.
at CompOversizedWeapon.HarmonyCompOversizedWeapon.AdjustRenderOffsetFromDir (Verse.Pawn,CompOversizedWeapon.CompOversizedWeapon) <0x0005b>
at CompOversizedWeapon.HarmonyCompOversizedWeapon.DrawEquipmentAimingPreFix (Verse.PawnRenderer,Verse.Thing,UnityEngine.Vector3,single) <0x0091f>
at (wrapper dynamic-method) Verse.PawnRenderer.DrawEquipmentAiming_Patch4 (object,Verse.Thing,UnityEngine.Vector3,single) <0x00072>
at (wrapper dynamic-method) Verse.PawnRenderer.DrawEquipment_Patch1 (object,UnityEngine.Vector3) <0x009bc>
at (wrapper dynamic-method) Verse.PawnRenderer.RenderPawnInternal_Patch2 (object,UnityEngine.Vector3,UnityEngine.Quaternion,bool,Verse.Rot4,Verse.Rot4,Verse.RotDrawMode,bool,bool) <0x011ac>
at Verse.PawnRenderer.RenderPawnInternal (UnityEngine.Vector3,UnityEngine.Quaternion,bool,Verse.RotDrawMode,bool) <0x0007d>
at (wrapper dynamic-method) Verse.PawnRenderer.RenderPawnAt_Patch1 (object,UnityEngine.Vector3,Verse.RotDrawMode,bool) <0x00219>
at Verse.PawnRenderer.RenderPawnAt (UnityEngine.Vector3) <0x00061>
at Verse.Pawn_DrawTracker.DrawAt (UnityEngine.Vector3) <0x0002a>
at Verse.Pawn.DrawAt (UnityEngine.Vector3,bool) <0x00032>
at Verse.Thing.Draw () <0x00047>
at Verse.ThingWithComps.Draw () <0x00010>
at (wrapper dynamic-method) Verse.DynamicDrawManager.DrawDynamicThings_Patch1 (object) <0x001f9>
at Verse.Map.MapUpdate () <0x00135>
at Verse.Game.UpdatePlay () <0x0005c>
at Verse.Root_Play.Update () <0x0004c>


and the other pawn (when drafted) triggers this error:


Exception has been thrown by the target of an invocation.
at System.Reflection.MonoMethod.Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) <0x00182>
at System.Reflection.MethodBase.Invoke (object,object[]) <0x00025>
at FacialStuff.Harmony.HarmonyPatch_PawnRenderer.Prefix (Verse.PawnRenderer,UnityEngine.Vector3,UnityEngine.Quaternion,bool,Verse.Rot4,Verse.Rot4,Verse.RotDrawMode,bool,bool) <0x01ec2>
at (wrapper dynamic-method) Verse.PawnRenderer.RenderPawnInternal_Patch2 (object,UnityEngine.Vector3,UnityEngine.Quaternion,bool,Verse.Rot4,Verse.Rot4,Verse.RotDrawMode,bool,bool) <0x00236>
at Verse.PawnRenderer.RenderPawnInternal (UnityEngine.Vector3,UnityEngine.Quaternion,bool,Verse.RotDrawMode,bool) <0x0007d>
at (wrapper dynamic-method) Verse.PawnRenderer.RenderPawnAt_Patch1 (object,UnityEngine.Vector3,Verse.RotDrawMode,bool) <0x00219>
at Verse.PawnRenderer.RenderPawnAt (UnityEngine.Vector3) <0x00061>
at Verse.Pawn_DrawTracker.DrawAt (UnityEngine.Vector3) <0x0002a>
at Verse.Pawn.DrawAt (UnityEngine.Vector3,bool) <0x00032>
at Verse.Thing.Draw () <0x00047>
at Verse.ThingWithComps.Draw () <0x00010>
at (wrapper dynamic-method) Verse.DynamicDrawManager.DrawDynamicThings_Patch1 (object) <0x001f9>
at Verse.Map.MapUpdate () <0x00135>
at Verse.Game.UpdatePlay () <0x0005c>
at Verse.Root_Play.Update () <0x0004c>


Basically what happens, is that all pawns suddenly become invisible (except for the two that actually trigger this error), and all items on the ground as well. As soon as I undraft the pawn, everything works as expected again.

Actually, looking at this error, I was somehow thinking it was related to this mod, but I don't think it is, so please ignore my bug report of it isn't. Sorry.

Edit: actually, I now remember why I thought this mod might be the cause, because I did see this log message above it:


Cannot register drawable Capybara87358 while drawing is in progress. Things shouldn't be spawned in Draw methods.
Verse.Log:Warning(String)
Verse.DynamicDrawManager:RegisterDrawable(Thing)
RimWorldRealFoW.ThingComps.ThingSubComps.CompHiddenable:show()
RimWorldRealFoW.ThingComps.ThingSubComps.CompHideFromPlayer:updateVisibility(Boolean, Boolean)
RimWorldRealFoW.MapComponentSeenFog:incrementSeen(Faction, Int32[], Int32)
RimWorldRealFoW.ShadowCasters.ShadowCaster:computeFieldOfViewInOctantZero(Byte, Boolean[], Int32, Int32, Int32, Boolean[], Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32, Boolean[], Boolean, MapComponentSeenFog, Faction, Int32[], Int32, Int32, Int32, Int32, Int32, Int32, Int32)
RimWorldRealFoW.ShadowCasters.ShadowCaster:computeFieldOfViewWithShadowCasting(Int32, Int32, Int32, Boolean[], Int32, Int32, Boolean, MapComponentSeenFog, Faction, Int32[], Boolean[], Int32, Int32, Int32, Boolean[], Int32, Int32, Int32, Int32, Int32, Byte, Int32, Int32)
RimWorldRealFoW.ThingComps.ThingSubComps.CompFieldOfViewWatcher:calculateFoV(Thing, Int32, Boolean)
RimWorldRealFoW.ThingComps.ThingSubComps.CompFieldOfViewWatcher:updateFoV(Boolean)
RimWorldRealFoW.ThingComps.ThingSubComps.CompFieldOfViewWatcher:CompTick()
RimWorldRealFoW.ThingComps.CompMainComponent:CompTick()
Verse.ThingWithComps:Tick()
Verse.Pawn:Tick_Patch1(Object)
Verse.TickList:Tick()
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdate()
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()


But, that wasn't an actual error, but a warning(yellow) log message, so it might not be related at all.