Skip to content

Posts from Current questions and answers regarding the map editor.

5.0 (12 ratings)
In reply to Jewily
User Avatar
4 years ago
Auto-translated
Jewill
Good evening! 
Is it possible to attach an ownership icon to a non-capturable object? Preferably, using a script, i.e., by creating a static object (if one can be created) or by using PlayVisualEffect. However, I'm not very familiar with entity types, and I might be suggesting something nonsensical right now. 
In general, I would appreciate any information on this effect and the possibility/impossibility of adding it to objects of any type. 
Hmm, I was interested in this myself once, but all I could find was a script from the 2nd mission of Wolfenstein in Lords, which showed neutral mine/dwelling icons around a war grave. The effect itself was activated through PlayVisualEffect, and the name of the effect was: "/Effects/_(Effect)/Buildings/Capture/_BuildingFree_S.xdb#xpointer(/Effect)". Perhaps you can find specific models with colors and faction icons at this address in the data folder.

UPD: I just checked the data.pak archive and found folders with faction names at the address /Effects/_(Effect)/Buildings/Capture/. And in each, there are subfolders with different effect colors (from red to brown). So, there shouldn't be any difficulties in applying them to an object.
In reply to Andrei_21
User Avatar
4 years ago
Auto-translated
Andrei_21

Hmm, I was interested in this myself once, but all I could find was in the script for the 2nd mission of Wolfenstein from Lords, where it showed neutral mine/dwelling structures around a warrior's grave. The effect itself was activated through PlayVisualEffect, and the name of the effect was: "/Effects/_(Effect)/Buildings/Capture/_BuildingFree_S.xdb#xpointer(/Effect)". Maybe you can find specific models with colors and faction icons in the data folder at that address.

UPD: I just checked the data.pak archive and found folders with faction names at the address /Effects/_(Effect)/Buildings/Capture/. And in each one, there are subfolders with different color variations of the effects (from red to brown). So, there shouldn't be any difficulties in applying them to an object.
Thank you for sharing your experience :)
I will definitely test it.
I always want to say "I'll report the results," but I realized it's better to finish the map first so I can simply refer to the developed materials.
And another question, maybe you know (or someone else who is as smart and experienced): Are the descriptions and tooltips for objects unique to the player, or are they common for everyone? I'm creating a map that is bilingual in terms of text (there are reasons to write them in English as well),
but the descriptions of custom objects are not dynamic, in the sense that it's not just a text box, but a fully-fledged text that is always available to read. And it turns out that I only specify the English versions everywhere,
because if an English speaker understands Russian, the opposite is not true.
User Avatar
4 years ago
Auto-translated
All game texts are stored in a special archive called tetxts.pak (excluding custom text files created from scratch). Personally, I would do it this way: by default, the map has one voiceover (e.g., Russian), and to enable another, you download a mini-mod containing the text files, but in English. And with a quick move, the Russian language turns into English. But this is if the map needs to be simply bilingual (without dynamic switching). You could also start the map and display a talk box asking the player which language they prefer, and then use a special command, OverrideObjectTooltipNameAndDescription, to change the names of objects and their descriptions. But that would involve a lot of writing in scripts. However, the main point is: I have no idea how this would work with 2 players. Someone familiar with this is needed.
In reply to Andrei_21
User Avatar
4 years ago
Auto-translated
Andrei_21
All game texts are stored in a special archive called tetxts.pak (excluding custom text files created from scratch). Personally, I would do it this way: by default, the map has one voiceover (e.g., Russian), and to enable another, you download a mini-mod that also contains text files, but in English. And with a simple trick, the Russian language turns into English. But this is if you just want to make the map bilingual (without dynamic switching). You can start the map and display a talkbox, asking the player which language they prefer, and then use a special command, OverrideObjectTooltipNameAndDescription, to change the names and descriptions of objects. But this requires a lot of scripting. However, the main point is: I have no idea how this will work with 2 players. Someone else who is familiar with this is needed.
Here, I didn't describe my task well enough: I already have a talkbox, and moreover, the map is primarily designed for Multiplayer (for now, I think that a bot on a map with this many scripts will suffer, even though I write each scripted interaction for the bots separately). The text files work like this: there are 2 folders, en and ru, and a special variable is written to the talkbox, which the player sees, and then it is simply substituted in the required place. It works like a charm - for talkboxes, message boxes, and everything that only the player sees. In general, it seems like it's a bit sad, but people will have to read tooltips in English.
In reply to Jewily
User Avatar
4 years ago
Auto-translated
Jewill
Here, I didn't describe my task well enough: I already have a toolbox, and moreover, the map is primarily designed for Multiplayer (for now, I think that a bot on a map with this many scripts will struggle, even though I write each scripted interaction separately for the bots). The text files work like this: there are 2 folders, en and ru, and a special variable is used to write this value to the player through the toolbox, and then it is simply inserted in the appropriate place. It works like a charm - for toolboxes, message boxes, and everything else that only the player sees. In general, it seems like it's a bit sad, but people will have to read the tooltips in English .

Here, you can create a small file with Russian descriptions so that you can simply Download the file, add it as a mod, and play. Such an archive won't take up much space and can be distributed directly with the map, plus you can indicate in the starting text file/toolbox that if you have chosen Russian voice acting, you should not forget to install this additional mod for tooltips; otherwise, you'll need a linguist to play the map
In reply to Jewily
User Avatar
4 years ago
Auto-translated
Jewill
Good evening! Is it possible to attach an ownership icon to a non-capturable object? Preferably, using a script, i.e., by creating a static object (if one can be created) or by using PlayVisualEffect. However, I'm not very familiar with the types of entities, and I might be suggesting something silly right now. In general, I would appreciate any information on this effect and the possibility/impossibility of adding it to objects of any type.

Yes, it can be done using PlayVisualEffect. Regarding the path, try something from Effects/_(Effect)/Buildings/Capture/...

Added 3 minutes later
Jewill
I'm creating a map that is bilingual in terms of text (there are reasons to write the text in English as well), but the descriptions of custom objects are not dynamic, in the sense that it's not a text box, but rather a permanently displayed text that is always available for reading. As a result, I'm only setting up English versions everywhere.

There is a function called OverrideObjectTooltipNameAndDescription

Added 4 minutes later
Well, in general, you can create two versions of the map, one in Russian and one in English. The checksum should not differ if the names of the text files are the same.
In reply to Andrei_21
User Avatar
4 years ago
Auto-translated
Andrei_21

Here, you could create a small file with Russian descriptions so that users can simply download the file, add it as a mod, and play. Such an archive won't take up much space and can be distributed directly with the map. Plus, you can mention in the starting text file/talkbox that if they choose the Russian voiceover, they shouldn't forget to install this additional mod for tooltips; otherwise, they'll need a linguist to play the map.
I'll probably do something like that closer to the end of the project... For those who find it too difficult to read English names. :)

Added 1 minute ago
Dolgy
Well, in general, you can create two versions of the map, one in Russian and one in English. The checksum shouldn't differ if the text file names are the same.

Thank you for the advice regarding the checksum; I didn't know that it only reads the headers. I understand that any text file, even a small one, will break the saves (if, for example, you add a file to the map folder using print_to)?
Most likely, that's the case. And unfortunately, this is a drawback because it forces me to enter a lot of data manually, not allowing the game to work for me...
In reply to Jewily
User Avatar
4 years ago
Auto-translated
Jewill
I'll probably do something like that towards the end of the project... For those who find it too difficult to read English names

Added 1 minute ago

Thanks for the tip about the checksum; I didn't know it only reads the headers. I understand that any, even small, txt file will break the saves (if, for example, you use print_to to add a file to the map folder)?
Most likely, that's the case. And unfortunately, this is a drawback, as it forces me to enter a lot of data manually, not allowing the game to work for me...

I mean the NAMES of the text files should be the same, not the content. For example, the map name can be in Russian or English, but in both cases, they should have the same file path. For example, Maps/Multiplayer/MapName/name.txt. And if there are no differences in these paths, the checksum should be the same. And players with maps in different languages should not experience any problems.
User Avatar
4 years ago
Auto-translated
Back to the topic of Capture Effects. Everything works now, thanks again for your help. However, the effect is always at level zero, and it reacts strangely to the Z argument in the function: it shifts along the X-axis, but the X argument – any value – doesn't change anything. Am I still struggling with this, or is this some property of the object that controls the effect's attachment?
User Avatar
4 years ago
Auto-translated
Is there a function called print_to that writes content to a text file within a map? If there's also a function for reading, that would be amazing! Regarding effects, you can create copies of these effect files (e.g., in the new_effects/possession/ folder), and place copies of the particle files specified in the effect's properties (instances, models, and lights graphs) there as well. (It might also be that the particles are directly defined within the effect, in which case you don't need to copy them). In the particle properties, there's a position graph where you can change the z-coordinate (it's best to keep it the same for all particles wink). These changes will definitely work.
In reply to }{0TT@6bI4
User Avatar
4 years ago
Auto-translated
}{0TT@6bI4
Is there a function called print_to that writes content to a text file within a map? If there's also a function for reading, that would be amazing!

Regarding the effects, you can create copies of these effect files (e.g., in a folder called new_effects/possession/), and place copies of the particle files specified in the effect's properties (the instances, models, and lights graphs) in the same folder (it might also be that the particles are defined directly within the effect, in which case you don't need to copy them).

In the particle properties, there's a position graph where you can change the z-coordinate (it's best to keep it the same for all particles wink), and these changes will definitely work.
Thank you very much, I'll make copies; it will definitely be less trouble.
There is a function for writing to a file, but unfortunately, there's no function for reading, as it's part of the Lua library that isn't included in Heroes. The writing function was created by the Nival Interactive developers themselves.
Over the years, I still haven't figured out where the standard functions from the manual are defined. I somehow thought they should be declared in a Lua file, but I couldn't find them.
Maybe if we could find the writing function, we could try to implement a reading function.
But I think that since even experienced modders like RedHeavenHero and magnomagus (and all the others I've forgotten) couldn't modify the executable to the extent that everyone would like, these things are unfortunately beyond our reach. :(
User Avatar
4 years ago
Auto-translated
Checked, in version 3.1, the value of the print_to variable is nil, not [function].
In reply to }{0TT@6bI4
User Avatar
4 years ago
Auto-translated
}{0TT@6bI4
I checked, in version 3.1, the value of the print_to variable is nil, not [function].
That’s a shame.
I saw the function itself in Novik’s manual, and also on the Heroes Community in some obscure archive.
There was also create_file.
It’s strange that it’s not defined in 3.1; perhaps it was removed.
User Avatar
4 years ago
Auto-translated
But Novik himself wrote in the manual that these functions were removed in versions higher than 1.6! smile42
In reply to }{0TT@6bI4
User Avatar
4 years ago
Auto-translated
}{0TT@6bI4
But Novik himself states in the manual that these functions were removed in versions higher than 1.6! smile42
And haven't you noticed that, despite all my undeniable human qualities, inattentiveness is my crowning achievement?
I see the goal - I don't see the obstacles. smile09

Statistics

Welcome our newest member: recijeb