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 ]
New Server | HOMM1: info forum | HOMM2: info forum | HOMM3: info forum | HOMM4: info forum | HOMM5: info forum | MMH6: wiki forum | MMH7: wiki forum
Heroes Community > MapHaven Guild > Thread: [H3] The Mapmaker's Thread
Thread: [H3] The Mapmaker's Thread This thread is 10 pages long: 1 2 3 4 5 6 7 8 9 10 · «PREV / NEXT»
RoseKavalier
RoseKavalier


Responsible
Famous Hero
posted June 11, 2016 12:34 AM

Right, step one is not necessary if you use the compiled script. I am leaving it there for people looking to customize the hotkeys or range of tiles possible.

Regarding WoG trick eight, there is a solution that doesn't require tampering with individual objects.


Lets you place anything anywhere with no restriction whatsoever.

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


Famous Hero
the Bobler
posted June 11, 2016 12:47 AM

Thank you for that simplified solution! I never checked out all those special tabs in the WoG Editor Do you leave that option up all the time though? I feel one will probably screw up by accident if that happens...

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


Responsible
Famous Hero
posted June 11, 2016 02:51 AM

Hahaha, that's why you keep various save versions... you seem pretty good at it v24.2

But really, what is there to screw up? With enough patience, anything can be fixed!

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


Admirable
Omnipresent Hero
Wog refugee
posted June 11, 2016 10:08 AM
Edited by Salamandre at 10:16, 11 Jun 2016.

Place objects everywhere can indeed screw if you start pilling tons of visitable objects with decorations, ie place 37 mountains on 42 learning stones.

But within decent design, there is no harm, only advantages. I have it ON all the time.

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


Supreme Hero
posted June 11, 2016 12:33 PM
Edited by bloodsucker at 13:40, 11 Jun 2016.

I'm glad I can ask this faraway enouch not to fear to be stoned to death...
There is a button in editor that allows for automatic filling of areas, do you ever use it or even consider the possibility?
Cause some time ago Sal said a good map takes about a year and I have already spent a few months in projects I abandonned before they got finnished but I never draw the maps, they were created with the RMG. If I had to add the test of objects for each square as I think I'm seeing here, it would take me a  lifetime.
How long does it take for you to design a (non-trickery) zone? It's a bit like asking Leonardo how long did he took to draw Monalisa, so I can have an estimative of how long will I take to draw Donald Duck but is the best I can do at the moment...

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


Known Hero
professional ERMô scripter
posted June 11, 2016 02:05 PM
Edited by potmdehex at 14:08, 11 Jun 2016.

To allow placing objects anywhere in H3 Complete editor, put the following bytes at 0042650E (you may also search for Hex string '53 56 57 75 30 8A 45 0F' and go back to 55 PUSH EBP):

Old Bytes:
55 8B EC 81

Address   Hex dump          Command                                  
0042650E      55            PUSH EBP                                
0042650F      8BEC          MOV EBP,ESP
00426511      81EC E0000000 SUB ESP,0E0

New Bytes:
31 C0 40 C3

Address   Hex dump          Command                                  
0042650E      31 C0         XOR EAX,EAX
00426510      40            INC EAX
00426511      C3            RETN



For anyone who doesn't know x86 assembly, this replaces the editor's IsPlacementValid() function with the following:

bool IsPlacementValid()
{
   return true;
}

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


Admirable
Omnipresent Hero
Wog refugee
posted June 11, 2016 09:09 PM

@potmdehex, would be possible to you to find the address which prohibits mage guild inspection if the hero does not have a book?

Is weird that we can inspect mage guild anytime, except when a hero without book is in town. The question "do you want a book" should come, then if you click yes or no, show the guild regardless.
____________
All my Era II mods

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


Promising
Legendary Hero
fallen artist
posted June 11, 2016 09:46 PM

Quote:
0042650E      31 C0         XOR EAX,EAX
00426510      40            INC EAX
00426511      C3            RETN

Lol, what a hack
____________

The future of Heroes 3 is here!

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


Known Hero
professional ERMô scripter
posted June 11, 2016 10:17 PM
Edited by potmdehex at 19:58, 12 Jun 2016.

Salamandre:

Before:


After:


First replacement (not enough gold case):
Search for hex string 8B 89 58 03 00 00 53 6A 08 6A FF 6A FF BA 01 00 00 00
Replace 5F 5E 5 bytes ahead with EB 74

Second replacement (Yes/No case):
Search for hex string 8B 80 5C 03 00 00 53 6A 08 6A FF 6A FF BA 02 00 00 00 8B C8
Replace A1 80 5 bytes ahead with 74 2C (the '80' byte can have a different value depending on version, doesn't matter)

Warmonger:
100% standard. Welcome to the jungle, we've got asm and games (and no C++/Boost).

EDIT: Didn't notice I missed skipping the -500 gold instruction when I quickly threw this together yesterday, updated bolded offets to skip it.

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


Admirable
Omnipresent Hero
Wog refugee
posted June 11, 2016 10:20 PM

Thanks
____________
All my Era II mods

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


Hired Hero
posted June 11, 2016 10:46 PM
Edited by Nikos at 22:56, 11 Jun 2016.

Biobob said:
(...)

Also, here is a little teaser which shows off some mechanics we will discuss in the next article...it is a little adventure, just driven by story.

Download
~The Works~

Greets



I tried to download it and I got this message: "This site has been disabled for violations of our Terms of Service. If you feel this disabling was in error, please fill in our appeal form" and then this message: "Forbidden Error 403"



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


Famous Hero
the Bobler
posted June 12, 2016 05:44 AM

That's strange; well, Google recently wanted me to verify my account, which I didn't do yet (don't want them to have my phone number), so that's probably the reason. I'll try verifying it, if that doesn't work, I'll gladly accept Sal's offer

Greets
____________
Maps
The Mapmaker's Thread

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


Admirable
Omnipresent Hero
Wog refugee
posted June 12, 2016 08:12 PM

potmdehex said:
EDIT: Didn't notice I missed skipping the -500 gold instruction when I quickly threw this together yesterday, updated bolded offets to skip it.


Plugin is already done and is taking care of both situations -posted in era thread, thanks.

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


Responsible
Famous Hero
posted June 25, 2016 07:21 AM
Edited by RoseKavalier at 06:26, 10 Dec 2016.

On experience levels

TL;DR

You can limit levels at 88, 100, 108 and 868 by setting these restrictions.

Restriction -- Level -- Max Exp (Safe gain)
Quote:

75  --  88 --  1,810,034,207 (337,449,441)
89  -- 100 --  2,079,739,175 (67,744,473)
101 -- 108 --  2,099,639,276 (47,844,372)
109 -- 868 --  2,144,641,867 (1,911,812)
187 -- 108 --  2,144,433,332  (3,050,316)



Beware that if you are offered a single-time experience amount over (2^31 - Max_Exp), experience will still overflow. There are more restrictions that allow stable levels but I've limited this to the most useful ones.

Either of the 75, 89 or 101 restrictions should prove the safest for your maps.

###

As some of you may be aware, hero levels behave as expected up until 74. That is, once you gain enough experience to advance to the next level, your hero's level increases by 1. However, when your hero gains the necessary experience* to gain access to level 75, hero levels start becoming unstable and you will instead level all the way to 88! Similarly, gaining enough experience at 88 will bring you to level 100.

*The use of 'Tree of Knowledge' should stop at level 88, because any further use will bring your experience in the negatives (-2 billion).

Here is a partial list of "stable" levels and the required experience to get there.
Level -- Experience
Quote:
74     1,508,362,195
88     1,810,034,207
100    2,073,739,175
108    2,099,639,276
868    2,144,641,867
3732   2,146,553,679
5920   2,146,673,313
6424   2,147,293,156
Inf/0  2,147,483,648



As you may see, there is a very thin margin between level 868 and 6424, just a bit more will render your hero virtually useless.

So why is this of any interest? Simple, the heroes that gain bonuses based on their level (Crag Hack, Tazar, Dessa, Orrin, etc) are sometimes required to get at high levels to fully enjoy the benefits they provide. The real problem is, limiting experience is a frustrating and difficult thing.

There is indeed an existing function in the map editor that allows you prevent heroes to level beyond a given point. It works pretty much as you'd expect as many have undoubtedly experience in the campaigns - if you input level 6 as maximum, then heroes may not acquire any more than 6,200 exp and will never get to level 7.

Unfortunately it's not that simple for levels beyond 74. If you input 99 as maximum, your heroes will be limited to 0 and have massive negative experience.



This leads me to share my latest findings, which I have not seen documented prior. While inputting level 99 does not have the expected outcome, there are some interesting caps that can be forced by using restricted levels between 74 and 99. It's not perfect as I will show later, but it's the best I've seen so far.

First, restricting level 75 will not allow heroes to level beyond 88. This is quite useful! Here is a list of non-negative levels that can be attained from my limited testing.

Restricted Level -- Actual Limit
Quote:
75 - 88
80 - 63
81 - 72
84 - 70
86 - 68
88 - 65
89 - 100
92 - 66
94 - 54
95 - 74
97 - 88
100- 65**
101- 108**
171- 108**
187- 108**
247- 108**

**Requires hex editing.

So what's happening exactly here? From my observations, restricting levels forces the game to place a hard cap at a certain experience value. For example, look at these restricted levels and matching maximum experience:
Restricted level -- Maximum Experience -- Experience difference
Quote:
76 -2,122,926,675 -
77 -1,688,518,979 434,407,696
78 -1,167,229,744 521,289,235
79 -541,682,662 625,547,082
80 +208,973,836 750,656,498


It seems the game is correctly computing the required experience for the following level, if you look at the experience difference, it is multiplied by 1.2 each time... 434,407,696*1.2 = 521,289,235. This works for a while. Once experience goes over 2^31, it reverts back to -2^31 and you can continue counting from there. With this I was able to predict a few levels starting from restriction at 76, minus small rounding issues I didn't bother fixing.

Restriction -- Max experience -- Experience Difference
Quote:

76 -2,122,926,675 -
77 -1,688,518,979 434,407,696
78 -1,167,229,744 521,289,235
79 -541,682,662 625,547,082
80 +208,973,836 750,656,498
81 +1,109,761,633 900,787,797
82 -2,104,260,307 1,080,945,356
83 -807,125,880 1,297,134,427
84 +749,435,432 1,556,561,312
85 -1,677,658,290 1,867,873,574
86 +563,789,998 2,241,448,288



At 87, my prediction was -1,041,439,353 exp but the game says -1,900,432,811 which is a significant problem. This is an issue with overflowing the extra experience difference between 86&87, as well as 87&88. It seems to me the game takes 100% of the previous value and separately adds 20% to it, but I'm not sure where the overflow happens afterward.

One last thing I found which you can see in the video, if the hero's current experience PLUS gained experience exceed 2^31, the experience will overflow even if there is the restriction protection active. This means the game first adds the gained experience to current experience and compares it to calculated limit... if it remains positive you'll get 'Cannot gain additional experience' message but if it becomes negative the number is certainly smaller than the limit and thus overflow occurs.

So far my research has found safe levelling to 100 and 108 as summarized earlier. If someone is competent enough to let me know how to hex edit beyond level 255 (only 1 byte allowed, I don't know how to change this) then I can look further. Of course, figuring out the way the limit experience is calculated would save a lot of time.

###

Restriction = 89, levelling to 100 safe!

Start


Gain experience a few times


Glitches to 88


Gain some more experience


Glitches to 100


Any more experience is discarded




###

EDIT: searched all the way through 255 restrictions... can't do more without figuring out how to add a second byte to restriction level.

EDIT2: it seems I accidentally skipped a stable level 868 by inputting level restriction 109. However, a mere 2M experience will send the hero into negative overflow - beware!

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


Admirable
Omnipresent Hero
Wog refugee
posted June 25, 2016 07:42 AM
Edited by Salamandre at 07:46, 25 Jun 2016.

We created yesterday a script (and that was not easy) which stops the experience gain when you are at a certain  level (you choose). So now playing at 100/108 or 6000+ levels is possible, without the danger of bug (back to zero). Is already available for Deadlift map.

So its funny that you come with same solution at same time (thats timing baby!), as probably that script uses same address.

Also is not recommended to use a tree when you are at 74, at least for me, it brings me back at 0, not at 88.

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


Responsible
Famous Hero
posted June 25, 2016 04:46 PM

Hehe that's indeed funny! In any case, I'll try to complete my work on this as it is useful for non-ERM situations. I'll edit the initial post as I check things.

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


Famous Hero
the Bobler
posted June 26, 2016 08:42 AM
Edited by Biobob at 12:28, 26 Jun 2016.

Interesting Findings here! The problem however is, that this method will lock you from putting level 868+ heroes to the map, because all initial experience is also reset by this...this disables some creative battles

It would be nice if a method was found to save the human player from overlevelling while still allowing the setting of level 868+ heroes...

Biobob said:

Placing out-of-map heroes and 'preventing map editor view

Today I am going to show you two neat tricks that are useful and do not require hex editing!

Placing a hero out of boundaries

It is possible to set a hero that is not actually on the map! Start by placing a hero:



Next, Right Click -> Advanced Properties on the hero. Remove the yellow 'entrance' square, so that he will be completely blank:



Upon starting the map, he simply vanishes, but we are still in the game:



However, after clicking the 'end turn' button, we are thrown to the title screen without any further notice:



Now, if you place another hero or town, suddenly the previously vanished hero will appear in the heroes bar:



He cannot do anything however...but he is able to town portal into the map:



This can be a nice feature for story driven maps, I'll let you figure out some uses yourself

Preventing map editor usage without hex editing

This is a honest mans attempt at trying to hide things in the editor without actually making it impossible through hex editing (which will probably be covered another day).

First, place an event:



Next, place any of the big terrain items and copy its sprite name:



Back to the event (Right Click -> Advanced Properties), paste the sprite name in and remove the one visitable tile.



Now, we can use this eventcloud to hide things in the map, since it covers a wide area:



In the map however, events are not visible, so all will be fine:



You can make this 100% bulletproof by placing zounds of such events over each other, but it eats up a lot of objects which makes you approach the maximum (32767) much sooner...it is however a nice and easy quick solution.



Greets

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


Admirable
Omnipresent Hero
Wog refugee
posted June 26, 2016 12:37 PM

Biobob said:

It would be nice if a method was found to save the human player from overlevelling while still allowing the setting of level 868+ heroes...



In Era you can, as it is hero ID related. One hero can be restricted to 10th level, another to 88, another to 108 and so on.

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


Supreme Hero
posted June 26, 2016 01:04 PM

Is there a way to make an event work differently for AI and player? What I wanted was to create different fights, one sustainable after a while, so AI can pass and another impossible, so human player can't but it has to be in the same hex.

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


Admirable
Omnipresent Hero
Wog refugee
posted June 26, 2016 01:10 PM

In Vanilla, event fights for AI are unpredictable, from my experience. I wanted this so much for ToP so put an AI with tons of level 7 then added 5-10 events with small fights for him, to see how much it looses. Once he died on second, once he died on 5th, once he survived all with no loss. I couldn't explain whats going on so I gave up.
____________
All my Era II mods

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread » This thread is 10 pages long: 1 2 3 4 5 6 7 8 9 10 · «PREV / NEXT»
Post New Poll †† Post New Topic †† Post New Reply

Page compiled in 0.0877 seconds