Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Crimson Wizard

#2221
Quote from: Snarky on Fri 02/12/2022 09:07:02-First, even when "Allow relative asset resolutions" is disabled, the property is available in the sprite editor and can be modified. This is confusing because changing the value has no actual effect in-game. I think the property should be hidden or made non-editable when the game-wide setting is disabled.

I believe it's possible to do (similar thing is done for a few other properties in game).

Quote from: Snarky on Fri 02/12/2022 09:07:02-Second, it used to be possible to bulk-edit this setting by selecting multiple sprites and adjusting the property. Now, the changed value is not applied to all the selected sprites, but only to the first one. I would consider this a regression.

I did not pay attention to this earlier, but this was actually a thing at least in AGS 3.2.1. It was possible to select multiple sprites, and the property grid would display only matching property values, while blanking out mismatching ones.
Back in a day the sprite resolution was the only property that could be changed, now alot of import settings may be changed.
EDIT: this is no longer working since AGS 3.5.0, where the sprite import was reimplemented.

Opened an issue: https://github.com/adventuregamestudio/ags/issues/2008

Quote from: Snarky on Fri 02/12/2022 09:07:02Separately from this, I think it would be nice if the ability to pre-scale sprites was reintroduced in a more straightforward way, e.g. a sprite scaling setting that could be set to 1x, 2x, 3x, 4x.

I guess letting to set fully arbitrary width & height could be also an option; but the question will be whether this is a import setting or a runtime effect. If it's a runtime effect, then the engine should probably precreate a scaled sprite on load in software render mode, or apply this extra scaling in accelerated render mode (d3d,opengl etc).

I further guess this is something to consider for ags4.
#2222
Quote from: jumpjack on Thu 19/01/2023 08:23:25Is this the only thread about AGS4? It is very old.
The only other one mentioning AGS4 is Engine & Editor V4.0 Alpha - Proposal, and an issue on github.

I would like to follow the ongoing discussion, if any, about new features going to be implemented  in AGS4.

I add here a link to all AGS4-tagged issues on github, for reference:

Open
Closed



Yes, as ags4 branch gets more new major features, we should probably open a proper forum thread, explaining priority goals and current state.

The mentioned github issue "AGS 4.0.0 Milestone proposal" is probably most up-to-date ticket with goals.

The changelog describing new features may always be found here: https://github.com/adventuregamestudio/ags/blob/ags4/Changes.txt

The downloads may be found on our build server, if you find the latest entry mentioning "ags4" branch:
https://cirrus-ci.com/github/adventuregamestudio/ags/ags4

It's worth mentioning that the idea of what "AGS 4" is have changed over time. Originally (number of years ago) I had thoughts about more major overwrite there, but as time went, it became clear that we don't have enough workforce to handle any kind of overhaul. So currently the idea is to implement major changes in smaller steps, and allow to break backwards compatibility whenever it gets in the way.

The principle about compatibility is to guarantee support only for importing the latest 3.* project format (3.6.0 currently), but don't guarantee running games compiled with latest 3.*. In other words, AGS 4 should be able to transfer the 3.6.0 project, but earlier projects will have to be upgraded to 3.6.0 first.
#2223
Quote from: edmundito on Sat 27/05/2023 14:50:56My specs are:
Windows 10 Home 21H2
Resolution: 2880x1800
Scale: 200%


So it has these glitches on a particular monitor only, or overall on Win 10? Or do you have only 1 monitor (i was not sure how to interpret what you say)?
#2224
Quote from: edmundito on Sat 27/05/2023 14:35:40I tested the editor on my high DPI display, and many panels must be fixed. I also wonder if Editor plugins would also be affected.

I made a video showing the glitches: https://1drv.ms/v/s!Ap-i3SuJykLihinGCZ0jdiCcj6E_?e=eBEiVC

Edit: I just tested the Speech Center editor plugin, and there are problems: https://1drv.ms/i/s!Ap-i3SuJykLihituN9TEAgr3nvmj?e=XQgu9p

Could you demonstrate how the previous version looks on the same monitor?
Also, which OS do you run this on?

Personally I did not know how this works, as I have only 1 monitor and still using Windows 7...
EDIT: I might experiment with the Windows 10 vm later if I figure out how to emulate a very big monitor.

We might revert this change if there's no easy fix to this.
#2227
AGS 3.6.1 - Beta 16
Full release number: 3.6.1.15

ACHTUNG!
This is a BETA version of AGS 3.6.1.
It's considered relatively stable but is not thoroughly tested yet and also may have planned additions.
Use at your own risk. Please back up any games before opening them in this version of AGS.
New settings in this version may make your project files unusable in previous versions after saving with this version.


For Editor
Spoiler

For Android
Spoiler
NOTE: the Editor now includes Android build component letting you prepare your own games for Android
[close]

For Engine/Editor developers
Spoiler


Released: 28th December 2023

Previous stable version: AGS 3.6.0 P7 forum thread


This release is brought to you by:

- Alan v.Drake (fixes, improvements)
- Crimson Wizard
- edmundito (iOS fixes)
- eri0o
- Walter Agazzi (fixes)



What is new in 3.6.1

3.6.1 is planned to be a focused on improving performance and usability of existing features, and also possibly on restoring few functionalities cut while porting the engine to SDL2 (in 3.6.0).

Common features:
- Implemented Deflate compression option for sprites. (This is an algorithm used in PNG and ZIP formats, and testing shows about x1.5-x2 compression improvement compared to LZW).
- Removed length limits for: Game name, savegame folder, Character's script name and regular name (description), Inventory item's name (description), Mouse cursor's script name, Audioclip's script name.

Editor:
- Discontinued Source control integration functionality, removed "Put sound and sprite files in source control" option from General Settings.
- Made Editor a Dpi-aware application, which might improve its looks in Windows 10 and higher. This is disabled (may be temporarily), as it turned out to cause troubles on some user setups.
- Improved Room Editor controls:
  Added free panning mode done by holding the middle mouse button, or alternatively - by holding Space + LMB.
  Mouse Wheel without key modifiers scrolls the room vertically; Shift + Mouse Wheel scrolls
  the room horizontally.
  Zoom is done by Ctrl + Mouse Wheel and room now zooms towards or outwards the cursor position.
- In Room Editor the context menu is now displayed by RMB or Shift + RMB while editing masks.
  The individual room mode menu is merged with the "copy coordinates" command when shown.
- In Room Editor the hint with coordinates is now also displayed when moving Objects or Characters with keyboard.
- In Dialog Script editor support most Edit menu and context menu commands from the regular Script editor, with a few exceptions.
- In Sprite Manager added command "View" -> "Show filenames" which toggles display of a sprite's source filename under the sprites.
- During sprite export Editor will display a proper progress dialog.
- Zoom controls in Character and View panes now allow downscaling too. View editor displays the preview sprite stretched to fill the parent panel.
- View editor now allows to select multiple frames at once, across multiple loops too, using standard Shift + LMB and Ctrl + LMB combinations. Properties panel lets modify properties for all the selected frames at once.
- Added "Replace with all sprites from folder" command to the View editor's context menu.
- For Audio Clips in the project tree added "Force Reimport", "Force reimport all file(s)" and "Replace Source File" context menu commands.
- For Output Panel added "Copy selection" context menu command.
- Implemented Log Panel that lets you see the engine and game logs right in the Editor.
- Improved LipSync panel looks in case user's system has display scaling option enabled.
- "Goto Definition" command in script will now work for most of the game entities too, such as Characters, GUIs, and so forth. In that case it will find a game's entity and open a respective editor panel for it. This still does not work for some types, such as Room objects, and Views.
- Added main menu commands for opening a Project folder and Compiled folder.
- Added "Export Global Messages to script" menu command. This command is meant for upgraded pre-3.2 game projects, and will generate a script with a String array, moving global messages texts there.
- For script's tabs added a context menu command for opening this script's location.
- In General Settings moved few properties to different groups for better consistency.
- Added "Scale Character sprite offsets" property to General Settings. This property refers to scaling of Character.z and sprite offsets added by LockViewOffset script command.
- Added TextureCacheSize and SoundCacheSize properties to Default Setup. These let configure the sizes of runtime texture and sound cache sizes respectively.
- Added "Leave room after fade-out" event to Rooms (script function called "Unload" by default).
- Added Translated property to all GUI Controls (was available only in ListBox). Translated property tells whether this control's text has to be translated, and applied text direction (in right-to-left text mode).
- Support '\n' linebreak character in the Label's Text and potentially other text properties.
- When run with "/compile" argument Editor will print all messages to the console (stdout), instead of displaying modal message windows.
- For Android build target Editor now supports a directory to place plugins in.
- For Android build target disabled compression of .ags and .vox assets, as that seriously slows down engine streaming resources (sprites etc).
- When building a game for Android and Linux the Editor will now be more tolerant to missing plugins and only issue a warning instead of stopping with error.
- Config will now be saved in UTF-8, letting to support setup program's title text in unicode.
- For non-Windows build targets Editor will fix config containing Direct3D graphics driver option and set OpenGL instead.
- For Color Themes: implemented character literal, braces match and braces error settings.
- Made Editor be somewhat more tolerate to missing XML nodes in Game.agf, in many cases it will still let open a game.
- When upgrading older game projects, Editor will insert a call to SetRestartPoint() in the end of the 'game_start' function in GlobalScript.asc. This is done to complement removal of an automatic restart point in the engine. This inserted command is safe to remove.
- When upgrading pre-3.2 rooms with disabled SaveLoadEnabled property the Editor will reset this property and insert a comment with a warning into the corresponding room's script. This is done because this property is deprecated as is no longer accessible.
- Fixed Editor refusing to open a game if one of the translation files is missing.
- Fixed General Settings and Default Setup not working correctly right after importing a pre-3.* game project.
- Fixed importing GIFs or 8-bit PNGs may lose transparent pixels if source images used other palette index than 0 for transparency.
- Fixed sprites may get wrong transparency settings after "Crop sprite edges" operation.
- Fixed Project Explorer's folders collapsing after certain user actions, such as dragging items or renaming things.
- Fixed a rare exception when scrolling the room in the editor.
- Fixed deleting collapsed "region" in script would sometimes lead to portion of the script undeleted but staying invisible.
 - (Possibly) Fixed a "Index out of range" exception in Script editor, related to the "script location" drop-down list, which could occur at random circumstances while working with the script, and any Color Theme is enabled.
- Fixed Dialog properties displaying internal values not meant to be seen by a user.
- Fixed selecting parent GUI after its control did not display GUI's own properties in the Properties Grid.
- Fixed Editor could miss some of the files when cleaning up old compiled files after the Game's Filename property is changed.
- Fixed Editor generating deprecated settings in the default config file.

Scripting:
- Support "#else" preprocessor directive.

Script API:
- Implemented Room's "After fade-out" event.
- Added eEventLeaveRoomAfterFadeout event for the global "on_event".
- Added eEventGameSaved event which runs after game was saved.
- Expanded interaction functions for Character, Object, InventoryItem, Hotspot and Region types: now they all receive respective object's pointer as a parameter, similar to GUI event functions, as well as a cursor mode this interaction was run with, if applicable.
- Added Game.ResetDoOnceOnly(), which completely resets all DoOnceOnly instances.
- Added Game.PrecacheSprite() and Game.PrecacheView(), which preload certain sprites and linked frame sounds into the engine's cache memory.
- Added ScriptName property to AudioClip, Character, Dialog, GUI, GUIObject, Hotspot, InventoryItem, Object.
- Added static GetByName() function to AudioClip, Character, Dialog, GUI, GUIObject, Hotspot, InventoryItem, Object.
- Added Object.AnimationVolume property, which works similar to Character.AnimationVolume.
- Added static File.ResolvePath() and File.Path attribute.
- Added support for a text formatting to a number of functions: DisplayAtY(), Character.SayAt(), Character.SayBackground(), DrawingSurface.DrawStringWrapped().

Engine:
- Significant performance improvement to scripts. Script running speed restored to a level close to AGS 3.2.1. Testing few "script-heavy" games showed fps raise by up to 30-40% compared with 3.6.0 engine.
- Improved performance of String objects in script. For instance, appending a character to a String is now roughly x2 times faster, *sequential* iteration of String.Chars[] in Unicode mode is about x12 (!) times faster (Strings in ASCII mode have relatively less improvement, because they have been faster than Unicode mode already).
- Improved performance when creating, deleting and manipulating Overlays; allows the game to have thousands of those with much less slowing down.
- Improved performance when updating and deleting dynamic sprites, and notifying any objects that have to redraw themselves. Engine no longer resets Graphic properties of objects referencing deleted dynamic sprite to 0.
- Implemented "texture cache", in addition to the existing "sprite cache". The texture cache keeps textures generated from raw sprites and lets reusing them, improving performance and reducing CPU workload. The textures mostly occupy the video memory (on GPU). The actual impact is proportional to the game's resolution and amount of simultaneously animated objects on screen.
- WFN font renderer now supports unicode texts in utf-8.
- Buttons, ListBoxes and TextBoxes now support Right-to-left text direction.
- DrawingSurface.DrawString now supports Right-to-left text direction.
- All the script File functions now treat paths in case-insensitive way (including subdirs), which makes them platform-independent.
- Removed an automatic SetRestartPoint() call at startup. This is done in case user does not want to use default "restart" save slot, or has a custom save system.
- Support handling multiple mouse clicks per game frame, similar to how multiple key presses were supported since 3.6.0.
- When starting up, engine will now precache only first 4 or 8 loops of the starting player character's View. This is done to avoid filling sprite cache with too much sprites at once in case when the player's View contains lots of additional animations.
- Characters will now have their graphic offsets, set by Character.z property and LockViewOffset() function, scaled along with the character's own scaling. This is done so long as the respective game option is enabled in the General Settings.
- Ensure that character and object scaling is updated even when the game is not drawn. This fixes rare issues when their scale property did not update in time whilst the game was completely fadeout, and similar cases.
- Allow to change Character's move speed while its moving.
- When Character is ordered a new move command while already moving, the engine will try to make a smooth transition between old and new moving without a delay.
- Engine will now log a warning for the most incorrect parameters to Animate function instead of quitting the game.
- Engine will now skip blocking Character.Say commands instantly while skipping a cutscene.
- Added new config settings in "graphics" section: "sprite_cache_size" (which replaces deprecated "cachemax" in "misc") and "texture_cache_size".
- Character.AnimationVolume now applies to the portrait animation too.
- Object.SetView now lets invalid loop and frame values, and fallbacks to using loop 0, frame 0, printing a warning. This is also consistent with backwards-compatble SetObjectFrame() behavior.
- Changed Object.SetView() to not play a frame's sound, which could lead to a duplicated sound play if Object.Animate is run right after.
- Text Overlays internal images are now registered as dynamic sprites, and their IDs may be read from Overlay.Graphic. This lets find out their sizes using Game.SpriteWidth/SpriteHeight and optionally draw them somewhere using DrawingSurface.DrawImage().
- Ensure all the script API is now correctly available for the plugins.
- Engine will now safeguard plugin's reading and writing of game saves, so that any mistakes done by plugins won't affect other parts of a save.
- Engine will disable vsync in a "infinite fps" mode, because vsync prevents getting more fps.
- Engine will force any in-game debug messages to be displayed in standard message boxes, disregarding game's "Display all messages as speech" option.
- Print some info about memory usage when reporting a "Out of memory" error.
- Deprecated in-game "console", as practically useless.
- Added new config settings in "graphics" section: "sprite_cache_size" (which replaces deprecated "cachemax" in "misc") and "texture_cache_size".
- Fixed Characters may be seemingly "walking in place" for some time when arriving at destination.
- Fixed Display and Say commands treating the second met "&" sign as a voice-over token too (they must only check the first one in string).
- Fixed PlayMP3File() function limiting filename argument by an arbitrary number of characters.
- Fixed speechlines were adjusting their Y position while trying to not overlap GUIs even when these GUIs are completely offscreen.
- Fixed first Sierra-style speechline in a sequence was adjusting its Y position without need when GUIs are set to be hidden during game pause (this includes blocking speech). Normally, the speechlines are adjusting their Y position in order to not overlap GUIs, but when GUIs are hiding during speech there should not be any need to do so.
- Fixed GAMENAMElabel is not updated if Game.Name changes in script.
- Fixed script behavior in case a local variable was assigned a value without being initialized with a zero memory by compiler's instruction beforehand. This is not a problem with the standard compiler, but technically could be an issue with any custom implementation.

Engine Plugin API:
- Added IAGSStream interface, IAGSEngine.OpenFileStream() and GetFileStreamByHandle().
- Added IAGSEngine.ResolveFilePath() method, which resolves a script path (with location tokens) into a proper system filepath.
- Fixed IAGSEngine.GetFontType() incorrectly reporting TTF font type for WFN fonts with more than 128 characters.

Compatibility:
- In Editor, restored all the Character's variables available in "backward-compatible" mode. This is primarily to make it easier to import very old games.
- Fixed slower character walking speeds in pre-3.1 upscaled and high-resolution games.
- Fixed Object.SetView() and SetObjectFrame() not treating -1 for loop and frame as "keep previous values" in older games.
- Allow to run an animation over a loop with zero frames, by using the placeholder frame. This lets particular old games to continue running instead of crashing with error.
- Fixed inventory window not updated after game.top_inv_item is assigned a new value.
- Fixed a "New Room" command in old-style dialog scripts was preventing "First time Enter room" event to be called.

iOS:
- Updated port for 3.6.*.

Windows:
- Fixed a rare bug when the Windows engine could fail loading the game for no good reason. This error is related to a bug in Windows SDK 8.1.

Web / Emscripten:
- Fixed Safari cannot switch the game into fullscreen mode.

WinSetup:
- Added options for setting texture cache and sound cache size.





Log Panel

We're now featuring a new Editor window called "Log Panel".



If it's not present, it may be enabled in the "Window" menu.

This panel receives log messages from the engine when running the game in a test mode (F5), and prints in the text box. This is a short-term log, it's limited by 4k messages (i think) and when hitting the limit it will clear the older ones. Its main purpose is to let users see the current and the recent state of the game.

The log settings may be configured by pressing the "Show configuration" tool button, this will make them visible to the right from the log window. The settings include 2 groups of settings:
* Log Output - lets configure the minimal level of messages that the Editor will receive. These options are only applied once the game is starting.
* Log Filter - lets configure the current (temporary) level of messages. These options may be applied anytime.

The message types are dividing between Main, Game and Script.
Main - is the main engine messages, mostly related to something important initializing or changing.
Game - are various game-related events.
Script - are messages printed by a System.Log command in script.

The Log window's font may be configured separately, in Editor Preferences, on "Advanced" tab.

Expanded interaction functions

Regarding expanded interaction functions, these are functions connected to Look at, Interact, Talk to and other similar events. They all now may have 2 parameters: a pointer to object, and cursor mode, similar to the following examples:
Code: ags
function Ego_Interact(Character *c, CursorMode mode)
function oObject1_Look(Object *o, CursorMode mode)

Exceptions:
- Hotspot WalkOn and MouseOver events do not have CursorMode parameter.
- All Region events do not have CursorMode parameter.

The purpose of this addition is to improve situation where you connect same function to multiple events and/or multiple objects at once. In such case you will be able to distinguish object and mode for which the function is actually called.

These new parameters are optional. If you don't have them declared in script, they will be ignored by the engine, and your script is going to run as before.
Also, naturally, you do not have to use them, if you don't need to (even if they are declared).

WFN fonts supporting Unicode

Engine can now draw unicode texts using WFN fonts too, if WFN fonts have appropriate letters.
Unfortunately, existing WFN editors do not let add letters at indices higher than 255. This means they need to be upgraded to allow arbitrary higher slots.
Current WFN format does not exactly have a limit to the glyph index, but it has a limit to 64k bytes of letter pixel data. This amount potentially allows it to store several alphabets in low-resolution within a single font. You may always split languages into separate fonts anyway.

Here's the modified Radiant's FontEdit which supports editing any character in range 0-65535:
https://www.dropbox.com/s/xth28bfzu78vtqi/FontEditUni.zip?dl=0
this is an "unofficial" version made purely for test.
The source project may be found here (if anyone is interested):
https://github.com/ivan-mogilko/fontedit
The example of the WFN font hosting Greek alphabet (only capitals, for test):
https://github.com/adventuregamestudio/ags/files/11540578/AGSFNT0_UNI.zip
may be tried with e.g.
Code: ags
Display("ΟΙ ΘΕΟΙ ΤΟΥ ΟΛΥΜΠΟΥ"); // THE GODS OF OLYMPUS
#2228
Another update:
https://cirrus-ci.com/task/4777755552776192

This is how it looks like, overall:
#2229
Please tell which version of AGS are you using exactly, and which steps do you do to build the game, which folder do you look in?
#2230
Characters already have a "Idle View" mechanic that practically does that, you could use that directly, or use a "dummy" idle view to trigger your code. Set a "idle view" and configure "idle delay" for a character. Then in "repeatedly_execute" test whether idle view had started, and do your thing.

Code: ags
function repeatedly_execute()
{
    if (player.View == player.IdleView) {
         // your actions
    }
}

Relevant articles in the manual:

https://adventuregamestudio.github.io/ags-manual/Character.html#characteridleview
https://adventuregamestudio.github.io/ags-manual/Character.html#charactersetidleview
#2231
All Room Objects are stored in an array "object[]". If your "piece" objects have sequential order, then you could do "object[i + FIRST]", where FIRST is the index of a first "puzzle" object.

If they are not sequential, and it's too difficult to make them such for any reason, then you could create your own array and assign objects to it:

Code: ags
Object* pieces[HOW_MANY];
pieces[0] = piece0;
pieces[1] = piece1;
etc
and then work with "pieces" array.
#2232
Please, be careful with ChatGPT, it was already proven that ChatGPT does not guarantee a valid AGS script (don't know about other languages).


LoseInventory and AddInventory are functions. The syntax of calling a function is "FunctionName(arguments)".
Therefore the code should be:

Code: ags
function oObject0_UseInv()
{
    if (player.ActiveInventory == iEmptyBottle) {
       player.LoseInventory(iEmptyBottle);
       player.AddInventory(iBlueBottle);
    }
}

Related topics in the manual (they contain examples!):
https://adventuregamestudio.github.io/ags-manual/Character.html#characteraddinventory
https://adventuregamestudio.github.io/ags-manual/Character.html#characterloseinventory
#2233
Quote from: Danvzare on Fri 19/05/2023 14:49:50But that's just my two cents on the matter. There are definitely good reasons to have a demo game that's meant to be a showcase of what you can do with the engine, rather than a tutorial game which tells you how you can do things with the engine. It all depends on whether we want to inspire newcomers or help them get acquainted.

There may be two demo games, one made as a tutorial, and another for showcasing more advanced stuff mended together.

The tutorial game could have a "chapter" menu which teleports you to the wanted room, with description of what that room does.
#2234
Quote from: Mekabor on Fri 19/05/2023 10:10:03
Quote from: Crimson Wizard on Fri 19/05/2023 07:45:58If the other game used different font that contains proper letters with umlauts, that could explain the difference in result.

Then again, the issue may be in a codepage you are saving your TRS, maybe it's not matching the game's font.

I still have the feeling that the mapping of the fonts has been changed because in the .trs file, the umlauts are written as special characters, for example, "ä" is represented as "$" but in the game it is displayed as an umlaut. I'm just wondering how this can be achieved with just a .trs file without making any changes to the game files.

All of this depends on:
- Which letters does the font have and which indexes they use.
- Which letters do you use in TRS and which encoding (utf, ANSI, other) do you save in. The encoding  of your TRS defines the values that letters are going to be represented with. Some letters always save in the value range of 0-127 (this refers to punctuation symbols, and basic latin letters), others will depend on encoding.

For example, if in font they have "ä" in standard place of "$", then you may get to display "ä" simply by putting "$" in the TRS.
For another example, if their font corresponds to ANSI-1252, then your TRS should be saved exactly in ANSI-1252 in order to match all letters.
If they don't have "ä" at all in their game's font, then there's no other way than providing another font.

Here's the archive containing our own command line tools existing so far:
https://www.dropbox.com/s/6wfl3foo3jb9iyu/agstools-360.zip?dl=0
(most of them are only useful when you're compiling the game from sources though)
inside there's a program called agsunpak, it unpacks the AGS game package. It's used from command line like "agsunpak.exe gamefile outputdir". For example: "agsunpak.exe game.exe mydir" or "agsunpak.exe game.ags mydir" (if the game data is in "*.ags" file).

You could use it to get the fonts out of the game and then analyze them using a WFN editor.
One editor may be found here: https://www.adventuregamestudio.co.uk/forums/modules-plugins-tools/editor-plugin-wfn-fonteditor/
There has been another older one by Radiant, somewhat easier to use, but I don't have a download link for it.
#2235
Quote from: Mekabor on Fri 19/05/2023 07:26:55No problem, it was indeed a lot of text. No, the other person used a different game from the same publisher, but both games were released in the same year, so there shouldn't be too much difference, right?

If the other game used different font that contains proper letters with umlauts, that could explain the difference in result.

Then again, the issue may be in a codepage you are saving your TRS, maybe it's not matching the game's font.

Quote from: Mekabor on Fri 19/05/2023 07:26:55Yes, I understand that the question is difficult to answer. But, I cannot distribute the game data as it is a commercial game, and I don't want to cause any harm.

You could perhaps give a link or at least name the game's title. But I guess it's not important anymore if you found the working solution.
#2236
Quote from: Mekabor on Fri 19/05/2023 06:17:32I have experimented again and managed to make the game use the other font and therefore display the special characters. However, now the font appears very distorted. Could this have something to do with the font size? How can I change it to make it look better?

This is an annoying gap in translation system, but I don't think you can set the font size with TRS.
This may be a proper feature request for the future engine versions.
I think you could maybe try converting ttf->wfn and choose the destination size when you convert (if converter allows this).
Other than that, look for other fonts, or even draw some yourself. There are WFN font editors around, for example this one: https://www.adventuregamestudio.co.uk/forums/modules-plugins-tools/editor-plugin-wfn-fonteditor/


Quote from: Mekabor on Fri 19/05/2023 06:17:32I tried that, and the game starts without any issues. However, when I connect the .trs with the acwin.exe, toget the .tra file, I get an error message, and the game no longer starts with acwin.

There's some misunderstanding. You don't use acwin.exe to get tra file from trs, acwin.exe only runs the game.
You need to use the translation compiler to make tra from trs.

Quote from: Mekabor on Fri 19/05/2023 06:17:32I tried the program you suggested, is there any manual or instruction available for it?

You run it from command line. You can run "trac.exe --help" to see the list of options.
The common use is "trac.exe lang.trs lang.tra" -- this will take lang.trs file and create lang.tra.


Quote from: Mekabor on Fri 19/05/2023 06:17:32Although the question of how the other person managed to achieve it with just a .trs file still bothers me a bit.

I might have missed this in your other replies, did that other person translate same game or another game? It's difficult to answer such question without knowing details, or better having the game with translation for analysis.
#2237
Quote from: Mekabor on Fri 19/05/2023 02:45:42I have tried that. I converted a .ttf file (which includes special characters) into a .wfn file, located the entries for .wfn in the game.exe, renamed the new .wfn files accordingly, and copied them into the game folder. The game loads, but the font in the game doesn't change significantly, and the special characters still aren't displayed.

A side note, but if I recall correctly, you dont have to convert ttf->wfn, as AGS would try to find ttf first.

Could you please clarify what does "the font in the game doesn't change significantly" means? To make it certain, can you confirm that the new font is being used at all?

Regarding the issue, I don't know if you are aware of this, so must mention: in AGS all games made before 3.6.0 were made in ASCII/ANSI text format. This means that in order to display "extended" characters both the translation text and the font should comply to the same ANSI codepage. It does not really matter which one, what matters is that the ANSI codepage you are saving TRS with must match with the codepage the font is complying to. For this reason people were making "AGS compatible" fonts, if they needed to feature e.g. extended Latin with umlaut, Cyrillic alphabet, and so on. These fonts have to have the letters in particular slots, in accordance to the chosen codepage. For example, see how the letter table looks like in this wikipedia article: https://en.wikipedia.org/wiki/Windows-1252
The problem with this approach also is that when you save TRS in ANSI, the result will depend on your default system codepage. (This setting is also called "Language for non-Unicode applications" in Windows) So this is something to pay attention to.

This is irrelevant if you are going the alternate route, using a Unicode mode.



Quote from: Crimson Wizard on Thu 18/05/2023 16:23:06I'm not entirely sure if I understand correctly, but are you referring about the "Translation" option under the "Explore Project" tab?
If so, please note that I haven't loaded the game in AGS because it is encrypted.

No, I'm referring to the text TRS file, and compiling it with the translation compiler. You should not be needed to launch an Editor for this.

Quote from: Crimson Wizard on Thu 18/05/2023 16:23:06If I follow the Manual, such as adding "//#encoding=UTF-8" at the top of the .trs file, the Translation is completely ignored.
The .trs file is in UTF-8 encoded, but the .tra file is currently in ANSI, when I convert the .tra file to UTF-8, the Translation is not recognized.

Right, I forgot to mention that old translation compilers dont support this. You have to use either one that already supports 3.6.0 feature (I dont know if there's one already), or use our own:
https://www.dropbox.com/s/42widlilgfa2aoq/trac%20--%20ags%20translation%20compiler.zip?dl=0
this tool should be run from command line though.

Note that the Encoding option wont work with the old game or engine exe anyway. (unless it's a 3.6.0 game)


Quote from: Crimson Wizard on Thu 18/05/2023 16:23:06As for the last part about "placing 3.6.0 engine (with SDL2 dll) in the game dir," am I understanding correctly that I should copy the entire AGS into the game directory? Would that work even if the data is encrypted?

No, not the entire AGS, but the engine runtime, called "acwin.exe" for Windows. The standalone engine exe can load games just fine, if it finds them in current location.
#2238
I might say that "Inventory items represent something that a character may acquire and use: a physical object, an idea, a useable skill, and so forth, depending on game mechanics that you want to have".

Another thing, in my opinion it may be better to say that characters own copies (or "instances") of items, this is why character may have multiple instances of same item, and multiple characters may have same item too.

"called or pointed to from within the script" - may be said as "referred to".

"set of items that belongs to a character" - may be called simpler as "inventory". Perhaps you could put the definition in front: "Inventory - is a set of items that belong to a character", and then use this term in the following text.
#2239
Well, the tutorial game sure has its benefits, as it does not throw everything into the user at once, but allows to acquaint yourself with AGS gradually.
#2240
AGS supports loading external files for much of the game data. Simply placing new fonts in the game dir will override ones in the game package, if their names match. For example, placing "agsfnt0.wfn" in the game dir will override the font 0, and so forth.

Besides that, compiled ags games may be unpacked and repacked; there are tools made that do that, mostly unofficial ones created in the last 20 years, but also we now have ones in our repository too (we do not distribute them "officially" yet). These tools let you unpack a game into separate files, replace some files, and pack back. That's another option for replacing fonts.



In addition, I might mention that AGS engine 3.6.0 supports Unicode mode, which may be turned on by translation too. This gives an opportunity to create proper unicode translations even to older games that were made in ascii mode.

This is explained in the manual here:
https://adventuregamestudio.github.io/ags-manual/Translations.html#additional-options

So, if you place 3.6.0 engine (with SDL2 dll) in the game dir, compile a translation with the "Encoding=utf-8" hint inside (and if TRS is saved as utf-8), and provide unicode-compatible font, then you may have proper translations in any language even for the games that did not support such feature.
SMF spam blocked by CleanTalk