Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed genScript.py crashing #1

Closed
wants to merge 2 commits into from

Conversation

RenegadeRaven
Copy link
Contributor

genScript.py no longer crashes if one (or more) of the scriptGAME.txt files are missing.

Regnum added 2 commits October 22, 2018 22:00
No longer crashes when a scriptGAME.txt is missing
1st to 3rd slots only in Gen 6 and 7 games
@SpiredMoth
Copy link
Member

Maybe I'm missing something by not being familiar with Python but why did you remove shutil.rmtree("scripts", True) and perform the file replacement manually?

@RenegadeRaven
Copy link
Contributor Author

RenegadeRaven commented Oct 24, 2018

By deleting the folder you lose all the scripts, which isn't a big deal if they're going to be made again. But with the change, if you have scripts in the folder that aren't included in the /src/scripts.txt, they won't be deleted, the other scripts will just added.

Ex: Folder contains a.pksm and c.pksm. scripts.txt is going to make b.pksm and c.pksm.
b.pksm will be added, c.pksm will be replaced, and a.pksm will remain there

@SpiredMoth
Copy link
Member

Guess that's more of a personal workflow style (I keep all my development stuff in a different, uncommitted directory)

Maybe this is just my JS experience and unfamiliarity with Python but looking over the code again it also seems that you're unnecessarily repeating some code, like the for game in games loop, because of the way you constructed a couple of your conditionals

@piepie62
Copy link
Member

The way that I designed it, genScripts was meant for basically only production. Anything other than full production compilation should probably be manually copied, anyway

@piepie62
Copy link
Member

Furthermore, the scriptGAME.txt files should NEVER be deleted, instead use PKSMScript directly

@SpiredMoth
Copy link
Member

What exactly do the WC renewal scripts do? At this point they're the only reason I'm keeping this open, and I'm thinking of including them when I deal with #2

@BernardoGiordano
Copy link
Contributor

@SpiredMoth they probably set the redeemed flag to false so that you can get them another time from the postman. I'd say it would be good to generalize them in a C script rather then hardcoding them and having up to 48 scripts to do the same thing with different offsets

SpiredMoth added a commit that referenced this pull request Dec 26, 2018
Merge branch 'dev' into PKSMv6
@SpiredMoth
Copy link
Member

@PlasticJustice check out /dev/python/genScriptsDev.py -- I'm pretty sure I covered all the functionality you were going for

Also added the WC renewal scripts in 8086bd9 so this can be closed

@SpiredMoth SpiredMoth closed this Dec 26, 2018
piepie62 pushed a commit that referenced this pull request Sep 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants