|
|
VikingII
Adventuring Hero
|
posted February 11, 2018 02:37 PM |
|
Edited by VikingII at 14:40, 11 Feb 2018.
|
In the script "24 wog - enhanced war machines 1.erm", when using Warfare I don't want the catapult on the battlefield, so I've removed this entire block:
*****************
* place real catapults *
!!BA:Hx1/?y1;
!!FU&y1<0:E; exit if no hero found
!!HEy1:S10/?y11; get ballistics secondary skills
!!FU9126/x2/x1/1;
!!BU&y11>0/v1=0:S145/1/x2/x1/-1/0;
!?FU915&v591=1;
!!BA:Hx1/?y1;
!!FU&y1<0:E;
!!HEy1&x1=0/x2=0:A2/4/d/?v2060 A2/5/d/?v2061 A2/6/d/?v2062 Fd/d/d/?v2066 S10/?v2070 Ed/?v2072;
!!HEy1&x1=1/x2=0:A2/4/d/?v2063 A2/5/d/?v2064 A2/6/d/?v2065 Fd/d/d/?v2067 S10/?v2071 Ed/?v2073;
!!FU9126/y1/4/2 P6/y1/5/3 P6/y1/6/4; call enabler
!!HEy1&v2=1/x2=0:A-4;
!!HEy1&v3=1/x2=0:A-5;
!!HEy1&v4=1/x2=0:A-6;
!!HEy1&v2=1/x1=0/x2=1/v2060=1:A1/4/13;
!!HEy1&v3=1/x1=0/x2=1/v2061=1:A1/5/14;
!!HEy1&v4=1/x1=0/x2=1/v2062=1:A1/6/15;
!!HEy1&v2=1/x1=1/x2=1/v2063=1:A1/4/13;
!!HEy1&v3=1/x1=1/x2=1/v2064=1:A1/5/14;
!!HEy1&v4=1/x1=1/x2=1/v2065=1:A1/6/15;
*****************
By this way is not showing anymore the catapult on the battlefield. Apparently is done, but is it "safe"? may cause problems in other situations like a siege or so? Should I remove another lines from the script? or add lines to make the script safe?
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted February 11, 2018 04:08 PM |
|
|
You should never remove lines from a script, especially if it is from wog mod, whose scripts are being used by tons of other mods. Instead, disable the lines, by changing !! to *! or whatever similar, or even better, make a mod with your own settings, it will have priority over vanilla. Then, in your script, you only need to perform the scripted catapult if there is siege battle, so you don't get it in open field ONLY.
Which means you have to add block line here:
!!FU912:P6/x2/x1/1;
!!BA:S?y1; check battle type
!!FU&y1<1:E; exit if not siege
!!BU&y11>0/v1=0:S145/1/x2/x1/-1/0;
But also, that whole script is very complex, another function is called from FU912 as I see, so you might have problems in other situations, I can't guarantee 100% that will work. Also whats the point in using warfare option if you remove the main thing it adds, the catapult in open field.
____________
Era II mods and utilities
|
|
VikingII
Adventuring Hero
|
posted February 11, 2018 05:14 PM |
|
Edited by VikingII at 17:17, 11 Feb 2018.
|
mmm that is what I was afraid...
The point of "24 wog - enhanced war machines 1.erm" is to use the improvements on ballista and first aid tent, but don't want to use that maggog catapult.
I'm pretty far now to do my own script, lots of things to do besides play games, for now I will change !! to *! in that entire block as you suggested. Is there another block I should disable like this?
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted February 11, 2018 05:21 PM |
|
|
I don't know, such scripts requires hours to analyses to the point of safely removing entire components.
|
|
VikingII
Adventuring Hero
|
posted February 11, 2018 08:01 PM |
|
Edited by VikingII at 01:13, 13 Feb 2018.
|
Salamandre said: I don't know, such scripts requires hours to analyses to the point of safely removing entire components.
No problem, I've tested War Machines 1 with Warfare in various situations, battlefield, underground, sieges (with catapult), vs heroes (no one has catapult)... and seems to work fine just disabling that block with *!, many thanks!
*******************************************************************
New question, by reading this list of specialties:
/Help/Erm Help 2.81/format/fmhs.htm
I've found some specialties that has no sense, like:
325 - Town Portal
I've assigned it to a hero with the spell with the idea to have only 1 hero with Town Portal in that map.
!#HE40:X3/325;
40 is Astral, X3 spell specialty, and 325 I think is Town Portal.
ok, he has the spell and he cast it as always, he need the same spell points, he can't cast expert if didn't learned Earth magic, etc... what is the advantage of make a hero with Town Portal specialty if it will act like any other hero who knows that spell?
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted February 13, 2018 01:17 AM |
|
|
None, that's why there are no heroes with dummy specialties.
|
|
VikingII
Adventuring Hero
|
posted February 13, 2018 10:54 PM |
|
Edited by VikingII at 22:58, 13 Feb 2018.
|
Thank you, not more experiments in that way.
Now, I want to change some names, I've extracted "Objnames.txt" from here: "Heroes III/Mods/WoG/Data" and changed some nimes (like the Star Axis, or Redwood Observatory, and worked for those, but for Market of Time didn't changed anything, also I couldn't found the names from new WoG objects like Arcane Tower...
Where are the names of the new WoG objects? and, is this the way to change their names?
|
|
avatar
Promising
Supreme Hero
|
posted February 13, 2018 11:15 PM |
|
|
In the scripts. I strongly suggest you to open and read WoG features.htm file locates in your heroes3 folder or click on manuals in era start menu app.
____________
|
|
VikingII
Adventuring Hero
|
posted February 14, 2018 01:31 AM |
|
|
avatar said: In the scripts. I strongly suggest you to open and read WoG features.htm file locates in your heroes3 folder or click on manuals in era start menu app.
Many thanks, the WoG features is the first thing I've read (in my cellphone while traveling, hehe).
I have a strange question, I have disabled the script "71 wog - fishing well.erm" in the WoG menu, but in game, when point a Magic Well I read "Fishing Well" (of course I can not go fishing because I have the script disabled). I've managed to return to Magic Well by editing the line:
*************
!#VRz356:S^Fishing Well^;
to
!#VRz356:S^Magic Well^;
*************
Now I read again Magic Well each time I point a magic well. But my question is why I can read Fishing Well if I've disabled that script? May I remove the entire 71 scripts from the S folder or that may cause problems?
|
|
avatar
Promising
Supreme Hero
|
posted February 14, 2018 06:25 AM |
|
|
All localisation files are stored in .ert files so you must simple edit them if you want to change names.
____________
|
|
majaczek
Supreme Hero
Work at Magic Dimmension
|
posted March 01, 2018 06:26 PM |
|
Edited by majaczek at 18:28, 01 Mar 2018.
|
How to make creature work like artifact?
In example I have 4 types of Lords of Elements which are going to behave exactly like Spell Tomes (air, water, fire, earth). I may wish to do similair things to other units and artifacts. I won't be scared by memory patches or hooks
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted March 01, 2018 06:32 PM |
|
|
Well, it depends on which artifact, is much easier to script a +2 from centaur axe than black orb for example. One solution would be to equip the ghost artifact in catapult emplacement if x creature is found in army, then delete after battle. This is a simple UN:A code.
|
|
majaczek
Supreme Hero
Work at Magic Dimmension
|
posted March 01, 2018 06:47 PM |
|
Edited by majaczek at 21:03, 01 Mar 2018.
|
Salamandre said: Well, it depends on which artifact, is much easier to script a +2 from centaur axe than black orb for example. One solution would be to equip the ghost artifact in catapult emplacement if x creature is found in army, then delete after battle. This is a simple UN:A code.
I want complex artifacts, and I cannot use Catapult trick since I use 6th misc slot plugin, but I found something interesting in Emerald code :D
EDIT: Well I done plugin ElemLord but it doesn't work :(
|
|
xericsin
Famous Hero
|
posted March 02, 2018 06:44 AM |
|
Edited by xericsin at 06:47, 02 Mar 2018.
|
Try this.
This is adopted from the Nabi Mod.
Use with hooker.
*******************************************************************
英雄战场附带宝物效果模块——最后更新 2014-7-17
*******************************************************************
*FU101050-101099以内
*z801-z802 汇编码占用,请勿与其它有相同变量的脚本混用.
**************************主模块**************************
*改写战斗阶段,游戏系统内部检测英雄是否携带某宝物的函数<004D9460>*
*拦截器使用z801作为载体,z802作为左右方英雄可以附带的宝物标志载体*
*设置左右方附带宝物标志后,战场上能获得该宝物的"战场效果".(如:天使联盟的祈祷,禁魔球的禁魔效力)
*任何非法修改z801将导致游戏崩溃!非法修改z802则导致脚本冲突.
*当设置左右方英雄宝物标志时,请确保以下模块代码已经运行!(也就是注意触发器的先后顺序)
*z801(98B3E8),z802(左98B5E8,右98B6E8)
!?BA0&1000;[战斗前]
!!FU101050:P0;
!!DO101051/10008040/10008551/1:P;
!?BA1&1000;[战斗后]
!!FU101050:P1;
!?FU101050&x1=0;[拦截函数]
*004D94C9 - e9 1a 1f 4b 00 - jmp 0098b3e8
*004D94CE - 90 - nop
*004D94CF - 90 - nop
!!UN:C5084361/1/233;
!!UN:C5084362/4/4923162;
!!UN:C5084366/2/37008;
*以下z801汇编码*
!!UN:C10007528/4/141921106;
!!UN:C10007532/1/161;
!!UN:C10007533/4/6919200;
!!UN:C10007537/2/37003;
!!UN:C10007539/4/21452;
!!UN:C10007543/4/326421049;
!!UN:C10007547/2/37003;
!!UN:C10007549/4/21456;
!!UN:C10007553/4/326421049;
!!UN:C10007557/4/1583005745;
!!UN:C10007561/4/311901;
!!UN:C10007565/1/144;
!!UN:C10007566/4/2257240113;
!!UN:C10007570/4/10008040;
!!UN:C10007574/4/3224439019;
!!UN:C10007578/2/34442;
!!UN:C10007580/4/10008296;
!!UN:C10007584/4/1963063427;
!!UN:C10007588/4/1566464736;
!!UN:C10007592/4/2415920322;
!!UN:C10007596/1/0;
!?FU101050&x1=1;[只还原原函数部分]
*004D94C9 - 33 c0 - xor eax,eax
*004D94CB - 5e - pop esi
*004D94CC - 5d - pop ebp
*004D94CD - c2 04 00 - ret 0004
!!UN:C5084361/4/1566490675;
!!UN:C5084365/2/1218;
!!UN:C5084367/1/0;
!?FU101051;[清空内存]
!!UN:Cx16/1/0;
!?FU101052;[set or get hero's artifact flag in battle]
*x1=0left 1right
*x2=artifact id(1-170)
*x3=value or return variable (set 1 to work)
*x4=0set 1get
!!FU|x1<0/x1>1/x2<1/x2>170/x4<0/x4>1:E;
!!VRy1:Sx1 *256 +x2 +10008040;
!!UN&x4=0:Cy1/1/x3;
!!UN&x4=1:Cy1/1/?x3;
**************************主模块结束**************************
!?BA0&1000;
!!FU101052:P0/91/1/0; //give left hero item 91
!!FU101052:P1/91/1/0; //give right hero item 91
|
|
igrik
Promising
Known Hero
|
posted March 02, 2018 09:38 AM |
|
|
majaczek said: I want complex artifacts, and I cannot use Catapult trick since I use 6th misc slot plugin, but I found something interesting in Emerald code :D
EDIT: Well I done plugin ElemLord but it doesn't work :(
!?PI; &GM0
!!SN:L^EraPluginserm_hooker.era^/?y1;
!!FU&y1=0:E;
!!SN:Ay1/^SetHook^/?y2;
!!SN:Ey2/1/4600822/1001001;
!?FU1001001;
!!SN:X?y1; !!UN:Cy1/4/?y8; [EDI] (side)
!!VRy2:Sy1 +8; !!UN:Cy2/4/?y3; [EBP]
!!VRy4:Sy3 -8; !!UN:Cy4/4/?y5; [EBP-0x8]
!!VRy6:Sy5 +26; !!UN:Cy6/4/?y7; [y7 - hero id]
!!VRy9:Sy1 +4; !!UN:Cy9/4/?y10; [ESI] (stack_id)
!!FU1001003:Py7/y8/y9;
!?FU1001002; ; x1 - _ptr_ stack; x2 - side; x3 - mon_id;
; x4/x5 - position ( for side(0) or side(1) )
!!BU&x2=0:Sx3/1/x4/x2/-1/0; if side(0)
!!BU&x2=1:Sx3/1/x5/x2/-1/0; if side(1)
!!UN:Cx1/4/d1; stack_id++
!?FU1001003; ; x1 - hero id; x2 - side; x3 - _ptr_ stack
!!HEx1:A2/91/d/?y1; is_art(91) !!FU1001002&y1>0:Px3/x2/170/52/66; mon_id (170) in position 52 or 66
!!HEx1:A2/128/d/?y1; is_art(128) !!FU1001002&y1>0:Px3/x2/195/86/100; mon_id (195) in position 86 or 100
!!HEx1:A2/161/d/?y1; is_art(161) !!FU1001002&y1>0:Px3/x2/147/120/134; mon_id (147) in position 120 or 134
|
|
majaczek
Supreme Hero
Work at Magic Dimmension
|
posted March 02, 2018 04:32 PM |
|
|
@xericsin
Thanks! it seems it's what I need. However IDK how does it work... Could you print it as C++/asm plugin code?
@igrik
sorry you misunderstood me - I want to make a creature behave like artifact, not otherwise but Thanks Anyway
|
|
xericsin
Famous Hero
|
posted March 02, 2018 06:21 PM |
|
|
I also don't know how it works exactly.
I can only translate the comments for you.
*Modifies the internal function<004D9460> that detects whether the hero has any artifacts during the battle.
*This z801 stores data of this hooker. z802 stores the artifact flags of the heroes in battle.
*After setting the artifact flags, the hero will have the effects of that particular artifact in battle. (Such as the Prayer of Angelic Alliance)
*Illegal modifications on z801 will crash the game. Illegal modifications on z802 may cause clashes with other scripts.
*When setting the artifact flags, make sure the main module is already run.(Which means we only add our lines at the end.)
*z801(98B3E8),z802(left-98B5E8,right-98B6E8)
BA0-do some initialisation
BA0-add any artifacts <- we only write our codes here, and it must be after the initialisation
BA1-restore the original settings
|
|
majaczek
Supreme Hero
Work at Magic Dimmension
|
posted March 02, 2018 07:43 PM |
|
Edited by majaczek at 16:26, 04 Mar 2018.
|
xericsin said: I also don't know how it works exactly.
I can only translate the comments for you.
*Modifies the internal function<004D9460> that detects whether the hero has any artifacts during the battle.
*This z801 stores data of this hooker. z802 stores the artifact flags of the heroes in battle.
*After setting the artifact flags, the hero will have the effects of that particular artifact in battle. (Such as the Prayer of Angelic Alliance)
*Illegal modifications on z801 will crash the game. Illegal modifications on z802 may cause clashes with other scripts.
*When setting the artifact flags, make sure the main module is already run.(Which means we only add our lines at the end.)
*z801(98B3E8),z802(left-98B5E8,right-98B6E8)
BA0-do some initialisation
BA0-add any artifacts <- we only write our codes here, and it must be after the initialisation
BA1-restore the original settings
Would this work with Emerald? it seems to hook same function
It seems to not work with emerald or doesn't work with spell tomes?
Okay it doesn't work with spell tomes
EDIT: found nice workaround through plugin of myself
|
|
blackstomper
Adventuring Hero
Member of the old Wog-team
|
posted March 06, 2018 08:51 PM |
|
|
I have managed to snow up all my old settings and all custom made erms that I had...
Trying to recreate all as it should be (in my mind etc)
But I am stuck at 2 specific problems.
1, I used to have dragon utopias, Naga banks, crypts etc (all that you fight in) to have extra army and a commander too.
What scrip is that?
2, I seem to have infinite skills, as in I can not fill the 8 slots and then be done. AFAIK (remember) the maprule that gave you an option to have extra skill could increase it, but that is off, and I can recive new skill all the time.
What script does that?
If it matters, my Modmanager has skills activated and in order;
Morn Battlefiels
Disposable Spell-scrolls
Wog Revisited
in the wake of god 1.0
Spells uncovered
Upgrade ALL
Swap troops
XXL
|
|
xericsin
Famous Hero
|
posted March 07, 2018 04:24 AM |
|
|
majaczek said:
EDIT: found nice workaround through plugin of myself
What workaround? I am interested in what you did and what you achieved.
blackstomper said:
1, I used to have dragon utopias, Naga banks, crypts etc (all that you fight in) to have extra army and a commander too.
2, I seem to have infinite skills, as in I can not fill the 8 slots and then be done.
1. creature bank growth option in wog options bottom right corner.
2. check plugin manager. Maybe you switched on all secondary skills.
|
|
|