Jump to content
XCOMUFO & Xenocide

Xcomutil Research Paradigm


stjones

Recommended Posts

After thinking about implementing the research tree as a Java program, I have decided that it really shouldn't be that hard. The key thing is to TOTALLY circumvent the research logic in the game.

 

In the past, I have always tried to design a way to work within the game. This meant coming up with a way to use the existing interface to assign scientists to projects and manipulate the data files in such a way that I triggered the research completions I wanted. What I really needed was a GUI to handle research allocations and completions at the end of each battle, but I didn't want to do that in C or C++. Adding Java to the equation changes EVERYTHING.

 

I already know how to suppress normal research. I do that to implement my Research Help from Captured Aliens. I also know how to force research completion and enable the use and production of various new technologies, I do that to implement the TEC:type functions in the command line version of XcomUtil. All I have to do is define MY version of the research tree and write the GUI that allows the players to use it.

 

As a first version, I will implement the normal research tree, with just a few modifications. First, I will automatically consume one of each new item for use in research. This will eliminate those problems in TFTD where you sold that alien body before you knew you needed it. Second, I will allow your idle engineers to help the scientists on a 1 for 1 basis. That is, if you have 10 scientists, up to 10 of your engineers can help them, effectively giving you 20 scientists, if you need them. If I wanted to, I could even implement the scientist quality model used by Xcom3, but I think that would be overkill.

 

I'll keep thinking about this for a few days, since I need to finish the map placement code for Hobbes before I start on this. However, with Java, it now seems VERY possible. I am even looking forward to it.

Link to comment
Share on other sites

Eventually, whatever your JAVA program comes up with the results have to be "Written" to Xcom. If in Xcom B depends on A, but with the JAVA utility you, say, make B depend not on A. Can you communicate back to Xcom that B has been researched whilst leaving A unresearched as far as Xcom is concerned?
Link to comment
Share on other sites

Eventually, whatever your JAVA program comes up with the results have to be "Written" to Xcom.  If in Xcom B depends on A, but with the JAVA utility you, say, make B depend not on A.  Can you communicate back to Xcom that B has been researched whilst leaving A unresearched as far as Xcom is concerned?

 

It should even be possible to change "A depends on B" to "B depends on A". I will disable research by constantly forcing all research projects to the maximum time remaining. No matter what project you assign your scientists to, nothing will actually be accomplished. Thus, the game will never report that anything has finished. Instead, I will maintain my own tables.

 

When I decide that research is complete, I will update RESEARCH.DAT to note that the research is done. Next, I will update PRODUCT.DAT to allow items to be produced and used. Finally, I will update UP.DAT to make entries visible in the UfoPedia. All of those are simple ON/OFF flags. When these flags are set, the old research interface in the game will probably show new things to research, but the impossibly high time remaining for all of them will still leave them disabled.

 

The biggest possible problem I see is enabling the final trip to Cydonia. That may require me to set that research time to some very small number so that it can be researched inside the game to enable something I don't yet understand. However, anyone who has used my Research Help and TEC:ALL features knows that everything else will work.

 

The main thing I have to design is the interface. I won't know when new scientists are hired or how much work they have done, unless I check to see how much those impossibly high research times have been reduced. I could use that as an indicator of how much time has been available. I may have to run my program just before combat, so that research can not be applied to things that were just acquired. In any case, I will have to allow a sequence of topics to be reseached, since it might be many game days between combats. If you have 100 scientist-days since the last battle, you might use the first 50 scientist-days to research A, which enables B. Then you could spend 30 more to research B, which enables C. This might actually result in faster research, since the game only completes projects at the end of each day, possibly wasting a vast number of scientist-days.

 

It also seems impossible to use engineers as backup scientists, much as I would like to, since I would not know how long they were idle. The player might have stopped all of his production just before combat to make me think they have been idle all along. There are many little details.

 

It has been a long time since I took at look at the status of the Xenocide research tree. Perhaps I should use the same XML to define my research trees. Since the games SHOULD be virtually identical in that respect, it could give that part of Xenocide a little free testing. I couldn't find the documentation describing it when I looked last night. Can you point me to the right file? Or just send it to me? Or post it here?

Link to comment
Share on other sites

Can you make the project show-up for assignment in Xcom itself, even in the (as you say) B depends on A case. Or will that have to occur entirely outside the game?
Link to comment
Share on other sites

Can you make the project show-up for assignment in Xcom itself, even in the (as you say) B depends on A case.  Or will that have to occur entirely outside the game?

 

I might be able to do that, but it would make my job much harder. By totally disabling research, I can re-use those file entries to store my own information. Anyway, I am still working out the details, so who knows.

 

For Xenocide developers: Where can I find the definition of the format of the Xenocide Research Tree? I would prefer to use the same format in XcomUtil, if possible.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...