NitroVicky Posted May 31, 2023 Report Share Posted May 31, 2023 (edited) Hi, I would like some help with adding more player slots to each match. The current maximum limit is 8, which is not enough for me - sometimes I need 13 players in one game. Is this feasible? Can I edit the source code to achieve this, or would it be possible to make a mod which extends the maximum number of players in each match? Edited May 31, 2023 by NitroVicky Grammar 1 Quote Link to comment Share on other sites More sharing options...
Atrik Posted June 1, 2023 Report Share Posted June 1, 2023 4 minutes ago, NitroVicky said: Is this feasible? Can I edit the source code to achieve this, or would it be possible to make a mod which extends the maximum number of players in each match? Yes to all. Think this mod is on the wish-list of few people already at this point. I'll download it and probably will be popular mod to be able to play larger games. No ideas on the issues you may face other than that a mod would very probably require all participants to have ofc. If you get this on rails, I'm sure you'll get help if needed. Assuming this is would be a mod and that you have no experience with 0ad mods, this may be useful early in your journey:https://trac.wildfiregames.com/wiki/Modding_Guidehttps://github.com/0ad/0ad I still don't know if there are other important tools. 0ad is easy to mod, but haven't be able to learn if a process to explore the code, other then reading it, exist. I hope someone will explain to nubs how he do it like a pro. 1 Quote Link to comment Share on other sites More sharing options...
Stan` Posted June 1, 2023 Report Share Posted June 1, 2023 Currently there is a hardcoded limit in the C++ side that limits the number of players to 8. See source/simulation2/helpers/Player.h:26 There have been some attempts in the past to raise it to 32, See https://code.wildfiregames.com/D2667 @wraitii wanted to commandeer it but forgot. There are a bit more documentation resources here https://docs.wildfiregames.com/ 1 1 Quote Link to comment Share on other sites More sharing options...
NitroVicky Posted June 1, 2023 Author Report Share Posted June 1, 2023 Thanks for the replies. I have downloaded and applied this patch 1 hour ago, Stan` said: https://code.wildfiregames.com/D2667 but the console threw 10 text conflicts. When I started the game, I was still limited to 8 players. The output of the patch process looks like this: U binaries/data/mods/mod/gui/gui.rng > applied hunk @@ -572,12 +572,17 @@ with offset 63 U binaries/data/mods/public/gui/session/diplomacy/DiplomacyDialog.xml C binaries/data/mods/public/gui/session/selection_panels_middle/multiple_details_area.xml > rejected hunk @@ -36,7 +36,8 @@ U binaries/data/mods/public/gui/session/selection_panels_middle/single_details_area.xml > applied hunk @@ -34,7 +34,8 @@ with offset 9 and fuzz 2 U binaries/data/mods/public/gui/session/trade/TradePanel.xml C binaries/data/mods/public/simulation/helpers/Player.js > rejected hunk @@ -43,6 +89,20 @@ C source/graphics/tests/test_LOSTexture.h > rejected hunk @@ -21,6 +21,7 @@ > rejected hunk @@ -31,22 +32,26 @@ > rejected hunk @@ -66,13 +71,14 @@ C source/gui/CGUI.cpp > rejected hunk @@ -852,12 +852,33 @@ C source/ps/GameSetup/GameSetup.cpp > applied hunk @@ -1318,6 +1319,9 @@ with offset -351 and fuzz 1 > rejected hunk @@ -80,6 +80,7 @@ C source/ps/scripting/JSInterface_Game.h > rejected hunk @@ -37,6 +37,7 @@ C source/ps/scripting/JSInterface_Game.cpp > applied hunk @@ -28,6 +28,7 @@ with offset 3 and fuzz 2 > rejected hunk @@ -169,6 +170,11 @@ > rejected hunk @@ -186,4 +192,5 @@ C source/simulation2/components/CCmpRangeManager.cpp > applied hunk @@ -216,9 +188,9 @@ with offset 14 > applied hunk @@ -283,9 +253,9 @@ with offset 49 > applied hunk @@ -718,14 +686,13 @@ with offset 19 > applied hunk @@ -741,9 +708,9 @@ with offset 19 > applied hunk @@ -1143,7 +1112,7 @@ with offset 24 > applied hunk @@ -1377,11 +1346,12 @@ with offset 68 and fuzz 2 > applied hunk @@ -1852,9 +1822,9 @@ with offset 81 and fuzz 1 > applied hunk @@ -1884,7 +1854,7 @@ with offset 81 > applied hunk @@ -2008,7 +1973,7 @@ with offset 74 and fuzz 2 > applied hunk @@ -2371,43 +2336,43 @@ with offset 63 > applied hunk @@ -2421,13 +2386,13 @@ with offset 63 > applied hunk @@ -2439,7 +2404,6 @@ with offset 63 and fuzz 2 > rejected hunk @@ -35,6 +35,7 @@ > rejected hunk @@ -57,42 +58,32 @@ > rejected hunk @@ -101,17 +92,14 @@ > rejected hunk @@ -119,40 +107,24 @@ > rejected hunk @@ -231,8 +203,6 @@ > rejected hunk @@ -246,7 +216,7 @@ > rejected hunk @@ -370,8 +340,6 @@ > rejected hunk @@ -380,7 +348,7 @@ > rejected hunk @@ -392,17 +360,17 @@ > rejected hunk @@ -431,13 +399,13 @@ > rejected hunk @@ -465,16 +433,16 @@ > rejected hunk @@ -783,7 +750,7 @@ > rejected hunk @@ -831,17 +798,17 @@ > rejected hunk @@ -854,7 +821,7 @@ > rejected hunk @@ -879,10 +846,10 @@ > rejected hunk @@ -1044,29 +1011,31 @@ > rejected hunk @@ -1570,9 +1540,9 @@ > rejected hunk @@ -1610,7 +1580,7 @@ > rejected hunk @@ -1739,7 +1709,7 @@ > rejected hunk @@ -1779,12 +1749,12 @@ > rejected hunk @@ -1823,7 +1793,7 @@ > rejected hunk @@ -1831,17 +1801,17 @@ > rejected hunk @@ -1896,11 +1866,6 @@ > rejected hunk @@ -1909,8 +1874,8 @@ > rejected hunk @@ -1942,7 +1907,7 @@ > rejected hunk @@ -1951,17 +1916,17 @@ > rejected hunk @@ -1989,7 +1954,7 @@ > rejected hunk @@ -2085,8 +2050,8 @@ > rejected hunk @@ -2116,7 +2081,7 @@ > rejected hunk @@ -2137,16 +2102,16 @@ > rejected hunk @@ -2447,8 +2411,8 @@ C source/simulation2/components/ICmpRangeManager.h > applied hunk @@ -24,6 +24,7 @@ with fuzz 2 > applied hunk @@ -416,11 +405,6 @@ with offset -53 > rejected hunk @@ -1,4 +1,4 @@ > rejected hunk @@ -250,8 +251,8 @@ > rejected hunk @@ -266,11 +267,8 @@ > rejected hunk @@ -281,11 +279,8 @@ > rejected hunk @@ -297,11 +292,8 @@ > rejected hunk @@ -312,17 +304,14 @@ A source/simulation2/helpers/ArrayData.h A source/simulation2/helpers/ArrayData.cpp U source/simulation2/serialization/BinarySerializer.h > applied hunk @@ -178,6 +178,12 @@ with offset -7 U source/simulation2/serialization/IDeserializer.h U source/simulation2/serialization/IDeserializer.cpp U source/simulation2/serialization/ISerializer.h C source/simulation2/serialization/SerializeTemplates.h > rejected hunk @@ -281,6 +281,19 @@ Summary of conflicts: Text conflicts: 10 Quote Link to comment Share on other sites More sharing options...
NitroVicky Posted June 1, 2023 Author Report Share Posted June 1, 2023 I have tried to apply the patch again and now there are 12 text conflicts. What could be causing the hunk rejection? How should I fix it? C binaries/data/mods/mod/gui/gui.rng > rejected hunk @@ -572,12 +572,17 @@ G binaries/data/mods/public/gui/session/diplomacy/DiplomacyDialog.xml > hunk @@ -41,7 +41,8 @@ already applied C binaries/data/mods/public/gui/session/selection_panels_middle/multiple_details_area.xml > rejected hunk @@ -36,7 +36,8 @@ C binaries/data/mods/public/gui/session/selection_panels_middle/single_details_area.xml > rejected hunk @@ -34,7 +34,8 @@ G binaries/data/mods/public/gui/session/trade/TradePanel.xml > hunk @@ -15,7 +15,8 @@ already applied C binaries/data/mods/public/simulation/helpers/Player.js > hunk @@ -1,3 +1,49 @@ already applied > rejected hunk @@ -43,6 +89,20 @@ C source/graphics/tests/test_LOSTexture.h > rejected hunk @@ -21,6 +21,7 @@ > rejected hunk @@ -31,22 +32,26 @@ > rejected hunk @@ -66,13 +71,14 @@ C source/gui/CGUI.cpp > rejected hunk @@ -852,12 +852,33 @@ C source/ps/GameSetup/GameSetup.cpp > rejected hunk @@ -80,6 +80,7 @@ > rejected hunk @@ -1318,6 +1319,9 @@ C source/ps/scripting/JSInterface_Game.h > rejected hunk @@ -37,6 +37,7 @@ C source/ps/scripting/JSInterface_Game.cpp > rejected hunk @@ -28,6 +28,7 @@ > rejected hunk @@ -169,6 +170,11 @@ > rejected hunk @@ -186,4 +192,5 @@ C source/simulation2/components/CCmpRangeManager.cpp > rejected hunk @@ -35,6 +35,7 @@ > rejected hunk @@ -57,42 +58,32 @@ > rejected hunk @@ -101,17 +92,14 @@ > rejected hunk @@ -119,40 +107,24 @@ > rejected hunk @@ -216,9 +188,9 @@ > rejected hunk @@ -231,8 +203,6 @@ > rejected hunk @@ -246,7 +216,7 @@ > rejected hunk @@ -283,9 +253,9 @@ > rejected hunk @@ -370,8 +340,6 @@ > rejected hunk @@ -380,7 +348,7 @@ > rejected hunk @@ -392,17 +360,17 @@ > rejected hunk @@ -431,13 +399,13 @@ > rejected hunk @@ -465,16 +433,16 @@ > rejected hunk @@ -718,14 +686,13 @@ > rejected hunk @@ -741,9 +708,9 @@ > rejected hunk @@ -783,7 +750,7 @@ > rejected hunk @@ -831,17 +798,17 @@ > rejected hunk @@ -854,7 +821,7 @@ > rejected hunk @@ -879,10 +846,10 @@ > rejected hunk @@ -1044,29 +1011,31 @@ > rejected hunk @@ -1143,7 +1112,7 @@ > rejected hunk @@ -1377,11 +1346,12 @@ > rejected hunk @@ -1570,9 +1540,9 @@ > rejected hunk @@ -1610,7 +1580,7 @@ > rejected hunk @@ -1739,7 +1709,7 @@ > rejected hunk @@ -1779,12 +1749,12 @@ > rejected hunk @@ -1823,7 +1793,7 @@ > rejected hunk @@ -1831,17 +1801,17 @@ > rejected hunk @@ -1852,9 +1822,9 @@ > rejected hunk @@ -1884,7 +1854,7 @@ > rejected hunk @@ -1896,11 +1866,6 @@ > rejected hunk @@ -1909,8 +1874,8 @@ > rejected hunk @@ -1942,7 +1907,7 @@ > rejected hunk @@ -1951,17 +1916,17 @@ > rejected hunk @@ -1989,7 +1954,7 @@ > rejected hunk @@ -2008,7 +1973,7 @@ > rejected hunk @@ -2085,8 +2050,8 @@ > rejected hunk @@ -2116,7 +2081,7 @@ > rejected hunk @@ -2137,16 +2102,16 @@ > rejected hunk @@ -2371,43 +2336,43 @@ > rejected hunk @@ -2421,13 +2386,13 @@ > rejected hunk @@ -2439,7 +2404,6 @@ > rejected hunk @@ -2447,8 +2411,8 @@ C source/simulation2/components/ICmpRangeManager.h > rejected hunk @@ -1,4 +1,4 @@ > rejected hunk @@ -24,6 +24,7 @@ > rejected hunk @@ -250,8 +251,8 @@ > rejected hunk @@ -266,11 +267,8 @@ > rejected hunk @@ -281,11 +279,8 @@ > rejected hunk @@ -297,11 +292,8 @@ > rejected hunk @@ -312,17 +304,14 @@ > rejected hunk @@ -416,11 +405,6 @@ G source/simulation2/helpers/ArrayData.h > hunk @@ -0,0 +1,134 @@ already applied G source/simulation2/helpers/ArrayData.cpp > hunk @@ -0,0 +1,205 @@ already applied U source/simulation2/serialization/BinarySerializer.h > applied hunk @@ -178,6 +178,12 @@ with offset -1 and fuzz 1 G source/simulation2/serialization/IDeserializer.h > hunk @@ -48,6 +48,7 @@ already applied G source/simulation2/serialization/IDeserializer.cpp > hunk @@ -135,6 +135,13 @@ already applied G source/simulation2/serialization/ISerializer.h > hunk @@ -178,6 +178,11 @@ already applied C source/simulation2/serialization/SerializeTemplates.h > rejected hunk @@ -281,6 +281,19 @@ I am using the testing version Alpha 27 Agnis. Quote Link to comment Share on other sites More sharing options...
Stan` Posted June 1, 2023 Report Share Posted June 1, 2023 Well the patch is old, and the code has likely changed since then, so it needs to be adapted. It will only apply properly on the version it was made for originally. Else you need to adapt it. 1 Quote Link to comment Share on other sites More sharing options...
nani Posted June 1, 2023 Report Share Posted June 1, 2023 Up! I wanna see it in trunk too 1 Quote Link to comment Share on other sites More sharing options...
wraitii Posted June 1, 2023 Report Share Posted June 1, 2023 The largest hurdle is the RangeManager, the LOS code only supports up to 14 players at most right now I believe. Until D3938 is merged, that can't easily be changed. I'm not sure which other components assume 8 players after that, probably territories ? 1 Quote Link to comment Share on other sites More sharing options...
NitroVicky Posted June 1, 2023 Author Report Share Posted June 1, 2023 1 hour ago, wraitii said: 14 players at most right now That should be enough for me at the moment. 1 hour ago, wraitii said: RangeManager, the LOS code I don't understand what you mean by this. Quote Link to comment Share on other sites More sharing options...
Stan` Posted June 2, 2023 Report Share Posted June 2, 2023 14 hours ago, wraitii said: The largest hurdle is the RangeManager, the LOS code only supports up to 14 players at most right now I believe. Until D3938 is merged, that can't easily be changed. I'm not sure which other components assume 8 players after that, probably territories ? The whole GUI ? 13 hours ago, NitroVicky said: I don't understand what you mean by this. source/simulation2/components/CCmpRangemanager.cpp and source/simulation2/helpers/Los.h 1 Quote Link to comment Share on other sites More sharing options...
Purgator_ Posted June 30, 2023 Report Share Posted June 30, 2023 I am very curious, how would you deal with Out Of Memory errors with more than 8 players? Current build (for Windows) is 32bit, and I can barely play game with 7 AI opponents for more than 10-15 minutes without Out-Of-Memory error which crashes the game. I love big battles and for sure will support more than 8 players, but memory limit isn't allowing me to do so peacefully. 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.