Trigedit works fine now, thank you! <-E2: look below
A thing may be of interest:
The string editor sometimes bugging - i cant reproduce it 100% in the new version but the console gives me sometimes error message when selecting a string.
MapSettings.StringTableEditor - 22:14:18.0379 - Warning::Could not find the changed string in the listbox.. (hr=0x80070057, V3\WinUI\MapSettingsDlg.cpp, 2963)
MapSettings.StringTableEditor - 22:14:18.0394 - Warning::Could not store the new contents of the '3th' string. (hr=0x80070057, V3\WinUI\MapSettingsDlg.cpp, 3414)
MapSettings.StringTableEditor - 22:14:18.0412 - Error::Could not handle changing the current string. (hr=0x80070057, V3\WinUI\MapSettingsDlg.cpp, 3084)
Further error message when changing the checkboxes
MapSettings.StringTableEditor - 22:20:44.0882 - Warning::Could not find the changed string in the listbox.. (hr=0x80070057, V3\WinUI\MapSettingsDlg.cpp, 2963)
MapSettings.StringTableEditor - 22:20:44.0896 - Warning::Could not store the new contents of the '17th' string. (hr=0x80070057, V3\WinUI\MapSettingsDlg.cpp, 3387)
MapSettings.StringTableEditor - 22:20:44.0913 - Error::Could not refill the string list. (hr=0x80070057, V3\WinUI\MapSettingsDlg.cpp, 3065)
This seems to occur when having a string selected and then changing the checkboxes - the mean thing about it is that im not able to select any other string until i recheck the group where the string is in.
E:
When I'm changing the size of classic map trigger windows the menu-buttons going up. Doesnt matter if I'm enlarging or shrinking it - the buttons going up until they are out of view.
E2:
Sorry i was wrong. i can load the triggers in trigedit+ and they are shown correctly now. But when i did changes and compile the code it gives me an error:
That is weird cause i did not make any changes on that line - problems seems to be in empty strings cause when im replacing "" with " " and hit compile it jumps to the next "uncommented" trigger with same error message.
Find and replace will fix this issue for now.
Post has been edited 5 time(s), last time on Jul 10 2017, 6:36 pm by Mimose.
None.
Placing doodads sometimes places multiple copies instead of just one.
[author of trigeditplus]
Empty string not recognized?? That is... weird.
I completely redid the string class, and then wrote an adaptor class for the plugin code, so there may be some behavior changes for the NULL strings. I'll take a look tonight.
If you want I can also add access to the new interface for plugins.
Post has been edited 1 time(s), last time on Jul 11 2017, 7:58 am by Suicidal Insanity.
I completely redid the string class, and then wrote an adaptor class for the plugin code, so there may be some behavior changes for the NULL strings. I'll take a look tonight.
If you want I can also add access to the new interface for plugins.
Could you add C api for plugin interface?
My current adapter code is full of assembly hacks, cause C++ ABI is pretty unstable.
#define DECLARE_THISCALL(decl, offset) \
__declspec( naked ) decl \
{ \
_asm pop eax \
_asm pop ecx \
_asm push eax \
_asm mov eax, [ecx] \
_asm mov eax, [eax + offset] \
_asm jmp eax \
}
// SICStringList uses virtual function calls. We should emulate __thiscall.
// Any function with SCMD2 in their middle takes SCMDraft2 style text as their input/output.
// Any function with _RawIndex in their last counts from stringtable string #1 as 0. (eg. stringID == -1 for enmpty string)
DECLARE_THISCALL(int __stdcall StringTable_FindString_RawIndex(SI_VirtSCStringList*, const char *), 0x0C)
DECLARE_THISCALL(const char* __stdcall StringTable_GetString(SI_VirtSCStringList*, int), 0x10)
DECLARE_THISCALL(int __stdcall StringTable_AddSCMD2String(SI_VirtSCStringList*, const char *, int , char), 0x18)
DECLARE_THISCALL(int __stdcall StringTable_Dereference(SI_VirtSCStringList*, __int16 , int , int), 0x1C)
DECLARE_THISCALL(int __stdcall StringTable_DerefAndAddString(SI_VirtSCStringList*, const char *, int , int), 0x20)
DECLARE_THISCALL(char __stdcall StringTable_SetSCMD2Text(SI_VirtSCStringList*, const char *, int), 0x24)
DECLARE_THISCALL(int __stdcall StringTable_GetTotalStringNum(SI_VirtSCStringList*), 0x2C)
DECLARE_THISCALL(char __stdcall StringTable_BackupStrings(SI_VirtSCStringList*), 0x3C)
DECLARE_THISCALL(char __stdcall StringTable_RestoreBackup(SI_VirtSCStringList*), 0x40)
DECLARE_THISCALL(char __stdcall StringTable_ClearBackup(SI_VirtSCStringList*), 0x44)
EUD
Ya I saw your sample plugin code, I actually used that to run some tests.
My plans for the plugin code is to make any new / changed interfaces be based on COM interfaces, which means for all intents and purposes you can treat them as a C API or use full COM interfacing for the language of your choice.
(Are you passing NULL instead of an explicit "" string? When I get home I will make sure that is allowed and converted to the 0th string index correctly, I may have gone overboard with parameter verification.)
+Should work in the next update.
E: having errors with trigeditplus and CUWP, but they also seem to occur with 0.8.0
E2: Found a string corruption bug. If you deleting _ALL_ text in text trigedit, then hit compile, and then compiled again with or without new triggers, it deleted the original set of strings twice. I hope that wasn't a common workflow for anyone.
E3: And uploaded. Will have to take care of the moving buttons + string filtering tomorrow though.
Post has been edited 5 time(s), last time on Jul 11 2017, 10:59 pm by Suicidal Insanity.
Your guys are just awesome, im amazed
E: One more note: Closing the string editor is not possible while having strings filtered - sometimes it crashes.
Post has been edited 1 time(s), last time on Jul 12 2017, 6:38 am by Mimose.
None.
We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch
Ya, that SI guy and his cats are BOSS.
New version with a quick+dirty fix for the button moving issue, and a fix for the string saving issue.
I am still not able to change the resource value in trigger action 'modify unit resource amount'. It defaults to <ERROR> and I cannot modify it.
^ Fixed in next upload
Anyone have some fancy custom brush files for me to test some stuff with?
*sluuuuuuuuuuuuuuuuuurp!* Melee Map Maker
What kind of "fancy brush" do you need?
None.
Something that would look nice in a screenshot of the new brush palette when its done. Reverse ramps or ramp sections would be a good example, right now I just have "Bunker Formation" "Factory+Addon" and boring stuff like that.
New build will be up in ~5 mins with the brush palette window, however VERY incomplete and untested. Hopefully I'll have time this week to work on it some more, been busy last week and this week isn't gonna be much better
But redoing brush palette is probably gonna be the last major change for 0.9.0
Build also fixed the set unit resource amount bug, and an undo bug in convert doodad to terrain.
Post has been edited 3 time(s), last time on Jul 18 2017, 11:20 pm by Suicidal Insanity.
*sluuuuuuuuuuuuuuuuuurp!* Melee Map Maker
I'll have a quick look into the new brush palette. I may compile something like a bug-free, cosmetically improved Desert ramp brush file later.
None.
Alright. The current version is mostly meant to give you a general idea of what the final version will look like, but should function somewhat.
E: I also found the thread with a bunch of predefined brush files, will try em tonight.
Post has been edited 1 time(s), last time on Jul 19 2017, 11:40 am by Suicidal Insanity.
Trigger action works, thanks!
Attempting to copy a briefing action freezes the program with no crash or error message. 100% reproduceable for me.
I'll fix that tonight. Gonna be a really stupid bug - I remember updating the code that does that a few days ago when I was reworking the trigger code.