About using IMapEntity. I'd like to dynamically create some things on the map for the player to sometimes randomly access. I have gotten them to appear on map but interaction of any kind seems to be missing.
var entity = new TestMapEntity();
var partyVis = new TestIPartyVisual();
partyVis.partyVisualPrefabToGenerateFrom = "tutorial_training_field";
partyVis.OnStartup(null); // this basically just gets a game entity with GameEntity.Instantiate() for "tutorial_training_field" and adds the entity to MapScreen.VisualsOfEntities
entity.PartyVisual = partyVis;
entity.PartyVisual.StrategicEntity.SetLocalPosition(Hero.MainHero.GetPosition());
entity.InteractionPosition = partyVis.StrategicEntity.GlobalPosition.AsVec2;
Successfully places the partyvisual part right under the player on the map, but I'm pretty sure something is missing with the MapEntity because its methods (which I have implemented) like OnHover and on click are never called and the field I created on the map has no interaction or presence on the map. My PartyVisual probably works because I added it to VisualsOfEntities, and probably I need to add the mapentity to something as well. Checking other objects in the game, for their IMapEntity they seem to directly rely on MobileParty or Settlement, using CampaignObjectManager to add their entities to MobileParties or Settlements, which are read only lists I can't access, so I'm really not sure where to go with IMapEntity from here.