Hearts of Iron IV

Hearts of Iron IV

Dynamic Resource Stockpile
111 Comments
ChocMoc May 25 @ 10:26am 
It's a really great mod. Would be nice to learn how to fix it so its not moveable. Thanks
wizard1073  [author] May 25 @ 9:18am 
@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 May 20 @ 10:26pm 
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  [author] May 20 @ 7:32pm 
@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 May 12 @ 10:16pm 
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  [author] Mar 28 @ 5:01pm 
@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.
Karl Franz Mar 25 @ 10:49pm 
Are you planning on updating this for the current patch if you dont mind me asking
zmajxywz Jun 9, 2024 @ 7:47am 
please make this work with rt56
wizard1073  [author] Mar 23, 2024 @ 9:52am 
@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 Mar 23, 2024 @ 6:45am 
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 Jul 8, 2023 @ 3:19pm 
The mod does not work at all with the new Road to 56.
wizard1073  [author] Jun 12, 2023 @ 5:35pm 
@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 Jun 8, 2023 @ 5:03am 
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 Jun 8, 2023 @ 4:54am 
I want to show a screenshot, but the link seems to delete by someone. Is there any way to show it to you?
wizard1073  [author] Jun 7, 2023 @ 11:12am 
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  [author] Jun 7, 2023 @ 11:12am 
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 Jun 7, 2023 @ 6:38am 
The construction window is broken. Only this mode has been applied.
Ungarn Jun 7, 2023 @ 5:50am 
.git <-Can I remove this folder?
wizard1073  [author] Mar 4, 2023 @ 4:00pm 
No changes to gameplay. Just added a thumbnail and revised the supported version. Let me know if you experience any issues.
Burner345-BR Mar 4, 2023 @ 1:43pm 
This update changed something in the gameplay?
Taipan Mar 4, 2023 @ 8:22am 
Cheers.
wizard1073  [author] Mar 4, 2023 @ 7:30am 
@Taipan thanks for the suggestion. It is done.
Taipan Feb 27, 2023 @ 1:48pm 
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 Feb 24, 2023 @ 11:58pm 
Cheers
wizard1073  [author] Feb 24, 2023 @ 7:13pm 
@Taipan thanks for the suggestion. I added it to the title in parentheses.
Taipan Feb 24, 2023 @ 12:33pm 
You could add storage in the title so it gets more tractions in searches. Cheers.
Taipan Feb 24, 2023 @ 12:33pm 
Works like a charm! Thank you very mucho!
Taipan Feb 24, 2023 @ 11:10am 
If this works you are the real deal! Else, you are fired!
The Redeemer Jun 20, 2022 @ 12:08pm 
@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  [author] Jun 18, 2022 @ 2:29pm 
@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 Jun 18, 2022 @ 1:33am 
Do you think it would be possible to create a system similar to fuel but with munitions and food?
Davidaf Jan 29, 2022 @ 3:11pm 
no screenshot I'm afraid and yes, more than one day had passed, I'll give it another try soon and properly check
wizard1073  [author] Jan 29, 2022 @ 1:58pm 
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 Jan 29, 2022 @ 5:50am 
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  [author] Jan 28, 2022 @ 6:35pm 
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  [author] Jan 28, 2022 @ 6:34pm 
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 Jan 25, 2022 @ 1:23am 
some buildings are added in this mod, but they can not been properly shown in the game.
AnotherEve Jan 25, 2022 @ 12:25am 
Wonderful:steamthumbsup:
wizard1073  [author] Jan 16, 2022 @ 11:17am 
I have released the ALPHA version of the submod. You can find it here: https://steamcommunity.com/sharedfiles/filedetails/?id=2721863257
WebSlug Jan 15, 2022 @ 8:23pm 
Fantastic mod. This should be in the vanilla game.
Davidaf Dec 30, 2021 @ 4:11pm 
amazing, keep it up man. Me and my friends really appreciate it, again if I can help somehow hit me up
wizard1073  [author] Dec 30, 2021 @ 3:41pm 
@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  [author] Dec 30, 2021 @ 3:40pm 
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 Dec 22, 2021 @ 3:55pm 
How the compatibility with nother mods work?
Davidaf Dec 21, 2021 @ 3:43am 
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 Dec 21, 2021 @ 3:43am 
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 Dec 21, 2021 @ 3:43am 
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  [author] Dec 20, 2021 @ 8:55am 
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  [author] Dec 20, 2021 @ 8:55am 
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  [author] Dec 20, 2021 @ 8:55am 
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.)