|
|
kegolo
Promising
Famous Hero
of infamy
|
posted July 02, 2012 06:18 AM |
|
|
I dunno. Don't remember H2. Do you remember what happened if you cast slow on a flying creature in H2? Was there even slow in H2?
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted July 02, 2012 07:02 AM |
|
|
|
kegolo
Promising
Famous Hero
of infamy
|
posted July 02, 2012 07:06 AM |
|
|
And what happened if you cast slow on a flier? Could it still move everywhere?
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted July 02, 2012 07:29 AM |
|
|
|
Sav
Known Hero
|
posted July 02, 2012 08:43 AM |
|
|
Quote: Could it still move everywhere?
No.
|
|
Hero_of_Light
Responsible
Supreme Hero
|
posted July 02, 2012 09:55 AM |
|
|
Quote: I have no idea how this script works. I replaced 11 wog - neutral town.erm with your script but game will not run. Apparently it depends on other changes, please upload the whole data/s (only scripts, no pcx), and on wikisend, thanks.
On ERA II my mod needs only this script. This script is the only one in my mod folder. I don't know why the game wouldn't start in your version.
In any case the problem lies in the building checking. If you can open the script and suggest a change here, then I can try it out myself and report the results.
____________
Not idly do the leaves of Lorien fall.
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted July 02, 2012 12:54 PM |
|
|
No idea, HERE is your mod (test map + script), when I open, endless errors.
|
|
Bersy
Honorable
Supreme Hero
|
posted July 02, 2012 01:50 PM |
|
|
Buttery.dll should be placed in EraPlugins, not in root.
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted July 02, 2012 01:55 PM |
|
|
|
Hero_of_Light
Responsible
Supreme Hero
|
posted July 02, 2012 06:30 PM |
|
|
I think I found a solution. It's not pretty but it works. By adding a building requirement for the upgraded buildings (that give third slots) I can make the player build the buildings in the desired order and so no harm no fault.
If you find the solution about the checking it will be most welcome for future reference but for now it isn't needed. Thank you for your time though, I really appreciate the concern and since the mod is about to be released in three weeks, I need all the help I can get to fight off bugs like this.
____________
Not idly do the leaves of Lorien fall.
|
|
kegolo
Promising
Famous Hero
of infamy
|
posted July 04, 2012 08:57 PM |
|
|
You know how each Commander is linked to another creatures' sounds? Like the Astral Spirit has genie sounds in combat? Anyone know of the memory address of where I can change this?
|
|
OxFEA
Promising
Famous Hero
feanor on DF2.ru
|
posted July 04, 2012 09:33 PM |
|
|
Pointer of array of monsters' structs: 0x006747B0
Structure of monster (from wog sources):
struct _MonInfo_{
long Group; // +0 0...8,-1 - neutral
long SubGroup; // +4 0...6,-1 - not available (423D87, 42A0FC)
char *ShortName; // +8 (4242B7)
char *DefName; // +C подгр и настр поля в 43DA45
Dword Flags; // +10 (424354, 42C6C0)
char *NameS; // +14
char *NameP; // +18
char *Spec; // +1C
long CostRes[7];// +20 (42B73A)
long Fight; // +3C
long AIvalue; // +40
long Grow; // +44 начальное количество монстров для найма
long HGrow; // +48
long HitPoints; // +4C
long Speed; // +50
long Attack; // +54
long Defence; // +58
long DamageL; // +5C
long DamageH; // +60
long NShots; // +64
long HasSpell; // +68 - сколько раз колдует
long AdvMapL; // +6C
long AdvMapH; // +70
};
You need field ShortName
|
|
kegolo
Promising
Famous Hero
of infamy
|
posted July 05, 2012 04:26 PM |
|
|
Thanks worked great. Another question. For your adding creatures plugin you made it so each new creature could have a shot associated with them like CR197SHOT.def. If I wanted to do something like add a new creature with a shot, then give a normal creature that shot, how would it go? I know for the adding shooting for non shooters script it was just a small edit in memory, is there another table to edit for the added creatures?
|
|
OxFEA
Promising
Famous Hero
feanor on DF2.ru
|
posted July 05, 2012 04:50 PM |
|
|
Quote: is there another table to edit for the added creatures?
No, I made it without table.
As I showed:
char tmp_missile[16];
int (__fastcall *LoadDef)(char *defname) =
(int (__fastcall*)(char*))(0x55C9C0);
int _edi() {__asm{mov eax, edi}}
int _esi() {__asm{mov eax, esi}}
int _ebx() {__asm{mov eax, ebx}}
int __fastcall NewMissiles_Body(char* missile_def, int edx)
{
int creature = *(int*)(_ebx()+0x34);
if (creature > 196)
{
sprintf(tmp_missile,"shot%i.DEF",creature);
return(LoadDef(tmp_missile));
}
return LoadDef(missile_def);
}
void NewMonstersMissiles()
{
//*(int*)0x43DA95 = MONSTERS_AMOUNT;
WriteHook((void*)0x43DB1D,(void*)NewMissiles_Body, HOOKTYPE_CALL);
}
|
|
kegolo
Promising
Famous Hero
of infamy
|
posted July 05, 2012 11:31 PM |
|
Edited by kegolo at 23:33, 05 Jul 2012.
|
So I've written a simple script to change how much money the capitol/ city hall / grail gives a player each turn (hopefully there isn't an easy way to do this in some text file I didn't see).
It works perfectly, but in the town screen, your "Daily Income" is still the original number, for example 9000 with grail and capitol. Is there a way to directly edit the daily income of a town?
My script:
!?TM1; Change town hall money settings
!!OW:C?y1; current player
!!OW:Ry1/6/?v9876; gold
!!OW:Wy1/?y3; number of towns
!!VRy3:Sd-1;
!!DO504/0/y3/1&$day$<>1:Py1; loop through all towns
!!OW:C?y1;
!!OW:Ry1/6/v9876;
!?FU504;
!!VRv1:S0;
!!OW:Wx1/x16/?y1; town number to y1
!!CA0/y1:B3/12;
!!VRv1&1:S1; 1 if city hall built
!!CA0/y1:B3/13;
!!VRv1&1:S2; 2 if capitol is built
!!CA0/y1:B3/26;
!!VRv1&1:Sd3; 4/5 if also grail
!!VRv9876&v1=1:Sd-500;
!!VRv9876&v1=2:Sd-1000;
!!VRv9876&v1=3:Sd-5000;
!!VRv9876&v1=4:Sd-5500;
!!VRv9876&v1=5:Sd-6000;
|
|
Hero_of_Light
Responsible
Supreme Hero
|
posted July 06, 2012 01:09 AM |
|
|
Is there a way to have a certain hero start with a certain Commander?
I want Mutare Drake start with the Conflux commanders (instead of the Dungeon ones) because I made her count as an Elementalist (but still starts with Brutes).
____________
Not idly do the leaves of Lorien fall.
|
|
kegolo
Promising
Famous Hero
of infamy
|
posted July 06, 2012 01:43 AM |
|
|
!!CO151:T8; ??? (didn't try)
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted July 07, 2012 09:25 AM |
|
|
Can't figure how to add an additional teleport location (to have a max of 6 instead of 5) to this script from JimV, please help:
!?OB40/19&-324; statues of Ares
!!FU455:P;
!?OB40/20&-324;
!!FU455:P;
!?FU455;
!!PO998:N?v1;
!!FU&v1=1:E; exit if statue already visited
!!PO998:N1; set "position N number" of current position to 1 (governs hint)
** statue locations: 106/16, 68/93, 35/91, 41/17, 12/18 (all underground)
!!VRv1997:+1; increase available teleport loc.s
!!IF&v1997<3:M^Hermes blesses you! When you have visited three of his statues, you will gain the magic power of teleportation, and for each of his blessings you will be able to set one teleport destination!^;
!!IF&v1997>2/v1997<5:M^Hermes blesses you! For each of his blessings you will be able to set one teleport destination! (Find other statues for more blessings.)^;
!!IF&v1997=5:M^Hermes blesses you! You have now visited all his statues and received all of his blesssings.^;
!!VRz-1:S^blessing^;
!!VRz-1&v1997>1:S^blessings^;
!!IF&v1997<5:M^You have received %V1997 %Z-1 so far.^;
!!IF&v1997>2:M^You can set or use teleport locations by right-clicking on your spell book (in the adventure screen).^;
!!QW&v1997>2:A111/29/2/-1; **remove G quest
!?CM0; check right-click on adventure screen
!!CM:I?v1; [Area clicked: v1]
!!FU|v1<>8/v1997<3:E; exit if Cast Spell not right-clicked or not enough statues visited
!!IF|110/117/126/129/229:M^The powerful magic of this region blocks your
teleporting ability!^;
!!FU|110/117/126/129:E;
!!CM:R0; [Disable standard right-click operation]
** set up radio button (G1) dialog box: use v1 for results/initial state/
** z# has header/z# has 1st item description/etc.
!!VRz-1:S^Gorgo's Teleport Menu:^;
!!VRz-2:S^(Set new teleport destination.)--sorry, not available now.^; v1=1
!!VRz-2&v1997>v1996:S^Set current location as a new teleport destination.^; v1=1
!!VRz-3:S^(Teleport to an existing destination.)--sorry, none available.^; v1=2
!!VRz-3&v1996>0:S^Teleport to an existing destination.^; v1=2
!!VRz-4:S^Exit from menu.^; v1=4
!!IF:G1/1/1/-1/-2/-3/-4; (G0 would be check-box)
!!FU&v1=4:E;
!!FU456&v1=1/v1997>v1996:P; set new dest.
!!FU&v1=1:E;
!!FU&v1=2/v1996<1:E;
** set up radio button (G1) dialog box: use v1 for results/initial state/
** z# has header/z# has 1st item description/etc.
!!VRz-1:S^Select a new location for Gorgo:^;
!!IF:G1/1/1/-1/753/754/755/756/757; (G0 would be check-box) **HERE
** move hero 29 (Gorgo/Melodia)
!!HE29&v1=1/z753<>z759:Pv1984/v1990/1;
!!HE29&v1=2/z754<>z759:Pv1985/v1991/1;
!!HE29&v1=4/z755<>z759:Pv1986/v1992/1;
!!HE29&v1=8/z756<>z759:Pv1987/v1993/1;
!!HE29&v1=16/z757<>z759:Pv1988/v1994/1;
!!HE29&v1=32/z758<>z759:Pv1989/v1995/1;
!?FU456; set new dest.
!!HE29:P?y1/?y2/?y3; get Gorgo's position
!!VRz-1:S^The Magic of Hermes:^;
!!VRz-2:S^Type a description of this location:^; -->z1
!!VRz-3:S^Options:^;
!!VRz-4:S^..\data\300\Hermes1S.jpg^;
!!VRz-5:S^..\data\300\hermes2.gif^;
!!VRz-8:S^Chose locations well--you cannot change them.^;
!!VRz2:S^Store Gorgo's current position.^; v1=1
!!VRz3:S^Cancel selection and exit.^; v1=2
!!IF:D7/-1/-2/-3/-5/-4/-5/0/-8/-8/-8/0/2/3/0/0; [Set up custom dialogue box]
!!IF:F7/0/0/0/0/0; [Disable Cancel button]
!!IF:E1/7; [Display Custom Dialogue] selected option 1-4 in v1
!!FU&v1=2:E;
!!VRy4:S1984+v1996; index to x-table
!!VRvy4:Sy1;
!!VRy4:S1990+v1996; index to y-table
!!VRvy4:Sy2;
!!VRy4:S753+v1996; index to z-table
!!VRzy4:Sz1;
!!VRv1996:+1;
|
|
JimV
Responsible
Supreme Hero
|
posted July 07, 2012 04:02 PM |
bonus applied by angelito on 18 Jul 2012. |
|
At last, a real ERM question which can't be answered just by quoting the ERM Help manual!
The script appears to have been set up for six teleport locations, but with only the first five implemented. I think two instructions have to be changed:
1) !!IF&v1997=5:M^Hermes blesses you! You have now visited all his statues and received all of his blesssings.^;
(v1997=5 --> v1997=6)
2) !!IF:G1/1/1/-1/753/754/755/756/757;
(add /758 at the end of the parameter list)
Also, another statue of type either 40/19 or 40/20 must be added to the map. Then, when all six statues have been visited, there should be six teleport destinations available. (I haven't tested this, so let me know if there is some problem.)
Adding a 7th destination would require changing some variable lists, but the lists already include six members. I will paste the whole script, including the variable lists and the above changes below:
ZVSE
** uses v1984-v1996
** v1984-v1989 x's for 6 teleports
** v1990-v1995 y's for 6 teleports
!#VRv1996:S0; # of teleport locations which have been set so far
!#VRv1997:S0; # of available teleport locations
** uses z730-z731, z753-z759
!#VRz730:S^Statue of Transportation (not visited)^;
!#VRz731:S^Statue of Transportation (visited)^;
!#VRz753:S^None--exit^;
!#VRz754:S^None--exit^;
!#VRz755:S^None--exit^;
!#VRz756:S^None--exit^;
!#VRz757:S^None--exit^;
!#VRz758:S^None--exit^;
!#VRz759:S^None--exit^; used to test for blank destination
!#HT40/19:P0/730;
!#HT40/19:P1/731;
!#HT40/20:P0/730;
!#HT40/20:P1/731;
** uses FU455-FU456
** statue locations: 106/16, 68/93, 35/91, 41/17, 12/18 (all underground)
!?OB40/19&-324;
!!FU455:P;
!?OB40/20&-324;
!!FU455:P;
!?FU455;
!!PO998:N?v1;
!!FU&v1=1:E; exit if statue already visited
!!PO998:N1; set "position N number" of current position to 1 (governs hint)
** statue locations: 106/16, 68/93, 35/91, 41/17, 12/18 (all underground)
!!VRv1997:+1; increase available teleport loc.s
!!IF&v1997<3:M^Hermes blesses you! When you have visited three of his statues, you will gain the magic power of teleportation, and for each of his blessings you will be able to set one teleport destination!^;
!!IF&v1997>2/v1997<5:M^Hermes blesses you! For each of his blessings you will be able to set one teleport destination! (Find other statues for more blessings.)^;
!!IF&v1997=6:M^Hermes blesses you! You have now visited all his statues and received all of his blesssings.^;
!!VRz-1:S^blessing^;
!!VRz-1&v1997>1:S^blessings^;
!!IF&v1997<5:M^You have received %V1997 %Z-1 so far.^;
!!IF&v1997>2:M^You can set or use teleport locations by right-clicking on your spell book (in the adventure screen).^;
!!QW&v1997>2:A111/29/2/-1; **remove G quest
!?CM0; check right-click on adventure screen
!!CM:I?v1; [Area clicked: v1]
!!FU|v1<>8/v1997<3:E; exit if Cast Spell not right-clicked or not enough statues visited
!!IF|110/117/126/129/229:M^The powerful magic of this region blocks your
teleporting ability!^;
!!FU|110/117/126/129:E;
!!CM:R0; [Disable standard right-click operation]
** set up radio button (G1) dialog box: use v1 for results/initial state/
** z# has header/z# has 1st item description/etc.
!!VRz-1:S^Gorgo's Teleport Menu:^;
!!VRz-2:S^(Set new teleport destination.)--sorry, not available now.^; v1=1
!!VRz-2&v1997>v1996:S^Set current location as a new teleport destination.^; v1=1
!!VRz-3:S^(Teleport to an existing destination.)--sorry, none available.^; v1=2
!!VRz-3&v1996>0:S^Teleport to an existing destination.^; v1=2
!!VRz-4:S^Exit from menu.^; v1=4
!!IF:G1/1/1/-1/-2/-3/-4; (G0 would be check-box)
!!FU&v1=4:E;
!!FU456&v1=1/v1997>v1996:P; set new dest.
!!FU&v1=1:E;
!!FU&v1=2/v1996<1:E;
** set up radio button (G1) dialog box: use v1 for results/initial state/
** z# has header/z# has 1st item description/etc.
!!VRz-1:S^Select a new location for Gorgo:^;
!!IF:G1/1/1/-1/753/754/755/756/757/758; (G0 would be check-box)
** move hero 29 (Gorgo/Melodia)
!!HE29&v1=1/z753<>z759:Pv1984/v1990/1;
!!HE29&v1=2/z754<>z759:Pv1985/v1991/1;
!!HE29&v1=4/z755<>z759:Pv1986/v1992/1;
!!HE29&v1=8/z756<>z759:Pv1987/v1993/1;
!!HE29&v1=16/z757<>z759:Pv1988/v1994/1;
!!HE29&v1=32/z758<>z759:Pv1989/v1995/1;
!?FU456; set new dest.
!!HE29:P?y1/?y2/?y3; get Gorgo's position
!!VRz-1:S^The Magic of Hermes:^;
!!VRz-2:S^Type a description of this location:^; -->z1
!!VRz-3:S^Options:^;
!!VRz-4:S^..\data\Hermes1S.jpg^;
!!VRz-5:S^..\data\hermes2.gif^;
!!VRz-8:S^Chose locations well--you cannot change them.^;
!!VRz2:S^Store Gorgo's current position.^; v1=1
!!VRz3:S^Cancel selection and exit.^; v1=2
!!IF:D7/-1/-2/-3/-5/-4/-5/0/-8/-8/-8/0/2/3/0/0; [Set up custom dialogue box]
!!IF:F7/0/0/0/0/0; [Disable Cancel button]
!!IF:E1/7; [Display Custom Dialogue] selected option 1-4 in v1
!!FU&v1=2:E;
!!VRy4:S1984+v1996; index to x-table
!!VRvy4:Sy1;
!!VRy4:S1990+v1996; index to y-table
!!VRvy4:Sy2;
!!VRy4:S753+v1996; index to z-table
!!VRzy4:Sz1;
!!VRv1996:+1;
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted July 07, 2012 07:44 PM |
|
|
Thank you, I missed the !!IF:G1/1/1/-1/753/754/755/756/757; change, now working. It is a nightmare to fix that map for ERA, 1 million flags working half of time, wish we had if/en at that time. The Castle Claghorn is still screwing its part of map -all tiles remain passable-, probably related to reload game while in labyrinth, I will post the mod when is done.
|
|
|