[1.3] [KV] Change Research Speed [ModSync RW]

Started by Kiame, May 26, 2017, 03:19:14 AM

Previous topic - Next topic

Kiame

My initial test:

-Global Speed Factor = 30
-5 tribal people w/ 20 research
-God-mode made gold-floored research bunker complete with 5 hi-tech research benches complete with attachments. What an amazing find for a bunch of too-smart tribal people!
-Researched a good chunk into a few techs (10k+)
-Save
-Load

Still tribal and research is still in-progress

So it's working on my side. Am i missing anything to reproduce this problem?

KiwiSensei

#46
Difference between your test and mine was that I got the "freebies" no matter the conditions;

Start new colony, instantly save and load -> free tech + level bump, same for crash landed (except some of the freebies overlap their starting techs)
Get a bit of research done, save and load -> same as above
Set factor to 0.1 and instantly finish a tech or two, save and load -> same as above

I also tried messing with the load order, put your mod on top, at the bottom, in the middle, turned off static tech progression, turned off tech progression overall, still the same. Only thing that made a difference was turning off your mod completely. So far it seems like loading the game somehow flags the colony as a crash landed start and sets tech level and starting techs to the appropriate values, and at the same time it doesn't, since even crash landed adds some of the techs.

I don't think it's the mod not working, would've seen posts about that by now, I just have a hard time pinpointing the issue which I assume is a conflict with another mod somewhere.

EDIT: Granted, I didn't test the opposite - turning off everything and running only your mod and core, will try that just to make sure when I get a chance later on.

Kiame

Just to make sure you have the latest downloaded (if manual)?

I know there were problems like that with earlier builds

KiwiSensei

#48
Yeah it's the latest manual from this topic, I didn't see this problem reported by anyone though, only saw the reverse with lost progress. And that's something I didn't encounter myself.

EDIT: I found the culprit, it's caused by Power Logic auto-completing that mod's research on load (but not on map creation for some reason), and thus all the prerequisites also get completed, attaching a (rough) before/after picture, can also confirm it didn't happen once I disabled Power Logic. However, I'd very much like to keep that mod because I'm a sucker for those systems ;D

Disabling it manually until I complete microelectronics, then enabling it, is a plaster but not a smooth fix. Is there a way I can patch this or track down the bit of code in PL to make it not auto-complete that research? (I've asked for a solution on the Power Logic thread as well, just figured I'd still ask here since it seems like something an experienced modder can answer, author or not.)

[attachment deleted due to age]

Kiame

#49
Thanks for finding the culprit.
I am very confused how these two mods are not working together. I looked through the Power Logic code and I don't see anything that would conflict....

Edit: To that end I added Power Logic to my previous test and everything seems to be fine still.

KiwiSensei

#50
It's not that they don't work together really, it's more that Power Logic does the random adding bit (even without CRS enabled I believe), which then causes CRS to bump tech level due to added completed research. In my last test it bumped to medieval rather than industrial though so at least that was a step in the right direction, but the problem would disappear completely if I could just stop Power Logic from auto completing those techs.

EDIT: So it could be something else causing the techs to be added? If your test with Power Logic didn't reproduce the results then I'm once again blank.

Here's a link to my modlist, maybe there's something I've done wrong, posted it on imgur because it'd be a pain as an attachment here. Psychology is also active at the very bottom (accidentally cropped it out), rest is inactive mods.
https://imgur.com/a/UZE9fYo

Kiame

I hate to say it but after going through the list 5 times, of the mods I do not also use, none stand out as a possible culprit.

Are there any warnings/errors when a saved game load or the game loads that could be helpful?

KiwiSensei

None, only the one from Medieval Times about "bench" something that's apparently safe to ignore, and so far it has been. Either way I disabled Power Logic for now and I'll enable it manually once I reach the correct tech level, sadly it'll still give me the techs for free but I can live with that, or find some workaround like upping the research factor for a couple of techs.

Kiame

#53
A true shot in the dark here. I've modified the patches in Change Research Speed to execute before any other methods. If another mod is running prior to this one when a game loads that could be causing research to complete...

<removed>

KiwiSensei

#54
Supes got back to me on the Power Logic thread, saying he'd upload one without prerequisites however that research will still be auto completed as it's intended. And now that I look at the screenshot, it shows as needing 0 research to complete so I assume even if it changed with your mod, wouldn't 0 needed research still cause it to auto? I feel like I missed a point and have caused extra work for two modders for no reason now  :-\ I'm still going to check your test file though because curiosity has taken over and I honestly quite enjoy these things due to the included learning process  :P

EDIT: Your updated file did nothing as I suspected, however just changing the base cost of the "misbehaving" (as intended) research to 100 solved the problem. Seems like it was just the 0 cost combined with the game's coding that caused a flood of free techs. Although that doesn't explain to me why your testing didn't yield the same results, and why it didn't happen upon the map generation.

Kiame


KiwiSensei

Yeah me too, thanks for looking into it though! And I'm sorry if it caused any inconvenience.
Feels silly to miss such a simple detail, especially when fiddling with coding myself you'd think I'd learn to sometimes step back and stop digging past the surface where, very often, the answer is hidden in plain sight :P

Kiame


ZE


Kiame

#59
Copy/paste fail!

Thanks, fixed now

1.0 Release: https://github.com/KiameV/rimworld-modifyresearchtime/releases/download/1.0/ChangeResearchSpeed.zip

Use ModSync RW to know if/when there's an update