My final project is to make a universal installer. An xml file will contain the necessary informations like, the name of the game, its version, the download link, the mod (s) with their links etc ... And usable by the game developers (like you
)
The user can choose what he wants to install with checkboxes.
Honestly, even if it was possible, it's way too much works to do just because some modders don't want to correctly mod Ren'py. Here you are thinking about the compilation of the source code, but you forget that it's in fact the last of your problem :
Firstly you'll have to deal with the fact that two different mods doing something different can change the same line in two different and incompatible way. Secondly you'll have to deal with the fact that one mod will completely change the source in such way that you'll have to guess where the change made by the second one should be inserted. And there's probably other problems which don't cross my mind.
And at the end of this, anyway why do you think that you need to compile the generated file ? I mean, the process is :
1) Check the mod to install ;
2) Edit the source to "install" the mods inside them ;
3) Compile the result ;
4) Run the game later.
The point 4 already take care of the step 3, so you don't need to know how to generate a rpyc file.
Personally, I would say: Don't bother with this. Let the players rage because mods are incompatible and perhaps that more modders will decide to correctly mod a Ren'py game without editing the source file. It's possible 95% of the time and not difficult to do if you read the doc.
Take a look at everything done by
You must be registered to see the links
. It replace the randomization by a choice, it change a +15 into a +30/45 (depending of the case), change the User Interface, and many other things, this without the need to edit the source code.
@bossapplesauce made at least two mods which act as incest restoration, without editing the source code.
The solution is not to create an universal installer, but to teach modders how to do their works in the right way.
Yes but i need to know, how Renpy use this for generate rpyc.
Ren'py parse the source code, create the objects related to each statement, store them in an AST, then pickle the AST. So, if Tom don't wanted to answer, it's simply because you need a complete copy of Ren'py to do this. So, to do this you need 100% of Ren'py. There isn't a single line of the code, not a single one of the included module, that you can forget, because it can be used by a python statement of the code you want to compile.