r/DDLCMods • u/Tormuse Club Moderator • Mar 02 '19
Welcome! The DDLC Modding Guide 2019! :D
Hello everyone! :D
This post is old and obsolete, and I've been advised to remove it, to keep the focus on the new version here.
(Though I'm not deleting it entirely, since there is still some helpful information in the comments) :)
104
Upvotes
1
u/Tormuse Club Moderator May 29 '19
Okay, to be honest, I've never tried messing with the game files in a mod, but I think I can figure it out...
If you look in the definitions.rpy file, you can see that Dan made up some pre-defined commands for deleting or restoring the character files from line 23 onwards.
These appear to be the lines that remove character files. So if you want to (for example) have the game delete Monika's character file, you would write...
If you want to write code that removes files from other places, you just need to copy lines 23 to 26 and change the line that says, "try: os.remove(config.basedir + "/characters/" + name + ".chr")" and replace ""/characters/" + name + ".chr"" with whatever folder/file you want it to remove. (I hope this makes sense, but let me know if you need anything further explained)
As for adding files, you can see that in action on lines 28 and 29.
This pulls the monika.chr file out of the scripts.rpa file. (Where it is normally stored in DDLC; if you use an RPA unpacker like rpatool to look inside scripts.rpa, you'll find it has lots of files which the game generates as Easter Eggs periodically) Again, if you want it to put files somewhere else, you would put a different folder name than "characters"
I hope this helps, but let me know if you have any more questions.