LeaderEnemyBoss Posted April 14, 2016 Share Posted April 14, 2016 (edited) While trying to make my Item costs depend on the game difficulty i noticed, that the ini that is intended to do this doesnt seem to work at all. This doesnt just affect my items, but vanilla items aswell. For example: I remember that the mimic beacon should cost 3 corpses at legendary since the latest patch, and thats exactly the value thats in the XComStrategyTuning.ini. However ingame, it is still as cheap as it ever was. Flashbangs should cost 50 supplies, but they cost 35. I confirmed this for the debug version aswell as for the normal steam version. Can other people confirm the same? If this ini is indeed not working, and its not just an issue with my setup, how would i go about making the costs of an item difficulty specific? Edited April 14, 2016 by LeaderEnemyBoss Link to comment Share on other sites More sharing options...
LeaderEnemyBoss Posted April 15, 2016 Author Share Posted April 15, 2016 (edited) So I did some more tests with a completely modfree build, and it seems like the item cost part of the .ini is indeed not working at all. This seems to be a major bug. However there is stuff in it, that works. For example the GTS upgrades do seem to have the correct costs attached to them. Would be great if others could confirm my findings. EDIT: Techs and proving ground projects work aswell, so far only the the Items that you directly build via "Build Items" and that are in the "Items" category seem to be affected by the bug. This means medikits, flashbangs, mimic beacons, etc.. Edited April 15, 2016 by LeaderEnemyBoss Link to comment Share on other sites More sharing options...
LeaderEnemyBoss Posted April 15, 2016 Author Share Posted April 15, 2016 (edited) So I'm kinda stuck now. I want my Item to have different costs depending on the game difficulty. As I have written in my previous posts, this should work by default using the XComStrategyTuning.ini, however it doesnt for some kinds of items. a workaround would be to add my item as a proving ground project insteat as a buildable item. This however has the disadvantage that there is a continent bonus that reduces the price of proving ground projects (something I dont want for my item, since it is already very strong). My next idea was to just modify the item cost of my template depending on the difficulty via screenlistener. However since I am not a programmer, I have no idea how to do this. So have anybody has a good idea or an easier way of doing this, I'm all ears :wink:. Edited April 15, 2016 by LeaderEnemyBoss Link to comment Share on other sites More sharing options...
davidlallen Posted April 16, 2016 Share Posted April 16, 2016 No need for a screenlistener; this code shows how to loop over the difficulty levels and modify templates:http://forums.nexusmods.com/index.php?/topic/3839560-template-modification-without-screenlisteners/I have used it to make the same modification to a template for all difficulty levels, but a simple modification can do something different for each difficulty. Link to comment Share on other sites More sharing options...
LeaderEnemyBoss Posted April 16, 2016 Author Share Posted April 16, 2016 (edited) No need for a screenlistener; this code shows how to loop over the difficulty levels and modify templates:http://forums.nexusmods.com/index.php?/topic/3839560-template-modification-without-screenlisteners/I have used it to make the same modification to a template for all difficulty levels, but a simple modification can do something different for each difficulty.Wow, that was fast! So i almost regretted posting my last update, since I just found a possible solution on my own. Adding Template.SetDifficulty(3) to any template will make the corresponding item only available in legendary (lower numbers for the the other difficulties). This even updates correctly when changing the difficulty while playing. So my plan was to create 4 templates, one for each difficulty. However i think your solution is way more elegant, since I dont have to copy localization strings etc. 4 times. If understand everything right, it modifies the already existing difficulty specific templates. I see one possible problem: what if the difficulty specific templates do not get created at all due to the bug I discovered (see second post)? Edited April 16, 2016 by LeaderEnemyBoss Link to comment Share on other sites More sharing options...
davidlallen Posted April 16, 2016 Share Posted April 16, 2016 I'm pretty sure the bug you discovered is that only some parts of the tuning file get applied. I am pretty sure all the templates get created. But, I can't see offhand what code is supposed to be applying the tuning file, so we cannot be certain. Link to comment Share on other sites More sharing options...
Recommended Posts