question about techprints

Started by Fakeaccount123, March 24, 2021, 06:58:52 PM

Previous topic - Next topic

Fakeaccount123

Is it possible to name one specific techprint with xml?
I am trying to make a patch so that the rebel quest gives you one specfic techprint as a reward but i don´t know if that is possible. It seems like you can´t specify wich techprint you get with xml. I can only find that "StockGenerator_Techprints" that generate techprints at random in traders lists.

Shinzy

If I'm not completely mistaken, techprint's defname is generated ingame based on the research that requires it.
So that said, you should be able to figure out the defname of any given techprint by placing one on the game map, saving the game and then opening the save file with text editor, all the defnames on the play area are listed in there somewhere

(There's better and easier ways to find this info I'm sure but I'm not a coder and my modding methods are very caveman trial and error)

You then should theoretically be able to make the quest reward give that specific techprint as a reward
And just to clarify; everything I've said is just a theory based on my own experience from toying around with xml's so there might be some unexpected troubles you could encounter or it might just not work at all ;D

Fakeaccount123

Yep. That worked. Thank you Shinzy.
In case anyone wonders specific techprints are called Techprint_nameoftheresearch

RawCode

most simple (but not ever close to "efficient") way to research database internals is reading savegame with text editor (savegames are plaintext\XML)

savegame "capture" state of entire game, including state of every object, this way you may spawn multiple objects with dev tools and just check how exactly they are defined from savegame

also you may modify savegame and check effects of your modifications, there are no integrity checks.