-
Notifications
You must be signed in to change notification settings - Fork 24
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
Show the prerequisites for the current research goal in the tech tree of the Great Library #135
Show the prerequisites for the current research goal in the tech tree of the Great Library #135
Conversation
…brary ..\ctp2_data\french\uidata\layouts\greatlibrary.ldl ..\ctp2_data\chinese\uidata\layouts\greatlibrary.ldl ..\ctp2_data\english\uidata\layouts\greatlibrary.ldl ..\ctp2_data\german\uidata\layouts\greatlibrary.ldl ..\ctp2_data\italian\uidata\layouts\greatlibrary.ldl ..\ctp2_data\japanese\uidata\layouts\greatlibrary.ldl ..\ctp2_data\spanish\uidata\layouts\greatlibrary.ldl
..\ctp2_data\french\uidata\layouts\ChatWindow.ldl ..\ctp2_data\french\uidata\layouts\SpriteEditor.ldl ..\ctp2_data\french\uidata\layouts\advancespad.ldl ..\ctp2_data\french\uidata\layouts\aipad.ldl ..\ctp2_data\french\uidata\layouts\ancient.ldl ..\ctp2_data\french\uidata\layouts\attract.ldl ..\ctp2_data\french\uidata\layouts\buttonbank.ldl ..\ctp2_data\french\uidata\layouts\c3utilitydialog.ldl ..\ctp2_data\french\uidata\layouts\ce_screen.ldl ..\ctp2_data\french\uidata\layouts\cityespionage.ldl ..\ctp2_data\french\uidata\layouts\citymanager.ldl ..\ctp2_data\french\uidata\layouts\citypad.ldl ..\ctp2_data\french\uidata\layouts\cityview.ldl ..\ctp2_data\french\uidata\layouts\creditsscreen.ldl ..\ctp2_data\french\uidata\layouts\ctp_template.ldl ..\ctp2_data\french\uidata\layouts\cutnpastepad.ldl ..\ctp2_data\french\uidata\layouts\cvscreen.ldl ..\ctp2_data\french\uidata\layouts\diplomacy.ldl ..\ctp2_data\french\uidata\layouts\endgame.ldl ..\ctp2_data\french\uidata\layouts\fancy.ldl ..\ctp2_data\french\uidata\layouts\fliwindow.ldl ..\ctp2_data\french\uidata\layouts\font1.ldl ..\ctp2_data\french\uidata\layouts\font2.ldl ..\ctp2_data\french\uidata\layouts\font3.ldl ..\ctp2_data\french\uidata\layouts\font4.ldl ..\ctp2_data\french\uidata\layouts\font5.ldl ..\ctp2_data\french\uidata\layouts\font6.ldl ..\ctp2_data\french\uidata\layouts\happystatus.ldl ..\ctp2_data\french\uidata\layouts\helppopup.ldl ..\ctp2_data\french\uidata\layouts\helptile.ldl ..\ctp2_data\french\uidata\layouts\hotseatlist.ldl ..\ctp2_data\french\uidata\layouts\infoscreen.ldl ..\ctp2_data\french\uidata\layouts\intromovie.ldl ..\ctp2_data\french\uidata\layouts\loadsave.ldl ..\ctp2_data\french\uidata\layouts\messagebox.ldl ..\ctp2_data\french\uidata\layouts\musicscreen.ldl ..\ctp2_data\french\uidata\layouts\ns_chglobby.ldl ..\ctp2_data\french\uidata\layouts\ns_editplyr.ldl ..\ctp2_data\french\uidata\layouts\ns_joingame.ldl ..\ctp2_data\french\uidata\layouts\ns_launch.ldl ..\ctp2_data\french\uidata\layouts\ns_lobby.ldl ..\ctp2_data\french\uidata\layouts\ns_selcnct.ldl ..\ctp2_data\french\uidata\layouts\ns_selplyr.ldl ..\ctp2_data\french\uidata\layouts\ns_selserv.ldl ..\ctp2_data\french\uidata\layouts\ns_template.ldl ..\ctp2_data\french\uidata\layouts\objectpad.ldl ..\ctp2_data\french\uidata\layouts\options.ldl ..\ctp2_data\french\uidata\layouts\playerpad.ldl ..\ctp2_data\french\uidata\layouts\pointspad.ldl ..\ctp2_data\french\uidata\layouts\pollutionpad.ldl ..\ctp2_data\french\uidata\layouts\profileedit.ldl ..\ctp2_data\french\uidata\layouts\queuewin.ldl ..\ctp2_data\french\uidata\layouts\scenario.ldl ..\ctp2_data\french\uidata\layouts\sciencevictory.ldl ..\ctp2_data\french\uidata\layouts\segmentlist.ldl ..\ctp2_data\french\uidata\layouts\sound.ldl ..\ctp2_data\french\uidata\layouts\sourcelist.ldl ..\ctp2_data\french\uidata\layouts\statswindow.ldl ..\ctp2_data\french\uidata\layouts\throneroom.ldl ..\ctp2_data\french\uidata\layouts\tilepad.ldl ..\ctp2_data\french\uidata\layouts\toolbar.ldl ..\ctp2_data\french\uidata\layouts\trademanager.ldl ..\ctp2_data\french\uidata\layouts\tradescreen.ldl ..\ctp2_data\french\uidata\layouts\tutorialwin.ldl ..\ctp2_data\french\uidata\layouts\unitmanager.ldl ..\ctp2_data\french\uidata\layouts\unitpad.ldl ..\ctp2_data\french\uidata\layouts\unitstatus.ldl ..\ctp2_data\french\uidata\layouts\victorymovie.ldl ..\ctp2_data\french\uidata\layouts\victoryscreen.ldl ..\ctp2_data\french\uidata\layouts\watchlist.ldl ..\ctp2_data\french\uidata\layouts\wondermovie.ldl
…reat Library ..\ctp2_code\ui\aui_ctp2\chart.cpp ..\ctp2_code\ui\interface\greatlibrary.cpp ..\ctp2_code\ui\interface\greatlibrary.h ..\ctp2_code\ui\interface\sci_advancescreen.cpp ..\ctp2_code\ui\interface\sci_advancescreen.h
Add it to the source files ..\ctp2_code\ui\aui_ctp2\chart.cpp ..\ctp2_code\ui\aui_ctp2\chart.h Add it to the layout files ..\ctp2_data\chinese\uidata\layouts\greatlibrary.ldl ..\ctp2_data\english\uidata\layouts\greatlibrary.ldl ..\ctp2_data\french\uidata\layouts\greatlibrary.ldl ..\ctp2_data\german\uidata\layouts\greatlibrary.ldl ..\ctp2_data\italian\uidata\layouts\greatlibrary.ldl ..\ctp2_data\japanese\uidata\layouts\greatlibrary.ldl ..\ctp2_data\spanish\uidata\layouts\greatlibrary.ldl
…and the advance chooser ..\ctp2_code\ui\aui_ctp2\chart.cpp ..\ctp2_code\ui\interface\sci_advancescreen.cpp ..\ctp2_code\ui\interface\sci_advancescreen.h
Sounds great, will give it a test and report back. |
Not sure if I saw the effect of this PR. @MartinGuehmann do you have a screen shot showing where this change should be visible? |
Well it is in the great library and the research chooser. All what you have to do is to set a goal for instance set the goal to Theocracy. And then you will see how many techs you need and how many of those you already know. In the Great Library you have to go to the tech tree. Go to Theocracy, go to the tree and set the goal to Theocracy and the advances you need in the tech tree get an asterix. |
Got it. That's great! Even works for "set goal" of a unit, e.g. sea ingeneer, just need to click on the advance ("nano assembly") that is listed to give that to get to the advance and then I can click on the tech-tree (which does not work for the unit entry): Then I can follow the advance that have an asterix and are not yet known (red frame): Which brings me to my currently researched advance (yellow frame): So works as expected. Good to go. |
I know, probably also something to change. But that is another PR.
Well, then let's merge.
The only complicated thing is finding a place for it. The candidates are the science chooser and the science window. The rest is a list box and some text elements. |
Just noticed that a commit between 247c8dc and the merging of this PR 68fa841 now causes the game to crash when opening the great-library. I'm not sure why that did not happen when I tested this PR as the screenshots show that it had worked then. |
I think, I will test it first. For sure that would be an issue we have to fix, quickly. |
Well, I compiled it on Windows and I got some LDL errors. I then also restored helptile.ldl in the German folder since I thought it had something to do with it. Anyway, I still got some ldl errors, so that I wonder whether originally read the errors correctly or just thought of helptile.ldl. I think we have also to solve this with the duplicated ldl files in a better way. They should be in the default folder. There is a main files called civ3.ldl, if the game is supposed to look for a ctp2.ldl then we could relocate it. Here are the errors:
For sure we did not modify intelligence.ldl, so that is really odd. When I open the trade manager I get the following assert:
dataBlock is NULL, which follows from the LDL error. But I don't know why the LDL error happened. After the assert, I went into debug mode and when I saw that dataBlock was NULL, I stopped debugging. But I would expect that the game would crash then. |
Testing this further, I have the impression that the problem occurs when continuing playing a game that was saved after a research goal was set. |
So looks like the LDL errors are another problem. At least, with new information, I have a some idea where to look. |
I found the problem, now I just have to upload it. |
That's great! Looking forward to testing that (synced your fork of civctp2 but found no new branch/commit so far). |
…l was set This fixes a bug introduced in civctp2#135 ..\ctp2_code\ui\aui_ctp2\chart.cpp ..\ctp2_code\ui\interface\sci_advancescreen.cpp ..\ctp2_code\ui\interface\sci_advancescreen.h
Show the prerequisites for the current research goal in the tech tree of the Great Library: This way it is easier to see what needs to be researched for the current research goal.
This PR should still add a label to the tech tree giving the current research and how many prerequisites it has has and how many of those are known.