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...
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...
@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
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)
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.
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"
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
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
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.
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
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
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!
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!
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.
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.
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.
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