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: Script rework?
Thread: Script rework? This thread is 9 pages long: 1 2 3 4 5 6 7 8 9 · «PREV / NEXT»
Salamandre
Salamandre


Admirable
Omnipresent Hero
Wog refugee
posted October 20, 2009 09:54 PM

Sorry, recovering from headache after reading

What you mean? Can give an example of removing terrain  overlay? I don't understand.
____________
Era II mods and utilities

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


Famous Hero
posted October 21, 2009 07:14 AM
Edited by Siegfried at 11:39, 21 Oct 2009.

Well, let's say there is a terrain overlay at Position X. Let's assume cursed ground. Now a fight takes place at this position. One side is a cleric, who would normlly create holy ground after he has won the battle. But there is already cursed ground. So no holy ground. So i thought of instead placing holy ground remove cursed ground.

Or:
After battle (!?BA1):
If winning hero is cleric and has skills A and B then
   if there is no terrain overlay
       then create holy ground
       else
           if the terrain overlay is holy ground
               then do nothing
               else remove the terrain overlay
           endif
       endif
   endif
endif

---------------------------------------------------------------

Edit: I've thought about the bonus for the necromancer and death knight. I think the automatic "animate dead" will be 1 of only 2 real boni. The other one beeing automatic daily summoning (aka "finding") skeletons and/or percentual growth of undead stacks, modified by terrain. I think of:

If hero has necromancy, scouting and eagle eye, then add (scouting + eagle eye) hitpoints of skeletons per day. Doubled for specialists. Doubled on cursed ground and evil fog. Halved on other ground. None on holy ground. Plus a weekly percentual growth of (scouting + eagle eye)%. Both, daily adding and weekly growth limited to undead.

In towns i'll replace scouting by estates (for a garrisoned hero).

The other necromancy and death knight speciality will be lowering the opponents skills, if opponent is not necro or death knight. I think of lowering every opponents skill both have by the skill value the necro has. This might then result in nullifying any bonus the opposite hero else would have. Maybe i modify this by terrain. No lowering on holy ground.


Maybe i'll change that further to let lucid pools and magic plains untouched.

For necromancer it would be similar, but opposite terrain overlays.
   

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


Admirable
Omnipresent Hero
Wog refugee
posted October 21, 2009 12:53 PM
Edited by Salamandre at 12:55, 21 Oct 2009.

Seems you are going more and more on Sagamosa trails. I don't think it is possible to remove terrain using OB but you can add a new terrain on the previous using TR:G to check then add a new one as object, however I fear that it will look awful, as the previous is still there and may appear behind. There will be also scripting problems to debug as if you check the battle square for terrain as OB it will return the surviving hero (the top OB is the hero now, not the terrain). I don't have any experience in that, so I really have no idea how you could achieve this.

I guess mapmakers will also avoid this script, if done, as it changes the layout significantly during the game. But players may enjoy, even it is seems to me very complicated (too many conditions and unused skills)
____________
Era II mods and utilities

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


Famous Hero
posted October 21, 2009 12:54 PM

There is a problem in placing those special terrain patches with erm. I use UN:Ix/y/l/type/subtype where type is 224 (evil fog) and i vary subtype. With subtype 0 i get that long vertical patch of correct type. With all other subtypes i instead get random stacks.

And i've found nothing in the original erm sources. At least nothing new. Anyone any idea or information?

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


Admirable
Omnipresent Hero
Wog refugee
posted October 21, 2009 12:58 PM
Edited by Salamandre at 13:02, 21 Oct 2009.

Until now only the big circle one has been added through ERM (mithril enhancements script). I don't know about others.

!!OW&v1>64:R-1/7/d-3; (take Mithril)
!!VRy5&v1=1:S227;
!!VRy5&v1=2:S222;
!!VRy5&v1=4:S224;
!!VRy5&v1=8:S226;
!!VRy5&v1=16:S228;
!!VRy5&v1=32:S229;
!!VRy5&v1=64:S231;
!!VRy5&v1=128:S46;
!!VRy5&v1=256:S21; (set y5 to type of magic terrain)
!!VRy3:Sv4;
!!VRy4:Sv5;
!!VRy4&v1<>256/v1<>128:+2; (setup were to place terrain)
!!VRy3&v1=256:+2;
!!VRy4&v1=256:+1;  (Special for Cursed Ground)
!!VRy3&v1=128:+2;
!!VRy4&v1=128:+1;  (Special for Magic Plains)
!!UN:Iy3/y4/v6/y5/0/y5/0/-1/0; (Place terrain)
!!VRy3:+1;
!!UN:Iy3/y4/v6/y5/0/y5/0/-1/0; (Place second patch(unless Cursed Ground))

____________
Era II mods and utilities

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


Famous Hero
posted October 21, 2009 01:43 PM

Quote:
Seems you are going more and more on Sagamosa trails.


Who knows?
Quote:

I don't think it is possible to remove terrain using OB but you can add a new terrain on the previous using TR:G to check then add a new one as object, however I fear that it will look awful, as the previous is still there and may appear behind.


Indeed. So if there is no possibility of securely remove terrain overlay, i won't do that. So if there already is a terrain overlay thre will be no new one.
Quote:

There will be also scripting problems to debug as if you check the battle square for terrain as OB it will return the surviving hero (the top OB is the hero now, not the terrain). I don't have any experience in that, so I really have no idea how you could achieve this.


Well, that is not the problem, as you don't check it with OB, but with TR. You can retrieve the topmost terrain overlay. But since it would look weird, i will try to place only 1 overlay, not more.

Quote:

I guess mapmakers will also avoid this script, if done, as it changes the layout significantly during the game. But players may enjoy, even it is seems to me very complicated (too many conditions and unused skills)

Well, if you want a variety of options result may become somewhat complicated. But i think most will specialise on only very few options. But anyone can choose his favorite option.

I prefere things that are not too obvious and simple.

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


Famous Hero
posted October 21, 2009 01:56 PM
Edited by Siegfried at 16:52, 21 Oct 2009.

Quote:
Until now only the big circle one has been added through ERM (mithril enhancements script). I don't know about others.


The big circle would be o.k.
Quote:


!!OW&v1>64:R-1/7/d-3; (take Mithril)
!!VRy5&v1=1:S227;  holy ground
!!VRy5&v1=2:S222;  clover field
!!VRy5&v1=4:S224;  evil fog
!!VRy5&v1=8:S226;  fiery fields
!!VRy5&v1=16:S228; lucid pools
!!VRy5&v1=32:S229; magic clouds
!!VRy5&v1=64:S231; rockland
!!VRy5&v1=128:S46; magic plains
!!VRy5&v1=256:S21; cursed ground
!!VRy3:Sv4;
!!VRy4:Sv5;
!!VRy4&v1<>256/v1<>128:+2; (setup were to place terrain)
!!VRy3&v1=256:+2;
!!VRy4&v1=256:+1;  (Special for Cursed Ground)
!!VRy3&v1=128:+2;
!!VRy4&v1=128:+1;  (Special for Magic Plains)
!!UN:Iy3/y4/v6/y5/0/y5/0/-1/0; (Place terrain)
!!VRy3:+1;
!!UN:Iy3/y4/v6/y5/0/y5/0/-1/0; (Place second patch(unless Cursed Ground))



This is interesting. It does not place that big circle. Instead it places 2 objects, the second on x+1.

The next interesting thing is: Type and subtype occures twice. Why? The help says:
Quote:

Additional syntax: You can place an object which functions as object type/subtype but looks like an object type2/subtype2.

So an object of f.ex. type 21, subtype 0 is placed and made to look like object of type 21, subtype 0. Strange.

The trailing -1/0 says: Don't change terrain and don't redraw. Don't redraw? Strange.

Cursed ground has 2 object numbers: 21 and 223. Are those extra patches simply other object types? Is it possible to see the type and subtype with the def tool?

Edit
O.k., the function is now this:

!?FU998&v2>=8/v2<=9/v6=0/v7=0/v8>0;
!!FU&x2<0:E;
!!FU&x2>155:E;
!!HEx2:O?y-1;           Owner
!!FU&y-1<0:E;           No owner
** Check terrain overlay
!!TRv998/v999/v1000:G?y-2;
!!FU&y-2>0:E;           Overlay already existing
**HEx2:P?y8/?y9/?y10;   Hero position
!!VRy8:Sv998;
!!VRy9:Sv999;
!!VRy10:Sv1000;
!!UN:X?y11/?y12;        map size
!!VRy8&v2=8:+2;         x-position +2
!!VRy8&v2=8/y8>y11:Sy11;Limit to map size
!!VRy9:+1;              y-position +1
!!VRy9&y9>y11:Sy11;     Limit
!!UN&v2=8:Iy8/y9/y10/21/0;Place cursed ground
!!UN&v2=9:Iy8/y9/y10/224/0;Place evil fog
!!VRy8:+1;
!!FU&y8>y11:E;
!!UN&v2=9:Iy8/y9/y10/224/0;Place evil fog 2
!!FU:E;

The function is called after battle with v2 beeing the hero class, and v3-v8 other hero specific values which i always use as multiplexer.

Creation should be no like in the mithril script.

Edit: 2 patches are still not enough (except for the old cursed ground and magical plains, where 1 patch is sufficient). I used 3 patches:


Edit: I just testplayed a map with this script, and it was fun. First it was not easy to get all 3 required skills, but when the necromancer at least had all 3, it was fun to play. I went into the last fight against decent troops mainly with a single stack of nearly 1000 skeleton warriors, and they regained full strength every action.

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


Supreme Hero
posted October 21, 2009 05:03 PM

Can you send me the script? I would like to try it too, it sounds interesting .

But of course, if you don't want to, you don't have to send it .
____________

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


Famous Hero
posted October 21, 2009 06:08 PM

It is always online: http://www.rorkvell.de/h3/script00.erm

But it is not compatible with the original WoG scripts! So you should backup all of Data\s directory to somewhere else, remove anything here and put only this script there.

And it's currently not balanced! It's work in progress. But you might try a map with fortress and necro Then go for the numbers bonus for both. On my testmaps i install 2-3 scholars to teach the necessary skills. For fortress this would be first aid and armorer. And must not have any magic school. Most beastmasters already come with armorer. For necro this is earth magic, sorcery and mysthicism and no other magic school. Then equip both heroes with decent numbers of gnolls resp. skeletons and try.

BTW: The latest script adds an animation to the undead recovery.

Tell me how it is

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


Famous Hero
posted October 22, 2009 08:35 AM

Problem

There is a new problem:

!!UN:U34/-1/?y-1;       Number of heroes on map
!!IF:M^DEBUG: %Y-1 Heroes^;

That is expected to give the number of heroes on the map. I know that there are at least 3. But the result is 0. The code is executed, for i get the message.

So what went wrong?

The code is part of a trigger.

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


Admirable
Omnipresent Hero
Wog refugee
posted October 22, 2009 10:33 AM
Edited by Salamandre at 12:38, 22 Oct 2009.

Does not work for heroes as objects. Try this:

!!OW:H0/99/0;
!!OW:H1/100/0;
!!OW:H2/101/0;
!!OW:H3/102/0;
!!OW:H4/103/0;
!!OW:H5/104/0;
!!OW:H6/105/0;
!!OW:H7/106/0;
!!VRy-1:Sv99+v100+v101+v102+v103+v104+v105+v106;
!!IF:M^%Y-1 Heroes^;
____________
Era II mods and utilities

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


Supreme Hero
posted October 22, 2009 02:26 PM

Hmm, I've got a question, can I make a WoG map, then copy the script there?
Without backuping my "s" folder.
____________

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


Famous Hero
posted October 22, 2009 03:30 PM
Edited by Siegfried at 15:57, 22 Oct 2009.

Quote:
Does not work for heroes as objects. Try this:

!!OW:H0/99/0;
!!OW:H1/100/0;
!!OW:H2/101/0;
!!OW:H3/102/0;
!!OW:H4/103/0;
!!OW:H5/104/0;
!!OW:H6/105/0;
!!OW:H7/106/0;
!!VRy-1:Sv99+v100+v101+v102+v103+v104+v105+v106;
!!IF:M^%Y-1 Heroes^;


Ah, o.k., thanks. In this case it is not what i want because i want to do a loop through all heroes, but then it is possible to make it another way. Your example gave me the right idea.

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


Famous Hero
posted October 22, 2009 03:32 PM

Quote:
Hmm, I've got a question, can I make a WoG map, then copy the script there?
Without backuping my "s" folder.


Yes!

But if you ask regarding my test script: No. Because i'm using variables and function numbers as i need them, so this collides with standard scripts.

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


Famous Hero
posted October 23, 2009 10:37 AM
Edited by Siegfried at 12:51, 12 Nov 2009.

Another question: Is it possible to detect with erm if in siege battle a wall is breached? I found that they have a "health" of 3, and the ballista does a damage of 1-3.

Idea: In siege battle disable flying for all stacks until the siege walls are breached (at least 1 part has health 0). Would that be possible?

BTW: I'm out for 3 days now. Next post monday.

Update: Tested the necro scripts. Seems to work well.

Necros have very different boni than all other factions. I think, the main speciality of necros is numbers, weaken enemy and necromancy (animating dead). Two of them are implemented and tested:

1. A necro with necromancy, earth magic, sorcery and mysthicism, but no other magic school, animates any undead stack before any action. Hitpoints animated depend on skill level and on numbers. Quite nice to play, but not easy to get this combination. This is the necro equivalent of the "numbers" bonus for other factions, as suggested by gnollking.

2. A hero with necromancy, eagle eye and scouting "finds" some undead weekly (small percentual growth of all stacks). Percentage depends on skill level, terrain and terrain overlay. Artifact mods still to do. And i have to work around one bug: There is a similar function with bigger growth in necro towns. A hero must be garrisoned to activate it. And he needs necromancy, mysthicism and estates to apply a percentual growth. Currently this hero gets the 2 actions both. I need a way to exclude heroes in town garrison from the first round. Is there any way to check if a hero found with !!OW:H... is garrisoned? Positon?

3. For the third point currently only cursing works. A necromancer curses with mana loss, a death knight curses with slow. Still to check how many movement points loss would be adequate.

Theoretically any necro could get both boni. He would need necromancy, earth magic, sorcery, mysthicism, eagle eye and scouting (6 skills) to get both (except town). For getting the town bonus as well, he would need estates, too. So this would be 7 skills. And then no fire magic, no water magic and no air magic (specialised on earth magic).

Balance: Still an issue. But seems to be reasonable. I had a fight with a necromancer against a knight. One of my stacks was a skeleton warrior stack with nearly 5000. The knight had a stack of crusaders of about 350. These needed one single strike (without the crusaders second strike) to knock down all 5000 skeleton warriors. So such a fight is still winnable for knights.

-----------------------------------------------------------------

Edit: Here is a map and the current script for test: http://www.rorkvell.de/h3/script99.zip

I'm porting the script to a WoG compatible version in script99.erm. Currently it has mainly the castle enhancements, although some rampart and tower enhancements are active, too. To activate the script, many of the other options must be disablet, because this script is meant as an alternate version of other enhancements. These are mainly: All secondary skill enhancements, all artifact boosts, and the hero specialisation boost. Check for message at start, saying "dynamic enhancements enabled" or "dynamic enhancements disabled".

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


Admirable
Omnipresent Hero
Wog refugee
posted November 12, 2009 01:06 PM

Great work! Check HCM
____________
Era II mods and utilities

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


Famous Hero
posted November 12, 2009 02:48 PM
Edited by Siegfried at 17:15, 12 Nov 2009.

O.k., i registered. I did non know this url.

BTW: New version online. It adds Sanya to the map and recommends teaching her scouting. Any hero having eagle eye and scouting may reveal a part of the map once a day. Prerequisite (besides the 2 skills) is: Not moved yet (lika as digging for the grail). Revealing a part of the map costs 500 movement points. So it is only possible once a day. Just select the proper hero and then right-click somewhere on the map.

The revealed area radius depends on skill levels (+1 for rangers) and is doubled for eagle eye or scouting specialists.

This was a suggestion by someone here in the thread I like it!

Still same url: http://www.rorkvell.de/h3/script99.zip

Edit: Next update. Added Orrin to the map and a sugestion to teach him eagle eye. Archery and eagle eye adds a no range penalty and no obstacle penalty to any shooters, as soon as the skills have some minimum level (minimum required is lower for archery specuialists and for rangers)


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


Admirable
Omnipresent Hero
Wog refugee
posted November 13, 2009 12:02 PM
Edited by Salamandre at 12:08, 13 Nov 2009.

Reveal map once a day for scouting/eagle is very unbalanced I think, and would become the major goal for any player on randoms MP. I think once a week could be more interesting (cast first view air expert) then click. The problem is that on randoms there are those prisons with already upped heros and this may change the outcome. Maybe disable prisons for your scripts?

Finally an use for eagle eye/scouting. I was missing those skills!
____________
Era II mods and utilities

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


Promising
Supreme Hero
WCL owner
posted November 13, 2009 02:37 PM

strange thread. first post was about making more order in using ERM variables and then I see a lot discussions about changing the game itself...by the way, Siegfried, I would advise you to check homm3:TE version - one of it's objectives was to build balanced MP game.
____________
I play HoMM3 at www.heroes-
III.com

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


Famous Hero
posted November 13, 2009 05:10 PM

Quote:
Reveal map once a day for scouting/eagle is very unbalanced I think, and would become the major goal for any player on randoms MP. I think once a week could be more interesting (cast first view air expert) then click. The problem is that on randoms there are those prisons with already upped heros and this may change the outcome. Maybe disable prisons for your scripts?

Finally an use for eagle eye/scouting. I was missing those skills!


Hmmm, yes, it may become unbalanced. Although as seen in the test map, when Sanya reveals a part of the map, the radius is quite large, due to her eagle eye speciality. For other heroes the radius is less.

Calculation is: Radius = eagle eye + scouting, doubled if eagle eye or scouting specialist. So normally it may become a radius up to 6, which is not that much. Only for specialists it may become up to 12.

Hmm, perhaps script has bug? Radius seemed to be larger. I'll check that.

The minimum radius is 2 (basic eagle eye and basic scouting, no specialist). I think this small radius is not that unbalanced. And to level up you need time. So by getting expert of both most of the map is already revealed, i think. O.k. that depends on map size. But on larger maps the revealed part is not that significant.

And then after revealing a part of the map the heroes movement is significantly reduced.

Currently i don't know how to limit that to once per week without usage of one more hero variable. I'll think about that. Currently the movement reduction itself is the identifier

Hmmm, if this is too unbalanced, maybe it's better to reduce the revealed radius? By what?

BTW, i'm thinking of inverting that for necromancers. So instead of revealing a part of the map, hide a part of the map. Needs other skills, though. Maybe Necromancy and Mysthicism? Maybe needs an artifact? Which?

Another thing: I'm working on a nice enhancement of Learning. A hero having Learning and Offense may dynamically during battle improve stacks AT, when stack is attacking, and if has learning and Armorer, dynamically during battle improves stacks DF, when defending. And maybe dynamically improve the first aid tent each time it heals some stack, if has first aid and learning. This could add some nice dynamic battle modification. So Learning too has its benefit.

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

Page compiled in 0.0945 seconds