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 5 - Modders Workshop > Thread: Question and Answer Topic: Modder's Workshop
Thread: Question and Answer Topic: Modder's Workshop This thread is 8 pages long: 1 2 3 4 5 6 7 8 · «PREV / NEXT»
sfidanza
sfidanza


Promising
Supreme Hero
posted December 03, 2007 10:12 PM

@Kronos: I HCM'ed you my comments

@Maurice:
"for index, type in types do"
has the effect of going through the array, with "index" getting the key and "type" the value. So "types[index]" is actually the same as "type" (at least to read the value).

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


Promising
Supreme Hero
posted December 03, 2007 10:15 PM
Edited by sfidanza at 22:18, 03 Dec 2007.

@InfernoX880: what do you want to do? (there might be an easier way than what you're thinking)
The experience for each level is in the manual (any version), at the end of the Hero Development section:
http://www.heroesofmightandmagic.com/heroes5/game_manuals.shtml

Edit: I think I might have misunderstood your question.
What you want is the .xdb file in data.pak where the values are specified? Then the answer would be nowhere. As far as I know, it's hard coded in the exe.

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

Hero of Order
Part of the furniture
posted December 03, 2007 10:18 PM

Doesn't the for index, type in types assign the number of types to type, and then lets the index run between 1 and type? That type defines the maximum array size?

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


Promising
Famous Hero
posted December 03, 2007 10:21 PM
Edited by InfernoX880 at 22:23, 03 Dec 2007.

Trying to change the experience requirements at higher levels (because I think that needing hundreds of millions of EXP to level up is ridiculous). If possible, I would also like to extend level cap to 50.

So basically instead of say 2071850 to get to level 32, I would change it to 600 thousand or so. Make it possible but still difficult to level up. Please don't tell me about what a stupid idea you think  that is. If there's one thing that frustrates me abuot the game its this to the point where I actually learned to mod to change it.

Like I said, I know you can change the EXP per creature killed easily but that makes leveling up in lower levels too easy. I have an interesting mod already made if you want to try it out:

http://www.badongo.com/file/5396900

Edit: Sorry didn't read your post to the end. All right, I'll just stick to my idea then. Maybe I'll get it to work somehow.

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


Promising
Supreme Hero
posted December 03, 2007 10:36 PM

@InfernoX880: your idea is not stupid. And it's your mod anyway, so nobody would be forced to use it. I only said that the experience levels were not specified in data.pak, and thus were not moddable (as far as I know).
What you could do however, is make a script using the HERO_LEVELUP_TRIGGER trigger. Each time a hero levels up, you could give him a bonus to reduce the remaining gap to next level. In your example, at level 31, the bonus would be about 400,000.


@Maurice: "for" has two syntaxes. The one you're referring to is:
"for i = 1,10 do"
which loops with "i" taking the 1 to 10 values successively.

The second syntax is the array/object iterator, which works as I said:
"for index, val in my_array do"
if my_array is the following array:
my_array[1] = 150
my_array[2] = 76
my_array[3] = 0
then index will take the 1, 2, 3 values, while type will take the corresponding 150, 76, 0 values.
If you know php, that's similar to the foreach construct.

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


Promising
Famous Hero
posted December 03, 2007 10:53 PM

I'm not that great at modding but your proposal sounds fine. If you could please explain it in a more basic way (I only do basic things like change unit cost) I would be very grateful.

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

Hero of Order
Part of the furniture
posted December 03, 2007 11:15 PM
Edited by Maurice at 23:29, 03 Dec 2007.

Gotcha. I am not familair with php, I only know C, C++ and the likes. The second syntax for the for-loop is not used in those languages (at least not to my knowledge), so I am unfamilair with that way of writing the code. I'd say it's awkward to do it that way .

Edit:

Anyway, I think I see the problem after more careful analysis. When the Hero has enough points for the monster stack to always join the Hero, you call this one:

MakeHeroInteractWithObject(heroname, objectname)

to force the interaction with the monsters offering to join. However, you didn't yet disable the touch script in your main body:

Trigger(OBJECT_TOUCH_TRIGGER, Creature, "CustomCombat1")

Before you call the Hero interaction, you need to disable this touch trigger. I think that if you put it this way:

Trigger(OBJECT_TOUCH_TRIGGER, objectname, nil)
MakeHeroInteractWithObject(heroname, objectname)


that it should work.

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


Promising
Supreme Hero
posted December 03, 2007 11:57 PM

@InfernoX880: Do you have some experience with scripts already?
Here's a sample code that will demonstrate the idea. You can download this sample map (Duel-test) to see it live (and open the console in the map):
dagobah-storage.com/temp/A1S1-test.h5m
------------------------
level_boosts = { 0, 200, 400, 600, 1000 }

function onLevelUp()
current_level = GetHeroLevel(heroname);
print("hero level up! Now level "..current_level);
ChangeHeroStat(heroname, STAT_EXPERIENCE, level_boosts[current_level]);
end;

print("Player: "..GetCurrentPlayer());
heroes = GetPlayerHeroes(GetCurrentPlayer());
for i, hero in heroes do
print(hero);
end;

heroname = heroes[0]
Trigger(HERO_LEVELUP_TRIGGER, heroname, "onLevelUp");
------------------------

There are however a few shortcomings that we can see:
- the trigger has to be set per hero. It's easy for beginning heroes. For heroes hired later, there's another trigger (PLAYER_ADD_HERO) that will be needed.

- the onLevelUp() function doesn't know which hero leveled up. So you will need one trigger function per possible hero. All of them can of course call one function that will give the exp boost.

- if the map original script uses the HERO_LEVELUP_TRIGGER, it will replace this one, and the hero will not get the boost.

Of course, I'll walk you through the rest of the process if you wish.

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


Promising
Supreme Hero
posted December 03, 2007 11:59 PM

Quote:
Anyway, I think I see the problem after more careful analysis.

It's exactly what I told Kronos by HCM.
Seems we agree on the remedy, then. Let's hope we're right.

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

Hero of Order
Part of the furniture
posted December 04, 2007 12:12 AM
Edited by Maurice at 00:14, 04 Dec 2007.

Quote:
Quote:
Anyway, I think I see the problem after more careful analysis.

It's exactly what I told Kronos by HCM.
Seems we agree on the remedy, then. Let's hope we're right.


Otherwise we both need to head back to the drawing board and learn some more scripting . I only skimmed the function fast, when I noticed the - to me - odd for-loop in it. After your explanation, I really examined the structure of the function and realised the intention behind it. It's a nice one, for sure.

Still, coming to think of it ... the first branch sets the monster mood to always join and forces interaction with the hero. Isn't starting the combat also easily done through that? Just determine if the monsters should join or not, based on the Diplomacy and Leadership skills, then set the mood properly (always join or always fight) and then force the interaction between Hero and creature stack. Less code, and it does the same.

Catching off the combat result shouldn't be all that hard; it's done on at least one occasion in the campaigns as well.

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


Promising
Supreme Hero
posted December 04, 2007 12:28 AM

Again, it seems great minds think alike...
I'll explain the answer Kronos gave me (I hope he doesn't mind): the purpose of the script is to launch the combat on a specific combat arena (which the StartCombat() does not do yet in the sample), on ToK new terrain type.
Of course, having a way to directly assign a combat arena to a specific terrain would be easier (a "new" terrain type - changing the combat arena of an existing terrain type would require only editing the corresponding combat arena files).

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


Hired Hero
posted December 04, 2007 07:01 AM

when you are editing a skin/texture for a model, do u need to do the animation, because i cant see mine

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

Hero of Order
Part of the furniture
posted December 04, 2007 09:48 AM

Ahh, I figured as much, but I didn't see the assignment to the specific arena in the StartCombat function . You could even catch this off by just setting the tile below the monster stack to the proper terrain type and thereby force the arena that way. The texture of a single tile is hardly noticable and can easily be masked by terrain dressing (grass, flowers) which are passable but cover the texture of the tile to some degree.

But I don't know the full details on the ToK campaign(s) and Kronos' ideas - it's just a random idea I just had.

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

Tavern Dweller
wizard
posted December 05, 2007 08:19 AM

can you teach me how to hack heroes 5 so that i can let my troops travel, wander around and guard castles without any hero and vice versa? please teach the desperate! show me tutorial links please.

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

Hero of Order
Part of the furniture
posted December 05, 2007 10:26 AM

You seem pretty desparate about getting that feature. Why the drive to get that in the game?

As Sfidanza already pointed out to you earlier, there hasn't been a way to get this done, no one has found anything that could make this possible. Keep in mind that this is something that according to me digs quite deep into the game mechanics. This isn't HoMM4, this is HoMM5.

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


Promising
Supreme Hero
posted December 05, 2007 11:49 AM
Edited by sfidanza at 11:49, 05 Dec 2007.

@heroes: I'll copy the answer I already gave you here as this is actually the thread to ask such questions. However, this is your 5th post in HC, and 5 times you asked the same question (+by HCM and email). You have to understand that this answer is final. If you post the same question again, I'll delete your post.

My honest opinion is that a mod allowing creatures to wander without a hero on the adventure map is NOT possible.
If you want a hero alone, just give him one unit, it's close enough.
And troops can already be garrisoned in a city and defend it without a hero.

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

Tavern Dweller
wizard
posted December 06, 2007 11:32 AM

ok, sorry i thought you knew how to alter the game codes but were just denying me because it's hard to explain altering game codes.  but i just learned you don't know and no one has ever discovered to hack my wish. i promise not to post same question again.

this is a different question: how do you set the game to easy mode/easy level/novice?

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


Promising
Supreme Hero
posted December 06, 2007 11:59 AM

Go into the Single Player menu. On the left, you then have the user block, with your difficulty setting that you can change (Easy, Normal, Hard, Heroic).

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

Tavern Dweller
wizard
posted December 06, 2007 12:26 PM

there are only 3 levels

i did what you said but there were only 3 levels : normal, hard and heroic. i already played the normal mode but it is still difficult and the enemies were too numerous. i want an easy level because i don't master the game yet.

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


Promising
Supreme Hero
posted December 06, 2007 01:48 PM
Edited by sfidanza at 12:35, 07 Dec 2007.

Indeed, the easy level has been added in a patch (I think 1.1, maybe 1.2). So this means that you play with H5 original (no HoF or ToE), and never installed a patch. Is that it?

I advise you to install the latest patch (1.6). To do that, you will need to first install patch 1.4 (it contains all the previous ones), and then 1.5 and 1.6. Patch 1.4 will add an updater tool in your StartMenu (with the other Heroes shortcuts), so you will be able to use this if you prefer.

To download patch 1.4, you can go to
http://patches.ubi.com/heroes_might_magic_5/
and look for the _1.04 links: choose the one corresponding to your language (ask here if you're not sure, the files are about 100Mb).

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

Page compiled in 0.0499 seconds