• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

Developer Diary | Modding

Greetings all,

Today we have quite a number of items for the dev diary. We’ll be covering some new additions to the career profile system, followed by some new tools coming for modders in the Avalanche update.

To begin with, I’ll hand over to our designer on the career profile:



Hello!

Ingevar here with an update regarding new features coming to the Career Profile.
Since the release of Career Profile earlier this year we've been working on the next iteration that will bring more stats, non-ironman achievements, and some profile customization.

Let's look at it in detail.


Playthrough Overview

When BBA is released, every player will find the playthrough overview available in the ESC menu when playing the game.​
image1.png

This familiar window will contain some numbers for your current playthrough, including new stats and awards.


New Stats

We are adding more stats to track combat efficiency like the amount of offensive and defensive battles, the ratio between them, or the ratio of battles versus encircled divisions. We want these stats to be a better depiction of each player's playstyle and will continue to add more, so if you have any suggestions, please tell us in the comments.​
image6.png

Stats for Modded Games

Previously we gathered numbers only from the vanilla version of the game, but now we've added a separate set of data for games played with mods.

Both base game and modded games stats are working in single-player games, at least for now. We are looking into making MP counts as well, so stay tuned for future updates on that topic.​
image12.png

Awards

Awards are medals and ribbons: new kinds of in-game achievement that don't require you to play in Ironman mode.
image4.png

Medals have three grades: bronze, silver, and gold. Each grade is harder to get than the previous one, with the aim that bronze is something you can get just by playing the game, while gold will require a dedicated effort and might not be achieved from the first try even by the most experienced players.

Ribbons have no grades, but the difficulty is there for most of them.​
image14.png

Awards won't work with most mods, cause you can never predict what the mod changes and therefore if the award required any challenge at all.

At the same time, we know that mods are an essential part of the HoI experience, so together with the base feature, we're introducing support for modded awards.
Any modder will be able to use all existing UIs for creating a list of unique awards that can be tracked, awarded in the game, and then displayed in the Career Profile.


Profile Customization

Every grade of medal you get and every ribbon will also award you with some Career Points.

Career Points are used to unlock Profile Pictures.​
image2.png

Some Pictures are unlocked after you get one or two medals, but others will be available only to players who dedicate a substantial amount of effort to getting lots of gold medals.
image7.png

Friends
All this comes together in the last feature I'd like to show today.

We're adding a Friends list to the game. You'll be able to find it in the main menu when BBA is out.​
image5.png

Friends window will have all your friends from Steam or Xbox and for now will only be used as a shortcut to viewing each other's Career Profiles.

By default, every profile in the game will be viewable by all your friends, but you can choose to make it private, this option will be available right in the Career Profile window.


TL;DR

All these features will be released together with the avalanche update. So any player who has the base game will be able to access Playthrough Overview, Awards, set their Profile Pictures, or view the Friends list.

The story of Career Profile just starts here and we plan to add more awards, stats, and profile customization to the game based on the feedback we get from you.
Hope you like this when it's out.


Modding In-Game Achievements

One of our new features for modders is a system to support custom achievements.

The feature aims :​
  • to allow mods to define their own achievements​
  • to display them and their completion status in-game​
  • to save them when a player completes them so that they appear as achieved when starting a new game​
Hard limitations :​
  • the achievements will not be displayed on steam (or other stores)​
  • no way to know the completion rate among players​
We have joined forces with Red King and their career profile to present those achievements in the prettiest way. Also the new Ribbon system will allow modders to easily illustrate their achievement without any graphic skill ! Of course if you are a master of the 64x64p icon, you can emulate our classic achievement illustration.​

image9.png
The Awards screen with mod achievements. Icons or ribbons, the choice is yours.


image13.png


A sample of script to define achievements

Behind the scenes, these achievements are earned and stored based on the game’s modset. Modifying the modset should clear achievements, but if the modset remains constant, any achievements earned will be persistent to that combination of mods.


Unit Medals and Units

Arheo back now to go over some more details on the script accessibility for our new features.

As mentioned briefly last week, unit medals are being added in BBA. These are fully scriptable, and take a similar form to regular database objects you’ll be used to working with.

Since the modifiers that can be applied via medals take a different path to regular modifiers, the list of possibilities is somewhat shorter than in other modifier scopes.

We’ve added a list of options at the top of the medals file, though we’re open to future suggestions if you find yourselves in need of something new:​
image15.png

You’ll note that the leader modifier is unused in the vanilla game. This modifier will translate over to army generals if the leader is promoted, and exert effects on the entire army.

The one_time_effect field will run an effect in the unit scope, though you should be able to scope to a unit’s owner and run effects on a country from this block.

Working with units is, as previously mentioned, new to script in the avalanche update. For the time being, only army units are accessible through script, though this may be expanded upon in future updates. The following effects will be available to you:

random_country_division
every_country_division
random_state_division
every_state_division
reseed_division_commander
destroy_unit
add_history_entry
change_division_template
add_unit_medal_to_latest_entry #usually used in combination with add_history_entry, otherwise you may not guarantee a valid entry.
add_divisional_commander_xp

Combined with the following unit conditions:

any_country_division
any_state_division
division_has_majority_template
unit_strength
unit_organization
is_unit_template_reserves
division_has_battalion_in_template


Balance of Power

The Balance of Power feature is built in a way that makes it extremely flexible, and therefore probably very useful for modders. Any given country can only have one Balance of Power at any given time - but there’s nothing stopping you from having several that you switch between as things evolve.

The definition might seem a bit tricky at first, but that’s only because it is extremely flexible. It starts like this:​
image17.png

This example is from Ethiopia - you set the id of the Balance of Power, the starting position, and the two starting sides. The sides are defined further down, and you can replace them with other pre-defined sides using script. This means you can, instead of changing the entire Balance of Power, just replace one, or both, of the sides should you want to do that instead.

You also define a decision category as the Balance of Power category, meaning that you can script Balance of Power decisions the same way as you would script normal decisions. The will then appear in the Balance of Power UI. So basically anything you can do with decisions, you can do in the Balance of Power UI…

Each side is further divided into ranges with a min and max value, and a set of modifiers that are active when you are in this range. Again, the ranges are customizable, so you can have basically as many or as few as you like (within reason).​
image11.jpg


As you can see from this example you can also run effects when the range becomes active or when the balance shifts away from it.

You can also set/change the graphics of the side as you like:​
image16.jpg


What else? Well you have triggers based on the Balance of Power, so you can lock Focuses, decisions, events, or whatever behind the Balance of Power being at a certain level. You can modify the balance either with one off values or with a ticking score. And you can of course remove it altogether.

In all I expect to see some wonderful applications of this in mods going forward.


Peace Conferences

Peace conference modding has now become somewhat simpler, as well as being more consistent with the rest of the game’s scripting standards albeit at the cost of some rather verbose dotscoping chains.

Peace conferences now primarily work on a per-state basis, with the exception of ships and stacked bids (which due to technical limitations are not very accessible to script).​
image10.png

Every turn, each state will be subject to two evaluations for the country from whose perspective you are playing or viewing. The first evaluation will define the bidding cost per action type for a state, and the second will define the ai desire to bid on said state. These two values do not correspond, but are affected by each other.

In the entry above, this cost multiplier will be applied at point of bidding for a country that is either NOT puppeted, or is bidding for itself, to states which are their cores.

You can add categories here which will consolidate their values in the tooltip for that state during a peace conference. This cost multiplier will only work on bids of the ‘take states’ type, but multipliers can be made to affect any combination of bid types if treated as an array.

A state can be subject to multiple cost reductions, which stack multiplicatively.

The evaluation of AI desire works in a very similar way:​
image8.png


Instead of affecting the cost, this affects the ai’s subsequent evaluation of the cost when deciding what to bid on. Here, the AI is subject to a -75% desire to liberate tags that belong to the is_unlikely_country_tag scripted trigger. In short, it means the AI will prefer not to release certain wacky, wonderful tags. AI desire can also be subject to multiple modifier entries, and these will also stack.

The AI evaluates costs with a bucketed per-type approach, rather than simply bidding on the best cost*desire entries. This goes some of the way towards reducing bordergore, and effectively takes a sample of the desire of bids of the same type and target - France for example, would consider all Puppet Switzerland bids to be of the same value to try and avoid leaving holes.


Debugging Tools

We’ve expanded the options in our imgui during By Blood Alone, and now this handy air region tool will be in your hands:​
image3.png

You can access this with the console command imgui show air, followed by selecting an air region. This will give you up-to-date information on the details of the wings present in the area and their efficacy.



And that’s all for this week! Next week there will be a break in dev diaries, but tune in in two weeks for a round up on the technical situation and changes coming in the Avalanche update.

/Arheo​
 

Attachments

  • image7.png
    image7.png
    1,7 MB · Views: 0
  • image9.png
    image9.png
    84,5 KB · Views: 0
  • image13.png
    image13.png
    23,5 KB · Views: 0
  • 46Like
  • 21Love
  • 13
  • 2
Reactions:
because its the same for all paradox gamesa and CKII is the one I tried, I didn't find a localization for HOIV , may be the fact that its not working for achievements discourages some people to do it?

As I said, it works for HOI4. It is not the same for all PDX games. CK3 has a different, newer engine.
 
  • 1
Reactions:
One thing I've said a few times, but I'll say it again, will the next update be able to adapt to more screens, my screen is not compatible with this game now, such as a 16:10 display
 
  • 2
Reactions:
Can't you just play windowed fullscreen? (Option in the launcher)
The same is true for the full screen of the window, the ui will be very small, and the text will be very small, I can't adjust to the highest resolution of my screen, if I use zoom, the picture will be blurred, ck3 does not have this problem, so I hope the next update can adapt more screens
 
  • 1
Reactions:
The same is true for the full screen of the window, the ui will be very small, and the text will be very small, I can't adjust to the highest resolution of my screen, if I use zoom, the picture will be blurred, ck3 does not have this problem, so I hope the next update can adapt more screens
Use the UI scaling option?
 
  • 1
Reactions:
Where new dd?
If you read the above DD all the way to the end, you'll find this:
Next week there will be a break in dev diaries, but tune in in two weeks for a round up on the technical situation and changes coming in the Avalanche update.
So, new DD will be a week from now.
 
  • 3
  • 1Like
Reactions:
Would be nice if the Devs could make it possible for modders to create new Tank Roles in the Tank Designer so we can create an Assault Gun role. Assault Guns are sorely missed and needed. It's currently a hardcoded feature. https://forum.paradoxplaza.com/foru...odding-for-spgs-tds-aa.1539107/#post-28435135

Also, these modding requests by the creator of the Man The Guns Expanded mod. "Adding tools to modular equipment designer"


Also, this modding request by Licarious the creator of the Battle Carrier Ise/Cruiser Submarine Surcouf/Man The Guns Expanded mods.

https://forum.paradoxplaza.com/foru...val-combat-positioning.1503916/#post-27972426
 
Last edited:
  • 3Like
  • 2
  • 1
Reactions:
Sorry a bit if this question has already answered by you, Arheo. But i want to have some clarifications about this

We thought about doing this, but decided it would materially effect players' expectations at game start, as well as changing quite a lot of starting balance.

No, in the interests of performance, divisional commanders are not explicitly set up as characters until you promote them to an army general. As such, giving them specific portraits is also not possible at the moment.

Available medals can be arbitrarily changed based on gamestate conditions by modders. We have elected not to do so for countries with unique sets, mostly for balance reasons (effects differ).

Let's say if i want to enlist some of Dutch Indies Officer Academy's graduate such as Oerip Soemohardjo and Soeharto as divisional commanders at KNIL, should the Netherlands East Indies held long enough for them to complete their studies. Right now in my mod, they're unlocked on late-game and instantly hired as level-1 generals for independent Indonesia.

I supposed that we can appoint both men as divisional commanders, but based on your responses above, the answer is "Not possible at this moment", right?

Thanks beforehand.
 
  • 1Like
Reactions:
Sorry a bit if this question has already answered by you, Arheo. But i want to have some clarifications about this





Let's say if i want to enlist some of Dutch Indies Officer Academy's graduate such as Oerip Soemohardjo and Soeharto as divisional commanders at KNIL, should the Netherlands East Indies held long enough for them to complete their studies. Right now in my mod, they're unlocked on late-game and instantly hired as level-1 generals for independent Indonesia.

I supposed that we can appoint both men as divisional commanders, but based on your responses above, the answer is "Not possible at this moment", right?

Thanks beforehand.
I believe they managed to solve what you're asking:
The system should now support female divisional commanders and defining historic portraits.
 
  • 3
  • 1
Reactions:
I find it notable that some of the top mods are not keeping up with the base game. BICE and Total War still haven't integrated a tank designer. Since BBA comes out in a days, they will then be two major features behind. That is one more reason I'd like Paradox to do a tech debt update instead of a new feature update, it will give the mod devs time to catch up
 
I want to mod certain divisions that appear on the map at the start of the game and/or are spawned in by events to have their historical commanders, preferably together with photos/portraits of them. Is this not possible? If it is, what are the relevant lines of code I need to insert? Also, I already know how to add advisor-size photos/portraits into the game.

Furthermore, I'd like to add custom unit histories to certain units that appear on the map at the start of the game and/or are spawned in by events. How would I go about doing this?

EDIT: I've figured it out to the point where I've managed to get unique divisional commanders, mod in new country-specific ranks and I have a decent idea on how I'll probably get them to display the proper photos/portraits as well, but I'm having trouble with the unit histories. I've managed to make divisions on-map at the start of the game start with unit histories, but I've not been able to get a custom history of my own to show, even though I typed it in the unit_medals_I_english.txt localisation file. I noticed that in the division history ("army_history") "unique=#" refers to a specific type of history entry, e.g. "unique=8" refers to an entry about capturing airfields, though the number of the entry doesn't match with the order in which the entries are found in the aforementioned localisation file.

So I'm wondering, is there some other file that dictates what the history entries can be. Do I need to add my custom entry there? Does it have to be of a special format, other than e.g. "FIN_9TH_DIV:0 "Custom entry here." "? I use a very similar entry and it does not work; I either get a blank history entry in-game or "INVALID_ARMY_HISTORY", depending on what number I set the unique=# to (again, they do not match the order of the entries in the localisation file, so it's a bit of guesswork, though I did believe I got the reference number correct, but now I'm thinking maybe there's another file I need to enter my custom entry into).

It also crossed my mind that this part could be hardcoded in a way that we can't add entirely new custom unit history entries. I hope that's not the case.
 
Last edited:
  • 2Like
Reactions:
The hit profile calculation define has been split into two like this without any explanation:
HIT_PROFILE_MULT = 100.0, -- multiplies hit profile of every ship
HIT_PROFILE_SPEED_FACTOR = 1.0, -- factors speed value when determining it profile (Vis * HIT_PROFILE_MULT * Ship Hit Profile Mult)

How does it work now?
Can we at least get an explanation how they should be set to get the same result as pre 1.12? A lot of balance testing has gone into getting naval warfare balanced in mods and now this potentially just throws the old results out the window…
 
  • 3Like
  • 2
  • 1
Reactions:
The hit profile calculation define has been split into two like this without any explanation:
HIT_PROFILE_MULT = 100.0, -- multiplies hit profile of every ship
HIT_PROFILE_SPEED_FACTOR = 1.0, -- factors speed value when determining it profile (Vis * HIT_PROFILE_MULT * Ship Hit Profile Mult)

How does it work now?
Can we at least get an explanation how they should be set to get the same result as pre 1.12? A lot of balance testing has gone into getting naval warfare balanced in mods and now this potentially just throws the old results out the window…

See here:

In 1.12.3 beta it is now:

HIT_PROFILE_MULT = 100.0, -- multiplies hit profile of every ship
HIT_PROFILE_SPEED_FACTOR = 2, -- factors speed value when determining it profile (Vis * HIT_PROFILE_MULT * Ship Hit Profile Mult)
 
  • 3
Reactions:
See here:

In 1.12.3 beta it is now:

HIT_PROFILE_MULT = 100.0, -- multiplies hit profile of every ship
HIT_PROFILE_SPEED_FACTOR = 2, -- factors speed value when determining it profile (Vis * HIT_PROFILE_MULT * Ship Hit Profile Mult)
Yes but what do this new define do? How does it change the calculation? This was the previous calculation: surface_visibility / speed * HIT_PROFILE_MULT.
Where does HIT_PROFILE_SPEED_FACTOR fit in this calculation? As you can see the comment '-- factors speed value when determining it profile (Vis * HIT_PROFILE_MULT * Ship Hit Profile Mult)' is written by one of the non-english speakers on the paradox dev team, those guys who wrote every comment in incomprehensible gibberish back in 2016-2018.
 
  • 1
Reactions:
Isn't the old calculation and the new calculation in the thread I linked?
Alright I see it now, was almost impossible to see the link on iPhone. But in that thread you and two others try to reverse engineer the defines, did you ever find out what the calculation is like? And does paradox not realize it makes 0 sense to change this, the player has to number crunch this since it's not explain or shown in-game, with the old system you could number crunch the ratio pretty easily which was all you had to do with HIT_PROFILE_MULT = 100.0.
 
  • 2
Reactions: