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: ERM help and discussion
Thread: ERM help and discussion This Popular Thread is 407 pages long: 1 50 100 150 200 250 ... 284 285 286 287 288 ... 300 350 400 407 · «PREV / NEXT»
Salamandre
Salamandre


Admirable
Omnipresent Hero
Wog refugee
posted January 07, 2016 10:50 PM

fred, the problem is that you want to jump and skip several steps in erm, this is like wanting to write in chinese without first learning to read it. Then reverse engineering, what you call "hex editing" is way more complicated, is not only about finding the hex, but also translate it in erm, with all the mathematical operations it requires. There is no easy/one line solution to your request.
____________
Era II mods and utilities

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


Disgraceful
Undefeatable Hero
posted January 07, 2016 10:54 PM

well, snow. i was hoping i'd be able to do most of this work myself, and sooner rather than later. i remember oxfea stating that he will be busy until the end of january.

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


Promising
Known Hero
posted January 08, 2016 10:04 AM

fred79 said:
script to remove diamond dragons' and ghost behemoths' "fly"; nor could i find the codes/number key needed to identify the creature itself.

diamond dragons (newly defined flags)
!#VRy1:S0 |16; only alive
!#MA:X151/y1;  set the flags

ghost behemoths (newly defined flags)
!#VRy1:S0 |16; only alive
!#MA:X156/y1;  set the flags

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


Disgraceful
Undefeatable Hero
posted January 08, 2016 10:43 AM

igrik said:

diamond dragons (newly defined flags)
!#VRy1:S0 |16; only alive
!#MA:X151/y1;  set the flags

ghost behemoths (newly defined flags)
!#VRy1:S0 |16; only alive
!#MA:X156/y1;  set the flags



i tried looking up specs on the "function local variables"(y), and got nowhere. i couldn't find(in erm help) how you would specify that, or what your two scripts here meant. the MA:X is simple enough, they appear to be deviations from(or replacements of) the scripts that oxfea(i think) sent me:

!!MA:X151/d-2;

!!MA:X156/d-2;

(these both specifically remove the dd and gb "fly" abilities)

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


Promising
Known Hero
posted January 08, 2016 09:00 PM

fred79 said:

!!MA:X151/d-2;


so doing wrong! (or rather dangerous)

the right to delete flag should be so (safely):
!!MA:X151/?y1;  set the flags
!!VRy1:|2 -2;
!!MA:X151/y1;

specifications and no variables. They are unique for each function, so you can, for their values in other scripts do not worry. But you must understand that if in
!?FU1;
y1 = 10

but
!?FU2;
y1 = may have a different content

this concern sonly "y" and "e" variables

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


Responsible
Supreme Hero
posted January 15, 2016 03:32 PM

I was wondering if it's possible to add all these nice new objects of HotA v1.4 in WoG, for instance the Water Garrison, new Boats etc.

I think I partly know how to add new objects but I would like a little help.

So, for one thing it goes without saying that the new objects must be added to the lod file.

Secondly, a text file must be added to add the object in map editor, such as this:

avwrhswd.def 001111111111111111111111111111111111111111111111 100000000000000000000000000000000000000000000000 111111111 011111111 53 0 0 0

However, what I don't know is how to make it work for these new objects. How do I edit where the object can be placed (for instance Water) and what its ability is (garrison)?

Can someone walk me through this? Or point me to a complete guide on how to do this?
____________
Not idly do the leaves of Lorien fall.

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


Disgraceful
Undefeatable Hero
posted January 15, 2016 07:48 PM
Edited by fred79 at 19:50, 15 Jan 2016.

@ HoL: i thought you knew how to do this(or maybe i'm misunderstanding you)? add them to your lod first, then add them to your zeobjts.txt.  this should help.

then, scripting the objects are up to you, after adding them. hope this information wasn't worthless.

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


Responsible
Supreme Hero
posted January 15, 2016 08:44 PM

OK, thanks, I'll give it a try.
____________
Not idly do the leaves of Lorien fall.

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


Disgraceful
Undefeatable Hero
posted January 15, 2016 09:47 PM
Edited by fred79 at 12:42, 18 Jan 2016.

no prob. glad i didn't misunderstand you.




edit: did it really take me that long to see that i had put misunderstanding instead of misunderstand? wtf? i think ghost has infected me. you guys better get your shots. i'm taking mine now.

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


Responsible
Supreme Hero
posted January 18, 2016 12:30 PM
Edited by Hero_Of_Light at 18:35, 18 Jan 2016.

@Salamandre

Some time ago you gave me these scripts that change the creatures that some buildings can recruit. You made the Natural Calamity to be able to recruit all 4 messengers and you fixed the Snowman creature growth (it was a daily growth and you set it right to weekly).

I was wondering if you can help me. I want to make the Nomad Tent to be able to recruit a different creature (124) rather than nomads. I also would like to make snowman recruit creature (123) instead of Santa Gremlins.

I post your original scripts here in case you need them. I was wondering If you can combine them into a new script. The reason I ask is that it may allow further recruiting changes in the future. There are a few more that I am thinking about it and so it will be nice to know that I can copy and add some lines to the script and make it happen.

To sum up, what I want is:

Nomad tent, to recruit 4 creatures 124
Snowman, to recruit 2 creatures 123
Natural Calamity to recruit creatures 166, 164, 165, 167.

If this can be combined into a new compact script then great, If they have to be separate then it's OK, I wouldn't mind.


** Natural Calamity

!#TM91:S1/999/7/255; [timer 91, every week]

!?TM91;
!!OW:C?y-2; [get current player]
!!OW:Iy-2/?y-3;  [get if AI or human]
!!FU&y-3<>0:E;  [exit if AI]
!!SN:W^Firstplayerflag^/?y-3;
!!SN&y-3<99:W^Calamity^/y-2; [get first human player]
!!VRy1:Sc; [get day]
;run first day
!!if&y1=1:; [only first day]
!!UN:U17/93/?y-1; [get calamities number]
!!VRv1:S-1;
!!DO3624589/1/y-1/1:P17/93;  [run through each one]
!!SN:W^Firstplayerflag^/99;
!!en:;
;run every week
!!if&y1>1:; [starting with 2nd week]
!!OW:C?y2;
!!SN:W^Calamity^/?y3; [check for first human player]
!!FU&y2<>y3:E; [exit if not first human player]
!!UN:U17/93/?y-1; [get calamities number]
!!VRv1:S-1;
!!DO3624589/1/y-1/1:P17/93;  [run through each one]
!!en:;

!?FU3624589;
;x1 type
;x2 subtype
!!UN:Ux1/x2/-1/1; [Calamity coordinates in v1/v2/v3]
!!DW1:M0/166/6; // hire
!!DW1:M1/164/5; // hire
!!DW1:M2/165/4; // hire
!!DW1:M3/167/6; // hire

!?OB17/93&1000;
!!DW998:M0/166/d; // hire
!!DW998:M1/164/d; // hire
!!DW998:M2/165/d; // hire
!!DW998:M3/167/d; // hire

**Snowman

!#SN:W^HoL_SG^/9; [change here the last value (1-14) for how many you want/week, not more than 14]

!$OB17/95;  [post-visit snowman]
!!HE-1:O?y1; [check hero owner]
!!DW998:O?y2; [check snowman's owner]
!!FU&y1<>y2:E; [exit if not same owner]
!!DW998:M0/173/?y3; [check in y3 number of available monsters]
!!PO998&y3<1:N15; [set PO to 15 to flag object]
!!PO998&y3>0:Ny3; [set to number of remaining monsters]

!#TM2:S1/999/1/255;
!?TM2;
!!OW:C?y1; [check current player]
!!OW:Iy1/?y2; [check if human/AI (0/1)]
!!FU&y2>0:E; [exit if AI player]
!!VRv4:Sc-1%7+1; [check day of the week]
!!SN:W^HoL_SG^/?y3;[what is our custom growth value]
!!UN:U17/95/?y-1;  [How many snowmen we have on map]
!!VRv1:S-1;
!!DO6318445/1/y-1/1&y-1>0:P17/95/v4/y3;[loop them all]

!?FU6318445;
;x1,x2 [dwelling type/subtype]
;x3 [day of the week]
;x4 [your choice]
!!UN:Ux1/x2/-1/1; [snowman in v1/v2/v3]

!!if&x3=1:; [first day of the week]
!!DW1:M0/173/x4;
!!PO1:Nx4;
!!en:;

!!if&x3<>1:; [rest of the week]
!!PO1:N?y1;
!!DW1&y1=15:M0/173/0; [set to 0 if already recruited]
!!FU&y1=15:E; [exit if gremlins recruited]
!!DW1&y1<15:M0/173/y1; [set to y1 if only partially recruited]
!!en:;
____________
Not idly do the leaves of Lorien fall.

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


Admirable
Omnipresent Hero
Wog refugee
posted January 18, 2016 08:17 PM

You can run all scrips on timer 2, if your mod uses it, is a daily timer and is used by most of wog regular scripts, so will not conflict. If I understand well, calamity and snowman are ok, right? Just change the values for snowman to 2 creatures weekly, then make same script for nomads tent, with the object ID changed, + the creature ID + new function ID, to not overlap with precedent.

Then show here result and I will correct if need.

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

Tavern Dweller
posted January 18, 2016 08:48 PM

Did HD mod turn off plugin "inferno gate...", or I do that something wrong?

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


Responsible
Supreme Hero
posted January 18, 2016 09:22 PM

Yes but nomad tent doesn't have the same daily problem with growth.

Let me tell you what I was thinking:

The Snowman has a weird daily growth of Santa Gremlins. If I change the creature that it is recruited, maybe the problem will disappear, since the dwelling doesn't sell any santa gremlins. I know I can just change the creature id in the script, but I was targeting for another solution that would allow further changes in other dwellings as well.

Furthermore, I want to have Nomad tent to sell another creature, since I changed the dwelling in my mod.

So I thought these two changes could be combined somehow in a script that generally changes creature recruits.

Since Natural Calamity has 4 slots now, it could be left out of the script I wouldn't mind.

So I think I'll need a new script entirely, I just posted these scripts to help on the process (if they can).
____________
Not idly do the leaves of Lorien fall.

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


Supreme Hero
Work at Magic Dimmension
posted January 19, 2016 09:23 AM

Knightmare Mods

In amethyst upgrades there is bin patch for Santa Gremlin growth.

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


Responsible
Supreme Hero
posted January 19, 2016 12:42 PM
Edited by Hero_Of_Light at 20:10, 22 Jan 2016.

**EDIT**

@ Salamandre

I tried to edit the script you gave me, so that I can change the creatures recruited for some dwellings. It partially works but there is a small problem. I know where it is BUT I don't know how to fix it. There is a problem with the creatures growth, as they are not stored in different variables. It is noted with red color where it needs fixing. Here is the script:

**Snowman

!#SN:W^HoL_SG^/2;

!$OB17/95;  [post-visit snowman]
!!HE-1:O?y1; [check hero owner]
!!DW998:O?y2; [check snowman's owner]
!!FU&y1<>y2:E; [exit if not same owner]
!!DW998:M0/123/?y3; [check in y3 number of available monsters]
!!PO998&y3<1:N15; [set PO to 15 to flag object]
!!PO998&y3>0:Ny3; [set to number of remaining monsters]

!#TM2:S1/999/1/255;
!?TM2;
!!OW:C?y1; [check current player]
!!OW:Iy1/?y2; [check if human/AI (0/1)]
!!FU&y2>0:E; [exit if AI player]
!!VRv4:Sc-1%7+1; [check day of the week]
!!SN:W^HoL_SG^/?y3;[what is our custom growth value]
!!UN:U17/95/?y-1;  [How many snowmen we have on map]
!!VRv1:S-1;
!!DO6318445/1/y-1/1&y-1>0:P17/95/v4/y3;[loop them all]

!?FU6318445;
;x1,x2 [dwelling type/subtype]
;x3 [day of the week]
;x4 [your choice]
!!UN:Ux1/x2/-1/1; [snowman in v1/v2/v3]

!!if&x3=1:; [first day of the week]
!!DW1:M0/123/x4;
!!PO1:Nx4;
!!en:;

!!if&x3<>1:; [rest of the week]
!!PO1:N?y1;
!!DW1&y1=15:M0/123/0; [set to 0 if already recruited]
!!FU&y1=15:E; [exit if gremlins recruited]
!!DW1&y1<15:M0/123/y1; [set to y1 if only partially recruited]
!!en:;

**Nomad Tent

!#SN:W^HoL_SG^/4;

!$OB17/77;  [post-visit snowman]
!!HE-1:O?y1; [check hero owner]
!!DW998:O?y2; [check snowman's owner]
!!FU&y1<>y2:E; [exit if not same owner]
!!DW998:M0/124/?y3; [check in y3 number of available monsters]
!!PO998&y3<1:N15; [set PO to 15 to flag object]
!!PO998&y3>0:Ny3; [set to number of remaining monsters]

!#TM2:S1/999/1/255;
!?TM2;
!!OW:C?y1; [check current player]
!!OW:Iy1/?y2; [check if human/AI (0/1)]
!!FU&y2>0:E; [exit if AI player]
!!VRv4:Sc-1%7+1; [check day of the week]
!!SN:W^HoL_SG^/?y3;[what is our custom growth value]
!!UN:U17/77/?y-1;  [How many snowmen we have on map]
!!VRv1:S-1;
!!DO6318446/1/y-1/1&y-1>0:P17/77/v4/y3;[loop them all]

!?FU6318446;
;x1,x2 [dwelling type/subtype]
;x3 [day of the week]
;x4 [your choice]
!!UN:Ux1/x2/-1/1; [snowman in v1/v2/v3]

!!if&x3=1:; [first day of the week]
!!DW1:M0/124/x4;
!!PO1:Nx4;
!!en:;

!!if&x3<>1:; [rest of the week]
!!PO1:N?y1;
!!DW1&y1=15:M0/124/0; [set to 0 if already recruited]
!!FU&y1=15:E; [exit if gremlins recruited]
!!DW1&y1<15:M0/124/y1; [set to y1 if only partially recruited]
!!en:;

How do I enter different variable for growth? I don't understand how this command works !#SN:W^HoL_SG^/4;

Can someone please help?
____________
Not idly do the leaves of Lorien fall.

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


Admirable
Omnipresent Hero
Wog refugee
posted January 22, 2016 08:58 PM
Edited by Salamandre at 21:03, 22 Jan 2016.

SN:W vars are latest present from Bersy, kinda unlimited vars, no need to be worried about cloning v10-v1000 anymore.

!#SN:W^HoL_SG^/4;

This means, I set the var with the name HoL_SG to 4. If you look at the first sketch of the script I gave you, it had the comment: set the value to what you need to change growth.

Example:

!#VRv500:S4; we set var v500 to 4 in instructions.
!!IF:M^%V500^; now we ask the value of 500 (will return 4)

The SN:W allows creating custom vars, depending on name. So we replace v500 by HoL_SG (can be anything)

!#SN:W^HoL_SG^/4; set var HoL_SG to 4 in instructions
!!SN:W^HoL_SG^/?y1;  now we ask its value (will be 4)

By changing the value after the / you will get different growth.

I don't have much time now to fix your script (don't know if it is right or not) so now that you what the var means, see if you can make it. If not, I will look later.

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


Responsible
Supreme Hero
posted January 22, 2016 10:15 PM

Thanks for the clarification. It works OK now, I didn't realize this was a new type of variable. I'll put it in good use.

Still, I think the script can be edited and be more efficient in changing the creatures that are recruited by any dwelling. The reason I'm asking is that I encountered another problem with my script:



The problem with the new lineup of Conflux is this:

Since I changed the Conflux lineup and used the previously 4 unused Heroes creatures (122, 124, 126, 128) which are not set to have a dwelling, in maps with random towns (and random level dwellings) the dwelling is not placed in Conflux, because the game doesn't know what dwelling to place.

To clarify. In level 2 creature slot of Conflux, non upgraded creature is no 122. This creature isn't assigned to an external dwelling. And so, (as you can see in image above) no dwelling is placed on map (and in fact it stays green like that in game and is set to blank).

Now, If I changed it to say Halflings (which do have a dwelling) then the Halfling's dwelling would be placed in the area of the random Conflux creature dwelling.

This means, that I need a command (or pluggin) that sets the creatures 122-128 to a default dwelling, so that the new Conflux will work OK in custom maps with a random town placed.

Can anyone help me with that?
____________
Not idly do the leaves of Lorien fall.

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


Supreme Hero
Work at Magic Dimmension
posted January 23, 2016 04:18 PM

let try dwellings.dll

you can add and/or modify all dwellings

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


Responsible
Supreme Hero
posted January 23, 2016 04:33 PM
Edited by Hero_Of_Light at 22:27, 25 Jan 2016.

Thanks for the advice

I was able to make it work now and I pretty much figured it out. Thanks again!

I also found out how to add new dwellings in an old thread in HC. To give a dwelling 4 slots eludes me for now, but it's OK since I managed to edit the script that Salamander gave me.

I also would like to point out that dwelling.dll eliminates the Santa Gremlins growth issue, so If anyone's interested to fix it, now there are two solutions: Salamander's script (that I posted in previous page) and through DWtable.txt (with dwelling.dll)

**EDIT**

I am getting a weird crash in ERA II:

When I start a random single scenario, then all is fine. However, suppose I start the game and at first day (before even clicking on end of turn) I decide to create another random map. Then, the second random map is never created, as WoG crashes and shows this message:

Access Violation. Attempt to {read} the inaccessible data at {0x30303038}

The Latest Executed ERM Receiver:

FU&y1=0:E;

!!CM:I?y1;
!!FU&y1<>12:E;
!!SN:W^IsAutosave^/1;

!?GM1;
!!UN:P999/?y1;
!!FU&y1=0:E;

Has anyone experienced the same problem?
____________
Not idly do the leaves of Lorien fall.

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


Admirable
Omnipresent Hero
Wog refugee
posted January 25, 2016 10:33 PM

Try to reduce mods one by one until the error doesn't occur again, so at least you get an idea from where is coming. The code is from quick saves script but is not relevant to error, also are there any DLL you use? Usually those are little tested.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread » This Popular Thread is 407 pages long: 1 50 100 150 200 250 ... 284 285 286 287 288 ... 300 350 400 407 · «PREV / NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.1127 seconds