Philip the Swaggerless Posted April 4, 2022 Report Share Posted April 4, 2022 I am looking into making shared line of sight a bonus in my mod, where a Maurya player automatically gets shared line of sight with allies. Is there a special trick to making shared LOS work? First I tried just changing the team bonus to an aura by basically copying the shared_los tech, but that didn't work: Spoiler { "type": "player", "affectedPlayers": [ "Player" ], "modifications": [ { "value": "Player/sharedLos", "replace": true } ], "auraName": "Arthashastra", "auraDescription": "See allies vision. Mauryas used an extensive network of informants and spies." } Then I tried making it a tech that autoResearched, but that didn't work: Spoiler { "genericName": "Arthashastra", "description": "See allies vision. Mauryas used an extensive network of informants and spies.", "autoResearch": true, "modifications": [ { "value": "Player/sharedLos", "replace": true } ], "requirements": {"civ": "maur" } } I noticed that in template_player there is a specific line for Shared Los tech, so I added my new tech to it: <SharedLosTech> unlock_shared_los arthashastra </SharedLosTech> Still no results... No errors messages, no line of sight. Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted April 4, 2022 Report Share Posted April 4, 2022 1 hour ago, Philip the Swaggerless said: { "genericName": "Arthashastra", "description": "See allies vision. Mauryas used an extensive network of informants and spies.", "autoResearch": true, "modifications": [ { "value": "Player/sharedLos", "replace": true } ], "requirements": {"civ": "maur" } } I feel like this should work. You placed this in the technologies/civbonuses folder? I tried it locally in DE and it didn't work for me either. Possibly something where <SharedLosTech> in template_player overrules the tech. Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted April 4, 2022 Report Share Posted April 4, 2022 (edited) 3 hours ago, Philip the Swaggerless said: <SharedLosTech> unlock_shared_los arthashastra </SharedLosTech> Perhaps: <SharedLosTech tokens=""> unlock_shared_los arthashastra </SharedLosTech> lol dunno. @Freagarach? My guess is there can be only 1 tech able to toggle SharedLos. Edited April 4, 2022 by wowgetoffyourcellphone 1 Quote Link to comment Share on other sites More sharing options...
Freagarach Posted April 4, 2022 Report Share Posted April 4, 2022 1 hour ago, wowgetoffyourcellphone said: there can be only 1 The relevant excerpt from Player.js. Player.prototype.UpdateSharedLos = function() { let cmpRangeManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_RangeManager); let cmpTechnologyManager = Engine.QueryInterface(this.entity, IID_TechnologyManager); if (!cmpRangeManager || !cmpTechnologyManager) return; if (!cmpTechnologyManager.IsTechnologyResearched(this.template.SharedLosTech)) { cmpRangeManager.SetSharedLos(this.playerID, [this.playerID]); return; } cmpRangeManager.SetSharedLos(this.playerID, this.GetMutualAllies()); }; So that "modification" isn't used. xD One day, I might have time to fix this (it was on my list already). If anyone else wants to: make the modification used. 2 Quote Link to comment Share on other sites More sharing options...
Philip the Swaggerless Posted April 4, 2022 Author Report Share Posted April 4, 2022 6 hours ago, wowgetoffyourcellphone said: I feel like this should work. You placed this in the technologies/civbonuses folder? I just have it in the technologies folder. Quote Link to comment Share on other sites More sharing options...
AIEND Posted April 25, 2022 Report Share Posted April 25, 2022 Why not make shared sight a basic setup? This kind of convenient place for players does not need to be special. Quote Link to comment Share on other sites More sharing options...
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.