Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Russian language support

A topic by xxxLEOPARDxxx created Nov 07, 2020 Views: 1,758 Replies: 58
Viewing posts 1 to 7

Hello!

Bought your engine yesterday. I felt, played, stunned)
Very worthy. Down with the old storm engine!
Interested in supporting the Russian language. I cannot select it in config. The point is not that there are exactly Russified files, but simply the very choice of it.
We are already engaged in Russification and have almost completed it. But we have our own project, which was based on the game "Corsairs: City of the Lost Ships 1.3.2 ATR". And now we want to transfer all scripts and resources to your engine.
But in order not to change the structure of the "string" scripts, we would like to receive support for language selection for Russian-speaking users. In any case, if this does not happen, then we will be forced to do everything in the "old fashioned way" - to enter the texts directly into the scripts.
Best regards, LEOPARD!

(+1)

The mod RESOURCE and PROGRAM scripts determine what languages are are listed and supported by the mod.

The Config.exe dropdown list for the mod is populated from a section added to the RESOURCE\INI\texts\language.ini.  Add a list of supported languages to the file, like this:

[ConfigList]
cfgLang = English
cfgLang = French
cfgLang = German
cfgLang = Italian
cfgLang = Spanish

If you want multiple languages (i.e. more than one language), then move your files for each language into separate directories with the the name of the language as the subdirectory name, and in your Program script code include files, you can use the special $language preprocessor in the file path and the user's selected language will replace that path with their current language.  The Maelstrom engine will replace all instances of $language in the code script with the selected language during the game startup while compiling the game scripts.  Example from Program\DIALOGS\portuguese\Capitans_dialog.c and Program\DIALOGS\english\Capitans_dialog.c

#include "DIALOGS\$language\Rumours\Common_rumours.c"
#include "TEXT\$language\DIALOGS\Capitans_dialog.h"

If the player selected portuguese, Maelstrom will use the file from TEXT\portuguese\DIALOGS\Capitans_dialog.h and if they selected english, it will use TEXT\english\DIALOGS\Capitans_dialog.h file.

Of course the additional work for the font.ini files, and font.tga textures must also be set up for each language, but that is also the mod responsibility.

Thanks for the detailed clarification!
Another question is, so as not to create a new topic.

We have two dlls in our project, "personalflag.dll" and "questflag.dll". We do not know what is in them. This was done by BMS on the latest versions of the city of lost ships. I believe that this concerns locks for the pirate line. but I can't say for sure. Your engine refuses to enable them.
How should we be?

I don't know what they are.  It is possible they hex-edited the original rigging.dll, similar to what the New Horizons modders did.  If they are duplicate rigging object .dlls, Maelstrom provides two solutions that were provided.  The reason NH needed to hex-edit multiple rigging.dll files is because they wanted separate flag textures, because the original game only allowed a single row of flags in the texture file; Maelstrom now allows many rows and to see how that works, see the ERAS RESOURCE\Textures\flagall_ship.new.tga.tx, RESOURCE\INI\rigging.ini and Program\battle_interface\BattleInterface.c function procGetRiggingData.

New Horizons could use that same technique, but the quicker way, so that their textures and script code can remain mostly the same, was Maelstrom added a feature to give an alias to various rigging instances within the script code.  You can see this in the Maelstrom New Horizons version that I edited PROGRAM\SEA_AI\AIShip.c, where there is an option to add a unique .iniSection and .lblGroup to the flag objects to indicate what locator group on the ship model to use, and the iniSection refers to configuration sections for different .tga.tx files to use for that name, which you can see an example in the Maelstrom New Horizons RESOURCE\INI\rigging.ini file.  This allows them to still use the multiple flag textures, but with just one rigging.dll because it will accomplish the same thing their hex-edited .dll files with these new features I added just so that it could work similarly, without the need for additional hex-edited .dll files.

If the personalflag.dll and questflag.dll are not used for ship flags like New Horizons, then I do not know what they do in their mod, so I can't answer the question.

We have a wish for you to improve.
Now there is one very extremely incorrect situation associated with the combat mode of the GG. The situation is as follows: if you shoot from a pistol, then if an ally is in front, then the shooting goes at him. The same goes for enemies. When there are massive battles, as well as boarding, then such shots can greatly reduce the effectiveness of the boarders.
Is it possible to make it so that only enemies are selected?
In corsairs - to each his own - this is corrected.
Best regards, LEOPARD.

Newest update now restricts NPC to target/shoot only enemies.  Player can still shoot friend/foe so still has to manually ensure an enemy is targeted.

(1 edit)

In order not to create new topics, I will continue here again.
We have already done Russian localization, but we faced a number of problems.

COAS 1.3.0 Game
1. Most likely a problem with the DX9 64bit engine. If you spend the night in a tavern in the common room, flickering textures appear on the floor.
2. Excessive yellow light illumination in some rooms. It's very strong. This is especially true in taverns and brothels.
3. Misty shroud strongly hides ships. There is no such thing in the Russian version of the old storm.
4. The sea changes the waves very abruptly, it seems that physics is not being worked out correctly.
5. The problem is in stretching the interface. If on the old storm in the script "interface.c" change the line "showWindow.aspectRatio" and set the values "showWindow.aspectRatio = 1.0;" then the interface doesn't stretch and looks great. This fix does not work on Maelstorm. There is no way I can properly make the interface for 16: 9 ratios so that the main frames are centered. They stubbornly stretch everywhere, which makes a very ugly picture. At 4: 3 ratios everything is fine, but this is already the past.

I sincerely hope that you can help us fix these issues. Best regards, LEOPARD.

1: Using Maelstrom 64 bit, I can spend the night in the tavern in our copy of COAS, GOF 1.2, GOF 2.0, GOF 2.5 and ERAS 2 and I see no flickering textures on the floor.  I can guess that the problem might be the sea is still enabled in your location; disable the sea for that location load in your scripts, or if you do want the sea enabled, change your sea height in the scripts to make sure it is lower than the floor.

2. The original scripts tried to set ambient light for locations with a function:  ExecuteTechnique("amb_tavern")  But that function had no effect, and never worked from the scripts because the Storm engine did not perform that feature properly.  I changed it use a message instead, during model load:  MSG_LOCATION_SET_AMBIENT_LIGHT.  If your location color is disturbing, either change the .col files for that location/hour, or you can set the ambient color with that message in your location loader script and the color you send will imbue that tint into all the textures of that location as ambient light.

3: The original City of Abandoned ships had lots of fog at sea.  ERAS 2 has little or no fog.  This is all set in the weather scripts, so if you have too much fog, change your weather scripts.

4: I changed none of the wave calculations from what I was given.  The only things I changed for the sea is to more properly handle the multi-threading event responses, increase the number of supported polygons and detail allowed, and doubled the size of the wave square surrounding the ship.  If your waves are too fast, too abrupt, then change your weather sea attributes for animation speed, wave frequency, sea and wave heights, sea color, etc. in your weather scripts.

5: The showWindow.aspectRatio attribute does not affect anything in the original Storm engine and does not change anything in the GUI screens; that attribute is only used in two functions:  RecalculateVIcon and RecalculateVIconScaled.  Those two functions only change the icon sizes displayed in the spyglass and battle interface HUD icons, nothing else.  The original COAS cd also stretched everything in the character GUI interfaces, because it presumes a 4x3 display and everything was defaulted to assume 800x600.  Maelstrom, by default will resize the screen elements (except a background image, which will always fully stretch) in the GUI by trying to retain the GUI element's WxH ratio, but within the actual monitor's resolution.  For example if you define a 800x600 box in the screen, but your monitor is 1920x1080, the box will expand to 1440x1080, still the same ratio as it was defined in the .ini file, but fit within the current display resolution.  A 400x300 box would expand to 720x540.  If you want everything to stretch like the original cd for COAS does, adding noresize=1 to all the screen .ini files will cause Maelstrom to act just like original Storm and stretch to fit the entire screen.  Otherwise, it will resize as I described in my 800x600 box example, turning it into a 1440x1080 sized box in a 1920x1080 screen.  There was a bug in the table column width calculation, but that is fixed in the next update.

If this is too much trouble, or still unsatisfactory, then perhaps just use the Russian version of the old Storm, since that appears to be your preference anyway.

(1 edit)

Thank you very much for the clarification!
We will deal with points 1-4 already in the scripts.
With point 5, we will wait for the stretch marks to be corrected.
And no, we don't like the old storm. I just gave an example that it worked there, but here we just did not know how to solve the problem.
If we liked the old storm, we would not buy your engine and transfer the largest mod to its base. The old storm is in the past. We've already done a tremendous job and there is still a lot to migrate to MS.
Best regards, LEOPARD!


PS.  Yes, I put noresize = 1 everywhere and it worked! We will wait for fixes from the full stretch.

I'll show you as an example:

Maelstorm


Storm



Engine was updated yesterday and someone else confirmed they are more satisfied with the table sizing now, so it should be good.

Yes, we have already made sure that all this works as it should! Thank you for your responsiveness!
Also thanks for making support for other texture formats. This is really cool! I've already checked everything on the interfaces, everything works flawlessly! Finally, it will be possible to reduce the weight of the game by 3 times)

Let's hope that someday you will add a new scene format to the game, otherwise the old GM models are not at all what is needed for the new engine :)
Best regards, LEOPARD!

(3 edits)

Hello!

There are still some problems with the interface. I will try to explain everything in detail.

The fact is that after the correction, some tables stopped moving from their positions, yes, it was corrected and obvious. But still the interface stretches.
I can't set my screen resolution to 1500x1200. the fact is that MS, with such parameters, starts immediately in FHD, and the interface itself is stretched to its full width. I think the stretching of the interfaces is in there somewhere. You naturally know better - where it is in the source code, I'm just guessing.
Now I will try to give examples of what we want to achieve.


Here's a look:
1 screenshot - this is MaelStrom in FHD resolution and the interface in ini is disabled by noresize. Here you can see how the interface has stretched.


Screenshot 2 is an old storm in FHD resolution. Here the interface does not stretch from the base 800x600.



Now let's look at the same thing, but with a normal aspect ratio of 4: 3, as it was originally for the storm.
In both screenshots, everything looks as it should.



The point is, we cannot do the same thing as it works on the old storm. If you know how to help us, please let me know.

Best regards, LEOPARD!

P.S. I'm sorry, but I seem to remember something. 3 years ago, when we just started making our mod, one person helped us with the interfaces, who had the source files of the storm. He changed something in the XINTERFACE.dll module and everything began to work for us as it should. MB is something that will help.


To be precise, this is how it can work with noresize = 1 disabled. And full stretch without noresize = 1
This would be ideal.


We also found some inconsistencies in the MaelStrom engine.

1. This is incorrect work of shaders for the sea. I gave an example of ERAS mod, old storm and COAS 1.3.0 on MaelStrom. Here you can see that shaders are not working correctly.
2. This is a first person sight at sea. By default, it should be yellow, and it should be white when aiming at neutral ships.

Sorry if we don't know something. We just draw your attention to the discrepancies we found.
Best regards, LEOPARD!

(+1)

That looks like a bug in the original engine, not Maelstrom; Maelstrom does it correctly.  The texture is an alpha mask, with no color, so it will take the shade of color sent to the engine from the Crosshair colors.

If you look at SEA_AI\AICameras.c for COAS, these are the colors:

Crosshair.Colors.Default = argb(0, 255, 255, 255);
Crosshair.Colors.Enemy = argb(0, 255, 0, 0);
Crosshair.Colors.Friend = argb(0, 0, 255, 0);
Crosshair.Colors.Neutral = argb(0, 128, 128, 128);

Default is White (255,255,255), Enemy is Red (255,0,0), Friend is Green (0,255,0), Neutral is Grey (128,128,128).  See https://www.google.com/search?q=color+picker

If you want the Default to be Yellow, change this line:

Crosshair.Colors.Default = argb(0, 255, 255, 255); //For Yellow, change it to argb(0, 255, 255, 0)

Good time!

I am again to you for a request and probably for the last time on the topic of "interface".
I even had to hire a translator so that he could voice what I say and explain)
You are welcome. watch the video.

(1 edit)

Good time!
I decided to make a 2048x2048 texture for the ship icons. I arranged everything as it should, but the main icons of the GG and companions are displayed incorrectly. On the command sheet, everything is fine, as you can see in the screenshot.



And yet, what about the interface. I sent you a video with explanations. What should we do?

Latest update contains font resizing, and should probably also fix dynamic button placement.  Also, the powder icon should also now work with that BattleInterface.c file you sent me.

The problem with the options table width for Key Controls, in 600x800 the cell width is also wrong, and also displays improperly in 4/3, so it will be wrong in all other resolutions too.  The correct the options_screen.ini:

[CONTROLS_LIST]

position = 435,296,758,498
colswidth = 30,289

If you changed the ship icons texture to include more columns/rows of ships, you must instruct the engine, because the assumed, default size is 8x8:

BattleInterface.ShipIcon.xsize = ??
BattleInterface.ShipIcon.ysize = ??

Also make sure all the ships also point to the correct index, because if they start at zero and count left-to-right, the down, for function SetShipPictureDataByShipTypeName.  You will also have to correct for the new colums/rows in the WorldMap, by fixing function GetTextureUVForShip in the scripts.

This will probably be the last work for this resizing, because only two of you are asking for this, and we see no real benefit, because we don't want our mod to retain a 4x3 aspect ratio for all GUI screens.  I was instructed by MK to simply stop working on it because we get no benefit from my work on this; we presume the Maelstrom Engine will be included in your downloads and therefore we get nothing for the work.

I noticed the BattleInterface.c comments showed that Mett added the powder and when I mentioned this to MK, he declared that he as asked to collaborate with him so that MK could get some ship models and a scene tool from Mett, but he was refused or ignored by Mett.  If you are working on Secret Beach, MK thinks that I should do no more, since we don't get anything for this, and if the Maelstrom Engine gets offered in your mod downloads, we'll get nothing from that either.  We obviously can't stop you, but that's where we stand now.

I changed the texture of the ships and specified everything as it should. One line contains 32 icons. I indicated the same to the engine. But for some reason he does not want to display correctly.

Texture 2048x2048 =
BattleInterface.ShipIcon.xsize = 32
BattleInterface.ShipIcon.ysize = 32
Or did I do something wrong? I apologize for this nonsense.

I do not work with Mett. We have different views and different projects. He generally has his own engine and his own development. I do not climb to him, he does not climb to me. The script I sent you was the only request for him to share it. And in general, he would hardly let me in to his development, tk. I am very weak at writing code.

As for the interface, I understood everything. I won't bother you anymore. Sorry if something is wrong :(

Thank you very much for your help and implementation of various utilities!
Best regards, LEOPARD!

You haven't answered the sea shaders yet - they are static. I showed you in the previous short video.

P.S. I'm not going to be giving away the Maelstrom Engine publicly. I'm not interested in this. My team of 5 got it to help me and that's it. I think it would be very disrespectful to you - to give away your development for free, depriving you of income. I plan to release only resources and scripts, and for Maelstrom Engine I will send people here to you.

Everything. We figured out the icons. We just don't know. that such code exists for the engine. There were misunderstandings on this.
Thank you again for your help!

Another update to fix when you edit the start.ini with a screen resolution not among the supported DirectX query results.  It will still override and choose the best resolution that is close to the x/y you type, but it will no longer stretch the main menu or GUI interface when it does so.  This was a true bug, so I fixed it.  One of the reasons this takes me awhile to figure out is that I have 25 years of programming in business/accounting software, but have no experience of graphic or game software, so I really don't know much about DirectX programming.  I followed some simple instructions for upgrading DX8 to DX9, but I do not know the intricacies of programming 3D graphics.  That is also the reason I have no answers for the sea shading.  I didn't change the shaders at all, so if you feel the shading looks different, it may just be a difference between DX8 and DX9 rendering the same shaders differently.  You can see the shaders in the modules/techniques/weather .sha files; they are the same for DX8 and DX9.  My lack of 3D graphic knowledge might also explain why the GUI resizing is not so simple for me to figure out...there is probably an easy trick to do it globally, but I don't know what that might be, so I have to manually adjust all the different GUI elements in 83 different source code files for the GUI interface code.

Yes, we understand everything perfectly. I have mined some code that may help you in this regard.

https://drive.google.com/open?id=10XUV32jL6zJ8nSF_hN9swK5BARS-FA0i

https://cdn.discordapp.com/attachments/767590548013711391/784237620867235850/ban...

Thanks again for the explanation of the icons for ships at sea. But I just can't figure out how the function for the global map works. I will provide you with a video so that you can watch that I cannot make a normal display. None of my team members understand how it works.
The video shows that in the sea mode everything works out perfectly. And on the global map, the ship icon changes. I changed the number of rows in the GetTextureUVForShip function, as you said. For the texture 2048x2048 I made 32x32 rows and indicated this in the function. But for some reason it does not work as it should.

What are we doing wrong?
The code itself:

void GetTextureUVForShip(int nShipType, ref rLeft, ref rTop, ref rRight, ref rBottom)
{
float fLeft = 0.0;
float fTop = 0.0;
float fRight = 0.125;
float fBottom = 0.125;//0.25;

if( nShipType> -1 && nShipType<SHIP_TYPES_QUANTITY_WITH_FORT ) // <-- ugeen fix, для тартаны nShipType = 0 !!!!
{
ref rBaseShip = &ShipsTypes[nShipType];
SetShipPictureDataByShipTypeName( rBaseShip.name );
int nV = BI_intNRetValue[0] / 32;
int nH = BI_intNRetValue[0] - nV * 32;
fLeft = stf(nH) * 0.125;
fTop = stf(nV) * 0.125;//0.25;
fRight = fLeft + 0.125;
fBottom = fTop + 0.125;//0.25;
}

rLeft = fLeft;
rTop = fTop;
rRight = fRight;
rBottom = fBottom;
}

Original: 1/8 = 0.125

For 32 rows/columns: 1/32 = 0.03125

Thanks, let's try!

What about the engine code I sent you in the post above?

And another question: you have recently made support for various image formats, but the engine contains calls to all the same .tga.tx textures. Is it possible for you to make the call from the engine not only .tga.tx? This would greatly simplify batch conversion of all textures and models in the game. Thanks in advance!
Best regards, LEOPARD!

(+1)

OK, the new Maelstrom update now uses the technique for GUI adjustment in that scaling code you sent.  It will use that new method if interfaces.ini contains:

resizeFactor = 1.0

If resizeFactor is omitted, or a value greater than 1.0, then it will use my old method of scaling, and also use the noresize values to determine screen positioning/sizing.

However, I did notice that this method gets bad results for image scrolls that use bAbsoluteRectangle.  So if you set resizeFactor 1.0, I suggest also fixing defaultode.ini:

[SCROLLIMAGE]

;bAbsoluteRectangle    = 5
bAbsoluteRectangle    = 0

Also, some of the GUI screens like itemsbox.ini specify values that need changing, like itemsbox.ini:

[ONE_ITEMSLIST]
;bAbsoluteRectangle = 4

[TWO_ITEMSLIST]
;bAbsoluteRectangle = 4

So if you use this new scaling that uses the method you sent, you will be responsible for fixing some of the other sizing issues that use the absolute position feature, because that feature specifically tells the GUI element to retain its size and position from the edges of the Global Rectangle, which is the outer screen resolution.  I did not change anything with that feature, but when I added the code for that scaling like you gave me, that absolute position skewed some of the elements, but that is because it is asking to align to the right and left of the Global Rectangle, which works fine in 800x600, but will skew wider resolutions.  What they really wanted for some of those bAbsoluteRectangle positions is actually relative position, which works for 800x600 and the wider, resized resolutions obtained with this code, so just remove the badly sized/positions like shown in itemsbox.ini.


The engine does have some hardcoded calls to .tga.tx within the source, but only a few and I am not going to change those.  The overwhelming majority of texture calls are specified in the .gm models, or the script code and they all contain the .tga extension, it is not automatic.  The modder is responsible for changing all the .gm model files and scripts from .tga to whatever texture files they want, not the engine...it doesn't know.  The engine will still search for whatever texture filename is sent, plus .tx first, because many of the old scripts and the model files contain just the .tga extension, so that feature needs to stay to support them.  But if not found, the engine will search for the same filename you sent, less the .tx extension.  So if you send texturefile.tga as the texture name, the engine tries to load texturefile.tga.tx first, then texturefile.tga.  If you send texturefile.dds as the texture name, the engine will look for texturefile.dds.tx first, and if not found, search for texturefile.dds, which it will load.  The engine does not automatically assume they are all .tga.tx, you have to change your models and scripts to use the different file names and extensions you want.

(2 edits)

Thank you for such a massive update!
I checked at different resolutions, the picture is the same everywhere, but the fonts are stretched. This is the only nuance.

Another question of interest is: is it possible to put different text on the global map and in the sea and how best to do it?

FHD


4:3




I also wanted to ask you. How did you edit the particles? Is there a publicly available program for editing them? Or how to edit them at all?
I just love graphics and a lot of experience with it. I want to try to improve the effects, as well as add different effects for abilities.

(+1)

The Maelstrom update today fixed some small issues in the GUI placement for things like the Title, because I found some cases in the code that were not properly ignoring the old method of resizing aspect when resizeFactor = 1.0.  It was supposed to ignore my old way of doing the calculation if that option was specified in interfaces.ini, but it wasn't for some of the elements.  That is now fixed.

For worldmap labels, the islands.gm needs to contain a locator in the "labels" group, where the name matches the worldmap init attributes:

worldMap.labels.Pirates_town.locator = "Pirates_town";

islands.gm contains a label, group "label" name "pirates_town"

If the two match, it should display the label at the coordinates for the locator.

I did not edit the particles.  The particles where probably made in the Maya modeling program and exported in the game format with a plugin like the .gm files.  But nobody I know has that plugin since the original developers do not appear to have released it, like they did the .gm exporter.  Since I know what the game format for particles consists of, since the source for the file reading is available to me, I did add a way to read the .xps files into the game, then export them all as .xml so that the values can be read by humans.  There is also a start.ini method to tell Maelstrom to read the .xml particle files I exported, instead of the .xps files.  This would allow someone to edit the .xml values instead, to achieve different particle effects.  But, I don't know what any of the values do or what effect they would have on the particle effect in the game.  So I have not edited any of them, but if someone knows what the values do, or wanted to experiment by changing the .xml files, with the new start.ini option, they would be able to try out new values and alter the effects.  Start.ini option to use them:

useXMLParticles = 1

(1 edit)

Thank you so much for your efforts and your work in general!
Everything is perfect with interfaces now!

It remains to be understood what is wrong with shaders on the water at sea. They are static.


And where to get the particles themselves?

I don't know of anything about the sea shaders because that is unchanged and remains original.

Particle files are in:  RESOURCE\Particles

Good time!
I am accidentally in the GOF ERAS fashion, you have a bat file in your textures folder for batch conversion. But it needs TextureWrite.exe to work. Do you happen to have such a program?

Good time!

We had a serious problem in some locations. This is due to the water treatments in Tenochtitlan and LSC.
The fact is that there is some kind of incomprehensible failure. Either in animations, or with locations, or something else. We cannot understand.
I also tested GOF ERAS2 and COAS 1.3.0 on your mods. There is absolutely the same situation. I will attach the screenshots below.




COAS 1.3.0


...and here is a shot I made just today ERAS:

Also today, GOF:


I don't know what causes your problem.

(1 edit) (+1)

Good time and Happy New Year to you!

There is a question: is it possible to make an optional setting to disable random scripts? Those. so that the random comes only from the start of the game and cannot be merged by save / load.
Thank you in advance!

We still have fonts stretching with resize factor = 1.
Can you do something about this, please?

Thanks a lot for editing the font stretching! Your engine is the best!