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 ... 48 49 50 51 52 ... 100 150 200 250 300 350 400 407 · «PREV / NEXT»
idiotpariah
idiotpariah


Adventuring Hero
posted November 21, 2009 04:53 AM

You can add the wog script to a timed event in a map. You can't make it drag and drop.

If you want to make the blank artifact always have certain powers you can add it to the wogify scripts in the data\s folder (to the artifact boosting scripts would seem most logical).

At that point the remaining issue would be how to add the artifact into normal/random maps, two ways to do that:
1) Add the artifact to a hero- that hero will then always have that artifact when first bought.- this is the easiest way but not perhaps ideal.
2) Add your artifact to the wogify script that replaces some old artifacts with new ones.

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


Famous Hero
posted November 21, 2009 06:04 PM

The basic idea behind these blank artifacts and erm is, these artifacts do not do anything at all. It is not just setting some artifact attributes and then the remainder is automatically, as with the standard artifacts.

So if you want to do anything with these artifacts, then you have to script it. So in cases where this artifact should "do" anything, set up a trigger, check, if the hero as this artifact equipped, then do what you want with erm. The artifact itself will not do anything.

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

Tavern Dweller
posted November 23, 2009 06:32 AM
Edited by Vanderlow at 06:34, 23 Nov 2009.

OK thanks for your replies.

I've had a shot at making an artifact that works like a suicide bomb - whenever a hero with this artifact equipped attacks another hero, or is attacked by another hero, BOTH heroes instantly get killed.

Here's the script:

ZVSE
!?BA0;
!!BA:E?y1; [is this a network battle?]
!!FU1&y1=0v1; [if not, continue the script]
!!BA:H0/?v700; [get attacking hero's number]
!!BA:H1/?v701; [get defending hero's number]

!!HEv700:A2/168/0/?v702; [has attacking hero got ROD equipped?]
!!HEv701&v701>=0:A2/168/0/?v703; [has defending hero got ROD equipped?]
!!HEv700:R2/?v705; [Store attacker's sex]
!!HEv701:R2/?v706; [Store defender's sex]
!!VRz90&v705=0:S^he^;
!!VRz90&v705=1:S^she^;
!!VRz91&v705=0:S^him^;
!!VRz91&v705=1:S^her^;
!!VRz92&v706=0:S^he^;
!!VRz92&v706=0:S^he^;
!!VRz93&v706=0:S^him^;
!!VRz93&v706=0:S^her^;
!!HEv700&v702=1:B0/?z80; [get name of attacker if he has artifact]
!!HEv700&v703=1:B0/?z81; [get name of attacker if defender has artifact]
!!HEv701&v702=1:B0/?z80; [get name of defender if he has artifact]
!!HEv701&v703=1:B0/?z81; [get name of defender if attacker has artifact]

!!IF&v702=1:M^%Z80 had the Relic of Doom equipped!!  As soon as %Z90 is in range %Z90 detonates, taking %Z81 with %Z91!!^;
!!IF&v703=1:M^%Z80 had the Relic of Doom equipped!!  As soon as %Z92 is in range %Z92 detonates, taking %Z81 with %Z93!!^;

!!HEv700&v702=1:K; [If attacker has ROD, kill attacker]
!!HEv700&v703=1:K; [If defender has ROD, kill attacker]
!!HEv701&v702=1:K; [If attacker has ROD, kill defender]
!!HEv701&v703=1:K; [If defender has ROD, kill defender]



It works in that both Heroes end up dead, but the names in the message are wrong.  It puts the Heroes name WITHOUT the artifact first!  And the other Hero (z81) doesn't come up at all...


any ideas?


-Vanderlow

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


Famous Hero
posted November 23, 2009 10:07 AM
Edited by Siegfried at 10:17, 23 Nov 2009.

I think here is an error:

!!HEv700:A2/168/0/?v702; [has attacking hero got ROD equipped?]

0 does not mean do nothing. 0 means set it to 0. If you want to do nothing here you should use d0 (meant as delta 0, i.e. add this to the current value instead of setting it), or simply just d.

BTW, just for security i'dd prefere to preset v702 with 0. Same for other hero.

And this one is not necessary:
!!HEv700&v702=1:B0/?z80; [get name of attacker if he has artifact]
(and then next 3 lines).

Simply get their names unconditionally. Condition checking in output is just sufficient. But if that has something to do with your bug, i don't think so.

And checking condition: In theory it is possible to get higher values than 1 if the hero has several of these artifacts equipped. So to be safe just check for =0 or <>0.

Next:
!!FU1&y1=0v1; [if not, continue the script]

Where is FU1? And do you have the standard scripts removed? I think FU1 is already implemented elsewhere. So what you are doing here is calling FU1. Don't know what this function is doing. Then the remainder of the script is executed.

If you want to continue the script if not network battle, it is much easier to think reverse: Exit the script if it is a network battle:
!!FU&y1<>0:E;

Else: What message appears?

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

Tavern Dweller
posted November 24, 2009 02:23 AM

Siegfied:

Thanks for your help mate.

I'll put your suggestions to the test!

-Vanderlow

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

Tavern Dweller
posted November 24, 2009 09:07 AM
Edited by Vanderlow at 09:08, 24 Nov 2009.

Hi again.

I've tried some of Seigfried's suggestions and this is what i've come up with:

It works fine when the Human hero equips and attacks a computer hero, but doesn't work in the siege situation.

When a computer Hero equips and attacks me, the dialogue is correct, but before both heroes disappear, you still fight out the battle, however both armies are just 1x Level 1 creature!!

If anyone can be bothered to have a look and let me know where i went wrong i would be very grateful!!




ZVSE

!?BA0&-998;

!#VRv700:S0; [v700 = Attacking Hero's #]
!#VRv701:S0; [v701 = Defending Hero's #]
!#VRv702:S0; [v702 = Attacking Hero's equipped Relic of Doom]
!#VRv703:S0; [v703 = Attacking Hero's equipped Relic of Doom]
!#VRv705:S0; [v705 = Attacker's sex]
!#VRv706:S0; [v706 = Defender's sex]
!#VRv707:S0; [v707 = Network battle?]
!#VRv50:S0; [v50 = Seige battle?]
!#VRv51:S0; [v51 = AI only battle?]
!#VRv52:S0; [v52 = Seige battle FU done?]
!#VRv53:S0; [v53 = AI battle FU done?]


!!BA:E?v707; [is this a network battle?]
!!FU29000&v707=0:P; [if not, continue the script]

!?FU29000;

!!BA:H0/?v700; [get attacking hero's number]
!!BA:H1/?v701; [get defending hero's number]

!!HEv700:B0/?z80; [get name of attacker]
!!HEv701&v701>=0:B0/?z81; [get name of defender]
!!HEv700:R2/?v705; [Store attacker's sex]
!!HEv701&v701>=0:R2/?v706; [Store defender's sex]
!!VRz90&v705=0:S^he^; [attacker "he"]
!!VRz90&v705=1:S^she^; [attacker "she"]
!!VRz91&v705=0:S^him^; [attacker "him"]
!!VRz91&v705=1:S^her^; [attacker "her"]
!!VRz92&v706=0/v701>=0:S^he^; [defender "he"]
!!VRz92&v706=1/v701>=0:S^she^; [defender "she"]
!!VRz93&v706=0/v701>=0:S^him^; [defender "him"]
!!VRz93&v706=1/v701>=0:S^her^; [defender "her"]

!!HEv700:A2/168/d0/?v702; [has attacking hero got ROD equipped?]
!!HEv701&v701>=0:A2/168/d0/?v703; [has defending hero got ROD equipped?]

!!BA:A/?v51; [is this an AI only battle?
!!FU29002&v51>0:P; [if this is only AI, go to FU 29002]
!!FU29000&v53>0:E; [end this function]

!!BA:S/?v50; [Is this a seige battle?]
!!FU29001&v50>0:P; [If it is, go to FU29001]
!!FU29000&v52>0:E; [end this function]

!!HEv700&v702>0:K; [If attacker has ROD, kill attacker]
!!HEv700&v703>0:K; [If defender has ROD, kill attacker]
!!HEv701&v702>0:K; [If attacker has ROD, kill defender]
!!HEv701&v703>0:K; [If defender has ROD, kill defender]
!!IF&v702>0:M^%Z80 had the Relic of Doom equipped!!  As soon as %Z90 is in range %Z90 detonates, taking %Z81 with %Z91!!^;
!!IF&v703>0:M^%Z80 had the Relic of Doom equipped!!  As soon as %Z92 is in range %Z92 detonates, taking %Z81 with %Z93!!^;

!!FU29000:E;

!?FU29001; [Seige battle]
!!FU29001&v701>=0/v702<1/v703<1:E;
!!IF&v701>=0:M^%Z81 is out of range of the Relic of Doom's explosive range.^;
!!VRv52:S1;
!!FU29000:P;

!?FU29002; [AI only]
!!FU29002&v701>=0/v702<1/v703<1:E;
!!HEv700&v701>=0/v702>0:K; [If attacker has ROD, kill attacker]
!!HEv700&v701>=0/v703>0:K; [If defender has ROD, kill attacker]
!!HEv701&v701>=0/v702>0:K; [If attacker has ROD, kill defender]
!!HEv701&v701>=0/v703>0:K; [If defender has ROD, kill defender]
!!VRv53:S1;
!!FU29000:P;

*!!BA:D;







Cheers

-Vanderlow

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


Famous Hero
posted November 24, 2009 10:11 AM
Edited by Siegfried at 10:14, 24 Nov 2009.

This one is strange:

!!FU29000:E;

There are similar lines. I'm not sure what it does. Normally it should call FU29000, but then what doe :E here?

I think you simply meant !!FU:E; which simply means to exit this function. I'm not sure what it does when using a function number here. Normally !!FU29000; would call that function. I'm not sure what !!FU29000:E; does.

Just for short...

Quote:
When a computer Hero equips and attacks me, the dialogue is correct, but before both heroes disappear, you still fight out the battle, however both armies are just 1x Level 1 creature!!

That seems you first have killed them, then recalled them. This is similar if you hire 2 heroes in town, and then hire a third hero. This one is then put to map with just 1 lvl 1 creature.

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

Tavern Dweller
posted November 26, 2009 05:36 AM

Trouble with Seige battle

Here is a little script for testing whether a battle is a seige or not.  Seige battles should return a value of 1, 2 or 3 for the !!BA:S$ receiver.

ZVSE
!?BA0;

!!BA:S?v50;

!!IF:M^Seige battle state is %V50.^;


For some reason it doesn't return the values expected:  i.e it sometimes returns "1" for a non-seige battle, and will return "0" for a non-seige battle, then return "0" for a seige battle!


Any ideas how to get the correct return for checking if it's a seige battle?

-Vanderlow

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


Famous Hero
posted November 26, 2009 11:57 AM

I've often tried it, and it always gave correct results.

perhaps the error is in what you think is a siege battle. Attacking a town is not automatically a siege battle. The town needs at least a fort to make this a siege battle.

And the return value is simply the fort level. So 0 fo no fort (which is valid in field battles as well as town battles with no fort), 1 if fort, 2 if citadel and 3 if castle.

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

Tavern Dweller
posted November 26, 2009 12:05 PM

Yeah i realise that.  Perhaps the problem is with my version of WOG?

Is there any way i can check what version i'm using?

I downloaded the 3.58 script update and updated it...
____________

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


Famous Hero
posted November 26, 2009 03:32 PM

!!UN:V$1/$2 -> Version/Subversion

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


Known Hero
The Forest Knight
posted November 26, 2009 08:39 PM

Can you give me script to live without castle?

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


Famous Hero
posted November 26, 2009 08:49 PM

That is easy

!#OW#1/#2;

Replace #1 with the player bit. Set to 255 if all players. Replace #2 with the number of days to live without castle.

To insert that into a map, setup a timed event, day 999, and the text beeing first line ZVSE, then this line. That's all.

If it does not work (some of the commands do not work before most of the map setting is done), try this 2 lines:

!?PI;
!!OW#1/#2;

Replace #1 and #2 as above.


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


Admirable
Omnipresent Hero
Wog refugee
posted November 26, 2009 09:18 PM

Siegried click on the red cross (disable smileys) when giving script, no reason to show your happiness inside.

ZVSE
!#OW:D0/250;
!#OW:D1/250;
!#OW:D2/250;
!#OW:D3/250;
!#OW:D4/250;
!#OW:D5/250;
!#OW:D6/250;
!#OW:D7/250;
____________
Era II mods and utilities

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

Tavern Dweller
posted November 27, 2009 02:07 AM
Edited by Vanderlow at 02:55, 27 Nov 2009.

Well i checked, and i'm using v358.

Anyone got any ideas why this script returns wrong values?


ZVSE
!?BA0;
!!BA:S?v50;
!!IF:M^Seige battle state is %V50.^;

I HAVE FIGURED OUT WHAT'S HAPPENING!

For some reason the first battle ALWAYS returns a value of 0.

Then every battle after that returns the value of the PREVIOUS battle.

So if I fought:

1 - A Citadel;
2 - A fort;
3 - A non-seige battle;
4 - A Castle;
5 - A non-seige battle

I would get the values:

1 - 0
2 - 2
3 - 1
4 - 0
5 - 3
Next battle - 0


How can i get it to return the value of the CURRENT battle and not the PREVIOUS battle?!?

-Vanderlow
____________

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


Famous Hero
posted November 27, 2009 09:36 AM

No idea.

But try this:

!?BA0&1000;
...

This calls this function only if some human is fighting. The BA trigger does not work properly for pure AI battles.

I don't know if that is the reason, but just to be sure...

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


Known Hero
posted December 12, 2009 04:02 AM

hello, my team is working on a project, in that project we made a lot of monsters, including creatures some like druids, but to make the druids, we must exclude of the game the pegasi, the reason of this post, is ask to somebody the exactly script to insert a link between the monsters( druid-ex pegasus) and the misile sprites def ... because if anybody change the flag of the pegasi(doble wide monster, fly, melee) or simply the stats, to become a shooter monster(need aditional frames), the game crash, because the inexistent misils.def of the pegasi, how i make a link between my druid and the created misil.def by me in H3sprite.lod?.. or more simply.. a link between zealots shoots or any other monsters missile?.. for example the wog dracolich thanksSsSs

sorry but we arenīt experts in erm ,I would like to request the script, but not just the code, rather including the code of the pegasi

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


Admirable
Omnipresent Hero
Wog refugee
posted December 12, 2009 04:38 AM
Edited by Salamandre at 06:47, 12 Dec 2009.

Write here exactly what is your rampart new upgrades and creatures and which will be shooter as well the wide of new creatures (1-2 hex)

I don't know how to make a shooter from a non shooter but I asked in russian forums, I need it too. Right now it asks for sfx and "sprite" then crash on shoot (it has frames).
____________
Era II mods and utilities

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

Tavern Dweller
posted December 15, 2009 09:57 AM

Hello everybody,
I need  some help with my new map scripting . I have already made a  script that map isn't wogified, but I want to keep quick combat and additional two secondery skills options. What I have to do ?

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


Admirable
Omnipresent Hero
Wog refugee
posted December 15, 2009 10:06 AM

Doc, quick combat option is kept whatever are the options. For additional secondary scripts, copy/paste "hidden skills" script from my map Time of Prophecy.
____________
Era II mods and utilities

 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 ... 48 49 50 51 52 ... 100 150 200 250 300 350 400 407 · «PREV / NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.8477 seconds