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: How to make Ballista base damage double for Christian?
Thread: How to make Ballista base damage double for Christian?
orc
orc


Famous Hero
posted September 23, 2017 03:17 PM
Edited by orc at 15:18, 23 Sep 2017.

How to make Ballista base damage double for Christian?

Hello,

I would like to make Ballista specialist make their war machine do double damage (4-6 instead of 2-3).

and I would like it to increase with attack, so Gurniso/Christian with 9 attack will have 40-60 damage ballista instead of 20-30.

How do I script this?

I watched creature specialists and tried a bit but nothing worked out (I used 146 for ballista creature number still with no effect)

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


Admirable
Omnipresent Hero
Wog refugee
posted September 23, 2017 04:26 PM

Well, you should show your script which didn't work, better learn how to do by correcting errors. Anyway, is simple:

ZVSE

!?BF&1000;
!!BA:H0/?y1 H1/?y2; check both heroes
!!HEy1:Ed/?y3 F?y4/d/d/d; get attacker level and attack skill
!!HEy2&y2>-1:Ed/?y5 F?y6/d/d/d;  get defender level  and attack skill
!!DO456789/0/10/1&y1=6|y1=97:Py3/y4;  run attacker stacks
!!FU&y2<0:E; exit if no defender
!!DO456789/21/31/1&y2=6|y2=97:Py5/y6; run defender stacks

!?FU456789;
;x1 level
;x2 attack skill
!!BMx16:T?y1;  type
!!FU&y1<>146:E; exit if no ballista
!!BMx16:U1/?y1 U2/?y2; check min and max damage
!!VRy1:*2; !!VRy2:*2;  multiply by 2
!!VRx1::10; divide level by 10
!!VRx1&x1<1:S1; define minimum value of 1
!!VRy1:*x1+x2;  multiply by level then add attack skill to damage
!!VRy2:*x1+x2;
!!BMx16:U1/y1 U2/y2; setup final damage

You will certainly need to fine tune it, I only used the vague parameters you gave.

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


Famous Hero
posted September 23, 2017 10:42 PM

Salamandre said:
Well, you should show your script which didn't work, better learn how to do by correcting errors. Anyway, is simple:

ZVSE

!?BF&1000;
!!BA:H0/?y1 H1/?y2; check both heroes
!!HEy1:Ed/?y3 F?y4/d/d/d; get attacker level and attack skill
!!HEy2&y2>-1:Ed/?y5 F?y6/d/d/d;  get defender level  and attack skill
!!DO456789/0/10/1&y1=6|y1=97:Py3/y4;  run attacker stacks
!!FU&y2<0:E; exit if no defender
!!DO456789/21/31/1&y2=6|y2=97:Py5/y6; run defender stacks

!?FU456789;
;x1 level
;x2 attack skill
!!BMx16:T?y1;  type
!!FU&y1<>146:E; exit if no ballista
!!BMx16:U1/?y1 U2/?y2; check min and max damage
!!VRy1:*2; !!VRy2:*2;  multiply by 2
!!VRx1::10; divide level by 10
!!VRx1&x1<1:S1; define minimum value of 1
!!VRy1:*x1+x2;  multiply by level then add attack skill to damage
!!VRy2:*x1+x2;
!!BMx16:U1/y1 U2/y2; setup final damage

You will certainly need to fine tune it, I only used the vague parameters you gave.



Hello salamandre,

Thanks for the reply.

I postee the script you are asking about a while ago. I basically modified script 39 (the specialty modification boost) and added few lines

Here it is the code.


orc said:
Hello,

I had two ideas:

First: What will happen if I used this line in my map

!!FU836:P2008/146/1/6/0;      

would it make christian increase ballista attack/defense every level instead of every 4 levels?


Second: I would like to edit Script 39 to make Ballista specialists also have same bonus as other creature specialists

I found this line in the code


!!FU804&w28>=1000/w28<2000:Px1/x2;     //check that hero is monster spec

and I also found that Ballista specialist is P2008

what should I do to make ballista gain attack, defense, and HP just like other creatures if the hero has ballista specialty? to make it gain just like other creatures gain (they gain attack equal to the hero attack and defense same and HP 12% + 3% every level I think)



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


Legendary Hero
posted September 23, 2017 11:35 PM

Great! It can be used to another new hero abilities!

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


Admirable
Omnipresent Hero
Wog refugee
posted September 24, 2017 12:05 AM

great, that will teach me about sitting down to write script when they think they know what they want but then they change their mind

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


Famous Hero
posted September 24, 2017 12:58 AM
Edited by Orc at 01:01, 24 Sep 2017.

Salamandre said:
great, that will teach me about sitting down to write script when they think they know what they want but then they change their mind


I only changed mind cuz I gave up. After 1 full year I thought maybe it was impossible so I thought I would think of another similar idea that cud be solved in easier way. Or maybe it was possible but no one knew. Or maybe the forum was sleeping lol.

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


Promising
Supreme Hero
Researching Magic
posted September 24, 2017 01:40 PM
Edited by RerryR at 13:42, 24 Sep 2017.

I think people in this forum have a lot of good ideas and start writing pages full of game improvements or suggest balance changes. Most of them are valid and would enrich the game.
But why are there so many different views?
This mostly comes from the fact that heroes 3 is a game which can or is played very differently for everyone. What is good for one, will not suit the other. This is what makes a good game in my opinion. Also this is the point where WoG/ERA excells. Giving you a lot of choices.

Now i can't help to wonder why somebody would wait over a year to see something changed instead of taking the matter in his own hand.
My point is: go ahead and play around with ERM or HEX editing. After a couple of weeks you will be able to do changes like this in a few minutes. Help will always be around the corner.

So no offence. This is just my general point of view and not exclusively addressed at you (because i know you already changed it).

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


Famous Hero
posted September 25, 2017 06:46 AM
Edited by orc at 07:26, 25 Sep 2017.

@Salamandre

hmmmmm,
there seem to be something wrong in the code

I get the message at the start of the map "error: reason:
!?Wrong function index (1...30000)"

this erm has wrong syntax
Disabled.

thats what I got (I had other erms before and they worked, but I only got problem after I pasted yours into a new event)

I tried to change the !?FU456789 to !?FU30000 . I am not sure exactly what happened. something happened, but im not entirely sure what it was. I also changed DO456789 to DO30000

and I started with Gurnisoo with 12 attack and he has 154 - 176 damage. it didnt make any sense to me. that wasnt (4-6) X [1+Attack Skill] lol

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


Promising
Supreme Hero
Researching Magic
posted September 25, 2017 08:34 AM
Edited by RerryR at 08:35, 25 Sep 2017.

Here the code works with no error.

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


Admirable
Omnipresent Hero
Wog refugee
posted September 25, 2017 08:46 AM

it happens when you use wog 3.58 instead of Era 2. What about you update?

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


Famous Hero
posted September 25, 2017 03:52 PM
Edited by orc at 16:01, 25 Sep 2017.

Salamandre said:
it happens when you use wog 3.58 instead of Era 2. What about you update?

yes I have 3.58

EDIT:
which one is better? I am watching this thread of yours and it has many many links lol.  

there is WOG 3.58, WOG, and Era 2 links. whats the difference?

EDIT: ok i will try era 2 then

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


Admirable
Omnipresent Hero
Wog refugee
posted September 25, 2017 06:46 PM

That thread is from 2011, 6 years ago. Yes, install Era 2, is basically wog 3.58 cleaned of errors (as much as possible) + mods support and real time script possibilities. Which means you don't need anymore to put your scripts in map/events, but in external file.

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


Famous Hero
posted September 29, 2017 05:34 AM

Hello Salamandre,

I tried the script just now and there seem to be a mistake in the math. The script also did not work for gerwolf, but only for christian and gurnisoo.

What I wanted is:

damage:

[4 to 6] x [1 + attack skill]

what this script give me currently is:

minimum damage:

[ 4 + Attack Skill ] X [Attack Skill] = 4xAttack + Attack^2

Max damage:

[6 + Attack] X Attack = 6xAttack + Attack^2

how do I fix that?
Here is comparason of supposed vs current values:

0 attck:
4 - 6 as supposed
1 attck:
10 - 14 it should be 8 - 12
2 attck:
18 - 24 it should be 12 - 18
3 attck:
28 - 36 it should be 16 - 24
4 attck:
40 - 50 it should be 20 - 30
and the list goes on.

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


Admirable
Omnipresent Hero
Wog refugee
posted September 29, 2017 08:50 AM

You didn't ask for Gerwulf, you specified Christian and Gurni. Also you gave vague maths in your first post, nothing precise, so I specified you need to fine tune it. Which is not hard, just use my script and replace with your values, thats why I added comments after each line, to help you.

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


Famous Hero
posted September 30, 2017 06:23 AM

Salamandre said:
You didn't ask for Gerwulf, you specified Christian and Gurni. Also you gave vague maths in your first post, nothing precise, so I specified you need to fine tune it. Which is not hard, just use my script and replace with your values, thats why I added comments after each line, to help you.


ok so what is the better way? is it to check for hero specialty or to check for each hero?

I could find the list of hero specialties here:
http://www.wakeofgods.com/erm_help/format/format_hs.htm

but then there is the hero format:
http://www.wakeofgods.com/erm_help/format/format_h.htm

now, it seems that christian specialty (6) is different than Gerwulf Specialty (118) and is also different than gurniso (97), and is different than Arlach (81), that they are technically different specialties?

does that mean I will have to check for all of them, and that checking only one of them would not satisfy

Becuz I found that in script 39, P2008 was considered ballista specialist & commander can fly.

Im currently middling with the math though. I will sort out the above  after I fix the math.

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


Admirable
Omnipresent Hero
Wog refugee
posted September 30, 2017 08:27 AM
Edited by Salamandre at 08:29, 30 Sep 2017.

Erm help is accessible from mod manager, I don't know why you are linking those old sites, not updated in the last 10 years at last. I don't remember how many ballista specialists there are, but here is where you specify them:

!!DO456789/0/10/1&y1=6|y1=97:Py3/y4; run loop only if hero (y1) is 6 of 97. So to add Arlach (y1=81) or any others, just write:

!!DO456789/0/10/1&y1=6|y1=97|y1=81:Py3/y4; now Arlach is included in the list
____________
Era II mods and utilities

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


Famous Hero
posted September 30, 2017 10:25 AM
Edited by orc at 11:49, 30 Sep 2017.

Thx,

I also figured out the damage bit. I just deleted the 2 lines of yours for both attacker and defender. These 2:
!!VRy1:*x1+x2;  multiply by level then add attack skill to damage
!!VRy2:*x1+x2;

:D

Edit: so to include some ballista specialists. (I didnt include Torosar cuz I changed him to archery)


!?BF&1000;
!!BA:H0/?y1 H1/?y2; check both heroes
!!HEy1:Ed/?y3 F?y4/d/d/d; get attacker level and attack skill
!!HEy2&y2>-1:Ed/?y5 F?y6/d/d/d;  get defender level  and attack skill
!!DO456789/0/10/1&y1=6|y1=81|y1=97|y1=118|y1=56:Py3/y4;  run attacker stacks
!!FU&y2<0:E; exit if no defender
!!DO456789/21/31/1&y1=6|y1=81|y1=97|y1=118|y1=56:Py5/y6; run defender stacks


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


Admirable
Omnipresent Hero
Wog refugee
posted September 30, 2017 10:45 AM

Add same conditions to "run defender stacks". The last line, same y1= etc...

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


Famous Hero
posted October 01, 2017 05:01 PM
Edited by orc at 17:02, 01 Oct 2017.

it always gave me a error when I tried. even when I just add 1 hero only (Christ or gurniso or pyre) I still got a error.

So I Searched for logical operators in erm help, he said "Use / to indicate the same operator as previously used.". The forward slash meaning "like prev. logical operator".

nevertheless its working now :D

here is how the code looks like after I touched it:


ZVSE

!?BF&1000;
!!BA:H0/?y1 H1/?y2; check both heroes
!!HEy1:Ed/?y3 F?y4/d/d/d; get attacker level and attack skill
!!HEy2&y2>-1:Ed/?y5 F?y6/d/d/d;  get defender level  and attack skill
!!DO456789/0/10/1&y1=6|y1=56/y1=81/y1=97/y1=118:Py3/y4;  run attacker stacks
!!FU&y2<0:E; exit if no defender
!!DO456789/21/31/1&y2=6|y2=56/y2=81/y2=97/y2=118:Py5/y6; run defender stacks
!!FU&y2<0:E; exit if no defender

!?FU456789;
;x1 level
;x2 attack skill
!!BMx16:T?y1;  type
!!FU&y1<>146:E; exit if no ballista
!!BMx16:U1/?y1 U2/?y2; check min and max damage
!!VRy1:*2; !!VRy2:*2;  multiply by 2
!!VRx1::10; divide level by 10
!!VRx1&x1<1:S1; define minimum value of 1

!!BMx16:U1/y1 U2/y2; setup final damage



I still didnt delete any other variables created by salamandre. Although I dont use any of them, I might use them later, or maybe at least study the trigger :D

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread »
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.0682 seconds