|
|
solitaire345
Promising
Famous Hero
|
posted August 08, 2012 08:12 PM |
|
|
Okay, fixed it this way:
!!VRz18:S^TpMrkSe2.pcx^;
!!DL1:Ay3/11/z18/1; Show outline
____________
|
|
Slayer
Adventuring Hero
|
posted August 09, 2012 05:25 AM |
|
|
So I had a unit idea that I wanted to make, would it be possible to do this? (And what program to use)
A unit that always shoots a retextured Chain Lightning to make it look like the bouncing fire of H5.
I'm pretty sure I could make the unit cast immunity to it's hit on it's friendlies at the start of it's turn.
(Make it cast similar to HoL Prayer from Bishop unit I think it is now)
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted August 09, 2012 05:28 AM |
|
|
|
Slayer
Adventuring Hero
|
posted August 09, 2012 08:19 AM |
|
Edited by Slayer at 08:23, 09 Aug 2012.
|
So I couldn't make the unit cast the effect of Pendant of Negativity and then cast cast a new or retextured spell?
Anyways, if that wouldn't work whats the best program for making non-hybrid unit models?
|
|
Slayer
Adventuring Hero
|
posted August 09, 2012 08:21 AM |
|
|
Hi, I am using Era 2 from this forum and New Objects patch, when trying to open h3wcmped.exe I get this,
"ResourceManager::Get Text could not find "text" resource ZCmpEdtr.txt"
If I hit anything I get,(From h3wcmped), Fatal-runtime error!
Thanks for any help in advance, help appreciated.
|
|
Bersy
Honorable
Supreme Hero
|
posted August 09, 2012 11:34 AM |
|
|
Did you try "Fix Editor" program from Era Start Menu?
|
|
JimV
Responsible
Supreme Hero
|
posted August 09, 2012 02:07 PM |
|
|
Quote: So I had a unit idea that I wanted to make, would it be possible to do this? (And what program to use)
A unit that always shoots a retextured Chain Lightning to make it look like the bouncing fire of H5.
I'm pretty sure I could make the unit cast immunity to its hit on it's friendlies at the start of it's turn.
The Hero "The Doctor" in "The Dragon Slaughter" can make any damage spell affect all enemy stacks, and friendly stacks are immune to his area spells (Fireball, Inferno, Chain Lightning, Meteor Shower, Armageddon), so I believe it is possible - assuming I understand what you mean and you can do the graphics of retexturing.
Programs to use:
For retexturing, GIMP or Photo Shop, plus MMARCHIVE, DefPreview, and H3DefTool - see the tutorials at this site.
For making it happen: ERM (ERM Help file, ERM Script Editor). See the scripts for Inteus in "The Dragon Slaughter".
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted August 09, 2012 02:12 PM |
|
|
|
JimV
Responsible
Supreme Hero
|
posted August 09, 2012 02:16 PM |
|
|
"By retexturing Chain Lightning" - I assumed this meant altering the CL def so it looks like fire instead of lightning.
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted August 09, 2012 02:20 PM |
|
|
But I don't see how we can use a re textured chain and a regular chain in same game. Does redirect works with spells graphics?
____________
Era II mods and utilities
|
|
JimV
Responsible
Supreme Hero
|
posted August 09, 2012 02:43 PM |
|
|
I assumed the CL would be replaced outright - didn't see having both versions as part of the specifications - but thought of mentioning redirects. Decided not to since then I would probably have to explain what they were (one thing at a time). To find out if they work on spells I would try it and see (as we used to say about pr/t limits in engineering). Note there are probably two defs for CL (one for the travelling part and one for the strike), and the strike might affect Lightning as well, so redirects might be necessary even to keep Lightning as well as CL. All of which is more than I wanted to get into.
This illustrates again that requests for scripts here are usually not very specific, and two different people can form very different ideas of what is wanted from the same request. I assumed Slayer just wanted a different version of CL with immunity for friendly stacks, and would live with however this changed the rest of the game - as a start, anyway. Start with the easy part and do the impossible part later, as we also say in engineering.
|
|
kegolo
Promising
Famous Hero
of infamy
|
posted August 09, 2012 08:57 PM |
|
Edited by kegolo at 21:01, 09 Aug 2012.
|
A few posts back someone was asking how to replace deathcloud with a new graphic, but only for a certain troop casting it (so that liches would still have the normal one). I pointed to how I do it with Brutes/Brute chieftans for the Covenant, just changing the address to a closely named spell in memory. So I believe this is possible and the code is already posted back there, only need the new address for CL, which I can look up later.
Redirect does not work on demand in battle AFAIK.
Edit: Ok I'll bite, what's the def name of CL?
|
|
OxFEA
Promising
Famous Hero
feanor on DF2.ru
|
posted August 09, 2012 09:20 PM |
|
|
CL, afaik, uses the same defs as simple Lighning Bolt +hardcoded lines.
|
|
Slayer
Adventuring Hero
|
posted August 09, 2012 10:32 PM |
|
Edited by Slayer at 22:34, 09 Aug 2012.
|
Could just replace Chain Lightning with the Fire Bounce, I don't really think it'd have any impact on game.
And thanks for help.
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted August 09, 2012 10:36 PM |
|
|
Then if you don't mind getting something at the cost of losing another, as I do often when see new scripts, you can start re texturing, the scripting part will not be difficult.
____________
Era II mods and utilities
|
|
JimV
Responsible
Supreme Hero
|
posted August 10, 2012 12:35 AM |
|
Edited by JimV at 06:03, 10 Aug 2012.
|
Redirecting spell graphics works in combat. E.g., to change the Chain Lightning strike from Lightning to a Fireball (under Era 2):
ZVSE
* TestCLredirect, JHV, Aug. 9, 2012
!?BG0&1000;
!!BG:A?v1 S?v2;
!!FU|v1<>1/v2<>19:E; exit if not Hero cast or spell not CL
!!SN:L^Era.dll^/?y1; y1=handle
!!SN:Ay1/^RedirectFile^/?y2; y2=FU address
!!SN:Ey2/1/^C03SPA1.def^/^C13SPF.DEF^; switch Lightning DEF to Fireball
!?BG1&1000;
!!SN:L^Era.dll^/?y1; y1=handle
!!SN:Ay1/^RedirectFile^/?y2; y2=FU address
!!SN:Ey2/1/^C03SPA1.def^/^^; restore Lightning DEF
P.S. (In response to a complaint which has since been deleted.) Based on what OxFea said above, and screen-capturing some Chain Lightnings, first there are hard-coded white/light-blue arcs between stacks, then all stacks display the lightning-strike animation, roughly simultaneously. It would cost much more to replace the hard-coded arc with something else, but it could be done. One way would be to use the XFiles plugin to display arcs of a different texture. Under this method the spell would be simulated in ERM, so the strike animations could be serial instead of parallel, if that was desired. No doubt there are other interesting alternatives also. Anyway, it is a simple matter to switch spell animation DEF's using Bersy's RedirectFile function.
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted August 10, 2012 06:43 AM |
|
|
|
solitaire345
Promising
Famous Hero
|
posted August 10, 2012 04:17 PM |
|
|
Another !!DL related question from me. Is it possible to open one dialog from another and close them both from second one? Currently when I close second one, half-screwed first dialog still stays on screen.
This is my code for closing dialogs:
!?DL&v998=1/v999=52/v1000=13; Art->Cr button
!!DL1:C1; Close self
!!DL2:S1; Show DL2
!?DL&v998=2/v999=30721/v1000=13; Art->Cr exit button
!!SN:W^ThisMarketX^/-1;
!!SN:W^ThisMarketY^/-1;
!!SN:W^ThisMarketL^/-1;
!!FU671088648:P; Clean SN:W vars
!!DL2:C1; Close self
Tried moving !!DL1:C1; to another trigger, adding delays for dialog closing and similar tricks. Nothing worked.
____________
|
|
JimV
Responsible
Supreme Hero
|
posted August 10, 2012 04:52 PM |
|
Edited by JimV at 17:09, 10 Aug 2012.
|
According to my WoG 3.59 ERM Help, which might be out-of-date, the DL:C command does not take a dialog number, and closes the active DL. For example:
!!DL2:S;
...
!!DL3:S; open DL3 on top of DL2
...
!!DL:C1; close DL3 - Dl2 then becomes active again
...
!!DL:C1; close DL2
Here are some notes from Bersy:
Bersy at HC in ERM Help thread, Oct. 21, 2011:
In Era 1.9+ buttons react on events 13 (left mouse button release) and 14 (right click).
The "Flags" field in the template is key-code of key to be binded to button (0 - no key).
So typical close action is written as follows:
!?DL&v998=DLG_ID/v999=BTN_ID/v1000=13;
!!DL:C1;
(key-code 28 in template to close on Enter, 1 - on Escape and so on)
The problem with closing is that C1 simply sets global variable Command. When callback trigger DL return control to wog core, the command is handled. Calling DL:S will clear this variable. So:
!!DL:C1;
!!DL:S;
will never work in any version. The solution is in reverse order:
!!DL:S;
!!DL:C1;
When the second dialog will be closed, the previous one will handle CLOSE message and close too.
Other solution is to write a function for every DL-dialog and then use something like this:
FUNC_ID := FIRST_DIALOG_FUNC;
WHILE FUNC_ID <> -1 DO
| CALL FUNCTION (FUNC_ID)
END;
------end excerpt----------
See the comments around that one for more details. I think the issue was how to open a new DL from an old DL and close the old DL without closing the new DL too - not exactly what you are looking for, but closer than my example (which leaves the old DL underneath the new one. Bersy's Method, translated into ERM, is:
ZVSE
* test of Bersy's alternate to TLo
!#VRz101:S^SFDL1CHR.TXT^;
!#VRz102:S^NEWDL2Mx.TXT^;
!?CM5; check left-click on adventure screen: Cast Spell
!!CM:I?v1; [Area clicked: v1]
!!FU&v1<>8:E; exit if Cast Spell button not clicked
!!CM:R0; [Disable standard click operation]
!!VRv100:S2; try 3 S1-->s2
!!FU200:P;
!?FU200; dialog loop
!!FU&v100=-1:E; #0
!!FU100:P;
!!SN:G0; goto cmd #0
!?FU100;
!!VRy1:Sv100+100; z-number
!!VRz100:Szy1;
!!DLv100:Nz100; (load template file)
!!DLv100:S; show DLv100
!?DL&v998=2/v999=6/v1000=12; left-click on Hint Box
!!VRv100:S1; open dialog 1 after closing dialog 2
!!DL:C1;
!?DL&v998=1/v999=3/v1000=12; left-click on Exit
!!DL:C1;
!!VRv100:S-1; must be here, not in FU100
|
|
solitaire345
Promising
Famous Hero
|
posted August 10, 2012 05:07 PM |
|
|
Quote: !!DL:C1;
!!DL:S;
will never work in any version. The solution is in reverse order:
!!DL:S;
!!DL:C1;
Wow. Didn't think of that. Thanks a lot
Edit: Is it my failure in reading manuals again, or does DL:N really crash if dialog was loaded and not shown?
Edit2: yeah, DL:N really crashes the game if dialog was not shown
____________
|
|
|