TTLG|Thief|Bioshock|System Shock|Deus Ex|Mobile
Results 1 to 8 of 8

Thread: Fixed a bug in DeusEx ConSys

  1. #1
    Member
    Registered: Sep 2000
    Location: Tallinn, Estonia

    Fixed a bug in DeusEx ConSys

    Hey guys. Are you still working on Cassandra?

    I started working on my mod again and since I needed to play an animation during a conversation, I discovered it wasn't working properly. I fiddled with the settings of the event, and finally it crashed the compiler. I thought maybe you guys need to do something like this too...

    Now I have never written "native" code for any Unreal engine game and I don't know how exactly the UnrealScript / C++ binding works, but I discovered that the ConEventAnimation.uc file had different variables than the C++ header file.

    I think I fixed this by modifying the .uc file like this (I added the lines where my name is in the comment):
    Code:
    var Actor eventOwner;				// Pawn who owns this event
    var String eventOwnerName;			// NPC who owns event
    var Name sequence;					// Animation Sequence
    var byte playMode;  // Erkki: 1 = no looping, 0 = looping
    var int playLength;  // Erkki: play time of animation in seconds
    var Bool bFinishAnim;				// Wait until animation finishes
    var bool bLoopAnim;					// Loop Animation
    Now changing this probably fixes the crashes, but it doesn't add any functionality yet. I think they didn't use/implement this properly in Deus Ex, forgot about it and left a bug in there... bLoopAnim isn't even present in the C++ header and looping depends on playMode == 0 (no looping playMode == 1). So you'd need to derive a new class from DeusEx.ConPlay and override the ConPlayAnim state. And add some functionality yourself. I only used a sort of hack and added Sleep(playLength) because I needed some timing unrelated to the actual animation. playLength is an INT though, I should divide it to get more precision
    Code:
    //After Begin: I added this
    	ConEventAnimation(currentEvent).bLoopAnim = (ConEventAnimation(currentEvent).playMode == 0);
    
    // For debugging
        log( "ANIM.Name : " $ ConEventAnimation(currentEvent).sequence);
        log( "ANIM.Mode : " $ ConEventAnimation(currentEvent).playMode);
        log( "ANIM.Length : " $ ConEventAnimation(currentEvent).playLength);
        log( "ANIM.Finish : " $ ConEventAnimation(currentEvent).bFinishAnim);
        log( "ANIM.Loop : " $ ConEventAnimation(currentEvent).bLoopAnim);
    
    // This near the end of the state, the part after else was already there...
    	if ((ConEventAnimation(currentEvent).playLength > 0))
    		Sleep(ConEventAnimation(currentEvent).playLength);
    	else if (( !ConEventAnimation(currentEvent).bLoopAnim ) && ( ConEventAnimation(currentEvent).bFinishAnim ))
    		ConEventAnimation(currentEvent).eventOwner.FinishAnim();

  2. #2
    Member
    Registered: Sep 2000
    Location: Tallinn, Estonia
    If you want a better sample of the modified ConPlay, I just posted one in the PlanetDeusEx coding forums.

  3. #3
    Member
    Registered: Sep 2000
    Location: Tallinn, Estonia
    Maybe you can help me...

    I don't remember if there were items transfered during conversations in Cassandra? If there were, did you manage to somehow transfer items that aren't in the DeusEx package?

  4. #4
    ZylonBane
    Registered: Sep 2000
    Location: ZylonBane
    Talking to your imaginary friend again?

  5. #5
    Member
    Registered: Aug 1999
    Location: Bath, England.
    Can't help with the ULTRA CLEVER TECH stuff upthread, but there's no actual original item transfer in the DX code.

    A lovely chap, whose name I forget, made a special .uc and released it. You should be able to find a copy of it on the DX editing sites that are still existant.

    And Zylon, stop being mean.

    KG

  6. #6
    Member
    Registered: Sep 2000
    Location: Tallinn, Estonia
    Thanx Brem, I'll have a look. Somone from the PlanetDX forums was supposed to mail something like that to me, but I'm still waiting...

  7. #7
    Member
    Registered: Aug 1999
    Location: Bath, England.
    I just remembered: we credit the name of the chap who wrote the actual script in the Cassandra read me. If you have it there, you should be able to locate.

    KG

  8. #8
    Member
    Registered: Sep 2000
    Location: Tallinn, Estonia
    Yeah, already found it on planetdeusex.com.. or was it dxediting ...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •