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 - SpeechCenter

#61
Quote from: monkey_05_06 on Thu 10/10/2013 09:37:31
Edit: I pushed a fix for the reported issue, by updating the interface of the Scripts collection. It now operates directly on ScriptAndHeader objects exclusively. For scripts without an associated header, the Header property returns null. This may break some of the functionality you were using, because I've removed/replaced some of the exposed functions.
I just looked at the class and it would certainly break any plugin that runs on the beta but compiled with the release version, including mine.
So I don't think it's a good fix because everything in AGS.Types is exposed to the plugin. How am I supposed to support those who decide to use the beta? And if I change it, then those would use AGS 3.2.1 will not be able to use the plugin.
I also believe you can still have a backwards compatible enumerators and items accessor for the Scripts class even if the internal implementation changed to ScriptAndHeader. Then at least you don't break those that access the class. It's not extremely complex, but it will require some attention to some details.

So please don't leave this change as-is, it's going to be hell to maintain plugins if the interface breaks like that.
#62
Quote from: Mods on Thu 10/10/2013 08:39:30
QuoteThis version fixes the automatic numbering with translation problem

Ooh. Is that a fix on the issue I was having with it or someone elses?
Should fix the issue you reported. Let me know if it worked out :)
#63
The implementation also assumes the called first adds a header, it stores it in a member and then assumes the caller adds the code script in a next call. Adding a non-header scripts adds a new item that references the script and the header from the previous call. I don't think this is an elegant way to implement this structure, but I realize a lot of this is inherited from the previous implementation where add and remove are generic but additional methods assume the header always comes before the script. So perhaps you're right that given the actual usage and the way it's implemented then multiplying by 2 is not the worst thing as long as the rest remains with this behavior.
#64
as reported here http://www.adventuregamestudio.co.uk/forums/index.php?topic=45622.msg636470246#msg636470246
AGS.Types.Scripts.Count returns an incorrect value

A second (totally unrelated) problem I noticed in the latest beta is if I close the application, before I get the "do you wish to save" message box, the first pane closes.
#65
Version 2.0.3 is now released here.
This version fixes the automatic numbering with translation problem and a workaround for the script count problem in AGS 3.3.0 beta.
#66
Quote from: Dhelayan on Wed 09/10/2013 22:32:15
I just noticed a bug (is it?) when using 2.0.2 with AGS 3.3.0 Beta..

When i edit some random line in edit mode, then press enter, save the game and hit refresh, the line is back to normal (i.e. without the edits)
It's more than just this edit. The bug is in the AGS editor beta code. AGS.Types.Scripts doesn't return the correct count. If I have 10 scripts (5 header and 5 code) it returns 5 as the count (multiplying by 2 is not a good solution since some scripts may not have both file types).
This problem was introduced on July 24 or July 27 in the AGS Git code repository.

I changed my code to work around it and not rely on count, but this should be fixed in AGS.

#67
I believe the source of the problem is that once you have a game with translation, the code doesn't update the existing translation key with the new string (the &number is considered part of the key when translating).
So if you go to the translation you see Italian because the key for each line changed and there's no English translation for the new one.

The workaround you suggest will most likely work since the same lines will appear and will have the same order for both languages. However, I believe it will not work if you would like the compiled game to use the compiled translation file with this method.

I'll try to see if there's a quick fix for this.
#68
The plugin does support automatic numbering of the game, you have to switch to edit mode and then in the edit dropdown you have an option to number all non-numbered lines. After that once you save the project it would apply the changes to your scripts/dialogs. The way it works is that it only numbers the lines currently displayed and not the ones you may have filtered out. It also only touches lines that don't have a number. The number is the lower available for the character. It also detects if a character has two different lines with the same text and if so it reuses the same number.

I had to add a specific edit mode due to the fact that the plugin interface doesn't have a way of notifying other components that an edit is in progress and no way of knowing if a script/dialog has pending changes. For this reason there's a dialog when entering edit mode and also upon save it closes all other windows and exits edit mode. However, you have full control over this behavior in the preferences because I didn't want these features to become nagging or annoying.

For the .net part, yes you guys are correct, I compiled it with 3.5 which is the highest .net version I can use while the editor is compiled with 2.0. Sticking to 2.0 for the plugin would have made some parts of the code overly complicated. My hope is that the editor would move to at least 4.0 at some point and then I'll make the same transition.

Currently aside from automatic numbering there's inline editing of the text itself. I didn't add an option to manually edit the number from the plugin. It's not impossible, but there are some details to take care of so it may take time to add it. Anyway, let me know if that feature has real use.

Please update if you managed to use the auto-number feature or whether something else needs to be worked out.
#69
First, I think it's a good idea to have this and it does the basic functionality it is supposed to do.
The plugin does need work

  • The font list should be in the tree view, probably similar to AGS font viewer
  • Consequently, each font should have its own editing window
  • If a font changed, it should indicate that with an asterisk at the title
  • It's better to be consistent and save when the user saves the project, even scripts which are separate files act this way and don't have a save button

As CW wrote, there are other more general improvements that should be done aside from some bugs like the exception thing.
Zoom in and out would be also helpful since the text is extremely small on any reasonable resolution, I think the size displayed now is not that useful, should be similar to AGS own font view.
I would also consider here usability features like copy-paste, undo, create new font, duplicate font and view original compared to the one being edited.

Other minor details, it's not trivial to know that left click draws and right click erases, so at least some text should say this. Also, could be useful to change the mouse cursor to pencil when the cursor is over the edit region. In addition, try to see if placing the editable region on the right would be more aesthetic, at the very least I would place it and the size editing in a group box. You'll need to play around with it, unfortunately, these things take time and trial and error.
#70
Not yet, working on solving this actually, but probably makes more sense in the plugin than in the context of this tool, since the original line is a key in AGS when it loads the .trs file.

It might take a bit of time since I'm juggling different things, but I'll do my best to bring it in as soon as possible.
#71
Hi All,

The changes took a bit longer than I thought, but the new version with new layout is up.
Also added an option (global and per line) to choose whether the number in the original line is included in the translated line.

The link remains the same, available here or in the original post.

Enjoy.
#72
I assume you are also using translation files, as far as I know, you also need to keep the same numbering in your translated text.
So if you have
Code: text
"&1 Original text"

you should have in the translation file
Code: text
"&1 Translated text"


That's the reason I automatically copy the number in the plugin and tool when editing the translation.
#73
As a starting point, check out the (free) course An Introduction to Interactive Programming in Python
It starts Apr 15 on Coursera
https://www.coursera.org/course/interactivepython

It could be a good fit because it also includes building small and simple games.

Actually, if you intend to take programming seriously you should later also try C# (or if not C# something like Java), but as others wrote, you should eventually learn things like object oriented and basic algorithms since many of the concepts are required in most languages.

#74
Quote from: Crimson Wizard on Tue 02/04/2013 22:23:57
The worse thing is that this error completely prevents user from closing application. I was able to do so only with the use of Task manager.
I'm referring to this text, perhaps there's a need to also fix the error handling if another error/exceptions ever occur so at least the user can close the application properly.
#75
As far as I know, as long as AGS is not GPL it cannot incorporate GPL code.
I can think of 2 options:

  • Ask the original author for an exception or a different license for AGS.
  • Write the filter based on the algorithm and not use the original code.

Obviously option 1 is preferable if possible.
#76
Have you also looked at the exception causing the editor to be unresponsive?
I'm asking because this is what I also had the same behavior when I saw the AGS.Native error, but since it happened in start time I assumed it was related. It may be a regression, not sure.
#77
Haven't tested it yet, but I also debugged it, the problem that I see is that _assetLib.AssetCount is not initialized to 0 so AssetManager::FindAssetByFileName goes into the loop if the value is above 0 (since it's random, sometimes it's negative so it doesn't go into the loop). Anyway, I'll take your new build now and test it.

Edit: Just ran it, seems to work fine, wondering if you fixed it the same way I thought it should :)
#78
Seems to have trouble loading the DLL (even though I supplied it the debug versions of VC runtime).
Can you try building AGS.Native with symbols but in release?
(I would have tried building it myself but VC 2008 is currently not installed and I don't want to change something that will cause this error to magically disappear)

The good news is that attaching to the process after the second message box reproduces the problem. I suspect it might have something to do with stricmp and agsfnt0.ttf, but I didn't check this thoroughly.
#79
Ran it again, same result.
Unfortunately running it under the debugger does not reproduce the problem so it's probably something uninitialized and since this happens right at the beginning I can't attach to the process before the exception occurs. Note that AGS.Native was not built with debug symbols so even if we work around it, like adding a message box before loading the dll, debugging would not be easy (though I hope it still reproduces after adding debug symbols).

I also tried moving the msvc DLLs out of the directory so it uses the system ones but the problem doesn't go away.

#80
I don't know if it's only my machine or something more general, but when I try to run the beta I get on startup System.AccessViolationException, the stack trace shows it comes from initialize_native() (which is called by AGS.Native.NativeMethods.Initialize())

If I replace AGS.Native.dll with the one from AGS 3.2.1 everything works fine.

The system is a fully patched Windows 7 Home Premium SP1 64 bits.
SMF spam blocked by CleanTalk