| Testing Menus | |
|
|
Author | Message |
---|
Manka Contributor
Posts : 24 Join date : 2011-09-23
| Subject: Testing Menus Sun Oct 09, 2011 1:25 am | |
| I've been working on restructuring module_game_menus with regards to testing menus, and I think I've got something that'll halfway work and isn't that invasive. I modified process_game_menus to accommodate the following changes:
1) For menus, change the mesh-name from "none" to "test". 2) For menu items, change the door-name (optional 5th tuple slot) from whatever to "test".
To have test menus compile into the game, have ENABLE_TESTING = True at the top of module_game_menus. To pull them out, set it equal to False.
I'm not the best at this python business, but the process script should change the mesh-name back to "none" and delete the unnecessary door name when testing is on and just plain remove the menus otherwise.
Downside is that it might require some work for future versions of M&B. Upside is that they haven't changed those parts of the format in at least 3 years.
Yours in cleaner code, M | |
|
| |
mp84 Nemisis
Posts : 690 Join date : 2010-12-21 Age : 42 Location : New Jersey
| Subject: Re: Testing Menus Sun Oct 09, 2011 3:19 am | |
| Now why would we want to change the way the testing menus appear?
The only reason we have those is simply for our testers to able to test things easily .. (create the necessary battle quick, spawn the companions, check the artwork on all troops, etc..) So I'm not quite sure why we want to change anything with how the test menu works since the release version of PoP 4 whenever that may be will not have a test menu, so I may be missing the point of this here.
| |
|
| |
abhuva Mind Reader
Posts : 191 Join date : 2011-06-27 Age : 44 Location : Germany
| Subject: Re: Testing Menus Sun Oct 09, 2011 8:04 am | |
| As far as i understand its more to clean the code, not changing the menus. So during testing phase all is the same like before, and when we compile the ready game, this will not be included in the compiled txt.files. (And its not needed to delete the code, but just set a constant from true to false).
If it doesnt break things, i am all in for a cleaner code. | |
|
| |
Mordred Insidious Diety
Posts : 2523 Join date : 2009-07-17
| Subject: Re: Testing Menus Sun Oct 09, 2011 8:42 am | |
| | |
|
| |
Akuthia Thought Warden
Posts : 118 Join date : 2011-09-13
| Subject: Re: Testing Menus Sun Oct 09, 2011 10:10 am | |
| My only concern on this would be for continued testing post release. It sounds like this requires a separate compiled folder, is that right? | |
|
| |
Manka Contributor
Posts : 24 Join date : 2011-09-23
| Subject: Re: Testing Menus Sun Oct 09, 2011 10:30 am | |
| Yeah, all this does is make the test menus go away with a single change to the source. And it does require a test/non-test set of text files, but I imagine that's not asking too much. The way it was done in 3.42 is for someone to scan an 18,000 line file for test menus and to comment each out manually. If you know what you're looking for, that's great, but the code seems to change hands regularly enough that that becomes time consuming and error prone.
Originally, all I wanted to do was to put all the test menus in a separate file which could be included or not based on testing status. Unfortunately, there are still the testing menu items to worry about, which sometimes appear in non-testing menus.
An alternative approach that y'all might like more would be to add a global variable to the game similar to what gets set when you use the console to get the cheat menu. This would let me leave all the menus in the text files and I could limit access to them to a couple of points that would be easily identified so that new coders wouldn't have to go hunting to turn them off. I can't tell if there was a reason this wasn't done before, as manually commenting out all the test menus is a lot of work. | |
|
| |
mp84 Nemisis
Posts : 690 Join date : 2010-12-21 Age : 42 Location : New Jersey
| Subject: Re: Testing Menus Sun Oct 09, 2011 11:13 am | |
| Ahh I get you.. I'm for a cleaner code too..
To be honest as long you give instructions on what exact "line" to put in the specific .txt file to activate the test menus while the testers are playing the I don't think anyone will have a problem understanding that..
So you should be good on that front.. plus I prefer that to the alternative method as I don't know what is, but I simply can never get the console cheats to work correctly.. (even though I know I have them activated).. So, I know for a fact I can edit a text file easily, as with everyone else if given the proper instructions.
| |
|
| |
Manka Contributor
Posts : 24 Join date : 2011-09-23
| Subject: Re: Testing Menus Sun Oct 09, 2011 11:36 am | |
| Er, no editing of the text files will be necessary. In the source, there's a single line that needs to be changed from True to False or back again, and depending on that you'll get test menus added to the text files or not. The idea is that we simply switch them off when we package a release. If anyone wants a testing version of a release version, we'd can make a build with them turned on (or even just the menus.txt file).
I think at least as much is required presently, as in order to get, say, Mad Vader's test menus in 3.42 someone would have to go and find them all and uncomment them in the source. | |
|
| |
mp84 Nemisis
Posts : 690 Join date : 2010-12-21 Age : 42 Location : New Jersey
| Subject: Re: Testing Menus Sun Oct 09, 2011 12:17 pm | |
| - Manka wrote:
- Er, no editing of the text files will be necessary. In the source, there's a single line that needs to be changed from True to False or back again, and depending on that you'll get test menus added to the text files or not. The idea is that we simply switch them off when we package a release. If anyone wants a testing version of a release version, we'd can make a build with them turned on (or even just the menus.txt file).
I think at least as much is required presently, as in order to get, say, Mad Vader's test menus in 3.42 someone would have to go and find them all and uncomment them in the source. Ahh ok now I get it.. Hey like the others have said why not, if it makes the code cleaner and less work in the end for you guys. MP | |
|
| |
Sponsored content
| Subject: Re: Testing Menus | |
| |
|
| |
| Testing Menus | |
|