manpower production mysteriously through the roof (Full Version)

All Forums >> [New Releases from Matrix Games] >> WarPlan >> MODS and Scenarios



Message


Nachtmahr667 -> manpower production mysteriously through the roof (7/12/2020 4:04:28 PM)

Hello dear MOD forum members,

I am trying to "create" new European minors countries in the editor (I just rename and edit the values of Asian minors countries, lol), but I have encountered a problem: Sometimes I set the manpower production value at e.g. "6", but ingame it's turned into something ludicrous, like "120". I have tried to compare what I have done differently from countries where everything works fine, but I couldn't find any differences. Does anybody have any idea what the reason for this mess-up could be?

Thanks!^^




AlvaroSousa -> RE: manpower production mysteriously through the roof (7/12/2020 7:04:49 PM)

120 per turn?

You got to settings one which is how many they got four turn and one which is how many they currently have in their pool.




Nachtmahr667 -> RE: manpower production mysteriously through the roof (7/13/2020 3:42:41 AM)

Yes, 120 per turn.
I'll upload screenshots.

[image]local://upfiles/68780/83566EC7E4974146B090EF469D822D6B.jpg[/image]




Nachtmahr667 -> RE: manpower production mysteriously through the roof (7/13/2020 3:43:15 AM)

ingame

[image]local://upfiles/68780/CD7C942910F84C4E9AB9172332D8BE42.jpg[/image]




AlvaroSousa -> RE: manpower production mysteriously through the roof (7/13/2020 12:29:52 PM)

Why does your country have no morale? It needs some locations with morale and production to calculate the manpower production.

Could be because you have none the formula gets all whacko. I gotta check.




Nachtmahr667 -> RE: manpower production mysteriously through the roof (7/13/2020 12:51:30 PM)


quote:

ORIGINAL: Alvaro Sousa

Why does your country have no morale?


I wanted to create a sort of Vichy Poland, so the country starts out with no territory, like Vichy France.

quote:

ORIGINAL: Alvaro Sousa

I gotta check.


Thanks!^^




AlvaroSousa -> RE: manpower production mysteriously through the roof (7/13/2020 3:12:13 PM)

I think you might be able to do this.

unlock the country making it active. Make it an alliance. Place the unit on the map. Now force the country to surrender. It should keep the unit on the map. But now that unit won't get reinforced.

So it will show up surrendered with their unit on the map. I think that will work. The code is dynamic in weird ways.

When I did my mod for SC2 I got real creative on using the logic of the code.




AlvaroSousa -> RE: manpower production mysteriously through the roof (7/14/2020 6:42:27 PM)

These are the two lines of code that determine manpower

c = country ID
manpower = what they currently have stockpiled

Game.M.country[c].manpower += ((Game.M.country[c].manpowerProduction * Game.M.country[c].politics.moral) / Math.Max(1, Game.M.country[c].politics.maxMoral));


In this case it's (6 * 0) / 1 = 0 manpower.


This makes sure you don't go over the limit.
Game.M.country[c].manpower = Math.Min(Game.M.country[c].manpower, Game.M.country[c].maxManpower);


This might be some float bizarre division error.




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.5930176