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: Shooting with no shooters script
Thread: Shooting with no shooters script This thread is 2 pages long: 1 2 · NEXT»
Salamandre
Salamandre


Admirable
Omnipresent Hero
Wog refugee
posted August 15, 2010 10:35 AM

Shooting with no shooters script

Credits go to Chortos from russian forums for the script and to Itsjutme for translating the comments for me, so I could find the right one.

$= Creature ID
It needs shooting frames, obviously
Optional you can add [x]shot.82m in data, where x is creature ID for sounds ie crusshot for crusader (see deftool misc column for right names).
It works with all creatures except pikeman and halberdier. The projectile used will be the archers one (not sure, it looks like)

ZVSE

!?FU6000;

Make sure the creature number is valid
!!VRx3&x1=1/x2<2:S16;
!!VRx3&x1=1/x2>197:S16;
!!FU|x2<2/x2>197:E;

Get the correct address
!!VRx2:+7961526;

Do what they ask us to do
!!UN&x1=0:Cx2/1/x3;
!!UN&x1=1:Cx2/1/?x3;

!#MA:X$/?i;
!#VRi:|4;
!#MA:X$/i;
!#MA:N$/16;
!#FU6000:P0/$/11;
____________
Era II mods and utilities

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


Honorable
Legendary Hero
Age of erwins is over
posted August 15, 2010 10:37 AM

that's great
____________

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


Admirable
Omnipresent Hero
Wog refugee
posted August 15, 2010 10:42 AM
Edited by Salamandre at 10:58, 15 Aug 2010.

If someone could explain me how the !!VRx2:+7961526; address is found, then the projectile layout can be changed to whatever you want.

Also what x1 is and when it can have the value of 0/1.
x3= projectile type I guess?
x2 is creature ID
x1 is?
____________
Era II mods and utilities

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


Hired Hero
posted August 15, 2010 01:08 PM
Edited by yexian7 at 13:16, 15 Aug 2010.

Quote:
If someone could explain me how the !!VRx2:+7961526; address is found, then the projectile layout can be changed to whatever you want.

Also what x1 is and when it can have the value of 0/1.
x3= projectile type I guess?
x2 is creature ID
x1 is?


Valery,here are details

!!UN:C#1/1/#3;

#1:Memory Address (Shoot Address=MonsterID +7961526)

#3:Projectile Type
0 - Archer (exception: for being number 196 - drakolich);
1 - a monk;
2 - Elf;
3 - master gremlin;
4 - magician;
5 - titanium;
6 - Gog;
7 - personal;
8 - jellyfish;
9 - ork;
10 - Cyclops;
11 - lizard;
12 - Ice elemental;
13 - halflings;
14 - Catapult;
15 - ballista.

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


Admirable
Omnipresent Hero
Wog refugee
posted August 15, 2010 01:31 PM
Edited by Salamandre at 13:36, 15 Aug 2010.

I already know what are x2-x3. But still not x1.

@Edit: Feanor answered me:
x1:
0 - set missile type to creature (!!FU6000:P0/<creature ID>/<missile type>)
1 - get missile type from creature (!!FU6000:P1/<crID>/?<var for missile type>;)

____________
Era II mods and utilities

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


Hired Hero
posted August 18, 2010 03:09 PM

Salamandre, i thought you cannot access the game memory with UN:C under wog 3.58, you'd need the exe modified with TE or the rules changed?
____________
Sagamosa
Advanced Levels

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


Known Hero
HC Adventurer From China
posted August 18, 2010 05:07 PM

Well, I cannot understand clearly. The error screen appears whenever I shoot with nonshooter army. For example, what should I do with the map ERM if I wanna shoot with the azure dragon without editing the LOD file?
____________
A jewel is just a pebble that found a way to shine.

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


Admirable
Omnipresent Hero
Wog refugee
posted August 18, 2010 07:04 PM
Edited by Salamandre at 19:05, 18 Aug 2010.

@Sagamosa, there are several threads in df2 forums about reverse engineering. They did it on 3.58 exe as well, thus the address I got.
I also have the address for ERA, it is 7994814. For more infos, ask there, as I do not know more details about.

@DDpro: you must add shooting frames to the azure, then put its ID in the script.

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


Promising
Famous Hero
feanor on DF2.ru
posted August 18, 2010 07:36 PM

Universal code for getting this address:

!!UN:C4446879/4/?y10;
!!UN:C4446867/1/?y11;
!!VRy10&y11=254:-2;
!!VRy10&y11=-2:-2;

//now it in y10.

I think, it will work at 358, TE, ERA, MoP and with plugin for adding creatures.


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


Known Hero
HC Adventurer From China
posted August 19, 2010 04:07 AM

Quote:
@Sagamosa, there are several threads in df2 forums about reverse engineering. They did it on 3.58 exe as well, thus the address I got.
I also have the address for ERA, it is 7994814. For more infos, ask there, as I do not know more details about.

@DDpro: you must add shooting frames to the azure, then put its ID in the script.


Thanks for the information
I remember that in the "Advanced War Machine I" ERM, they added the shooting frames of magog to the catapult - how did they do that?

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


Admirable
Omnipresent Hero
Wog refugee
posted August 19, 2010 10:32 AM

They did it the same way Woodmelon uses Orrin specialty on shooters for lich/magog projectiles, they change type on shoot action.

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


Known Hero
HC Adventurer From China
posted August 20, 2010 03:40 AM

Quote:
They did it the same way Woodmelon uses Orrin specialty on shooters for lich/magog projectiles, they change type on shoot action.


Thanks, I see.
____________
A jewel is just a pebble that found a way to shine.

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


Adventuring Hero
New Hero
posted March 17, 2011 04:26 PM
Edited by emrysblack at 23:24, 23 Mar 2011.

Is there a way to simply change projectile on unit that already shoots without replacing def?

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


Promising
Legendary Hero
Pizza Nazi
posted April 24, 2011 07:06 PM

But now a thing that needs to be known why pikemans and halberdiers cannot shoot?
I wanted to change the halberdier to an hunter and i really need to know why.

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


Promising
Famous Hero
feanor on DF2.ru
posted April 24, 2011 07:16 PM

Quote:
But now a thing that needs to be known why pikemans and halberdiers cannot shoot?
I wanted to change the halberdier to an hunter and i really need to know why.

Cause:

CPU Disasm
Address   Hex dump          Command                                  Comments
0043DA8E  |.  8B43 34       MOV EAX,DWORD PTR DS:[EBX+34]
0043DA91  |.  83C0 FE       ADD EAX,-2                              ; Switch (cases 2..92, 17. exits)
0043DA94  |.  3D 90000000   CMP EAX,90
0043DA99  |.  77 7F         JA SHORT 0043DB1A
0043DA9B  |.  33C9          XOR ECX,ECX
0043DA9D  |.  8A88 A4DB4300 MOV CL,BYTE PTR DS:[EAX+43DBA4]

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


Promising
Famous Hero
of infamy
posted May 04, 2011 11:16 PM

Quote:
Credits go to Chortos from russian forums for the script and to Itsjutme for translating the comments for me, so I could find the right one.

$= Creature ID
It needs shooting frames, obviously
Optional you can add [x]shot.82m in data, where x is creature ID for sounds ie crusshot for crusader (see deftool misc column for right names).
It works with all creatures except pikeman and halberdier. The projectile used will be the archers one (not sure, it looks like)



Hi I'm wondering how the lich's missle works (dracolich I suppose as well). I want to make a creature that fires a missle and then has an animation similar to the death cloud, but with another creature.

Possible? Also, slightly off topic, but what would be the script for a creature to do 25% of the damage it does to the enemy to itself? I'm making a new town that will be out by the end of the year but really am a ERM noob and more of a graphics guy.
____________

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

Tavern Dweller
posted November 08, 2011 01:30 AM
Edited by skymarshall at 01:33, 08 Nov 2011.

A bit more on this - if you want a creature to shoot lasers (i.e. like Evil Eyes or Archmages) as opposed to projectiles (i.e. like everything else) you need another function as well as the FU6000 described above.

File offset below is for WOG / ERA.  


*****************************************
**FU6001 - memory edit of shooter laser table
**x1 - 0 for Write / 1 for Read
**x2 - creature ID
**x3 - beam color (0=green, 1=white, 2=black)
**
** mem loc 4453828 corresponds to file offset 0x3f5c4 which contains
** an array of bytes for the color of beams used by creatures 35-121.
**
**to make a creature a laser shooter one must:
** - give the creature an entry in the projectile table with FU6000 (startup + load)
** - give the creature a laser color using FU6001 (startup + load)
** - set the 4 and 2048 flags for the creature (startup)
!?FU6001;
!!VRx3&x1=1/x2<35:S2;
!!VRx3&x1=1/x2>121:S2;
!!FU|x2<35/x2>121:E;                      
!!VRx2:+4453828-35;  
!!UN&x1=0:Cx2/1/x3;
!!UN&x1=1:Cx2/1/?x3;

Info and offsets ripped from russian thread http://forum.df2.ru/index.php?showtopic=6055&st=40

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


Adventuring Hero
posted November 16, 2011 11:45 AM
Edited by marshall32 at 12:11, 16 Nov 2011.

is this work ? because i tried but it doesn't work for me :S can someone put the exactly things that i need to do ?

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


Known Hero
Editing Heroes Without Limits
posted November 14, 2012 02:43 PM

"It needs shooting frames, obviously"

How do I know what is the correct shoot frame name?

Possibilities:
-[creature number]SHOT.def
-SHOT[creature number].def
-?
____________

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


Known Hero
Editing Heroes Without Limits
posted November 14, 2012 03:15 PM

I am testing with the peasent C139

-I have edited CRANIM (copied the archer line)

-I used exactly as you indicated

!?FU6001;
!!VRx3&x1=1/x2<2:S16;
!!VRx3&x1=1/x2>197:S16;
!!FU|x2<2/x2>197:E;
!!VRx2:+7961526;
!!UN&x1=0:Cx2/1/x3;
!!UN&x1=1:Cx2/1/?x3;
**peas
!#MA:X139/?i;
!#VRi:|4;
!#MA:X139/i;
!#MA:N139/16;
!#FU60010/139/11;


REsults:

-Before battle appear the message:
getsprite could not find the "sprite" resource "".

-At the batle the peasent may shoot. But if I shoot the game crashes.

Wogcrash log:



WoG Version: 3 . 59
Built on Dec 12 2005

******************************_Exception_(trace_details)_******************************
### Location: 1 : 82
### Location: 6 : 9
### Location: 6 : 40
### Location: 6 : 57

EIP = {0x00495B5A},  Access Violation. Attempt to {read} the inaccessible data at {0x00000008}

The Latest Executed ERM Receiver:

BG:A?v2320;

____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread » This thread is 2 pages long: 1 2 · NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.0564 seconds