Heroes of Might and Magic Community
visiting hero! Register | Today's Posts | Games | Search! | FAQ/Rules | AvatarList | MemberList | Profile


Age of Heroes Headlines:  
5 Oct 2016: Heroes VII development comes to an end.. - read more
6 Aug 2016: Troubled Heroes VII Expansion Release - read more
26 Apr 2016: Heroes VII XPack - Trial by Fire - Coming out in June! - read more
17 Apr 2016: Global Alternative Creatures MOD for H7 after 1.8 Patch! - read more
7 Mar 2016: Romero launches a Piano Sonata Album Kickstarter! - read more
19 Feb 2016: Heroes 5.5 RC6, Heroes VII patch 1.7 are out! - read more
13 Jan 2016: Horn of the Abyss 1.4 Available for Download! - read more
17 Dec 2015: Heroes 5.5 update, 1.6 out for H7 - read more
23 Nov 2015: H7 1.4 & 1.5 patches Released - read more
31 Oct 2015: First H7 patches are out, End of DoC development - read more
5 Oct 2016: Heroes VII development comes to an end.. - read more
[X] Remove Ads
LOGIN:     Username:     Password:         [ Register ]
HOMM1: info forum | HOMM2: info forum | HOMM3: info mods forum | HOMM4: info CTG forum | HOMM5: info mods forum | MMH6: wiki forum | MMH7: wiki forum
Heroes Community > Heroes 3.5 - WoG and Beyond > Thread: Era II
Thread: Era II This Popular Thread is 220 pages long: 1 ... 12 13 14 15 16 ... 30 60 90 120 150 180 210 220 · «PREV / NEXT»
Bersy
Bersy


Honorable
Supreme Hero
posted March 25, 2012 11:34 AM

Quote:
Ive noticed one minor thing. Era II doesn't seem to remember the WOG options I choose after I exit the game and I have to reselect them every time I start Era II.

Neither did WoG. After changing options press the "Save" button and override either default settings.dat or enter new name for options file.

Quote:
i may change the variables to positive indexes (it's unique for the trigger yeah? so i may use any of y1 to y10?).

But be careful about some out-of-date script00 functions, which return result in y-2, for instance. You didn't include y- changes from Era II in your update, right?

Quote:
probably report is invalid

I asked him for save game.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
majaczek
majaczek


Supreme Hero
Work at Magic Dimmension
posted March 25, 2012 03:39 PM
Edited by majaczek at 15:52, 25 Mar 2012.

I included many of negative to positive Y-var changes from era, but script parts which was completely new in SU mostly are incorporated AS-IS (of course some few-line-changes were "var-posated" to fit the rest of the script segment they are inserted in), also scripts which weren't fixed in era since 3.58f are included totally as is.

script00/78wogify has functions which return via y-2? which ones they was? (I may check every call to the function to "fix" it).

and question: why negative variables indexes are unsafe? also: regarding positive Y-vars outside function, are they unique for a trigger or global?

EDIT: there probably many negative Y-vars to fix, but it need to be carrefully done to not make any overlap.

EDIT: we have to check for conflicts then we may resort to "var-posate" all scripts which may need it.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Bersy
Bersy


Honorable
Supreme Hero
posted March 25, 2012 07:26 PM

Quote:
I included many of negative to positive Y-var changes from era, but script parts which was completely new in SU mostly are incorporated AS-IS (of course some few-line-changes were "var-posated" to fit the rest of the script segment they are inserted in), also scripts which weren't fixed in era since 3.58f are included totally as is.

script00/78wogify has functions which return via y-2? which ones they was? (I may check every call to the function to "fix" it).


Just read the script from start. From the very start. For instance:

Quote:
** Selects a Random Stack on the Battlefield **
** Parameters: x1=0 =attacking side, x1=1 =defending side, x1=2 =either side
**             x2=0 =including war machines (except arrow towers)
**             x2=1 =excluding war machines
**             x3=0 =shooters or non-shooters
**             x3=1 =shooters only
**             x3=2 =non-shooters only
** Stack Number returned in y-100 (-1 returned if no valid stack) **


Quote:
and question: why negative variables indexes are unsafe? also: regarding positive Y-vars outside function, are they unique for a trigger or global?

There were only y+ variables at first. They were not saved/restored on trigger start/end. Then ZVS introduced y- variables for triggers. They were not saved/restored in functions. Thus we got 2 incompatible sets of variables. Because any trigger is function in reality (and has it's ID > 30000), Era makes y+ variables globally safe by saving/restoring them on every function/trigger call.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
majaczek
majaczek


Supreme Hero
Work at Magic Dimmension
posted March 25, 2012 10:53 PM

so negative  Y variables are unsafe in functions (and era FU based trigers), but they are perfectly safe in non-FU triggers?

So positive Y-vars are unsafe in non-FU triggers?

Okay, Thanks.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Bersy
Bersy


Honorable
Supreme Hero
posted March 26, 2012 12:51 PM

Positive y vars are safe everywhere now )

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Bersy
Bersy


Honorable
Supreme Hero
posted March 26, 2012 02:12 PM

Reports from WoG forum:
1) Invalid specialty atack/defense bonuses, no extra mods except russification.
2) Dead siege weapons are displayed as stroked pikeman in the after battle statistics screen.
3) Scouting scripts (random resources at every hero step) now works really rarely. (once per several weeks)
4) Script "New Artifacts" does not work at all. New commander and wog artifacts are not placed on the map.
5) Button "Buy all creatures" shows price in gold and only one type of resource.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
majaczek
majaczek


Supreme Hero
Work at Magic Dimmension
posted March 26, 2012 11:28 PM

Quote:
Reports from WoG forum:
1) Invalid specialty atack/defense bonuses, no extra mods except russification.
2) Dead siege weapons are displayed as stroked pikeman in the after battle statistics screen.
3) Scouting scripts (random resources at every hero step) now works really rarely. (once per several weeks)
4) Script "New Artifacts" does not work at all. New commander and wog artifacts are not placed on the map.
5) Button "Buy all creatures" shows price in gold and only one type of resource.


1) I'll try it at least to export scripts from the save (to compare erm files), also I'll check hero level (such value is normal for overexped heroes), if those mean to filter false alarm fails, it's some conflict but fired at weird (rare) event.
2) okay the script's variable for catapult creid were zeroed (it's set to something like magog to be able attack units), i start search for this var conflict.
3) yeah I also found per-step events rare (both rougue ambush and xscouting) at some cases. Seems calculation were interrupted.
4) okay problem with artifact banning. Probably i "fixed" negative yvar so badly so result weren't captured.
5) it always worked for just gold and one type of non-gold resource (it's assumed there's only one non-gold resource per town). There's problem if the resorce doesn't match. Or does it describe a bug in case that a creature worth gold+res were able to recruit at summon portal?

I probably have to fix the functions which return via negative yvar. Can I use associative memory for each one? (To be sure free of conflicts)
I also have to fix all uses of negative y-vars in functions (I should use positive y-vars for local variables?)
I'll definately have to dig deeply into scripts. I'll include fix for herobasicprimary found at internet. Could I include some tiny and tested fixes/features from my own and from doom3d's wogmod? Or should i rather limit changes only to those from SU and fixes for ERA/SU incompability?

There definately will be new version of the package soon. Thanks for reports. (Are negative yvars still safe in non-FU triggers?)

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Bersy
Bersy


Honorable
Supreme Hero
posted March 27, 2012 05:27 PM

Quote:
There's problem if the resorce doesn't match.

The reporter said that hint contained full price and all resources, but it's not a problem in fact.

Quote:
I probably have to fix the functions which return via negative yvar. Can I use associative memory for each one? (To be sure free of conflicts)

I have doubts you will be able to fix all function calls. Anyway, it's simplier to use ?v2 syntax.

!?FU1;
!!VRx1:S7;

!?CM0;
!!CM:R0;
!!FU1:P?v2;
!!VRy1:Sv2;
!!IF:M^%Y1^; "7"

Quote:
I should use positive y-vars for local variables?

Right.

Quote:
Could I include some tiny and tested fixes/features from my own and from doom3d's wogmod? Or should i rather limit changes only to those from SU and fixes for ERA/SU incompability?

I'll provide the link to the updated wog mod in the first post, but won't include it in the basic package. For instance, I tested Phoenix only on the old wog 3.58f subset and don't want to fix other authors' bugs and test again. Thus downloaders will decide what they like. Thus you can include any changes, better with description anyway.

Quote:
Are negative yvars still safe in non-FU triggers?

Mostly. Triggers may generate new events (77XXX) which do no save/restore y- vars. Basically, it's dialogs + keyboard event.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
majaczek
majaczek


Supreme Hero
Work at Magic Dimmension
posted March 27, 2012 10:55 PM

Of course I'll include description of changes.
I meant to include a replacement for a cartographer replace scriptlet, but with mine aproach not dooms one.
I also meant to change the build twice rule to be more powerful (to 4x which is much more balanced than infinite)
I also want to include original wogmod boost to enchanced comanders but bugfixed by me (to remove overflow issues), sorry that it includes two more ert lines but it fixes annoying "it has no effect on <commander>"
there also tiny chages to scouting, learning and tactic boost from wogmod which I approve (it also contain a fix for crossscript bug with henchmen)
also a fix for a glitch in macro getherobasicprimary (it fixes some display errors)
I will not include NEW scripts from wogmod (let it be separate mod and let some another person keep the hell of incompabilities)

let my own changes to enchanced commanders be a separate mod since changes are too big (and it is far from complete).

I may also fix the inconsistences with two binary plugins from era. It have to be limited to "file exists" check, if wanted by me "isbinarypluginenabled" won't be availible.

I hope the minor-to-medium changes blend in well, and it's me who is responsible for the changes.
What is a limit for positive yvar index in era? I want to change negative y indexes to big positive ones to make sure yvars index ranges do not overlap?
Could you list commands which takes nontext variable index as parameter (instead of get syntax) with marked ones which take the index and work for the few latter indexes? It would help a lot.
Okay I may try get syntax of function calls, but i prefer the association table at least for functions hidden under macros. I'm also curious if new era commands wor k inside macros also.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Bersy
Bersy


Honorable
Supreme Hero
posted March 28, 2012 04:36 PM


Plugins Manager by SyDr

Quote:
What is a limit for positive yvar index in era? I want to change negative y indexes to big positive ones to make sure yvars index ranges do not overlap?

Same as in WoG. y1..y100.

Quote:
Could you list commands which takes nontext variable index as parameter (instead of get syntax) with marked ones which take the index and work for the few latter indexes? It would help a lot.

Sorry, I didn't understand the meaning of the phrase.

Quote:
I may also fix the inconsistences with two binary plugins from era. It have to be limited to "file exists" check, if wanted by me "isbinarypluginenabled" won't be availible.

I'll try to release and update as soon as possible.

Quote:
Okay I may try get syntax of function calls, but i prefer the association table at least for functions hidden under macros. I'm also curious if new era commands wor k inside macros also.

What do you mean "inside macros"? Macro mechanism is instable in WoG, not supported by many receivers, is slow and has limitation on 8 characters in length.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
majaczek
majaczek


Supreme Hero
Work at Magic Dimmension
posted March 28, 2012 06:58 PM

Quote:

Quote:
What is a limit for positive yvar index in era? I want to change negative y indexes to big positive ones to make sure yvars index ranges do not overlap?

Same as in WoG. y1..y100.




so ERM compiler/interpreter is faulty, as I was able to do get syntax for y114 and y214 without any warnings/errors from the ERM compiler/interpreter. it looks like I destroyed some memory after adress of storing y100. I'll have to fix it in my script.

Quote:


Quote:
Could you list commands which takes nontext variable index as parameter (instead of get syntax) with marked ones which take the index and work for the few latter indexes? It would help a lot.

Sorry, I didn't understand the meaning of the phrase.




most commands (receivers) use get syntax for writing result into variables, but some just use variable index (a number) for writing result into variables. so if I search eg. for v234 it isn't enough to "find in files"->"v234" but I also have to "find in files"->"234" to make a check if it isn't used inside such command (receiver)

Quote:


Quote:
I may also fix the inconsistences with two binary plugins from era. It have to be limited to "file exists" check, if wanted by me "isbinarypluginenabled" won't be availible.

I'll try to release and update as soon as possible.





thanks, I'll be waiting carefully.

Quote:


Quote:
Okay I may try get syntax of function calls, but i prefer the association table at least for functions hidden under macros. I'm also curious if new era commands wor k inside macros also.

What do you mean "inside macros"? Macro mechanism is instable in WoG, not supported by many receivers, is slow and has limitation on 8 characters in length.


okay it's impossible to use commands inside macros, because !!MC receiver use only variables. Still I want to use associative tables for functions that oryginally used macros in SU. So I have to use associative tables instead of macros, or for "!!FU$macroname$:" syntax use associative tables for result of such function.

PS: looks like !!EA commmands work properly only on monster commanders until I find anything possible elsewere. It would be nice to have a command for !!CO receiver to simulate units experience for real commanders (or i have to found a trick to make !!EA works for real commanders)

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Bersy
Bersy


Honorable
Supreme Hero
posted March 28, 2012 07:34 PM

Quote:
most commands (receivers) use get syntax for writing result into variables, but some just use variable index (a number) for writing result into variables. so if I search eg. for v234 it isn't enough to "find in files"->"v234" but I also have to "find in files"->"234" to make a check if it isn't used inside such command (receiver)

No, I don't have the list of commands which take indexes of variables as arguments. I'm in the same position as you: ERM Help + C++ sources

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
majaczek
majaczek


Supreme Hero
Work at Magic Dimmension
posted March 29, 2012 01:13 PM

there are still myriads of uses of negative y indexes in actual era scripts. so I won't undertake the changing all negative y on my part. but i will fix the most obvious "bads". I'll also check for actual conflicts. I'll also check if I did any copy-paste error. Neverthless there will be new version of the package soon.

I know there's much FU indexes to use, so could I reserve FU55000 to FU55099 for my exclusive use?

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Bersy
Bersy


Honorable
Supreme Hero
posted March 29, 2012 02:18 PM

In short, yes.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
majaczek
majaczek


Supreme Hero
Work at Magic Dimmension
posted March 29, 2012 05:38 PM
Edited by majaczek at 17:42, 29 Mar 2012.

Quote:

Regeneration phase in battle
!?FU77007;

Parameters: stack number (0..41), Structure indicator TBattleMonster, Block regeneration? (0 &#8211; no, 1 &#8211; yes).
In this event, the regeneration of Hell Hydras, Trolls, and Wigts takes place.



does it work on commanders too? if yes, I want to use it in my version of enchanced commanders script. (It will capture the regeneration, make an action eg. cast a spell and block the regeneration)

It's sad that I cannot make !!EA work on real commander (not monster commander) in battle. If it's possible, please add commands to !!CO receiver which actually works like experience lines for real commanders. (It's seems the stack experience effects to be disabled for real commanders for some reason) or perhaps better add a flag 2 to !!EA receiver experience line commands which would mean "enabled for real commanders" (actually we are having only flag 1 which says "enabled"). it would need some changes both in commander and stack experience code). I can now do some tricks to change real commander to monster commander and back, but it will be reallly unsafe (eg. it may make commander dead in commander window if it won't switch back fast enough)

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
JimV
JimV


Responsible
Supreme Hero
posted March 29, 2012 05:58 PM

Why not simply disable the WoG Commander option (which was progammed the way the WoG Team wanted Commanders to work), and add Commander creatures at the start of a battle similarly to the way Henchmen are added?  In other words, ERM already allows you to script Commanders with EA abilities, without any revisions to program code.  (Players would see these Commanders appear in battle the same as actual Commanders.)  You would have to add some menus to the Hero Screen, similar to those for Henchmen, and it would require thought and testing - but revising core programs can also be a lot of work, especially with only vague specifications to work from, which may not turn out as expected.  You are the best person to script or code whatever it is that you want.

Sorry to add my opinion, but in my experience when one person volunteers to to code or script something complicated for someone else, both parties (and third parties) are rarely completely satisfied with the results.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Bersy
Bersy


Honorable
Supreme Hero
posted March 29, 2012 06:27 PM

Quote:
does it work on commanders too? if yes, I want to use it in my version of enchanced commanders script. (It will capture the regeneration, make an action eg. cast a spell and block the regeneration)

Yes.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
majaczek
majaczek


Supreme Hero
Work at Magic Dimmension
posted March 29, 2012 08:19 PM
Edited by majaczek at 21:02, 29 Mar 2012.

Quote:
Why not simply disable the WoG Commander option (which was progammed the way the WoG Team wanted Commanders to work), and add Commander creatures at the start of a battle similarly to the way Henchmen are added?  In other words, ERM already allows you to script Commanders with EA abilities, without any revisions to program code.  (Players would see these Commanders appear in battle the same as actual Commanders.)  You would have to add some menus to the Hero Screen, similar to those for Henchmen, and it would require thought and testing - but revising core programs can also be a lot of work, especially with only vague specifications to work from, which may not turn out as expected.  You are the best person to script or code whatever it is that you want.

Sorry to add my opinion, but in my experience when one person volunteers to to code or script something complicated for someone else, both parties (and third parties) are rarely completely satisfied with the results.


well I kept trying on some weirdos to make commander accept !!EA, mostly on begin of battle, but I haven't yet thought of commander option! thanks! perhaps i can disable it during/before battle and reenable later! it perhaps could keep the hardcoded options for comander, while getting a bit of stack experience (at least at begin of battle, so santa guards work).

EDIT: well JimV I just made my game crash on begin of battle .
EDIT: I made some zvslib errors, but the stack experience still doesn't work on commander if commanders were enabled at least once.
EDIT: !!UN3/0; is enabled, !!UN3/1; is disabled - weird... now i know...
EDIT: some progress - commander works but doesn't appear on battlefield, and no more crashes

--------------
while I'm trying unlucky, Bersy could you find code for making !!EA don't work on real commander, and making it work if flag 2 set on experience lines? it should be just some conditional execute (a few "if...else"), and I believe you have the cpp code of wog additions? (or era II doesn't profit from released wog sources?). we already use flag 1 here for "enabled", so it doesn't have to do something really special - it should be relatively easy from coder point of view (if you have sourced/analysed both commander code and stack experience code)

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Bersy
Bersy


Honorable
Supreme Hero
posted March 29, 2012 09:18 PM

Quote:
or era II doesn't profit from released wog sources?

Era II is standalone project, while wog sources are public and have been released. Feel free to look through tons of code )

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
majaczek
majaczek


Supreme Hero
Work at Magic Dimmension
posted March 29, 2012 10:00 PM
Edited by majaczek at 22:29, 29 Mar 2012.

Quote:
Quote:
or era II doesn't profit from released wog sources?

Era II is standalone project, while wog sources are public and have been released. Feel free to look through tons of code )


Oh sorry, so you did all this with binary hacks over binary hacks wog already is? ERA team you are my heroes!
How did you do to include new commands for !!SN receiver? well then thing I'm asking you to do isn't trivial as it seems. For now I'll play with !!BU:S. But if you were able to locate the code for commanders and stack experience, and were able to make support for experience lines flag 2 i mentioned - it would be SUPER DUPER!!

meanwhile i checked I should use !!BU:S for summon, not !!BM20 which crash on working with non existing unit. I probably would be able to work some of the things out with dirty hacks, but if it is possible I would like native support for stack experience lines on commanders.

EDIT: I lied that !!BU doesn't work in functions... i just placed !!BU in comment with trailing !! what a derp (facepalm)

EDIT: i managed to summon monster commander while having normal commander on battlefield... now I can try merge effects of temporary disabled commander support hack and sumoning of monster commander. It appears that monster commander have same stats as real, but it can cast beneficial spells on enemies... also It doesn't seem to benefit from hardcoded commander abilities... well either I have to replace all hardcoded abilities with scripted/Stack_experience ones or I may rather try to just make scripted Summon Support ability for real commander (so it summons a monster one duplicate). well however santa guards doesn't seem to work on summoned stacks. I will have some nice features after i work a bit...

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread » This Popular Thread is 220 pages long: 1 ... 12 13 14 15 16 ... 30 60 90 120 150 180 210 220 · «PREV / NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.2434 seconds