nickwest Posted March 9, 2015 Share Posted March 9, 2015 Hi folks, I'm just curious what you all are doing with your repos to support modules that work in both DS and DST. Are you creating separate repos, or are you maintaining separate branches for each version? We just updated our mod, Pickle It, to work with DST and so far have maintained the DST code in a new branch, but now we want to back port some of our fixes into the DS version so we're staring at our repo wondering if we should keep 2 separate production branches, one for each version's code base, or if we should just make a new repo for DST and work in them separately. My hope would be that DS and DST would converge on one API version eventually. Any word on DS and DST converging on one API version in the future or will they stay forever different? Link to comment Share on other sites More sharing options...
rezecib Posted March 9, 2015 Share Posted March 9, 2015 (edited) For simple mods (like Geometric Placement), I keep both in one version, and just change the api_version when I publish. Simplex provided a neat memoized check for whether the current game was DST:local is_dstfunction IsDST() if is_dst == nil then is_dst = GLOBAL.kleifileexists("scripts/networking.lua") and true or false end return is_dstendYou can use this to toggle the small amounts of code that need to be changed between games. However, for anything that involves custom networking in DST... I would probably just make a separate version. I believe Simplex has been keeping Up & Away in one version, though, so I suppose it is feasible to keep them integrated. I'm pretty sure the APIs will stay different. While there are definitely some merits to merging them, I think the rationale is probably that (a) it would take a fair bit of work, (b) it might upset the current DS API, and © it creates the illusion that many things that are actually handled very differently between the games are fully interoperable, when they aren't, for example the many single-player character mods that execute much of their logic on GetPlayer()-- in multiplayer you can't just use ThePlayer, because that only gives you the local or host player entity. Edited March 9, 2015 by rezecib Link to comment Share on other sites More sharing options...
nickwest Posted March 10, 2015 Author Share Posted March 10, 2015 Ya the only way I'd really imagine them merging would be by making single player actually running client/server but only allowing local connections when playing single player; basically the same way minecraft did it. It'd simplify the codebase for Klei too, but it almost certainly would break DS mods without adding a translation layer for things like GetPlayer() and other single player calls. Thanks for sharing that condition, I hadn't stumbled upon that yet. I'm still not sure if I want to try to maintain a single codebase or just do two and make changes in two spots, or just freeze the single player mod and keep new features to DST. Link to comment Share on other sites More sharing options...
seronis Posted March 10, 2015 Share Posted March 10, 2015 Who cares if it breaks mods? The modders will update. If they dont someone else will update it for them either directly or by making their own version of the feature. 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