mxmstr Posted February 11, 2016 Share Posted February 11, 2016 So recently I made it my mission to find a way of increasing the amount of soldiers at each CP, and I have gotten it to work...up to a point. Here's a video I recorded demonstrating what happens when assigning more than 10 soldiers to a CP:https://www.youtube.com/watch?v=ke71B6qgATQ There seems to be some sort of limit on how many soldiers can be rendered and active in the player's proximity, seeing how soldiers who are too far will turn into magical green smoke (probably used as a placeholder for inactive entities) and stop reacting to the environment around them. It's frustrating since I cannot for the life of me figure out how to increase these NPC limits. In Africa's enemy definition file, there is a variable called MAX_SOLDIER_STATE_COUNT but increasing it doesn't change anything, nor does DEFAULT_SOLDIER_STATE_COUNT in TppDefine.lua. If anyone's interested, I can give more detailed instructions on how to do this yourself, but until the limitations are taken care of such a mod would be unplayable. Link to comment Share on other sites More sharing options...
tinmantex Posted February 11, 2016 Share Posted February 11, 2016 You need to adjust realisedCount in the Soldier2GameObject entity of the fox2. https://imgur.com/opcGD6b On my system it hard-crashes on load at 38 for some reason, totalCount crashes out ~> 360, but since that max state count it makes sense at least. Game crashes on return to acc also when near the limits, haven't narrowed down whether its realize or total. Also from what I can gather (current area) quest soldiers will be eating into that total count so you need to keep that in mind. Link to comment Share on other sites More sharing options...
mxmstr Posted February 12, 2016 Author Share Posted February 12, 2016 Well s#*!...the solution was right in front of me the whole time. Really appreciate the help man. Link to comment Share on other sites More sharing options...
tinmantex Posted February 12, 2016 Share Posted February 12, 2016 Setting is pretty flaky, another crash at 32, even though fine on load, it crashed while moving through a high populated area (just normal game area, none of my added soldiers).Behavior was repeatable, crash when hitting same spot.Dropped the count to 31, no crash, back up to 32, crash.So I thought, a not well handled internal limit of 32?So I quit to acc, crash. Oh dear.Dropped to 24, no crash.Will test at this for a while. Link to comment Share on other sites More sharing options...
mxmstr Posted February 13, 2016 Author Share Posted February 13, 2016 The only mention of a max realized count is in the file TppEneFova.lua, which seems to set up soldiers' faces. At line 2, there's the line: local e=EnemyFova.MAX_REALIZED_COUNTAnd at line 277 there's the line: function a.GetFaceGroupTableAtGroupType(e)local t=TppEnemyFaceGroup.GetFaceGroupTable(e)local a={}local e=EnemyFova.MAX_REALIZED_COUNTPerhaps the game crashes because there are not enough faces loaded into the game? MAX_REALIZED_COUNT isn't mentioned anywhere else, but when I make the game print the variable it says its 255. Raising the assigned value at line 2 doesn't have any noticable effects, and the game still crashes when adding more soldiers. At line 277, changing the assigned value to anything but 255 causes the enemys' faces/heads to disappear. And it also doesn't prevent crashing when adding more soldiers. So altering MAX_REALIZED_COUNT at line 277 is causing an error that is preventing the face table from being constructed. What a bummer. Link to comment Share on other sites More sharing options...
mxmstr Posted February 13, 2016 Author Share Posted February 13, 2016 Hmm at line 866 there's this: local _=32Not sure if it's relevant or not. Link to comment Share on other sites More sharing options...
rogelio11 Posted August 19, 2016 Share Posted August 19, 2016 that is awesome. your onto something. hopefully you find a command to spawn female soldiers or as prisoners. Link to comment Share on other sites More sharing options...
guibillyboy Posted October 8, 2016 Share Posted October 8, 2016 Hey guys ! Catching the late train but would you mind explaining where I could find all of this? You mentionnend fox2 files? Link to comment Share on other sites More sharing options...
mxmstr Posted October 8, 2016 Author Share Posted October 8, 2016 Here's the thread w/ download:https://forums.nexusmods.com/index.php?/topic/3843865-increased-soldier-population-wip-mod/&do=findComment&comment=34996235 Link to comment Share on other sites More sharing options...
guibillyboy Posted October 8, 2016 Share Posted October 8, 2016 I didn't expect an answer so quickly ! Thank you very much !! Link to comment Share on other sites More sharing options...
Recommended Posts