28.08.2021, 18:43
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174
31.08.2021, 22:19
Hi,
I saw there are new opportunities to display pics while creating dialogs with choices, like IF:G, can you point me please to some manual about?
I saw there are new opportunities to display pics while creating dialogs with choices, like IF:G, can you point me please to some manual about?
31.08.2021, 22:57
Valery, that is just intext game resources' displaying support
IF:M^{~>myDef.def:0:5}^; 0 is cadre group, 5 - is cadre number (starts from 0)
IF:M^{~>myPcx.pcx}^; just pcx
not sure, it was made for pcx 
IF:M^{~>myDef.def:0:5}^; 0 is cadre group, 5 - is cadre number (starts from 0)


Quote:[+] Added support for displaying inline def-images right in texts as a part of Era Markup Language (EML).
To embed image in text use the following tags:
{~>def_name.def} Will display the first frame from the first group of def_name.def image in place of text cursor.
{~>def_name.def:frame_index} Will display specified frame from the first group of def_name.def image or nothing if index is invalid.
{~>def_name.def:group_index:frame_index} Will display specified frame from specified group of def_name.def image or nothing if index is invalid.
Frames and frame groups are counted from 0. Frames are automatically trimmed.
By default images are rendered "inline". It means, that they are treated as non-wrapping sequence of white space characters. Images do not allocate
vertical space except the height of current font. But they automatically allocate necessary width.
Images can be aligned vertically using the following attribute: valign=top|middle|bottom.
Examples:
{~>ava0037.def valign=bottom}
{~>smalres.def:5}
Vertical alignment modes:
- 'top'. Image is drawn from the top left pixel of current character box.
- 'middle'. Image is vertically centered relative to current text line height. This is the default mode for inline images.
- 'bottom'. Image is drawn so, that it's bottom edge matches current text line bottom edge.
about RADIO settings: (Click to View)
Quote:[+] Implemented high level API for WoG radio dialogs (IF:G). Configure dialog before showing. Optionally assign value and tag to each item.
Optionally add special "cancel" item. The result is item index, value and tag. No need to convert bits anymore.
Example 1:
!?FU(OnAfterErmInstructions);
!!FU(RadioDlg_Reset):P;
!!FU(RadioDlg_SetTitle):P^What primary skill would you like to increase?^;
!!FU(RadioDlg_AddCancelButton):P;
!!FU(RadioDlg_AddItem):P^Attack^/(SKILL_ATTACK)/^attack^;
!!FU(RadioDlg_AddItem):P^Defense^/(SKILL_DEFENSE)/^defense^;
!!FU(RadioDlg_AddItem):P^Knowledge^/(SKILL_KNOWLEDGE)/^knowledge^;
!!FU(RadioDlg_AddItem):P^Power^/(SKILL_POWER)/^power^;
!!FU(RadioDlg_SelectItemByTag):P^knowledge^;
!!FU(RadioDlg_Show):P?(item:y)/?(value:y)/?(tag:z);
!!IF:M^Item: %(item). Value: %(value). Tag: %(tag)^;
Example 2:
!?FU(OnAfterErmInstructions);
!!FU(RadioDlg_Reset):P;
!!FU(RadioDlg_SetTitle):P^Select your starting hero:^;
!!FU(RadioDlg_AddCancelButton):P;
!!FU(RadioDlg_AddItem):P^Orrin^/(HERO_ORRIN);
!!FU(RadioDlg_AddItem):P^Xeron^/(HERO_XERON);
!!FU(RadioDlg_AddItem):P^Gird^/(HERO_GIRD);
!!FU(RadioDlg_AddItem):P^Valeska^/(HERO_VALESKA);
!!FU(RadioDlg_SelectItemByValue):P(HERO_GIRD); Preselect Gird from start
!!FU(RadioDlg_Show):P?(item:y)/?(hero:y);
!!if&(hero)>=(HERO_FIRST);
!!IF:M^Selected hero: %(hero)^;
!!en;
API:
!?FU(RadioDlg_Reset);
; Resets all radio dialog settings to empty values.
!?FU(RadioDlg_SetTitle);
; Changes radio dialog title.
!?FU(RadioDlg_AddCancelButton);
; Adds cancel button to dialog. Decreases maximum number of items in dialog by one.
!?FU(RadioDlg_SelectItem);
; Sets new selected item by its index.
!#VA(itemInd:x);
!?FU(RadioDlg_SelectItemByValue);
; Finds the first item with specified value and selects it.
!#VA(itemValue:x);
!?FU(RadioDlg_SelectItemByTag);
; Finds the first item with specified tag and selects it.
!#VA(itemTagPtr:x); Tag string
!?FU(RadioDlg_AddItem);
; Adds new item to radio dialog.
!#VA(itemCaptionPtr:x); Optional. New item caption. Empty/spacy captions are valid. Default: ^^.
!#VA(itemValue:x); Optional. Numeric value, associated with item. Default: 0.
!#VA(itemTagPtr:x); Optional. String tag, associated with item. Default: ^^.
!#VA(selectItem:x); Optional. Boolean. If TRUE, item will be selected. Default: FALSE.
!?FU(RadioDlg_AddItems);
; Adds up to 5 items to radio dialog. For detailed arguments description see (RadioDlg_AddItem).
!#VA(firstItemCaptionPtr:x);
!#VA(firstItemValue:x);
!#VA(firstItemTagPtr:x);
!?FU(RadioDlg_Show);
; Display previously configured radio dialog with single possible choice.
; Currently maximum RADIO_DLG_MAX_ITEMS (-1 for cancel button) items can be added to the dialog.
; Returns selected item index, value and tag. Item index is (NO_RADIO_DLG_ITEM) if no items are present for selection
; or Cancel button was pressed.
!#VA(resultItem:x); Default: (NO_RADIO_DLG_ITEM).
!#VA(resultValue:x); Default: -1.
!#VA(resultTagPtr:x); Default: ^^.
31.08.2021, 23:45
Additional interesting parts from manual:
Code:
[+] Added possibility to use animated defs in DL-dialogs. Just append " animated" to dialog item name to make it animated. Example: "Def" => "Def animated".
Up to 10 animated defs are supported for each dialog. Animation speed is 10 frames per second. One single DEF group of frames is used.
[+] Added possibility to specify frames group index for defs in DL-dialogs. Write frame index as GROUP_INDEX * 100000 + FRAME_INDEX. Group indexes are counted from 0.
[+] Implemented horizontal text alignment support in Era Markup Language (EML).
To specify alignment use either regular color tags with new align=xxx attribute or new tag "text".
Possible alignment values: "left", "center", "right".
Examples:
{~RosyBrown align=right}Some text with(out) images{~}
{~text align=center}Some text with(out) images{~}
{~RosyBrown align="left"}Some text with(out) images{~}
{~text color="RosyBrown" align="left"}Some text with(out) images{~}
Attribute values without spaces and special chars may be written without double quotes.
[+] Implemented block-style images support for Era Markup Language (EML).
Use "block" attribute to mark image in text as block-style. New line before and after image will be forced automatically.
Vertical space in text is also automatically reserved for block images. Moreover, they can be partially scrolled without vanishing effect, occuring for inline images.
Examples:
!!IF:M^{~text align=center}{~Orange}Fire camping{~}
----
{~>CDEVIL.def:0:0 valign="middle" block}
----
{~>cndrgn.def:12:2 block}{~}^;
[+] Added support for 65536-color pcx images (pcx16) in DL-dialogs. Default loading mode is 256 colors (pcx8). To load image as pcx16 change its name in dialogs editor to '****.pcx.pcx16'. Real file name in lod/pac archive should be left as is. The engine will recognise new extension, transform it into '.pcx' and load image as pcx16.
01.09.2021, 00:08
wow 
Thanks, now I am lost with the ton of information. Can you give me a short example, following a script I used in Era 2, please? So I can see the new pattern without converting to bits
How would look adding any pcx or def to a single of those options?

Thanks, now I am lost with the ton of information. Can you give me a short example, following a script I used in Era 2, please? So I can see the new pattern without converting to bits
Spoiler (Click to View)
How would look adding any pcx or def to a single of those options?

01.09.2021, 00:51
=>

01.09.2021, 01:23
Thanks, but how do I place a big def as header and below the option?
As this, empty z var?
!!VRz3&v9222<99:S^{~>smalres.def:%(RES_ORE)}^;
or simply like in your first example?
IF:M^{~>myDef.def:0:5}^;
Because I want the def to display in a IF:G dialog. Also animated defs display only in DL dialog?
As this, empty z var?
!!VRz3&v9222<99:S^{~>smalres.def:%(RES_ORE)}^;
or simply like in your first example?
IF:M^{~>myDef.def:0:5}^;
Because I want the def to display in a IF:G dialog. Also animated defs display only in DL dialog?
01.09.2021, 01:54
Animated defs are supported in DL-dialogs, right, though simple animated def-dialog is on approach.
You can use {~>} tags anywhere in text, though there is not so much space for images in IF:G boxes.
You can use {~>} tags anywhere in text, though there is not so much space for images in IF:G boxes.
04.09.2021, 09:51
An idea of ERA + BattleReplay improvement.
How about storing every single global vars at OnBeforeBattle and restore all of them at OnBattleReplay? With this mod makers don't have to do it manually. Scripting is much easier
How about storing every single global vars at OnBeforeBattle and restore all of them at OnBattleReplay? With this mod makers don't have to do it manually. Scripting is much easier

04.09.2021, 16:11
Archer30, this feature may double memory requirements (let say, +200-400 MB), may create battle start delays and will not be universal anyway, because it will not touch the memory of Lua/C++/Delphi plugins. Moreover, there maybe trigger-local arrays and temporary ERT-variables, which are harder to save restore.
How many scripts do you have to adapt and how many variables to save/restore?
How many scripts do you have to adapt and how many variables to save/restore?
04.09.2021, 17:08
Hmm. I have to save and restore a lot. Haven't count yet
Recently, I become a co-author of the Chinese mod "Fengmo", implementating modern support to the ancient project. The amout of features of the mod is about 2 times TUM + ACM. I have to dig deep to figure out many variables. That's inefficient.
But I understand your concern. Not all players have modern PCs. That makes sense to keep it the current way
Recently, I become a co-author of the Chinese mod "Fengmo", implementating modern support to the ancient project. The amout of features of the mod is about 2 times TUM + ACM. I have to dig deep to figure out many variables. That's inefficient.
But I understand your concern. Not all players have modern PCs. That makes sense to keep it the current way
04.09.2021, 17:30
Archer30, if we save all the memory just before OnBeforeBattleUniversal event, we will lose all changes in memory, made by scripts in this event. OnBattleReplay will restore variables to the state even before attempt to initiate battle. To my mind the whole replay feature can never support arbitrary scripts and mods even in theory. Full save and load is the most stable way.
04.09.2021, 18:58
Berserker, Right, I get the idea.
Looks like the issue with HE:F 1 is non-stopped...I suppose the receiver should be banned or improved.
Crashes happened with 39 hero spec boost script on leveling up.
Two reports
The most tricky part is, I couldn't reproduce the problem a few hours ago. Until now it's 100% reproduciable. Sent the save to daemon, he can't reproduce no matter what.
Any idea?
I start to figure out an alternative way here.
Looks like the issue with HE:F 1 is non-stopped...I suppose the receiver should be banned or improved.
Crashes happened with 39 hero spec boost script on leveling up.
Two reports
The most tricky part is, I couldn't reproduce the problem a few hours ago. Until now it's 100% reproduciable. Sent the save to daemon, he can't reproduce no matter what.
Any idea?

I start to figure out an alternative way here.
04.09.2021, 19:01
Berserker, Do you think that virtual technology will ever exist that is capable of reversing in time the events caused? Sort of like a save/load state in emulators, but full scale in OS. Sorry, I was curious as for now it is impossible to make a completely faithful rollback of heavily scripted battles.

04.09.2021, 23:10
Archer30, your solution is ok, fixed it a bit (don't forget to add prefixes to functions).
From my researches all crashes with HE:F were produced either by artifacts plugins or by attempt to make some artifacts combo-arts or non-commander arts.
V_Maiko, that's not possible ) Not all computations can be reversed. Take integer division operation as an example.
21 : 5 = 4.
When we have 4 as result, we cannot reverse operation by 4 * 5 = 20.
From my researches all crashes with HE:F were produced either by artifacts plugins or by attempt to make some artifacts combo-arts or non-commander arts.
V_Maiko, that's not possible ) Not all computations can be reversed. Take integer division operation as an example.
21 : 5 = 4.
When we have 4 as result, we cannot reverse operation by 4 * 5 = 20.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174