Jump to content


Photo

Creepin's various WeiDU questions of varying silliness

0x10e

  • Please log in to reply
111 replies to this topic

#21 Creepin

Creepin
  • Administrator
  • 1676 posts

Posted 19 July 2017 - 10:09 AM

@Argent77
Thank you so much for the explanations attached. Now to ponder over them for a little bit more...

@kjeron
That is odd.  For me, that code duplicates every matching BAM file, replacing the "AX" with "TE" in the filename.
Tried again to make sure I didn't erred somewhere. Still the same effect. Ironically I'm trying this on Win7, where Argent77 successfully replicated your method.

Attached Files


Edited by Creepin, 19 July 2017 - 01:36 PM.

The Old Gold - v0.2 WIP (mod for BGT/BWP/BWS)


#22 Creepin

Creepin
  • Administrator
  • 1676 posts

Posted 19 July 2017 - 02:27 PM

Since this was going to be 3rd thread I was planning to create in IE Help in last 3 days I decided to merge them all together to keep me from spamming whole IE Help board  :rolleyes:  I also want to take an opportunity to thank you folks for all your answers and advices - they're really appreciated! :)

Right now I have a problem with ADD_CRE_EFFECT macros. I'm trying to add an effect having a spell as a resource (opcode 206), and it looks like WeiDU doesn't accept resource as a text, it keeps asking me for an integer, but what integer could I provide for the spell name?
 
Here's the code:

COPY_EXISTING_REGEXP GLOB ~.*\.cre~ ~override~
    READ_SHORT 0x28 animation
    PATCH_IF (animation = 32551) OR (animation = 32553) BEGIN
        LAUNCH_PATCH_FUNCTION ADD_CRE_EFFECT
        INT_VAR
        opcode = 206
        target = 1
        timing = 1
        resource = ~crspl02.spl~
        END
    END
BUT_ONLY_IF_IT_CHANGES

And here is the relevant part of its debug log:

ERROR: cannot convert crspl02.spl or %crspl02.spl% to an integer

What went wrong?


Edited by Creepin, 19 July 2017 - 02:38 PM.

The Old Gold - v0.2 WIP (mod for BGT/BWP/BWS)


#23 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 4842 posts

Posted 19 July 2017 - 02:39 PM

You need to edit just this:
LAUNCH_PATCH_FUNCTION ADD_CRE_EFFECT
         INT_VAR
         opcode = 206
         target = 1
         timing = 1
         resource = ~crspl02.spl~
         END
To be this:
LAUNCH_PATCH_FUNCTION ADD_CRE_EFFECT
         INT_VAR
         opcode = 206
         target = 1
         timing = 1
         STR_VAR 
         resource = ~crspl02~
END
See the INT_VAR is the same thing for the integers... as the resource is a "string variable".

Edited by The Imp, 19 July 2017 - 02:42 PM.

Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.


#24 Creepin

Creepin
  • Administrator
  • 1676 posts

Posted 20 July 2017 - 12:35 AM

So that's what that INT_VAR was there for! Doh, I should have noticed :) Thank you Jarno!

Edited by Creepin, 20 July 2017 - 12:36 AM.

The Old Gold - v0.2 WIP (mod for BGT/BWP/BWS)


#25 Creepin

Creepin
  • Administrator
  • 1676 posts

Posted 19 October 2017 - 01:20 PM

IESDP states regarding Opcode 127:

 

Spoiler

 

I'm trying to use that custom 2da option, but got stuck on the issue which is complete stopper: where/how exactly do I put the name of that custom 2da?

I tried to change "from 2da file" field in spmon01.eff from monsum01 to cr2da001 manually by typing it in hex mode of NI (because there's finite list of options when using NI's GUI for editing this field), but found out I don't have enough space to do so as there's only 4 bytes reserved for resource name. When I shortened my 2da name down to cr21 (4 letters) though, I had just the place to squeeze it inside the eff, but much to my surprise the game keep drawing summon subjects from monsum01.2da, not from cr21.2da. I further removed "spmonsum" value from the parameter 2 of the eff (just in case, I have no idea what it does or refers to), but still the same result. Apparently not only eff doesn't recognize my custom 2da, but it also kept somehow it's original ties with monsum01.2da even though I removed its mention.

At this point I'm out of my own ideas and would welcome yours :)

 

Add: actually I'm not sure typing my custom 2da name in hex was bound to work in the first place, for 2da resource isn't stored in the eff by its name but rather by associated number instead. For example monsum01 is stored in eff as 0, monsum02 - as 1 and so on. This looks hardcoded. But then again, why does IESDP claims its possible to use custom 2das, surely someone tested it with a success? Perhaps there's mods using such I could learn from?


Edited by Creepin, 19 October 2017 - 01:39 PM.

The Old Gold - v0.2 WIP (mod for BGT/BWP/BWS)


#26 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 4842 posts

Posted 19 October 2017 - 01:47 PM

I tried to change "from 2da file" field in spmon01.eff from monsum01 to cr2da001 manually by typing it in hex mode of NI (because there's finite list of options when using NI's GUI for editing this field)

It would be silly to not have the .2da file you intent to define, to not be in the games override folder when doing so ? Did you not have it there ?

Generally, I would assume the .2da name is in the effects resource 2 field, aka offset 0x0070. At least according to the Near Infinity, with the hexadecimal offsets shown up. (Options -> Show Hex Offsets)


Edited by The Imp, 19 October 2017 - 01:57 PM.

Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.


#27 Roxanne

Roxanne

    Modder

  • Member
  • 3564 posts

Posted 19 October 2017 - 01:57 PM

-


Edited by Roxanne, 19 October 2017 - 02:08 PM.

The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*

 


#28 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 4842 posts

Posted 19 October 2017 - 01:59 PM

Roxanne, if only you would see my posts... but nope.


Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.


#29 Creepin

Creepin
  • Administrator
  • 1676 posts

Posted 19 October 2017 - 02:31 PM

It would be silly to not have the .2da file you intent to define, to not be in the games override folder when doing so ? Did you not have it there ?
Generally, I would assume the .2da name is in the effects resource 2 field, aka offset 0x0070. At least according to the Near Infinity, with the hexadecimal offsets shown up. (Options -> Show Hex Offsets)

Re. having 2da in question in override - of course I do :) The choice for this field in GUI is actually limited to ten 2da's, it doesn't draw from all 2da's present in override like usual fields do.
Re. resource 2 - tried that, all I've achieved is that the creature summoned now do so without it's summoning animation played, :huh: but still it's the creature from monsum01.2da nevertheless.


Edited by Creepin, 19 October 2017 - 02:38 PM.

The Old Gold - v0.2 WIP (mod for BGT/BWP/BWS)


#30 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 4842 posts

Posted 19 October 2017 - 02:58 PM

It would be silly to not have the .2da file you intent to define, to not be in the games override folder when doing so ? Did you not have it there ?
Generally, I would assume the .2da name is in the effects resource 2 field, aka offset 0x0070. At least according to the Near Infinity, with the hexadecimal offsets shown up. (Options -> Show Hex Offsets)

Re. having 2da in question in override - of course I do :) The choice for this field in GUI is actually limited to ten 2da's, it doesn't draw from all 2da's present in override like usual fields do.
Re. resource 2 - tried that, all I've achieved is that the creature summoned now do so without it's summoning animation played, :huh: but still it's the creature from monsum01.2da nevertheless.

Attach files please ... Specifically in a .zip file .. reason being that I could open them.


Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.


#31 Creepin

Creepin
  • Administrator
  • 1676 posts

Posted 20 October 2017 - 02:33 AM

Update: resource 2 (offset 0x0070) is an animation. No wonder animation ceased to play when I crammed resource 2 with my 2da name :rolleyes:

 

Update 2: the reference to 2da is stored within eff 127 as a hex integer from 0 to 9 even though 4 bytes allocated to this reference could fit in something more. Any attempt to write there anything else, from ascii to hex 0A or more, leads to a monsum01 (hex reference 00) being activated or at least that's what it looks like from testing. By now I tend to believe that monsum01 being active for me was not due to me overlooking reference to it somewhere in eff but rather due to it being built-in failsafe in case reference is out of 0 - 9 boundary. I also assume that there should be some 2da-like mapping where monsum01 = 0, monsum02 = 1 and so on. I was unable to find such 2da, so it might be hardcoded. If so, then how is it ever possible to use custom 2da unless map it within exe, and we need Erephine or Ascension64 for that :rolleyes:

 

Still, I am attaching the test files I was working with (in zip :)) in hope I've missed something obvious and it is in fact possible to attach custom 2da to opcode 127.

Attached Files


Edited by Creepin, 20 October 2017 - 06:29 AM.

The Old Gold - v0.2 WIP (mod for BGT/BWP/BWS)


#32 -kjeron-

-kjeron-
  • Guest

Posted 20 October 2017 - 06:49 AM

Opcode 127 has a hardcoded 2da list, Opcode 331 has the externalized 2da list.

Custom 2da's go in the first resource field.

Custom animations go in the second resource field.

Parameter2 still dictates the allegiance of the summoned creatures for custom 2da files: 0-4 = ALLY, 5-9 = ENEMY.

 



#33 Creepin

Creepin
  • Administrator
  • 1676 posts

Posted 20 October 2017 - 07:15 AM

Yes, yes and yes, that worked like a charm! Thank you kjeron so much! :Bow:


The Old Gold - v0.2 WIP (mod for BGT/BWP/BWS)


#34 Creepin

Creepin
  • Administrator
  • 1676 posts

Posted 26 October 2017 - 01:03 AM

Does IE have out of the box function to summon "up to X HD" monsters at all? Something like opcode 127, but treating number in parameter 1 not like the amount it had to fill from associated 2da, but as a max for RNG picking between 1 and that max? Of course I could emulate it, it's just seem hard to believe that IE doesn't have build in function for, like, "roll 1D6 to determine the total HD of a group summoned", which I understand to be a staple for AD&D.


The Old Gold - v0.2 WIP (mod for BGT/BWP/BWS)


#35 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 4842 posts

Posted 26 October 2017 - 01:16 AM

Well, you can simulate it by setting the effect percentages between 0 and 99. So 1HD monster from 0 to 9, 2HD monster from 10 to 19 and so forth toward to 10HD from 90 to 99 for example.


Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.


#36 Creepin

Creepin
  • Administrator
  • 1676 posts

Posted 26 October 2017 - 01:30 AM

Of course I could emulate it

This part was exactly about approach you mentioned, what I wonder is whether such tabletop mechanic was actually omitted in IE or I just don't know something :)


Edited by Creepin, 26 October 2017 - 01:32 AM.

The Old Gold - v0.2 WIP (mod for BGT/BWP/BWS)


#37 Creepin

Creepin
  • Administrator
  • 1676 posts

Posted 28 October 2017 - 05:06 AM

When exactly does weapon item abilities performs: upon attack (no matter if target was hit or missed) or only upon successful hit? Or it is controlled by some parameter in ability?

The Old Gold - v0.2 WIP (mod for BGT/BWP/BWS)


#38 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 4842 posts

Posted 28 October 2017 - 05:46 AM

When exactly does weapon item abilities performs: upon attack (no matter if target was hit or missed) or only upon successful hit? Or it is controlled by some parameter in ability?
What reference are you trying to use ? Is it "performs: upon attack" or something else, I can't interpreter the exact word(s).

Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.


#39 Creepin

Creepin
  • Administrator
  • 1676 posts

Posted 28 October 2017 - 06:01 AM

What reference are you trying to use ? Is it "performs: upon attack" or something else, I can't interpreter the exact word(s).

I am asking whether opcode attached to the weapon through item ability will be executed each time I attack someone with this weapon or only when I actually hit my target. Say, I want a sword with opcode 13 or 55, and I need to make sure it only insta-kills on successfull blows while doing nothing if I perform an attack but miss the target: is this default behaviour in IE or are there any switches to it?


Edited by Creepin, 28 October 2017 - 06:12 AM.

The Old Gold - v0.2 WIP (mod for BGT/BWP/BWS)


#40 -kjeron-

-kjeron-
  • Guest

Posted 28 October 2017 - 11:34 PM

Only when you hit.

There is no way to trigger an effect on a miss.

 

Does IE have out of the box function to summon "up to X HD" monsters at all? Something like opcode 127, but treating number in parameter 1 not like the amount it had to fill from associated 2da, but as a max for RNG picking between 1 and that max? Of course I could emulate it, it's just seem hard to believe that IE doesn't have build in function for, like, "roll 1D6 to determine the total HD of a group summoned", which I understand to be a staple for AD&D.

In 2E the monster/animal summoning spells were dX creatures of level X, not dX total HD of creatures, so that is what we have, at least in the EE's.  The summon opcodes can roll dice(using the dice fields, leave parameter1 at 0) for an amount of creatures, but not for an amount of HD of creatures, by setting the special field to '1'.  Opcode 127 can only do this in external EFF files, 331 can do it in EFF's or Spells.  I don't know whether or not this works in the original engine for opcode 127.