• 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.
What I'd like, is that such automated system would be open. Would be cool if modders like people of Kaiserreich could use such a tool for their wiki aswell.
We don't claim ownership of any tools used on the wikis. That is why we ask such tools to be linked so everyone could use or update them.
That said, a "thank you" to the developer of said tool would probably be nice.
 
  • 1
Reactions:
I think for the major powers and Spain which is a tricky case you can legitimately require they're put together manually. Beyond that I'd set everything as per the files in the 1936.1.1 timepoint. I understand the cosmetics change but that is the Initial setup of the game which is what's recorded on the wikis.

Beyond the political parties, applying the same logic to the starting technology, staff and designers and economy vastly reduces further editing overhead too.
For the country pages I could be convinced that they should only list the starting leaders though I'd like to hear others' opinions on that.
But doesn't at least [[Political_Parties_and_Leaders]] record all leaders in the game, not just the starting ones? And since we're trying to generate that one, don't we need to crawl all leaders regardless?
 
  • 1
Reactions:
For the country pages I could be convinced that they should only list the starting leaders though I'd like to hear others' opinions on that.
But doesn't at least [[Political_Parties_and_Leaders]] record all leaders in the game, not just the starting ones? And since we're trying to generate that one, don't we need to crawl all leaders regardless?
At this point its your script. Build what you think will work best.
 
  • 1
Reactions:
I have no problems protecting automated pages, as long as the script used to generate the information is linked to on the talk page.
Should script generated pages receive an Ambox template or other suitable template? I am a novice in this area, but here is a starting suggestion {{ambox | text = Script generated section. See || Talk page link || }}.
 
  • 1
Reactions:
Should script generated pages receive an Ambox template or other suitable template? I am a novice in this area, but here is a starting suggestion {{ambox | text = Script generated section. See || Talk page link || }}.
Sounds sensible to me. Not a requirement but certainly good practice.
 
  • 1
Reactions:
@Dauth It seems like the SyntaxHighlight extension is not working? It is installed according to https://hoi4.paradoxwikis.com/Special:Version but <syntaxhighlight lang="python">print("hello")</syntaxhighlight> doesn't get highlighted.
It probably was not enabled. Will be hard to get them during their summer holidays.
It is probably time to try and get some of the technical control back to the team -- at the very least enough to install/enable extensions.
 
  • 3Like
Reactions:
Sorry if this has been discussed but is the Wiki going to add decisions, their reqs and impact in the future?
It depends on how you look at it. It is not a matter of policy as in whether we want decisions to be added or not. The demand is there. But as PDX invests minimal financial resources into the wiki, the supply depends entirely on volunteers (maybe you? :) ). So as soon as somebody volunteers we'll have them and likely no earlier than that.

But if you look at it statistically as an observer, decisions likely won't be added. They have been added to the game with Waking the Tiger well over two years ago. If they haven't been added to the wiki since, it stands to reason they won't be added for another similar amount of time. The ship designer is a similar case. The majority of activity usually happens shortly after something gets released.
 
  • 3
  • 1
Reactions:
At least in theory, wikis are maintained by their users. So asking "is the Wiki going to add X" is a lot like asking "why haven't I added X"? That's not a rebuke, by the way. Much like my unpopular response to the "why aren't their mini-campaign scenarios" from Paradox or modders, the point is to look at the question from the production side rather than the consumption side. Imagine yourself as the responsible party, and you can get some insight on why "the wiki" hasn't already done what you want done. It can be a lot of work to try to dig up all the information, and then get it into a nice format in the wiki. And all the other players mostly want to play rather than edit a wiki, too. (Do you know the story of The Little Red Hen?)

Paradox probably sees it as documentation they don't have to do, which is also not the most productive attitude. The problem with that approach is that not all the information is available even to willing editors. You can get a lot from tooltips. For other things, you have to dig through the mod files. (And as far as I know, that format isn't documented, so there can be guesswork as to what the syntax means.) Then people like bitmode put an even more tremendous amount of work into reverse engineering the code and tracing through it to find out what it actually does. The code isn't available for public inspection, so "the public" can't document everything. Only Paradox knows a lot of the answers. And for a lot of the rest, a Paradox employee could find out answers with much less effort, making the information much more likely to actually wind up in the wiki.

So the best product would come from teamwork. Most of the wiki editing can be done by willing players -- if we have willing players and they have the information. But the information they put in often needs to come from Paradox rather than exhausting sleuthing, repeated testing trying to average out statistical trends to guess at formulas, and reverse engineering the binary executable that you see so often in the forums. That's admirable work, but it's sad that all that work is necessary. If Paradox expects the wiki to be of value, they need to have someone on staff whose job it is to coordinate that work, taking questions from the player-editors and finding out the answers internally from designers, devs, and code that players don't (and shouldn't) have direct access to. That access really ought to happen before release, too, so the work can be ready when the product is released. (That requires a level of trust in the player-editors.) If players expect the wiki to be of any use, they have to give up some of their thousands of hours of playtime to do a ten or a hundred hours of work on the wiki, putting in what they know and can discover, benefitting other players but not themselves. Paradox doesn't have staff members to do all that work directly. But even one staffer assigned that task, along with management that values it being done, would be a tremendous force multiplier for the players that are willing to work on the wiki.
 
  • 2Like
  • 1
Reactions:
Sorry if this has been discussed but is the Wiki going to add decisions, their reqs and impact in the future?
Sorry, but as much as I would have liked to, the wiki team does not have enough time to add content to all wikis; To that end, we rely on the community to help with what the team can't. Would have been easier if we had a dedicated HoI4 member, but sadly we don't have one at the moment.

At least in theory, wikis are maintained by their users. So asking "is the Wiki going to add X" is a lot like asking "why haven't I added X"?
Very much true, even if most users can't see it this way :)

Paradox probably sees it as documentation they don't have to do, which is also not the most productive attitude. The problem with that approach is that not all the information is available even to willing editors. You can get a lot from tooltips. For other things, you have to dig through the mod files. (And as far as I know, that format isn't documented, so there can be guesswork as to what the syntax means.) Then people like bitmode put an even more tremendous amount of work into reverse engineering the code and tracing through it to find out what it actually does. The code isn't available for public inspection, so "the public" can't document everything.
There is actually not much to reverse-engineer. Most of the content on the PDS-centered wikis come from 3-4 main folders: common, events, and localisation.
The decision script files are located in "SteamFolder\...\Hearts of Iron IV\common\decisions."
 
  • 2Like
Reactions:
There is actually not much to reverse-engineer. Most of the content on the PDS-centered wikis come from 3-4 main folders: common, events, and localisation.
The decision script files are located in "SteamFolder\...\Hearts of Iron IV\common\decisions."

While there isn't a lot in terms of "net words", there is a fair bit in terms of "key mechanical information". I'm pretty comfortable with those folders (common's the only one I'm not entirely on top of, because it's got a heap in it that I haven't had to looked at) and there's plenty of stuff in the past I've had to "test for" to work out what's going on. Unless @bitmode says otherwise (his reverse engineering is well beyond my ken) there's still information that it would be handy to have dev input from, and without which the best we can do is either a long and tedious testing process, or guess.
 
How would I transfer the decision.txt into the Wiki? Do authors use a script to convert the code into human-friendly text? Or is it just done manually?
https://github.com/ajul/pyradox helps extract the data from the files. E.g. after loading the decisions folder you could do decisions['GER_reichskommissariats']['GER_reichskommissariat_norwegen'] in Python code but there is still a lot to be done to produce actual wiki text. To stick with this example, the condition for Reichskommissariat Norwegen looks like this:
Code:
        available = {
            has_completed_focus = GER_form_the_reichskommissariats
            has_government = fascism
            controls_state = 110
            controls_state = 142
            controls_state = 143
            controls_state = 144
        }
Turning that into a textual representation requires recognizing the different triggers, looking up their values (like the matching state names for controls_state, focus names for has_completed_focus), their English localizations and so on. So doing it by script is maybe more future proof and slightly less error prone, but not necessarily any easier than typing out the hundreds of decisions by hand.
https://hoi4.paradoxwikis.com/German_events and other event pages already do something similar, but I don't know how that came into being. The first version by @SolSys already contained most of the content.
And as far as I know, that format isn't documented, so there can be guesswork as to what the syntax means
I reversed the file format as well, but there is not much to it. Pyradox basically guessed it correctly. Most files may start with a UTF-8 byte order mark but it has no real impact on how the file content is treated. On the lexical level, the following characters have special meaning: !#;(),<=>{}

Either of the first three introduces a comment which stretches until the end of the line. There is no option for multiline comments. Parenthesis and commas are not really used for anything as far as I can tell (there are only two places across the whole game where commas are used - wrongly).
The comparison operators and curly braces are used for the usual nested elements you see throughout the files.

All other stretches of text delimited by special characters or whitespace are treated as numbers or generic tokens depending on whether they look like a number or not. This means whitespace is not required anywhere except to separate two generic tokens or for stylistic purposes. Generic tokens may be quoted with double quotes but this is only necessary if they contain whitespace or characters with special meaning. I.e. almost all quotes you see in the game source are completely useless like tag = "GER" is strictly the same as tag = GER. Within a quoted token " can be escaped as \" and \ in turn can be escaped as \\.

Beyond this basic level there is no common syntax. The content of curly braces might be a list of uniform numbers, it might contain simple assignments or nested elements. It all depends on the element they belong to.
 
  • 2
Reactions:
Beyond this basic level there is no common syntax.
I was thinking more of the next level up, the semantics of the various tokens, rather than just the grammar of the format. An easy example to reverse would be the fields in a 'unit_stats" data structure (whatever it's really called). Most, if not all, of those are likely used in the files in the units directory, so you'd get most of it by scanning through those files. But it seems like if modding is supposed to be a thing, then there'd be a document for modders that defines the data structures and outlines the processes in which they're used. The comments are hints in that direction, but just hints.

Slightly harder to guess (as seen in older forum posts) can be things like the semantics of the numbers. Is that "chance" field a probability, N / 100? A weight, N / sum(changes of all options in the record)? Hey, this constant has an intriguing name; what does it do? Is it even used, because when I change it nothing obvious happens. What exactly does the "agility" value do in air combat? Do numbers matter? Are all fights 1-on-1? (I know; a lot of this has been reversed already. ) But you see the kind of thing I mean. You have to know the algorithms for the numbers to have any meaning. Those algorithms are the sort of thing Paradox knows easily, but the playerbase at large can reverse-engineer only with a lot of effort. It's the difference between doing particle physics from scratch, rather than reading a physics textbook. Doable, an admirable endeavor -- and also tremendously time-consuming.
 
  • 1Like
Reactions:
I was thinking more of the next level up, the semantics of the various tokens, rather than just the grammar of the format. An easy example to reverse would be the fields in a 'unit_stats" data structure (whatever it's really called). Most, if not all, of those are likely used in the files in the units directory, so you'd get most of it by scanning through those files. But it seems like if modding is supposed to be a thing, then there'd be a document for modders that defines the data structures and outlines the processes in which they're used. The comments are hints in that direction, but just hints.
If you are referring to things like field_hospital in common/units, that's a CSubUnitDefinition. Even just the high-level overview of the code handling all the recognized attributes for this one structure looks like this:
Screenshot from 2020-08-09 20-56-00.png

with each of the tiny blocks being a chunk of assembly. Ain't nobody got time fo' that.
Slightly harder to guess (as seen in older forum posts) can be things like the semantics of the numbers. Is that "chance" field a probability, N / 100? A weight, N / sum(changes of all options in the record)? Hey, this constant has an intriguing name; what does it do? Is it even used, because when I change it nothing obvious happens. What exactly does the "agility" value do in air combat? Do numbers matter? Are all fights 1-on-1? (I know; a lot of this has been reversed already. ) But you see the kind of thing I mean. You have to know the algorithms for the numbers to have any meaning. Those algorithms are the sort of thing Paradox knows easily, but the playerbase at large can reverse-engineer only with a lot of effort. It's the difference between doing particle physics from scratch, rather than reading a physics textbook. Doable, an admirable endeavor -- and also tremendously time-consuming.
Fully agree. I'm well aware that the amount of reverse-engineered info is a drop in the ocean but I think (hope) it gives players a taste of what would be possible if documentation was widely available at the level you describe. Be it for the wiki, modding, bug reports etc. Programmers like to forget that documentation of an interface is equally important as programming it.
 
  • 1
  • 1Like
Reactions:
Is there or will there be an editor?
Do you mean a tool for editing the HOI4 wiki?
Do you mean a person paid to edit the HOI4 wiki?
  • To the best of my knowledge, the wiki is maintained by volunteers. This includes two wiki moderators: