Hearts of Iron IV

Hearts of Iron IV

Dynamic Resource Stockpile
111 条留言
ChocMoc 5 月 25 日 上午 10:26 
It's a really great mod. Would be nice to learn how to fix it so its not moveable. Thanks
wizard1073  [作者] 5 月 25 日 上午 9:18 
@ChocMoc, The only thing I learned from another mod was to create a window and place it over the top bar in a vacant space. You don't actually integrate it into the bar, but make it so the user can't tell the difference.
ChocMoc 5 月 20 日 下午 10:26 
Great, any idea how I can plate it to the resource tab? I wanna have it fixed and thanks for consenting I always enjoyed this and it just makes my mod more historical lol (and makes my life easier while I personally code everything else 😊)
wizard1073  [作者] 5 月 20 日 下午 7:32 
@ChocMoc, go right ahead. The code is all public release, and the comments in the code should be a good guide to how it works.
ChocMoc 5 月 12 日 下午 10:16 
Could I include this in my overhaul? I really love the idea and concept it's the best thing since EUV was announced haha
wizard1073  [作者] 3 月 28 日 下午 5:01 
@The Invincible Las, can you confirm that it still works on the current version? If so, I just need to update the supported version number within the mod.
The Turf Track Licker 3 月 25 日 下午 10:49 
Are you planning on updating this for the current patch if you dont mind me asking
zmajxywz 2024 年 6 月 9 日 上午 7:47 
please make this work with rt56
wizard1073  [作者] 2024 年 3 月 23 日 上午 9:52 
@SebZ if I remember correctly, the original mod created a window and placed it on top of the top tab, because there was no way to modify the top tab. We essentially are fooling the game to make it look integrated.
SebZ 2024 年 3 月 23 日 上午 6:45 
Is there any way you could add the stockpile stats to the top tab instead of having it be a separate window? The original mod by Jakor did it that way.
chicks99 2023 年 7 月 8 日 下午 3:19 
The mod does not work at all with the new Road to 56.
wizard1073  [作者] 2023 年 6 月 12 日 下午 5:35 
@Ungarn, we ran into this problem with the Road to 56 mod, which greatly increases the number of building slots. Unfortunately, there is no way to make the slots invisible. The mod essentially uses an existing mechanic to fool the game into adding the stockpile. There is no way to solve this problem until Paradox extends stockpiling to all resources.
Ungarn 2023 年 6 月 8 日 上午 5:03 
The stockpile buildings added in the mod are displayed next to the state buildings (Infrastructure, Radar, etc.), causing the screen to overflow. Shouldn't it be invisible in the game and only used for calculations?
Ungarn 2023 年 6 月 8 日 上午 4:54 
I want to show a screenshot, but the link seems to delete by someone. Is there any way to show it to you?
wizard1073  [作者] 2023 年 6 月 7 日 上午 11:12 
Can you be more specific about how the construction window is broken? I will need to recreate the problem in order to fix it.
wizard1073  [作者] 2023 年 6 月 7 日 上午 11:12 
You can remove the .git folder without any issues. That is simply where the tracking of code revisions in stored. However, the next time the mod is updated, it will push that folder again, so really there is no need to delete it.
Ungarn 2023 年 6 月 7 日 上午 6:38 
The construction window is broken. Only this mode has been applied.
Ungarn 2023 年 6 月 7 日 上午 5:50 
.git <-Can I remove this folder?
wizard1073  [作者] 2023 年 3 月 4 日 下午 4:00 
No changes to gameplay. Just added a thumbnail and revised the supported version. Let me know if you experience any issues.
Burner345-BR 2023 年 3 月 4 日 下午 1:43 
This update changed something in the gameplay?
Taipan 2023 年 3 月 4 日 上午 8:22 
Cheers.
wizard1073  [作者] 2023 年 3 月 4 日 上午 7:30 
@Taipan thanks for the suggestion. It is done.
Taipan 2023 年 2 月 27 日 下午 1:48 
Also it could be nice if you could add a square picture for the right thumbnail, even if it's the same picture with the big one :)) I've created a post about your mod, but your empty thumbnail sucks lol. Cheers
Taipan 2023 年 2 月 24 日 下午 11:58 
Cheers
wizard1073  [作者] 2023 年 2 月 24 日 下午 7:13 
@Taipan thanks for the suggestion. I added it to the title in parentheses.
Taipan 2023 年 2 月 24 日 下午 12:33 
You could add storage in the title so it gets more tractions in searches. Cheers.
Taipan 2023 年 2 月 24 日 下午 12:33 
Works like a charm! Thank you very mucho!
Taipan 2023 年 2 月 24 日 上午 11:10 
If this works you are the real deal! Else, you are fired!
The Redeemer 2022 年 6 月 20 日 下午 12:08 
@wizard1073
Yes I came to this mod over from the comment you left in the food system made by the other guy, but from my understanding his mod is more of a reskin than anything. Millennium dawn did add in money, but that money doesn't work in the same way fuel does. Fuel for example can be stockpiled inside of divisions themselves, motorized vehicles for example have a fuel capacity. I wonder if it is possible to add a 'food capacity' for infantry divisions and things of that sort.
wizard1073  [作者] 2022 年 6 月 18 日 下午 2:29 
@The Redeemer I think some of the overhaul mods like Millennium Dawn have done something like that. Might check them out. I think they put in a monetary system. Other people have put in food.
The Redeemer 2022 年 6 月 18 日 上午 1:33 
Do you think it would be possible to create a system similar to fuel but with munitions and food?
Davidaf 2022 年 1 月 29 日 下午 3:11 
no screenshot I'm afraid and yes, more than one day had passed, I'll give it another try soon and properly check
wizard1073  [作者] 2022 年 1 月 29 日 下午 1:58 
Did you happen to capture a screenshot? Additionally, had at least one day passed? Just trying to pinpoint where the error might be. I did add a moving average to the stockpile limit, so there is now a lag in how it grows or shrinks. I added this after seeing world tension go from 25 to 24 percent and I lost all of my excess stockpile in one day before tension ticked back up a day later.
Davidaf 2022 年 1 月 29 日 上午 5:50 
I'm not 100% sure as I've only tested it for a short while the other day but I got the feeling the max stockpile wasn't working properly since I had military factories and shipyards and the stockpile was 0. Tension was also at 0%, I know it's supposed to scale with world tension but, is it supposed to be 0 stockpile if I have like 8 mil factories at 0 tension?

I think when I tested previous versions of the mod this worked differently.

PS:(this is all before this last patch regarding the shared buildings)
wizard1073  [作者] 2022 年 1 月 28 日 下午 6:35 
I just posted a patch that prevents the added resource buildings from being "shared slots", which means they should not prevent other state buildings from being built.
wizard1073  [作者] 2022 年 1 月 28 日 下午 6:34 
You can disregard the buildings that are added in the mod. They are not supposed to be shown on the construction menu. The mod automatically creates and destroys these buildings in order to simulate withdrawals from the stockpile.
AnotherEve 2022 年 1 月 25 日 上午 1:23 
some buildings are added in this mod, but they can not been properly shown in the game.
AnotherEve 2022 年 1 月 25 日 上午 12:25 
Wonderful:steamthumbsup:
wizard1073  [作者] 2022 年 1 月 16 日 上午 11:17 
I have released the ALPHA version of the submod. You can find it here: https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=2721863257
WebSlug 2022 年 1 月 15 日 下午 8:23 
Fantastic mod. This should be in the vanilla game.
Davidaf 2021 年 12 月 30 日 下午 4:11 
amazing, keep it up man. Me and my friends really appreciate it, again if I can help somehow hit me up
wizard1073  [作者] 2021 年 12 月 30 日 下午 3:41 
@Burner345-BR, I don't think there will be any compatibility issues with other mods. I am adding private variables for money and the global stockpile, and a new GUI to buy/sell resources. There will however be major game balance issues, but I leave that to those of you who subscribe.
wizard1073  [作者] 2021 年 12 月 30 日 下午 3:40 
Progress report: I've coded up the global stockpiles, pricing mechanism, AI sell mechanism, and money. Still need to implement GUI for human player, and logic for AI to buy.
Burner345-BR 2021 年 12 月 22 日 下午 3:55 
How the compatibility with nother mods work?
Davidaf 2021 年 12 月 21 日 上午 3:43 
But I guess something similar could be done from the diplomacy menu, I'm just almost oblivious to how scopes would work there, who would be FROM and THIS and such in such case.

If you have time and want to have a chat please feel free to add me on steam and maybe we cna brainstorm this. My knowledge regarding gui is rather limited but I've been able to add some gui to the top bar or fix a couple of construction menu icons and such. I also have a friend who is decent with icon sprites
Davidaf 2021 年 12 月 21 日 上午 3:43 
There's that old spionage mod that uses a similar concept to this. Not resource based but on the diplomacy tab you have a custom gui with buttons and by using PREV, FROM and such that guy was able to assign variables from that menu to the receiving player based on which player you selected and open diplomacy view.
I was able to make a small mod for this mod where I added decisions to capture enemy spies, and after a lot of headache I managed to, for example, capture all enemy spies from a particular country in my current country with something like this

add_to_variable = {PREV.PREV.Spies_Captured@THIS = network_spies@FROM }
Where with this I "imprison" all the network_spies from my enemy currently working in my country and add them to my captured spies from this particular country(since each possible country has their own spies_capturedUSA, or spies_capturedBRA, etc. What drove me crazy was figuring out the correct scope for the spies_captured part.
Davidaf 2021 年 12 月 21 日 上午 3:43 
Thanks for the reply! Regarding the making it player to player I was thinking either a diplomatic decision or a custom button somewhere in the diplomatic view gui that would show up a new trade gui. In my opinion it doesn't matter if the exchange is instant for MP, since fuel already behaves like this when lend leasing, and since the trades to the global market would be also instant it would make sense. This way the money you get in that market can also be put to use in diplomatic trades with other players and the resources themselves can also be used as a sort of money, not having to barter only with military support, lend lease promises or civilian factories(as in buying resources you don't need to pay with those civs)
wizard1073  [作者] 2021 年 12 月 20 日 上午 8:55 
The only unrealistic part of this (AFAIK) is that transfer of resources from the global market to the player's stockpile is instant. If I could put this through the convoy mechanism (e.g., through an artificial country with provinces in every continent), that would push all of this through the existing trade mechanism, which trades civ factories instead of money.

Thank you for the kind remarks about the comments! My goal is to pass on the knowledge to my future self when I edit it, but it has the added bonus of showing other people how I solved the challenges.
wizard1073  [作者] 2021 年 12 月 20 日 上午 8:55 
The system is global. I'm not sure how to do player to player (i.e., for a multi-player arrangement), but if you have any insight, that would be great. The idea is that the "private sector" absorbs all unused exports, which helps to stabilize the global price. If players sell too much, the price falls and the private sector increases its purchases, thereby restoring the price to equilibrium. Likewise if the players buy too much, price goes up and the private sector slows its purchases. The daily deposit of global excess production is what restores drives the price back down toward a stable price.
wizard1073  [作者] 2021 年 12 月 20 日 上午 8:55 
I've been on hiatus from coding due to a very busy time in my primary job, but I have a couple weeks break here at Christmas. If I can shake loose some obligations, I will have time to get the price mechanism and GUI coded, and then the mod will be done. (If anyone has more expertise with these GUIs than I do, please let me know. It is slow going for me--I'm more of an algorithm guy.)