Quantumphysguy Posted February 18, 2016 Report Share Posted February 18, 2016 I have an idea for a mod for the game but not sure if I am using the correct terminology. I want to create an auto-save feature, that will save the game lets say every 5 minutes. Is that a mod? If so, how would I get started doing that? All the modding guides I have read are for creates units. If this isn't the correct route - what path should I go to implement this? Quote Link to comment Share on other sites More sharing options...
sanderd17 Posted February 18, 2016 Report Share Posted February 18, 2016 You should be able to do that in a mod, as a mod can edit any GUI files, and can also call GUI-exposed functions. Thus call the saving function. But I think it would be better to have this feature directly in the main game (as an option) than in a mod. You will have to touch files that aren't optimised for modding, which means you'll have to copy a lot of code to your new mod (code that you will need to maintain as the game evolves). If you want to implement this, start in the GUI files that handle the saving of games, see what functions they use, and try to call them from a timer in the GUI somewhere. 4 Quote Link to comment Share on other sites More sharing options...
Quantumphysguy Posted February 19, 2016 Author Report Share Posted February 19, 2016 I'm pretty new to 0 A.D. - Can you point me to where those files are? From there I think I can figure it out. Thanks again! Quote Link to comment Share on other sites More sharing options...
Lion.Kanzen Posted February 19, 2016 Report Share Posted February 19, 2016 http://trac.wildfiregames.com/wiki/GettingStartedProgrammers in 0AD You can contribuye with main code, I mean The game as volunteer, open ticket, submitting patches. Givin feedback, suggestions. Quote Link to comment Share on other sites More sharing options...
fcxSanya Posted February 19, 2016 Report Share Posted February 19, 2016 5 hours ago, Quantumphysguy said: Can you point me to where those files are? Gui layout/scripts are here: gui During the game session the 'session' 'page' is active: gui/session (you may be in particular interested in 'session.js' there). Save dialog logic is here: gui/savedgames/save.js , Engine.SaveGame call is saving the file on the engine side. 1 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.