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 ... 197 198 199 200 201 ... 250 300 350 400 407 · «PREV / NEXT»
Salamandre
Salamandre


Admirable
Omnipresent Hero
Wog refugee
posted April 01, 2013 02:18 AM
Edited by Salamandre at 02:20, 01 Apr 2013.

Well, I don't know for sure how it works because erm scripts load after the heroes are placed on map, but you can do the follow:

Check if starting hero is catherine (CA:H#/$), if yes, change class/army on first day. If not Catherine, place her in tavern (OW:V) on day one and change class/army.

Not sure what you are trying, but looks to me easier to just change portrait of a conflux hero, name it Catherine and change specialty.
____________
Era II mods and utilities

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


Supreme Hero
Work at Magic Dimmension
posted April 01, 2013 11:42 AM

he is trying to add a campaign hro to conflux. under some wog options there is possibility to start with campaign hero if random hero is choosen as start hero. I suggest to look to the script of campaign heroes something, and learn from there and mayb include modified version in your mod.

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


Known Hero
posted April 01, 2013 11:58 PM

I would like to balance the number of heroes for each faction. But I think it's too hard for me...
I will think of something else  

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


Admirable
Omnipresent Hero
Wog refugee
posted April 02, 2013 01:08 AM

To reduce the number of heroes each faction can hire, is not hard, disable them.
____________
Era II mods and utilities

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


Hired Hero
posted April 02, 2013 02:04 PM
Edited by Caagr98 at 14:20, 02 Apr 2013.


This script is supposed to make it so that every time you step on an unexplored patch of terrain, all neighboring terrain tiles of the same type are automatically explored. It works fine, except that if the terrain patch is at the edge of the world, it gives a stack overflow error... No, the problem isn't that I use some used !?FUs, it's supposed to be used in a custom map. Also, I'm aware that it might work poorly for the AIs. Wait, doesn't the AI know the entire map at the start?

[url=http://pastebin.com/FXLXCixX]Link to Pastebin[/url] (I don't want to post a wall of text here)

Also, the file "/Help/zvs notes.txt" seems to mention some kind of local functions and a few other useful things, but they don't seem to be implemented?

EDIT: I'm using ERA 2.4, by the way.

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


Supreme Hero
Work at Magic Dimmension
posted April 02, 2013 03:30 PM

you are right - local functions are not implemented in ERA. It's bacause ERA bases on stable TE, while this functionality were added in later unstable beta/alfa... although some useful things from zvs notes are implemented in ERA.

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


Admirable
Omnipresent Hero
Wog refugee
posted April 02, 2013 03:33 PM

Looks like script never exits sometimes,  a simple test message in each function will show you that both function run infinite loop, this is your overflow.

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


Hired Hero
posted April 02, 2013 03:51 PM
Edited by Caagr98 at 16:08, 02 Apr 2013.

Quote:
Looks like script never exits sometimes,  a simple test message in each function will show you that both function run infinite loop, this is your overflow.

Yes, I know that stack overflows are caused by infinite recursion. But I don't know why it doesn't work. If I remove this part:

!!UN:X?y8/?y9;//Check if outside boundaries
!!FU&x1<=0:E; //West
!!FU&x1>=y8:E;//East
!!FU&x2<=0:E; //North
!!FU&x2>=y8:E;//South

it says that the coordinates are outside the grid (in java, I guess it would be an ArrayIndexOutOfBoundsException or another kind of IndexOutOfBoundsException, but I guess that's not relevant). Maybe !!PO:N doesn't update instantly or something?

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


Admirable
Omnipresent Hero
Wog refugee
posted April 02, 2013 03:58 PM

I tested it briefly and is not about edge, can occur anywhere, hard to say if about terrain type or special coordinates. But to find out, I would save right before the step crashing the game and add checks for vars storing coordinates then display them.
____________
Era II mods and utilities

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


Hired Hero
posted April 02, 2013 04:21 PM
Edited by Caagr98 at 16:23, 02 Apr 2013.

I noticed that it happens if you try to use it at too large areas.
I think it's because it uses a stack instead of a queue, so when it finds a new square, it instantly checks that one, and from that one finds some more, etc, instead of getting done with the current square first.

Comparision:
(X is hero, numbers are stack depth, -| are movement, . is nothing)
(NOTE: double size to be able to show the lines, grid is 3x3, not 5x5)

Stack:
X-1-2
....|
7-8.3
|...|
6-5-4

Queue:
X-1-2
|.|.|
1.2.3
|.|.|
2.3.4

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


Admirable
Omnipresent Hero
Wog refugee
posted April 02, 2013 04:27 PM
Edited by Salamandre at 16:28, 02 Apr 2013.

If I understand well what you want to do, it does not matter area is large or small, script is checking only adjacent squares, right?
____________
Era II mods and utilities

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


Hired Hero
posted April 02, 2013 04:34 PM
Edited by Caagr98 at 08:34, 03 Apr 2013.

Quote:
If I understand well what you want to do, it does not matter area is large or small, script is checking only adjacent squares, right?
Not really... First, it checks the adjacent squares, and marks those as checked, and then it checks those squares' neighbors, ETC. Currently it does it through recursion, but I'd prefer to be able to use a queue to store the squares in, because that would likely be both faster and cause less crashes.

For example, let's use this map.

The green dot is the player.

When the map starts, it should look like this:

The red is opened on the map.

When I move to the lava area to the right, the darker-red squares are opened.


However, if you try to move to the large grass area, it crashes because there are too many squares to loop through, and the stack can't handle that many.


Also, I know that you can use !!UN:C6547928/4/0; to set the hero scouting radius to 0, but is there any way to set it for castles and other hero-owned stuff? And redwood observatories?

And is there any way to check the subtype of the visited object in an !?OB trigger?

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


Admirable
Omnipresent Hero
Wog refugee
posted April 03, 2013 08:35 AM
Edited by Salamandre at 08:39, 03 Apr 2013.

The only ones who know how to seek for UN:C magic are OxFea, JimV and Bersy. You should ask them, this is quite undocumented area. Of course you can work around by disabling redwood observatories or anything else (for castles I don't know how), then script their effect manually.

!!OB998:U?y1;
____________
Era II mods and utilities

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


Hired Hero
posted April 03, 2013 09:57 AM
Edited by Caagr98 at 11:00, 03 Apr 2013.

...Why didn't I think of !!OB998:U... I feel stupid looping through all objects and checking their coordinates.
Also, is there any way to disable a secondary skill, and to change a level 7 dwelling (the map type, not town type) to the corresponding level 8?

EDIT: The subtype is good to know, but I meant the number of the object. I think I saw some recever for getting an obelisk's number in the other objects page, but how do I get it for other objects? And what is !!OB:C?

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


Admirable
Omnipresent Hero
Wog refugee
posted April 03, 2013 10:18 AM

Hidden skills script is a good example on how to prohibit a skill being offered, there are also text files (Hctraits.txt) in which you can set the probability to be offered to null. To change a dwelling to another, delete with UN:O then add with UN:I.
____________
Era II mods and utilities

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


Hired Hero
posted April 03, 2013 11:16 AM
Edited by Caagr98 at 12:35, 03 Apr 2013.

Okay, but I meant stop them from appearing in witch huts, universities, level ups, and some other places, not just level ups. You can disable them in h3wmaped.exe->Map Specifications->Secondary Skills, and you can do pretty much everything you can do with the editor through ERM, so why can't you disable skills?

...Does the DW reciever target the yellow square or the bottom right corner? They aren't always the same.

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


Admirable
Omnipresent Hero
Wog refugee
posted April 03, 2013 11:22 AM

Who said you can't? You have several tools: editor, but skills will still be offered if hidden, so fix this thought hidden skills. If you use editor restrictions, I believe skill will not appear in universities or huts, but if it does, check each of those objects and change to something else. And as last tool, you have HCtraits.txt in the lod, where you can set every faction percentages. If for example you set them to never be able to learn fire, the skill will be in red when you visit in universities or conflux special dwelling.

There are bunch of tools to get what you seek for, which one you use depends of exactly what you seek, skill being offered but not in huts, etc.
____________
Era II mods and utilities

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


Hired Hero
posted April 03, 2013 12:41 PM
Edited by Caagr98 at 12:48, 03 Apr 2013.

I want to disable it through ERM, so I don't have to do it for every map, and modifying the HCTraits (and other TXT files) might cause incompatibility with other mods (even through CR and AR are more risky that HC).

EDIT: I did some tests, and it seems that it's the yellow square that counts as dwelling, for some reason.

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


Supreme Hero
Work at Magic Dimmension
posted April 04, 2013 03:30 PM
Edited by majaczek at 21:18, 04 Apr 2013.

Quote:
The only ones who know how to seek for UN:C magic are OxFea, JimV and Bersy. You should ask them, this is quite undocumented area. Of course you can work around by disabling redwood observatories or anything else (for castles I don't know how), then script their effect manually.

!!OB998:U?y1;


not fully true. seeking for memory patch is much easier with wog sources as guide (if you touch wog things) and it's moderately hard to use olly debugger (with disasembler). I myself found about 5 or so memory codes. But I prefer use binmagic files than un:C. but I must admit it required a bit of training.

When i would be doing huge mod with amethyst, and amethyst 2 wouldn't come, I'll try to make patch for stack experience to work on new creatures (there is two limits - one 255 and one not changed in amethyst).

======================================================================

edit: but i still have some newbie questions for erm :P... How to make  battlefield script network compatible without disabling it for network battles? :)


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


Hired Hero
posted April 05, 2013 07:43 AM
Edited by Caagr98 at 08:08, 05 Apr 2013.

Quote:

not fully true. seeking for memory patch is much easier with wog sources as guide (if you touch wog things) and it's moderately hard to use olly debugger (with disasembler).


I do have the WoG sources (are they the full sources, or the changes from vanilla?), but how does that help? Also, is there any source code for Era?

EDIT: In _B1.cpp, there seems to be a list of stuff that could be memory addresses.

 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 ... 197 198 199 200 201 ... 250 300 350 400 407 · «PREV / NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.5438 seconds