Saiph Posted August 13, 2017 Share Posted August 13, 2017 Hello, I'd like to override forest_map.lua to increase map size. So, I have put an other forest_map.lua in my mod folder. But it doesn't work, the game still uses the original one. (I have added print statements in the "Generate" function, in the original game file and mine, and I see only the print from the original file) Looking at some previous topics about this I think this file can not be overwritten like that, but it still seems possible. For example there is an answer given in this post: but I didn't manage to make it work. I have put my forest_map.lua in temp_override/map/ and this line in my worldgenmain.lua, and it still doesn't change anything. But maybe there's something else to do ? Does anyone knows if it is possible ? Link to comment Share on other sites More sharing options...
ThemInspectors Posted August 13, 2017 Share Posted August 13, 2017 put this in your modworldgenmain.lua GLOBAL.SIZE_VARIATION = number Link to comment Share on other sites More sharing options...
Saiph Posted August 13, 2017 Author Share Posted August 13, 2017 (edited) Thanks, but I think this option increases the number of rooms not directly the size of them. The option I'm looking for is the "Huge" number of tiles in forest_map.lua: sizes = { ["tiny"] = 1, ["small"] = 350, ["medium"] = 400, ["default"] = 425, -- default == large, at the moment... ["large"] = 425, ["huge"] = 450, -- example: change this to 800 } I know this is the good one because I have already tested it and it truly makes the map gigantic. However, I can only change forest_map.lua in the original game file, not through a mod. Edited August 13, 2017 by Saiph Link to comment Share on other sites More sharing options...
ThemInspectors Posted August 13, 2017 Share Posted August 13, 2017 (edited) 1 hour ago, Saiph said: Thanks, but I think this option increases the number of rooms not directly the size of them. The option I'm looking for is the "Huge" number of tiles in forest_map.lua: sizes = { ["tiny"] = 1, ["small"] = 350, ["medium"] = 400, ["default"] = 425, -- default == large, at the moment... ["large"] = 425, ["huge"] = 450, -- example: change this to 800 } I know this is the good one because I have already tested it and it truly makes the map gigantic. However, I can only change forest_map.lua in the original game file, not through a mod. As far as I know, I don't think that a mod would be able to do that. It's a local table, meaning that there generally isn't a way to edit it. EDIT: Although you could use simplex's method. Edited August 13, 2017 by ThemInspectors Link to comment Share on other sites More sharing options...
Saiph Posted August 14, 2017 Author Share Posted August 14, 2017 Can you please detail how Simplex's method works ? I have tried what he says and the file still doesn't get overwritten. I have put a temp_override/map/forest_map.lua file in my mod directory and added this exact line at the end of my worldgenmain.lua: GLOBAL.package.path = ("%stemp_override/?.lua;"):format(MODROOT) .. GLOBAL.package.path Printing it shows: GLOBAL.package.path = ../mods/workshop-1073203411/temp_override/?.lua;../mods/workshop-1073203411\scripts\?.lua;scripts\?.lua;scriptlibs\?.lua;scripts/?.lua It seems to be the correct path yet the size changes I have done don't apply. Link to comment Share on other sites More sharing options...
ptr Posted August 14, 2017 Share Posted August 14, 2017 I'm trying to override that file too, but it seems the forest_map file is treated in a different way. I overrode both forest_map and storygen using the same way(put in the mod directory), but only the latter one works. Maybe only direct io operations on the original forest_map file will work in the case? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now