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 > Heroes 3.5 - WoG and Beyond > Thread: [Wake of Gods] - Introduction/Modding/Scripting
Thread: [Wake of Gods] - Introduction/Modding/Scripting This thread is 33 pages long: 1 2 3 4 5 ... 10 20 ... 29 30 31 32 33 · «PREV / NEXT»
gnollking
gnollking


Supreme Hero
Supreme Hero
posted April 30, 2010 06:49 PM
Edited by gnollking at 19:03, 30 Apr 2010.

How to make an artifact with ERM - Part 3

On this part, we will not use the previous script, we will edit the Golden Bow (#91).
I want to do so, that when hero equips the Bow, he will get Expert Archery skill (and the normal bonus).
So, the first line is (always):

ZVSE

After that, we add the hint text of the artifact, when right-clicked on hero's inventory:

!#VRz10:S^{Golden Bow}

When wielded, the Golden Bow allows your troops to shoot through any obstacle or at any range without penalty, and grants you the {Expert} {Archery} -skill.^;
!#HT5/91:T10;


As I have said earlier, text in the middle of "{" and "}" is shown in golden.
Next, we move to the actual bonus, giving the Expert Archery skill.
I'll post the whole code at once:

!?AE1&v998=91; Equip Artifact 91
!!HE-1:S1/?v1; Check if hero has Archery, if yes, variable v1 will be set to 1
!!HE-1:S1/3; Give Expert Archery
!?AE0&v998=91; Unequip Artifact 91
!!HE-1:S1/v1; Remove Archery, if variable v1 is 1


Again, there's the first line "!?AE1", it means the hero equips the artifact (91).
The second line, there's an "S". It means the work with Secondary Skills. And after the S, there's a number 1 - it is the number of Archery skill. But then, after the 1, there's a "?v1", this "?" checks if the hero has secondary skill number 1, and the "v1" saves the answer to variable 1 (yes=1, no=0). Simple.
And the third line, it gives the Expert Archery skill, same as above, but instead of "?v1", there's a number 3. This means the skill is an Expert level skill:

0 = none.
1 = basic.
2 = advanced.
3 = expert.


After these lines, there's the code "!?AE0", again, it means hero unequips the artifact.
The last line, almost the same, but the last one is "v1", this code removes the skill, if the v1 is true (in common language, it removes the skill, if the hero did not already had it). Now, the only thing left, is to add these lines:

!?CM2;
!!UN:R3/-1;


These lines redraw the screen, when hero equips and unequips the artifact, or does anything in the hero screen (we don't want the "Expert Archery" skill image be shown, when hero unequips the artifact..). So, again here's the whole script:



ZVSE
!#VRz10:S^{Golden Bow}

When wielded, the Golden Bow allows your troops to shoot through any obstacle or at any range without penalty, and grants you the {Expert} {Archery} -skill.^; Set this text to "z10"
!#HT5/91:T10; Show "z10", when hero right-clicks the artifact
!?AE1&v998=91; Equip Artifact 91
!!HE-1:S1/?v1; Check if hero has Archery, if yes, variable v1 will be set to 1
!!HE-1:S1/3; Give Expert Archery
!?AE0&v998=91; Unequip Artifact 91
!!HE-1:S1/v1; Remove Archery, if variable v1 is 1
!?CM2;
!!UN:R3/-1; Redraw Hero Screen





Very easy. You can add as many secondary skills as you want, whatever skills you want, and what level of skills you want, it's all up to you.


Note: When hero has already, for an example, Basic Archery skill, when he equips this artifact, he will get Expert Arxhery skill. But when he unequips, he will only lose the Expert Archery skill, and the original Basic Archery skill remains.

____________

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


Admirable
Legendary Hero
ghost of the past
posted April 30, 2010 08:09 PM

Quote:
There is, still, a small problem with changing the Morale and Luck. With this script, they will stay only until the next battle. So, to have the bonuses, you would have to re-equip the artifact after all battles. I'm still working on a solution to fix this..

This should work:

!?BA1; after any battle
!!BA:H0/?y-95; check who the left hero was
!!BA:H1/?y-96; check who the right hero was
!!HEy-95:A2/163/?v1/?v2; check if the left hero still has the shield (he might have lost it in the battle)
!!HEy-96&y-96>=0:A2/163/?v3/?v4; do the same for the right hero, but only if it was a hero (and not just creatures)

give luck and morale
!!HEy-95&v1>0:R0/d1;
!!HEy-96&v3>0:R0/d1;
!!HEy-95&v1>0:R1/d1;
!!HEy-96&v3>0:R1/d1;

You tried to check if the heroes were still "alive" i.e. if they still belonged to any color after the battle (by checking their current owner), but what if the hero with the shield had retreated and is now available in the tavern? He should still have the bonus because he kept the shield.

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


Supreme Hero
Supreme Hero
posted April 30, 2010 08:34 PM
Edited by gnollking at 20:45, 30 Apr 2010.

Oh, okay, thank you, I'll try that and tell you if it worked .

@EDIT, works perfectly, thank you again for all your help .
____________

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


Supreme Hero
Supreme Hero
posted May 01, 2010 12:08 PM
Edited by gnollking at 16:56, 06 May 2010.

Ummm.., OxFEA:
Quote:
!!UN:C5906498/1/<new monster ID> - summonning fire  el. sp.
!!UN:C5906519/1/<new monster ID> - summonning earth el. sp.
!!UN:C5906540/1/<new monster ID> - summonning water el. sp.
!!UN:C5906561/1/<new monster ID> - summonning earth el. sp.

Why is there earth twice? Other one is water air, right?
____________

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


Promising
Famous Hero
feanor on DF2.ru
posted May 01, 2010 12:25 PM

oops..4th is water, of course.

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


Supreme Hero
Supreme Hero
posted May 01, 2010 12:26 PM
Edited by gnollking at 16:56, 06 May 2010.

Edit, Added a "Links to other great modding threads in HC" -section to the first post, if you know a thread like these, please write me a HCM ("send instant message") and I'll add it there .
____________

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


Honorable
Legendary Hero
Age of erwins is over
posted May 07, 2010 04:22 PM

Does exist a program who can change creatures stats?

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


Supreme Hero
Supreme Hero
posted May 07, 2010 04:33 PM
Edited by gnollking at 16:36, 07 May 2010.

Yes, there is, it is an ERM program, very easy to use, it creates the scripts automatically. I'll upload it, if you want, just wait a sec..

Edit, or then, you could use MMArchive to extract "ZCRTAITS.TXT" from "h3bitmap.lod", and edit the text file with "TXTedit.exe". All creature's stats are stored in the text file, doesn't take longer than a minute to get the text file, and you can edit the stats of all creatures as much as you want. Then, when finished, just place the text file to /data folder, and it'll work. When you want the original stats back, just remove the text file from the /data folder .
____________

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


Honorable
Legendary Hero
Age of erwins is over
posted May 07, 2010 04:46 PM

Thanks a lot.

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


Supreme Hero
Supreme Hero
posted May 07, 2010 04:59 PM
Edited by gnollking at 16:53, 11 May 2010.

How to make an artifact with ERM - Part 4

Yes, another part.. So, how about giving hero resources each week?
A little bit harder than before, but still very easy.
Again, let's use the artifact number 91 (Golden Bow), let's use the previous script (this page, post 1):



ZVSE
!#VRz10:S^{Golden Bow}

When wielded, the Golden Bow allows your troops to shoot through any obstacle or at any range without penalty, and grants you the {Expert} {Archery} -skill.^; Set this text to "z10"
!#HT5/91:T10; Show "z10", when hero right-clicks the artifact
!?AE1&v998=91; Equip Artifact 91
!!HE-1:S1/?v1; Check if hero has Archery, if yes, variable v1 will be set to 1
!!HE-1:S1/3; Give Expert Archery
!?AE0&v998=91; Unequip Artifact 91
!!HE-1:S1/v1; Remove Archery, if variable v1 is 1
!?CM2;
!!UN:R3/-1; Redraw Hero Screen





First of all, we want the hero to receive 1500 gold each week. Now, we will edit the text:

{Golden Bow}

When wielded, the Golden Bow allows your troops to shoot through any obstacle or at any range without penalty, grants you the {Expert} {Archery} skill, and gives 1500 gold pieces each week.


Replace the previous description with this one.
Now, to the actual resource adding. To do this, we will need to set a Timer (we will use timer 15). This is done easily:

!#TM15:S8/999/7/255;

This line goes first, right after the "ZVSE". Now let me explain something about it. "S" means that we will set the timer and to which players the timer will occur. "8" - Starting day. "999" - Ending day. "7" - Occurs every 7th day. "255" - Occurs to all players.
Very very simple. Now, these lines wont give the gold, no. To do this, we'll add these lines:

!?TM15; Timer 15
!!OW:C?v2; Get current player
!!OW:Rv2/6/d1500; Give 1500 Gold


Okay, first line, Trigger is timer number 15.
Second line "Get current player", just gets the current player to v2.
Third line, "OW:R" is used to edit the Resources. Let's continue, "v2" is the player, "6" is Gold, and the "d1500" is +1500 gold. Now, we need to Enable this timer to the player, who has the Bow equipped. Now, after "!?AE1", we will add these lines:

!!OW:C?v3;
!!TM15:Ev3;


First line saves the current player to v3.
Next code simply Enables the timer 15 to current player (v3).
Now, after "!?AE0", we add these lines:

!!OW:C?v3;
!!TM15:Dv3;


Same as before, but instead of an "E", there's a "D". This Disables the timer 15 to the current player.

Not hard. Whole script here:



ZVSE
!#TM15:S8/999/7/255; Timer to all players every week
!#VRz10:S^{Golden Bow}

When wielded, the Golden Bow allows your troops to shoot through any obstacle or at any range without penalty, grants you the {Expert} {Archery} skill, and gives 1500 gold pieces each week.^; Set this text to "z10"
!#HT5/91:T10; Show "z10", when hero right-clicks the artifact
!?TM15; Timer 15
!!OW:C?v2; Get current player
!!OW:Rv2/6/d1500; Give 1500 Gold
!?AE1&v998=91; Equip Artifact 91
!!HE-1:S1/?v1; Check if hero has Archery, if yes, variable v1 will be set to 1
!!HE-1:S1/3; Give Expert Archery
!!OW:C?v3;  Get current player to v3
!!TM15:Ev3; Enable timer 15 to current player
!?AE0&v998=91; Unequip Artifact 91
!!HE-1:S1/v1; Remove Archery, if variable v1 is 1
!!OW:C?v3;  Get current player to v3
!!TM15:Dv3; Disable timer 15 to current player
!?CM2;
!!UN:R3/-1; Redraw Hero Screen






____________

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


Honorable
Legendary Hero
Age of erwins is over
posted May 09, 2010 08:20 AM

I don't know this is right topic,but how I can put images with map editor at events and buildings?

P.S:I tried by multiple times,but don't work,do you can upload the stats program?

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


Supreme Hero
Supreme Hero
posted May 09, 2010 09:15 AM
Edited by gnollking at 09:17, 09 May 2010.

To show pictures, use IF:Q:

Quote:
Show a message or request with one picture.
Q#1/#2/#3/#4^Text^;

#1 - number of flag
#2 - type of the picture
#3 - subtype of the picture
#4 - type of message
   =1 - message (FLAG #1 WILL NOT BE SET!!!)
   =2 - request yes/no (stored to the flag)
   =4 - message with no buttons, visible until button is released


An example:

!?OB10/10/0;
!!IF:Q1/20/3/1^Welcome to the house of Pathfinding!^;


First line, when object at coordinates 10/10/0 is visited.
1 = number of the flag (1-10), 20 = secondary skill, 3 = basic pathfinding, 1 = simple message (the text in the middle of ^ ^ is shown, if you want to show no text, just leave the ^^ blank).


About the stats, I'll post a guide later, just wait .

____________

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


Supreme Hero
Supreme Hero
posted May 09, 2010 09:53 AM
Edited by gnollking at 09:56, 09 May 2010.

How to edit creature stats

Just a small guide about editing creature stats.
If you think a creature is either too strong or too weak, just edit it.

Okay, so first of all, the tools you'll need are ResEdit2 or MMArchive (use either one you want), and TextEdit. I'll use the MMArchive.

Then, we open MMARchive (ResEdit2), and open "h3bitmap.lod", this file is located on your ..heroes3/data folder. Next, we wil find "ZCRTAITS.TXT", and extract it (anywhere you want):



Now, we close MMARchive, and open the TXT Tables Editor. Now we'll locate the text file and open it. Find the creature you want to edit (I chose Gnoll) (you can edit as many creatures as you want):



Here are all the stats of the Gnoll. I'll improve it's stats just a little bit:



Now, we save the text file to the /data folder. Check if the text file is in the data folder.
Now, when we run Heroes 3 WoG:




Easy, very simple. Now, to remove the stats, we just delete the text file from the data folder, and that's it .

ANy text file, when edited, just needs to be placed on the "Data" folder fro them to work. To delete them, remove the text files from the "Data" folder.


____________

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


Honorable
Legendary Hero
Age of erwins is over
posted May 09, 2010 11:09 AM

Thanks.A new question:How I can change line-up of a town only for one map?

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


Supreme Hero
Supreme Hero
posted May 09, 2010 01:45 PM

You mean the creatures recruited in the town?
You just need to copy the whole script (from ZVSE to the end) to a Timed Event on your map.
(On the Map Editor press Ctrl + Enter, then go to "Timed Events" and add the script to the event. Then set the day to 500 or more and you're done.)
____________

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


Honorable
Legendary Hero
Age of erwins is over
posted May 09, 2010 02:45 PM

Some help please:I modified Aztrong and defmaker doesn't want to generate shadow,the color is good,but in game the background appear.Does exist a solution?

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


Supreme Hero
Supreme Hero
posted May 09, 2010 02:50 PM

You mean the light-blue background?
If it is seen in the battle, the problem is in the palette, the background is wrong color.
____________

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


Honorable
Legendary Hero
Age of erwins is over
posted May 09, 2010 02:57 PM

I don't think,I only recoulor some red thinks,but I used old frames who have good background,whic work in game.I will try to modify them.

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


Supreme Hero
Supreme Hero
posted May 09, 2010 02:59 PM

You said, that the shadow wont work, this is because the background had wrong color. This has happened to me also .
____________

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


Honorable
Legendary Hero
Age of erwins is over
posted May 09, 2010 03:24 PM

I recolor all frames with right color and it doesn't generate shadow

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread » This thread is 33 pages long: 1 2 3 4 5 ... 10 20 ... 29 30 31 32 33 · «PREV / NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.0942 seconds