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 200 250 ... 292 293 294 295 296 ... 300 350 400 407 · «PREV / NEXT»
Hero_Of_Light
Hero_Of_Light


Responsible
Supreme Hero
posted March 10, 2016 08:33 PM

I know the AI has it equiped because I made the commander artifacts equipable by editing the artifact traits txt. So the artifacts appear in the map editor and I made them wear them from the start.

As I said, maybe the script can be edited to work with the necklace that gives +3 morale and luck and apply through script the reductions only. Since the combination artifact uses the neck slot, there won't be a problem of interfering the one with the other.

Anyway, If you can help me with that I would really appreciate it.
____________
Not idly do the leaves of Lorien fall.

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


Admirable
Omnipresent Hero
Wog refugee
posted March 10, 2016 08:47 PM

Well, I changed art 155 to centaur axe (7) for testing and all is right when attacker is AI (no effect both).

Used this part of script:

!?BA&1000;
!!BA:H0/?v9711 H1/?v9712;
!!HEv9711:A2/7/d/?y28;  [check for artifact]
!!HEv9711&y28>0:R0/d3;  [morale bonus]
!!HEv9711&y28>0:R1/d3;  [luck bonus]
!!HEv9712&y28>0:R0/d-3;  [morale bonus]
!!HEv9712&y28>0:R1/d-3;  [luck bonus]
!!HEv9712&v9712>-1:A2/7/d/?y29;  [check for artifact]
!!HEv9712&y29>0:R0/d3;  [morale bonus]
!!HEv9712&y29>0:R1/d3;  [luck bonus]
!!HEv9711&y29>0:R0/d-3;  [morale bonus]
!!HEv9711&y29>0:R1/d-3;  [luck bonus]

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


Responsible
Supreme Hero
posted March 10, 2016 09:59 PM

Have you tred it a few times?

The test results were actually pecuiliar. You need to place more than two heroes bearing the artifact to test it completely and thoroughly.

For instance, I had 4 heroes (two of mine and two AI) placed in a map, all four bearing the artifact.

At first I attacked one of the opponents and the script worked OK, nothing happened.

After that the AI attacked me and still it worked.

Then the AI attacked me once again and then he had -3 Morale and Luck (which shouldn't work like this).

I don;t know why, it has something to do with the y variables I guess. Since both heroes have the artifacts and the attacker becomes the attacked, maybe the variables were not changed and so the script malfunctions.

As I said, maybe a command that calls the Pendant of Courage would do the trick. Can you conjure up a way to make bearer of artifact 155 to be wearing the Pendant of Courage in battle and make it dissapear when battle ends? I think this will solve the problem. And as I said, artifact 155 is a combo that uses the neck slot so there is n need for a check command, since Pendant of Courage would never be worn when artifact 155 is present.
____________
Not idly do the leaves of Lorien fall.

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


Admirable
Omnipresent Hero
Wog refugee
posted March 10, 2016 10:06 PM
Edited by Salamandre at 22:10, 10 Mar 2016.

First you must debug when the error happens.

!?CM4; when click on battle field
!!BA:H0/?v9711 H1/?v9712;
!!HEv9711:A2/7/d/?y28;  [check for artifact]
!!HEv9712&v9712>-1:A2/7/d/?y29;  [check for artifact]
!!IF:M^%Y28, %Y29^; (should be 1, 1)

My assumption is that some of your AI heroes choose to unnequip the artifact, there is no other explanation. If they do such thing, the debug above will tell you.

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


Responsible
Supreme Hero
posted March 10, 2016 10:22 PM

OK, I'll try it as soon as I can (It will be a couple of days though).

Maybe I'll test it in Multiplayer so that I control both heroe's movements. In any case I'll let you know. Thanks!
____________
Not idly do the leaves of Lorien fall.

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


Famous Hero
posted March 11, 2016 05:06 PM

Salamandre said:
I see only a map to download. No scripts, no graphics, no mod. As graphics are changed, ofc the map won't open. Have you ever looked at an Era mod structure?


Sal, When you say scripts, are you referring to the ERM codes? if I upload a Map like this, with the ERM codes in the map specifications tab, will that be enough to fix the problem I have with the ERM codes for the artifacts? I understand that without the graphics, the other map wouldn't open, but that shouldn't stop/affect the codes or scripts for the artifacts right? I'm so lost lol


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


Admirable
Omnipresent Hero
Wog refugee
posted March 11, 2016 05:48 PM

Ok, upload a map like that.

I don't see why you are lost, all you have to do is download a mod for era, look at structure then use same, data folder with its lods/pacs), s subfolder with scripts, a readme file with details for the player, is not like we are talking quantum physics here.

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


Responsible
Supreme Hero
posted March 12, 2016 10:50 PM

I was thinking of a way to enhance some artifacts' abbilities by adding additional classes to them.

For instance, I thought that it would be nice to add a class to hand weapons in Heroes just like in other fantasy games, for example:

Dagger Class: This weapon may be borne in addition to one other hand weapon.

Red Dragon Flame Tongue is obviously a dagger, so it is only natural that it could be wielded along with another sword (instead of a Shield). It would be nice to be able to wield it with another sword.

Secondly, I thought of another nice addition which would require a little scripting though...

Two Handed Weapons: If the shield slot is empty, this weapon has enhanced bonus.

Take Sword of Judgement for instance. It could easily be wielded with both hands. What If you got an extra +2 to each attribute if you chose to leave the shield hand empty? That would be nice (unless you would find a Shield with greater bonus).

In order for that to work, there would be needed a script that:

1) Checks If sword of Judgement is wielded
2) Checks If Shield slot is occupied (is there a command that can check this?)
3) If Shield is empty apply additional bonus
4) If not, then nothing happens
5) If Sword of Judgement is unequiped or Shield is borne then cancel bonus

Is this possible? I realize there's a change that this can't be done but I thought I'd ask anyway. I know the dagger class can be easily introduced by editing the artraits.txt so the question is about two handed weapons.
____________
Not idly do the leaves of Lorien fall.

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


Admirable
Omnipresent Hero
Wog refugee
posted March 12, 2016 11:42 PM

Hero_Of_Light said:
In order for that to work, there would be needed a script that:

1) Checks If sword of Judgement is wielded
2) Checks If Shield slot is occupied (is there a command that can check this?)
3) If Shield is empty apply additional bonus
4) If not, then nothing happens
5) If Sword of Judgement is unequiped or Shield is borne then cancel bonus


Such thing is easy, as you show it. The mess starts when the player will equip any shield then unequip sword while wearing that shield, in hero screen. Therefore you have to script every shield in the game, to check if sword is equipped, then remove accordingly the bonified stats.

____________
Era II mods and utilities

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


Responsible
Supreme Hero
posted March 13, 2016 04:29 PM
Edited by Hero_Of_Light at 16:54, 13 Mar 2016.

Hm.. I guess there's no way to just add a command that checks if any artifact is equipped in left hand huh?

I've been pondering about the AI player, there might be a mess there, with equip-unequipped. Maybe I'll just make a WOG artifact work like that and see how it goes.

For instance, I checked the morale reduction script in Multiplayer and it seem to work OK... Maybe the problem was that which you stated (the AI kept unequipping the artifact for some reason.
____________
Not idly do the leaves of Lorien fall.

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

Tavern Dweller
posted March 13, 2016 09:01 PM
Edited by AgeofHeroes at 21:19, 13 Mar 2016.

fine
____________

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


Admirable
Omnipresent Hero
Wog refugee
posted March 13, 2016 09:06 PM

Wrong thread, plz delete.

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


Responsible
Supreme Hero
posted March 15, 2016 02:23 PM
Edited by Hero_Of_Light at 15:27, 15 Mar 2016.

**EDIT**

The question I had was dealt with for now, but I encountered another error:

I've got this script that Solitaire gave me but I have some trouble with the variables it uses (z1, z2). It seems they are taken and used in other scripts and so they interact badly. I know that enhanced artifact script uses z1 and so If the option is enabled then z1 is taken from here (and not script 07).

I tried to change the variables but game crashed when I clicked on Werewolves. Can someone change these two variables to a stable state?

**Werewolves
**Script for changing werewolf's def and sound on full moon. ERA 1.9 or higher
!#TM1:S1/999/1/255; create timed event that occurs to everyone and everyday.

!?TM1;
!!VRy2:Sc; Get current game day
!!VRy2:%28; Get day of month
!!VRz1:S^CWEREW.def^; Human form
!!VRz2:S^HALB^; Human sound
**Human attributes
!!VRz638:S^Lycan^;
!!UN:G1/194/0/638; [Set description]
!!VRz639:S^Lycans^;
!!UN:G1/194/1/639; [Set description]
!!MA:L194/2; //set monster level
!!MA:G194/6; [Growth]
!!MA:A194/8; [attack]
!!MA:D194/8; [defense]
!!MA:M194/3; [min dmg]
!!MA:E194/4; [max dmg]
!!MA:C194/6/250; [cost Gold]
!!MA:P194/20;   Health
!!MA:S194/6;   Speed
!!if&y2=>14/y2<=16:; If full moon
!!VRz1:S^ZM194Z.DEF^; Wolf form
!!VRz2:S^HGWR^; Wolf sound (the default wolf's sound is actually the one used by monk)
***wolf attributes
!!MA:L194/2; //set monster level
!!MA:G194/6; [Growth]
!!MA:A194/10; [attack]
!!MA:D194/10; [defense]
!!MA:M194/5; [min dmg]
!!MA:E194/8; [max dmg]
!!MA:C194/6/250; [cost Gold]
!!MA:P194/40;   Health
!!MA:S194/9;   Speed
!!VRz559:S^Werewolf^;
!!UN:G1/194/0/559; [Set description]
!!VRz560:S^Werewolves^;
!!UN:G1/194/1/560; [Set description]
!!en;
!!SN:K12/9597928/7894504/1; overwrite def name with z1
!!SN:K8/9598440/7894496/1; overwrite sound name with z2
____________
Not idly do the leaves of Lorien fall.

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


Admirable
Omnipresent Hero
Wog refugee
posted March 15, 2016 05:00 PM
Edited by Salamandre at 17:01, 15 Mar 2016.

I don't think z1/z2 overlap as they are used only here, then they are assigned via SN:K so they can be used elsewhere right after. Such things you should ask in russian forums, the new Era commands into memory SN:  are unknown by me.

I see a little syntax error, en; (the if/en column) should be en:;

Fix it, maybe can help.

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


Responsible
Supreme Hero
posted March 15, 2016 06:34 PM
Edited by Hero_Of_Light at 19:29, 15 Mar 2016.

I fixed the en:;, but the problem still occurs.

The problem occurs with enhanced artifacts. When you equip the Centaurs Axe, Dwarven Shield etc. to form the Garb of the Forest Lord, a message appears notifying that creatures will join your cause every week.

However, instead of the message, you get WERW.def, obviously because z1 was appointed to this.

Then, when the week passes, z1 becomes the ID of the hero wearing the artifacts because a text appears saying:

Wearing the Garb of the Forest Lord, some creatures join WERW.def army.

It's not that big a deal of course but it is kind of annoying to see that the two scripts can't work together.

I have an idea though I don't know If it will work. What If we add a command that stores whatever z1 and z2 has in new variables and then have it restored after script is done? Do you think that might work?

I don't know If the enhanced artifact script can be changed as well to avoid this bug.
____________
Not idly do the leaves of Lorien fall.

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


Admirable
Omnipresent Hero
Wog refugee
posted March 15, 2016 08:27 PM

yes then z1-z2 must be replaced but I don't know how they fit in SN:K.

Anyway, I will become less and less active here as I have no further plans, so if you continue modding, register in russian forums, there are daily a few active erm guys connecting, and you are allowed to write in english.

I can help if there is some erm error to track but I have no longer time to work on scripts.

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


Responsible
Supreme Hero
posted March 15, 2016 08:33 PM
Edited by Hero_Of_Light at 21:06, 15 Mar 2016.

That's sad to hear

Anyway thanks for your help. I would have never been able to add so many features If it weren't for you so your advice is always appreciated. Even If you don't come in the forums often I will be posting here my ideas or problems in case you're interested.

I think storing z1 and z2 to other variables and then restoring them back might work, I'll give it a try.

I deleted the whole werewolf script and the enhanced artifacts script still malfunctioned so I guess there wasn't any problem there. Must be something wrong with original script I guess or something.
____________
Not idly do the leaves of Lorien fall.

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


Disgraceful
Undefeatable Hero
posted March 17, 2016 08:24 PM
Edited by fred79 at 20:26, 17 Mar 2016.

i was browsing erm help, and couldn't find 2 things:

1. how to prevent certain creatures(stronghold and ghost behemoth, which is now Forge) from spawning during creature weeks.

2. how to make certain creatures spawn on water only(not wandering creatures) during creature weeks.

edit: and by these, i mean permanently, and not just for one map.

any help in these regards would be much appreciated.

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


Admirable
Omnipresent Hero
Wog refugee
posted March 17, 2016 08:37 PM

There is no direct way to deal with that. For spawning monsters, one could see what type the week spawned then delete if type x (loop all monsters day 1, ask type etc).

For water problem is much more complicated. Not easy to say if a map has water or only small lakes if only checking with erm, so I fear it will not find any spot if random search and little water.

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


Disgraceful
Undefeatable Hero
posted March 17, 2016 09:01 PM

Salamandre said:
There is no direct way to deal with that. For spawning monsters, one could see what type the week spawned then delete if type x (loop all monsters day 1, ask type etc).

For water problem is much more complicated. Not easy to say if a map has water or only small lakes if only checking with erm, so I fear it will not find any spot if random search and little water.


what command would i use for number 1?

for number 2, the maps i make/use always have ocean on them(at least a decent amount, too), so that won't be a problem.

 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 200 250 ... 292 293 294 295 296 ... 300 350 400 407 · «PREV / NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.5856 seconds