Duke4.net Forums: EGwhaven Thread (Witchaven II Source Modification) - Duke4.net Forums

Jump to content

  • 6 Pages +
  • « First
  • 2
  • 3
  • 4
  • 5
  • 6
  • You cannot start a new topic
  • You cannot reply to this topic

EGwhaven Thread (Witchaven II Source Modification)  "An Area To Discuss EGwhaven, WH1 and WH2"

User is offline   Corvin 

  • King of the Lamers

#91

Okay did the HOZ Splitting Door. The Vertical Splitting door construction is a mystery to me, don't even know if the codes complete. There was no sound.
But well I applied a low tag of 9 and used [space] to open it, the wall morphed and I couldn't wall through without dieing.
So I'm constructing it wrong. Any ideas?
1

#92

No idea.

From WHTAG.C:
     case DOORSPLITVER:

          wallfind[0] = -1;
          wallfind[1] = -1;
          for (i = startwall; i <= endwall; i++)
               if ((wall[i].x == centx) || (wall[i].y == centy)) {
                    if (wallfind[0] == -1)
                         wallfind[0] = i;
                    else
                         wallfind[1] = i;
               }

          for (j = 0; j < 2; j++) {
               if ((wall[wallfind[j]].x == centx) && (wall[wallfind[j]].y == centy)) {
                    i = wallfind[j] - 1;
                    if (i < startwall)
                         i = endwall;
                    dax2 = ((wall[i].x + wall[wall[wallfind[j]].point2].x) >> 1) - wall[wallfind[j]].x;
                    day2 = ((wall[i].y + wall[wall[wallfind[j]].point2].y) >> 1) - wall[wallfind[j]].y;
                    if (dax2 != 0) {
                         dax2 = wall[wall[wall[wallfind[j]].point2].point2].x;
                         dax2 -= wall[wall[wallfind[j]].point2].x;
                         setanimation(&wall[wallfind[j]].x, wall[wallfind[j]].x + dax2, 4L);
                         setanimation(&wall[i].x, wall[i].x + dax2, 4L);
                         setanimation(&wall[wall[wallfind[j]].point2].x, wall[wall[wallfind[j]].point2].x + dax2, 4L);
                    }
                    else if (day2 != 0) {
                         day2 = wall[wall[wall[wallfind[j]].point2].point2].y;
                         day2 -= wall[wall[wallfind[j]].point2].y;
                         setanimation(&wall[wallfind[j]].y, wall[wallfind[j]].y + day2, 4L);
                         setanimation(&wall[i].y, wall[i].y + day2, 4L);
                         setanimation(&wall[wall[wallfind[j]].point2].y, wall[wall[wallfind[j]].point2].y + day2, 4L);
                    }
               }
               else {
                    i = wallfind[j] - 1;
                    if (i < startwall)
                         i = endwall;
                    dax2 = ((wall[i].x + wall[wall[wallfind[j]].point2].x) >> 1) - wall[wallfind[j]].x;
                    day2 = ((wall[i].y + wall[wall[wallfind[j]].point2].y) >> 1) - wall[wallfind[j]].y;
                    if (dax2 != 0) {
                         setanimation(&wall[wallfind[j]].x, centx, 4L);
                         setanimation(&wall[i].x, centx + dax2, 4L);
                         setanimation(&wall[wall[wallfind[j]].point2].x, centx + dax2, 4L);
                    }
                    else if (day2 != 0) {
                         setanimation(&wall[wallfind[j]].y, centy, 4L);
                         setanimation(&wall[i].y, centy + day2, 4L);
                         setanimation(&wall[wall[wallfind[j]].point2].y, centy + day2, 4L);
                    }
               }
          }

0

User is offline   Corvin 

  • King of the Lamers

#93

okay, I had no luck after trying different constructions. It's probably kinda easy once you know how to do it. I haven't gone through all the game maps to find an example, but I doubt they used it, since it wasn't in the manual. I'll have to continue to look tho, probably WH1 maps.

Thanks for getting back to me on that one!
0

User is offline   Corvin 

  • King of the Lamers

#94

I looked through the source code again, just to look to see if SNDLOOP was in there and it is, at least the part I looked at. It seems to have the same code as WH1. So I was wondering again why the ambiance sounds are not working? I thought the snd list I found in the source where the numbers to use on the tags, like 0,5 I believe is water.

Getting bummed out when this stuff doesn't work, I'll have to make another go at this :/
0

#95

Well, let's see what I can find regarding those.

When WHAVEN.C sets up the map, here's what happens:
          if (sprite[i].picnum == SNDEFFECT) {
               sector[sprite[i].sectnum].extra = sprite[i].lotag;
               deletesprite((short) i);
          }

          if (sprite[i].picnum == SNDLOOP) { // loop on
               sector[sprite[i].sectnum].extra = (32768 | (sprite[i].lotag << 1) | 1);
               deletesprite((short) i);
          }

          if (sprite[i].picnum == SNDLOOPOFF) {   // loop off
               sector[sprite[i].sectnum].extra = (32768 | (sprite[i].lotag << 1));
               deletesprite((short) i);
          }


Looks ok so far. The containing sector gets its "extra" attribute set based on the sprite's lotag, then the sprite is removed.

Now, how about in WHFX.C...
//JSA BLORB
void
sectorsounds(void)
{

#if 0

     struct player *plr;
     unsigned short sec;
     int  index;

     if (!SoundMode)
          return;

     plr = &player[pyrn];

     sec = sector[plr->sector].extra;

     if (sec) {
          if (sec & 32768) {       // loop on/off sector

               if (sec & 1) {      // turn loop on if lsb is 1
                    index = ((sec ^ 32769) >> 1); // (32768|(sprite[i].lotag<<1)
                                                  // |1)
                    if (ambsoundarray[index].hsound == -1)
                         ambsoundarray[index].hsound = SND_PlaySound(ambsoundarray[index].soundnum, 0, 0, 0, -1);
               }

               else {              // turn loop off if lsb is 0 and its playing
                    index = ((sec ^ 32768) >> 1);
                    if (ambsoundarray[index].hsound != -1) {
                         SND_StopLoop(ambsoundarray[index].hsound);
                         ambsoundarray[index].hsound = -1;
                    }
               }
          }
          else {
               if (plr->z <= sector[plr->sector].floorz - (8 << 8))
                    playsound_loc(sec, plr->x, plr->y);
          }

     }
#endif
}

Looks like here is our problem. The code is disabled with that #if 0 block. There might be an underlying good reason for that, but as soon as I get a chance I can try re-enabling it in EGWhaven and hopefully it won't have any ugly side effects. Even if it works, it would mean that effect would only work if the map is run in EGWhaven, but it shouldn't outright break the map if it's run in vanilla, there just won't be a sound.
0

User is offline   Corvin 

  • King of the Lamers

#96

Thats what I looked at too, the WHAVEN.C file in both WH1 and 2. I felt there was more too it in another section of the code.
Maybe see what they had in WH1 WHFX.C file or which ever file the have it in.

About running into problems with the sprites being present. I ran WH1 maps that have SNDLOOP sprites in it with WH2 and it didn't crash over anything. But then again its disabled.
Crossing my fingers, I really hope this works. And it doesn't matter if its only in EGwhaven that it works, the game to me is unplayable without EGwhaven.
0

#97

I enabled the aforementioned code and got the wind sound to play, sort of, but it doesn't loop like it's supposed to so there's obviously more that has to be done to re-enable this feature. I'll continue looking into it.

Edit: with some experimenting, I've made the side discovery that the JOESND from the original game can be swapped in for the JOESND in Witchaven II (you get the wrong sounds, but it reads it OK, so it's definitely an archive of some sort). The problem with SNDLOOP is definitely code-side and not in the JOESND though. I'll probably have to do a full comparison of the WHSNDMOD.C files from each release to see what else could have changed.

This post has been edited by ETTiNGRiNDER: 21 January 2015 - 02:09 PM

0

User is offline   Corvin 

  • King of the Lamers

#98

oh cool it works sorta. Maybe it needs an ENDLOOP sprite somewhere near by...
0

#99

New EGwhaven up at http://ettingrinder....haven/egwhaven/
Things of note:
* Mouse control was tweaked again. May not be entirely perfect, but should be an improvement over the previous version.
* GAME parameter can now load STUFF.DAT, JOESND, W_SONGS and F_SONGS from the specified game mod directory, in addition to maps.
0

User is offline   Corvin 

  • King of the Lamers

#100

Congrats with the new release.

According to the changelog you left the ambiance sndloop/sndeffects enabled, but for the life of me I couldn't get the sound to play, none of the ones I tested, left me puzzled how you got a sound to play?

BTW In the process of testing the mouse. Most new mice have a DPI button on them that speeds things up/or slow things down. I'm leaving mine at what I use on my desktop at, the slower more precise setting.
1

#101

View PostCorvin, on 21 January 2015 - 07:49 PM, said:

According to the changelog you left the ambiance sndloop/sndeffects enabled, but for the life of me I couldn't get the sound to play, none of the ones I tested, left me puzzled how you got a sound to play?

It plays sometimes, when it feels like it. It's not consistent, like something is blocking the playback or turning the sound loop off or something, but I haven't pinned down what's going on. Try making a red sector in the middle of a larger sector and put the sound loop sprite in that. Low tag it 1. Don't include a loop off sprite. Walk into/around the red sector for a bit and you may hear the wind sound sometimes. Those were more or less the conditions I got when I made a test map for it.

Quote

BTW In the process of testing the mouse. Most new mice have a DPI button on them that speeds things up/or slow things down. I'm leaving mine at what I use on my desktop at, the slower more precise setting.

Neither of my mice have this, so you'll have to let me know how that goes.
0

User is offline   Corvin 

  • King of the Lamers

#102

Well the mouse seemed fine to me.

The SNDLOOP, no luck in getting anything from it. oh well.
0

#103

I've made some progress figuring out JOESND / SONGS, working things out from a combination of reading the source code and looking at the files in a hex editor. I haven't done any extracting/modding yet to prove what I've found, but I think I'm on the right track.

For both files, the last 4096 bytes of the file are an index. Each index entry is made up of 3 double words (32 bit values). For both types of archive, the first value is an offset to the sound or song entry, but you need to multiply the value in the index by 4096 to get the real offset.
For JOESND, the second value should be "sample size" (appears always to be 5) and the third value should be "priority" (for deciding whether or not the sound is important to play if multiple sound fx are already playing, it seems)
For SONGS, the second value should be "cache length" and the third value might be unused (appears always to be 9). I'm not sure if cache length is the same as how long the song data actually is, yet.

Will keep you posted as I find out more.

In other areas, anybody who would like to help out with further bugfixing in EGwhaven is encouraged to mess around with enchanted weapons as much as possible and report to me if you discover any actions that consistently make the sound/auras/other related stuff mess up, so that I have better leads to track down the remaining issues there. The battle axe in particular still seemed to have something fishy happen with it last I checked (sometimes acting like it's not enchanted when it still should be) that I haven't worked out the cause of yet.

This post has been edited by ETTiNGRiNDER: 24 January 2015 - 04:00 PM

0

User is offline   Corvin 

  • King of the Lamers

#104

From what I remember there are duplicate songs, I think they removed them in the updated game data.
0

User is offline   Corvin 

  • King of the Lamers

#105

@EG

I know your exploring other areas of bug fixing at the moment, but have you given any thought to get the game to read the DATS out of the STUFF.DAT at all?
You probably can get code from another src package for this slight problem.
0

#106

I can look into that. Is it everything that's not an .ART or a .MAP that doesn't load, or is there other stuff that's OK?
0

User is offline   Corvin 

  • King of the Lamers

#107

Normally these are included in a grp file: LOOKUP.DAT, PALLETE.DAT and TABLES.DAT

Just the very little I under stand of the src, I'd say there not being checked for in the STUFF.DAT.

The maps and ART appear to be working.

This post has been edited by Corvin: 27 January 2015 - 08:26 PM

0

User is offline   Corvin 

  • King of the Lamers

#108

BME's new v2.0 WH2 and EGwhaven Map Browser is available at ETTiNGRiNDER's Witchaven Shrine:
http://ettingrinder....-and-utilities/
1

User is offline   Corvin 

  • King of the Lamers

#109

Enchanted Wells

To give a Well more than one usage, High Tag the cone sprite 9 for two uses, 10 for three uses, 11 for four uses, 12 will give fives uses etc...


Still not sure why they used tags 3,0 and 0,2. I'm still thinking the 2 was a mistake, or they wanted it to activate once as the low tag of 2 is used on sectors that activate doors as well.
I haven't included instructions how to build an Enchanted Well and Shrine in the expanded manual. I just described it basically, figured they could look at existing Wells or make up there own.
0

#110

EGwhaven v0.4 is out!

I've played through the whole game (and The Horror Back) and found a whole lot of little bugs and weirdnesses that I hadn't even noticed before, most of which are now fixed, as well as discovering the cause of some of the "elusive" bugs that were annoying me before (disappearing weapon auras and monsters stuck in attack animation).

As a side effect of this playthrough, I've also greatly filled out my Witchaven II walkthrough. Let me know if you spot mistakes or missing secrets.

Here's a list of notable changes in the new EGwhaven:
- Better fix for mouse control, should operate more smoothly. You may have
to re-adjust your mouse sensitivity.
- Tweaked jump height, level 14 should be beatable from a clean start now
(no flight scrolls). It should now be safe to assume this is as close
to the "canonical" jump height as it's going to get (let me know if
you find anything to challenge that assumption).
- Better fix for Hero Time, bringing back the berserk speed while keeping
it under control.
- Behavior of magic arrow and fireball spells adjusted to more closely
match the manual's descriptions (fireball was formerly WEAKER than
magic arrow due to half-assed coding). The "resist or die" property of
fireballs spells is now in effect, and the code has been adjusted to treat
them differently from enchanted morning star, monster or wall trap
fireballs. Lava Fiends and Cirae-Argoth cannot be insta-killed by
fireball spell, either.
- You are no longer allowed to freeze Cirae-Argoth with the Ice Razor sword.
This prevents an unwinnable game glitch.
- Implementation of willow wisp's shocked status changed: it now
stuns the player in place for a second. This was due to some
powerup alterations making the old-new attack almost as useless
as having none. (Also closer to my initial idea)
- Onyx Ring now lasts for one level instead of one life, in line with
comments left by Capstone in the code. Its effect has been made
stronger to match with this. Adamantine Ring now also lasts one level.
- It is now possible to trigger a sprite via a pull chain (e.g. the trap
shooter setup in EXAMPLE.MAP.)
- Midian Warrior's thrown halberd now does damage as it should (although if
you have an Onyx Ring, the "catch halberd from midair" glitch has been
made into a feature).
- When using scare scroll and dual wielding, your off hand is properly
shadowy like the main hand.
- Frightened monsters don't get stuck in their attack animation if you
close in and then back off.
- Ciraean Sentinels don't glitch if they thaw out after being hit with a
freeze spell.
- Trap shooters no longer have their shots displaced far upwards. Seems
ok for all levels tested so far. (Darts in level 2 are a real threat
now)
- Fire arrows do 2x the damage of normal arrows, as originally intended
- Fixes to randomization; random values should be in the proper ranges now
- Midian Warrior with sword and blue cape is now allowed to be placed on
a map.
- Enchantment shrines give the proper number of enchantment charges for the
selected skill level.
- Enchanted weapons should always show their aura and enchanted battle axe
always swing at the correct speed.
- Enchanted weapons don't trigger "Weapon is damaged" messages.
- Powerups tweaked to have 30 second / one minute durations instead of close
to those values.
- WARP parameter, invoke EGWHAVEN WARP # to go directly to LEVEL# without
playing the intro or going through the menu first.
- Automap is no longer zoomed way in at the start of every map, but set at
a more reasonable mid-level zoom.
4

User is offline   Corvin 

  • King of the Lamers

#111

Congrats on this massive update.

You know I had to test the pull chain trap in EXAMPLE.MAP. :lol: But is there sound playing for those arrows or is it there just drowned out by the pull chain sound?

And not your fault but Capstone, those traps are to close to the walls that there suppose to fly by, but they wouldn't have know that since the chain traps where not working.

I only had a brief play time, just to check the mouse sensitive settings so not much else to tell you.
0

User is offline   TerminX 

  • el fundador

  #112

I like where you're going with this.
0

User is offline   Daedolon 

  • Ancient Blood God

#113

Do you have the older executable zip files somewhere downloadable anymore?
0

#114

View PostTerminX, on 12 February 2015 - 03:16 AM, said:

I like where you're going with this.

Thanks! There's a lot I still want to do with it, but I think this version was a big step forward in having a better play experience.

View PostDaedolon, on 12 February 2015 - 05:34 AM, said:

Do you have the older executable zip files somewhere downloadable anymore?

I thought Corvin was archiving them on R.T.C.M., but it looks like he only kept the more recent release, so I've reuploaded them on my page for now. I may eventually run out of space to keep the old stuff, but they're small and I'm only using about 40 out of 500 MB on my account right now.
2

User is offline   Daedolon 

  • Ancient Blood God

#115

Thanks, mirrored all of them permanently at http://www.the-postm...files/egwhaven/ (just add the filename to the end to download), you're free to delete them if you want to get more space.
1

User is offline   Corvin 

  • King of the Lamers

#116

If anyone else is out there that has been following the information at the bottom of the expanded wh2 manual and has been using it, I need assistants to square up the remaining data, I ran out of Juice basically over the last 2 and 1/2 months I been working to get the document in working order.

Anyhow if you can do some testing of the remaining information, that would help out a lot until I can return to it myself.
0

User is offline   Corvin 

  • King of the Lamers

#117

Sorry EG, didn't know or perhaps didn't realize/remember I was to archive them....I'll do so if you require it in the future.
0

#118

View PostCorvin, on 23 February 2015 - 08:52 PM, said:

Sorry EG, didn't know or perhaps didn't realize/remember I was to archive them....I'll do so if you require it in the future.

No problem. Please go ahead and archive them if you have the space and inclination. Jimdo seems pretty decent as free hosts go, but if anything does happen to my site, better to have the stuff archived more places than fewer.
1

User is offline   Caleb280 

#119

Hi. Congratulations on EGwhaven project. I really love Whaven 2. That was the first time I used build editor. I was working on a WH2 addon maps but It's currently on hold cause of sector/sprite limitations. Are you working on removing this limit in EGwhaven? I'd love to continue my work. You see there's a nasty "too many sprites bug". I have a map with lot's of tree's and they just disappear. So you see I can't work with old build/wh2 game until the limit is removed.
0

#120

Do the sprites just disappear visually, but they're still there (like in Doom engine games) or do they actually get removed from the game?
0

Share this topic:


  • 6 Pages +
  • « First
  • 2
  • 3
  • 4
  • 5
  • 6
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options