• View unanswered postsView active topics

  • Wolf3d SDL coding tutorials (?)

    Discuss Wolf3D and Wolf3D modding/ports

    Postby Tricob1974 09 Dec 2011, 01:49

    WolferCooker wrote:How do you change the firing speed of the weapons?
    In WL_AGENT.CPP, you'll find a group of numbers in threes, which look like this:
    Code: Select all
    {6,0,1}
    The first number of this trio is the speed. The smaller the number, the faster the speed.

    I don't recommend setting the number lower than 2, as that will make the weapon act strangely when the game skips even just than one frame.
    Tricob1974
    Team RayCast member
    Team RayCast member
     
    Posts: 1384
    Location: Huntsville, Alabama

        

    Postby WolferCooker 09 Dec 2011, 04:00

    Okay thanks!

    EDIT: I already know off the bat that adding a rocket launcher, flamethrower, or any weapon that fires projectiles is gonna be different than adding a regular bullet-type weapon. How hard could it be?
    WolferCooker
    User avatar

     
    Posts: 168
    Location: Bethlehem, Pennsylvania

        

    Postby Tricob1974 09 Dec 2011, 07:00

    It's not hard at all; when I enabled the Rocket Launcher in WolfDX, I just Copyed and Pasted the line of numbers from the Pistol weapon, and the control worked fine. The weapon still had problems afterwards, but that was for reasons that had nothing to do with the weapon code. :)
    Tricob1974
    Team RayCast member
    Team RayCast member
     
    Posts: 1384
    Location: Huntsville, Alabama

        

    Postby WolferCooker 09 Dec 2011, 07:26

    Sounds easy enough there, but if I just do that, the rocket launcher will fire like it's a bullet-type weapon would it? How do you actually get your weapon to fire projectiles?
    WolferCooker
    User avatar

     
    Posts: 168
    Location: Bethlehem, Pennsylvania

        

    Postby Tricob1974 09 Dec 2011, 17:21

    The rest of the code is written by Richter Belmont. He posted a tutorial on it many months back.
    Tricob1974
    Team RayCast member
    Team RayCast member
     
    Posts: 1384
    Location: Huntsville, Alabama

        

    Postby WolferCooker 09 Dec 2011, 20:09

    Okay I see the tutorial. I'll try this out later.
    WolferCooker
    User avatar

     
    Posts: 168
    Location: Bethlehem, Pennsylvania

        

    Postby Tricob1974 09 Dec 2011, 23:08

    It looks like BrotherTank already posted an Add Additional Weapons tutorial to DHWs, but - again - it isn't 100% compatible with Wolf4SDL. While this does cover more ground than Brian's tutorial did, it's - IMO - a bit heavy-handed for a beginner. WolferCooker said it well in that I should just go and make an Add Additional Weapons tutorial of my own. I'll probably post something basic to start with, and elaborate its functions in a later post. I suppose this gives the topic a chance to take on a life of its own, and cover ground that BT wasn't able to get to. When I first joined the forum, I never would have predicted that happening. :)
    Tricob1974
    Team RayCast member
    Team RayCast member
     
    Posts: 1384
    Location: Huntsville, Alabama

        

    Postby WolferCooker 10 Dec 2011, 00:23

    I'm sure you'll get good feedback Tricob. I think you're like WSJ in terms of explaining things clearly in tutorials and outlining necessary steps without confusing someone.
    WolferCooker
    User avatar

     
    Posts: 168
    Location: Bethlehem, Pennsylvania

        

    Postby Tricob1974 10 Dec 2011, 04:00

    Thanks for the encouragement. :)
    Tricob1974
    Team RayCast member
    Team RayCast member
     
    Posts: 1384
    Location: Huntsville, Alabama

        

    Postby WolferCooker 10 Dec 2011, 04:26

    No prob. Gotta give that to people like you that have helped change Wolf3d.

    BTW, it seems you need to have the separate ammo feature in the code as well in order for a new weapon to shoot projectiles. I just hope that the tutorial on DHW is correct for 4SDL before I can begin on that.
    WolferCooker
    User avatar

     
    Posts: 168
    Location: Bethlehem, Pennsylvania

        

    Postby WolferCooker 23 Dec 2011, 21:10

    I started over again, this time with the SPEAR source code because I want to get back to basics. Lets say I want to add a toilet as a new static object. What are the steps to adding just a new static object?

    I need to get the adding a static/bonus object down so I can work on the separate ammo code later.
    WolferCooker
    User avatar

     
    Posts: 168
    Location: Bethlehem, Pennsylvania

        

    Postby Tricob1974 27 Dec 2011, 04:26

    My apologies for the delayed response. I haven't been in the apartment for a few days, so I haven't gotten much done here. I'll try to get your question answered tomorrow; today's been kind of messy. :%)
    Tricob1974
    Team RayCast member
    Team RayCast member
     
    Posts: 1384
    Location: Huntsville, Alabama

        

    Postby WolferCooker 27 Dec 2011, 05:36

    Don't worry about it. It's just practice. I intend on getting serious with making a mod once your Base of Operations source code is released.

    I still need some more practice to get my confidence up.
    WolferCooker
    User avatar

     
    Posts: 168
    Location: Bethlehem, Pennsylvania

        

    Postby WolferCooker 05 Jan 2012, 03:17

    Okay I'm gonna start coding again. I have 3 new questions for you Tricob:

    1. Your in-game messages feature works differently than WSJ's with the GetMessage routine I see. I see in that routine you put in STR_SOMETHING. How does this work? Can you assist me on how your version works and how to properly add new messages?

    2. I want to make ammo separate. I'm looking at the DHW tutorial for it and it tells you to first define the separate ammo in the version.h. I could do that, but your custom.h, advanced.h files seem to be extensions of version.h. From your source code, which file is the best to define new items and features?

    3. Before I make the ammo separate, I have to add a new ammo clip and I want to define it in your BONUSFEATURES section where you have added your own new objects instead of with the original objects. Unfortunately I'm getting these
    problems.

    Image

    I admit I've gotten rusty with this already.
    WolferCooker
    User avatar

     
    Posts: 168
    Location: Bethlehem, Pennsylvania

        

    Postby Tricob1974 05 Jan 2012, 08:13

    WolferCooker wrote:Okay I'm gonna start coding again. I have 3 new questions for you Tricob:

    1. Your in-game messages feature works differently than WSJ's with the GetMessage routine I see. I see in that routine you put in STR_SOMETHING. How does this work? Can you assist me on how your version works and how to properly add new messages?

    Let's say you want to change the message for picking up Key #1. In "_messages.h", change this line:
    Code: Select all
    #define STR_GOTKEY1                 "Got the yellow key."


    ... and change the message in quotes.
    Code: Select all
    #define STR_GOTKEY1                 "Key #1 retrieved."


    2. I want to make ammo separate. I'm looking at the DHW tutorial for it and it tells you to first define the separate ammo in the version.h. I could do that, but your custom.h, advanced.h files seem to be extensions of version.h. From your source code, which file is the best to define new items and features?
    For now, just put them in "(custom).h".

    3. Before I make the ammo separate, I have to add a new ammo clip and I want to define it in your BONUSFEATURES section where you have added your own new objects instead of with the original objects. ...

    I admit I've gotten rusty with this already.
    No, you just need to set the H files to run the MyMod4SDL files. :) I can send the modified files into DropBox, but I have an updated, "official" version of MyMod4SDL to send to Brian first, now that I'm done fine-tuning it. :)
    Tricob1974
    Team RayCast member
    Team RayCast member
     
    Posts: 1384
    Location: Huntsville, Alabama

        

    PreviousNext

    Return to General Wolf3D/modding Discussion and tutorials


    Who is online

    Users browsing this forum: No registered users and 3 guests