Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0
Ghost_Ellis

How Do I Make An Item?

Question

Posted (edited)

I made a 32x32px image of a note, and I want to make it an item that can be picked up by walking over it, like the medkits, but, I also want it to lock player movement and player camera movement upon pickup. Then, I want it to show another image I've made of a note with text on it, that can be closed by pressing E, which returns player/camera movement. It's used in all my favorite games like The Last Of Us(comics and cards), Uncharted(notes), and Resident Evil(all sorts of sh*t but mainly notes). Any advice or suggestions? Cant seem to find a current tutorial for this. Also want the note to go into the players inventory, where it can be clicked on and viewed again at any time

 

Share this post


Link to post

11 answers to this question

Recommended Posts

  • 1

This can be done with the hudmessage function in acs! I actually did this recently with a notepad of my own for an upcoming mod im developing. Watch this tutorial on hudmessage. 

He shows you how to display images with hud message near the endish. 

 

Youre also going to need to write a some code in keyconfig lump calling up your key to open the note. 

I can elaborate later if you wish. 

 

https://youtu.be/VKcmXehHqkA?si=CtQCWgSTAaB0t0NQ

Share this post


Link to post
  • 0
Posted (edited)

You can put the texture into your WAD file through SLADE, but other than that, I believe you have to alter the code in Doom/Doom II. IIRC DeHackEds can't do anything like that, due to them only altering the executable.

Share this post


Link to post
  • 0
Posted (edited)
5 minutes ago, Chameeleoh said:

- So uh...idk how to code. I can script with ACS but idk what to put into the .txt file for the note. Do you know how to do any of that? All i know is that I'm supposed to make it so the text file tells the game what the item is

 

 

 

Share this post


Link to post
  • 0
Posted (edited)

Hope this helps. Sorry its an info dump!

 

NGL, this is not an easy process. but its not impossible. once you delve into the code of how other people create props and monsters it gets easy to understand. 

 

theres most likely different ways to get this done. but this is what i frankensteined together. lol

 

heres a ACS HUDMESSAGE METHOD.

Spoiler

the way I did my note is i called a hudmessage displaying the note as hudelement say, #9. then i put all the rest of my hudmessages as #1-8 above that so it looks like its displaying on top of the paper. 

It takes some tweaking and patience but its very doable with that method. but it looks like you want to make it take up the whole screen.

all you really have to do if you want to use the hudmessage method is make your NOTE the a higher number hudelement than the rest of your text. then you can make it all display over it.

 

Theres a few ways to do it. but the way that worked best for me is using SLADE3, and going with the DECORATE lump. 

Youre going to want to name your sprite. something with 6 letters. import that into your pk3. 

 

this is how i defined my actor note. just made it into a keypickup.

Capture.JPG.5b0121da25543b283d2e7343e5faceaf.JPG

 

As for your other questions, you should really look at the channel i posted, i learned SO MUCH from him.

Also LAZYGAMER on youtube does a nice tutorial series on how to structure your PK3 to make your projects easy to organize.

PK3 filestructure is so much easier to manage than a WAD. but you can still do all this with a WAD if you really want. 

 

this is the youtube series from LAZYGAMER on how to make and understand the pk3 file structure. 

 

 

Heres some methods on how to freeze your player and do stuff in between.

Spoiler

script "YOUR FUNCTION HERE" (void)
{

   //This is where you will freeze the player.
    Thing_Stop(0);
    SetPlayerProperty(1,1,PROP_TOTALLYFROZEN);

 

//this is where you will display your hudmessage block for your NOTE.

 

}

 

script 255 (void)// this name of the script is what your going to call in your KEYCONF lump. shown below
{//NOTEPAD!!!!

//repeat this first hudmessage block and type out what you want just make each hudelement numbered differently but dont exceed the number of your NOTE.

        SetFont("SmallFont");
        HudMessage(s:"SAMPLE TEXT HERE FOR FIRST LINE.";
                                HUDMSG_PLAIN, 4, CR_BLACK, 0.13, 0.8, 4.0,1.0,1.0);

 

        SetFont("Notepad");// This is displaying the NOTEPAD image.
        HudMessage(s:"A";
                                HUDMSG_PLAIN, 6, 0, 0.1, 0.7, 4.0,1.0,1.0);
 

 

// dont forget to reactive the player when youre done. 

// note sure how youll get the button press working just yet. but mine is just set to a 4 second timer calling up a quick notepad look.

    Thing_Activate(0);
    SetPlayerProperty(1,0,PROP_TOTALLYFROZEN);
    //SetPlayerProperty(1,1,PROP_);

}

 

//i havent figured out why it needs to be puke255 yet. i looked up a forum post and got this loose code i modified to work for my needs. 

but use this structure and play around with it if you want.


Capture2.JPG.283b4079aaa6a0a2cc0b8fbff155112b.JPG

 

This is how you can freeze the player and do some moving camera stuff or whatever else you want to do

Spoiler

 

 

Edited by Chameeleoh

Share this post


Link to post
  • 0

Seems to be working...kinda. When I attempt to run a test map w the wad, it gives me an error saying

 

"Unable to find sprite lump "PZP1A" used by actor "Note1":17102. Forgot to include required resources?"

 

What I have for the note sprite, is just a png, is that why its not working? Also, the wad I'm doing this all in is just a renamed copy of the doom 2 wad. Idk how to make pk3's

Share this post


Link to post
  • 0

Graphics have to be in doom format to work, not PNG. The editor Slade 3 has an ability to convert things to the Doom graphics format. Also, never use the base Doom WADS, not only is it illegal to redistribute them, it also contains lots of redundant resources which you have no need to include in your mod.

 

A PK3 is just a directory structure packaged into a file. I get the impression that you're pretty new to map editing, and your lack of experience may hinder you when trying to do things the Doom engine wasn't built to do. It CAN do them, but perhaps you should start smaller and work your way up.

Share this post


Link to post
  • 0
Posted (edited)
3 hours ago, Stabbey said:

Graphics have to be in doom format to work, not PNG. The editor Slade 3 has an ability to convert things to the Doom graphics format. Also, never use the base Doom WADS, not only is it illegal to redistribute them, it also contains lots of redundant resources which you have no need to include in your mod.

 

A PK3 is just a directory structure packaged into a file. I get the impression that you're pretty new to map editing, and your lack of experience may hinder you when trying to do things the Doom engine wasn't built to do. It CAN do them, but perhaps you should start smaller and work your way up.

 

Also sry for late answer. My job requires i wake up very early. And im tired. Lol

 

Yeah this is correct here. Youre going to want to learn how to make a pk3 using slade3 and then when you use ultimate doom builder you import your pk3 assets package as a reference that your wad looks at for resources.  

 

It takes a little time. But that video i sent in the post above shows a full tutorial on how to do everything. Thats where i learned from. 

 

Its saying its missing PZP1A because thats my graphic that i named, so you gotta name your graphic to that or something similar and then put the name in your code accordingly. 

 

Also check out zdoom inheritance.  

The technique i showed is an example of that. 

Basically youre taking an item thats already in DOOM and inheriting its properties to do the easy work. And what youre doing in the actor code is changing what you want to change. 

Graphic, sound pickup, inventory msg, all of that. 

Listed here at the zdoom wiki. Keep this wiki bookmarked cause its basically the manual on how to do everything zdoom and acs

https://zdoom.org/wiki/Using_inheritance

 

(Another thing to note is that the decorate method is depreciated, meaning it will still work, but the zscript class method is the current standard. You make your custom class and then in your zmapinfo lump youll add a DOOMED block identifying its ultimate doom builder editor actor number.)

 

DoomED

{

     30000="youractorhere"

}

Video here for more explanation

 

 

In the long run making a pk3 will make organizing your projects assets so much easier than endlessly scrolling through a giant wad of endless textures and assets

 

Also heres a video on doing your custom images with slade3

From DOOMKID. Their tutorials are also great info dumps!

 

Edited by Chameeleoh

Share this post


Link to post
  • 0
Posted (edited)

I did name my sprite the same. Only way I've been able to view it in game so far is by replacing the Chainsaw sprite with my own. As per Doom Modding, I'm not new to map making, But I am new to scripting, and I'm rusty on pk3's. I work best by just trying to make what I want to make, And learning how one thing at a time. I already have a full map done and scripted n ready, but I want to figure out how to make the special items, textures etc in a seperate test map first, just to see how it works. If I shouldnt use doom2.wad copies then should I make my own slade wad from scratch? Do you have discord? Maybe I can send over sum stuff so u can see what I'm trying to do. Mine is Ghost_Ellis#4460

Edited by Ghost_Ellis

Share this post


Link to post
  • 0
Posted (edited)

You could always download a realm667 asset similar to what your going for, then look at its code and see how it works and try to do the same thing. that's what worked for me. but those tutorial vids i posted above share alot about coding and pk3 file structure. also how to edit and add your own textures and stuff. those videos are taught me all i know about doom modding. 

but yeah youre going to want to make your own wad. the doom wads are only there for reference when you want to play the project, you shouldn't really pull anything or edit from them unless you're doing it on purpose for some reason. 

 

but basically youre going to need slade3 to make it a little easier on yourself. its a wad editing tool. so you can import your graphic and code in there and then make your map.

but pk3 is much easier cause you can have it all organized into its own little folders. 

i guess basic item creation.

Make graphic, import it into wad using slade3. convert to doom.gfx

define your actor in decorate or zscript class. and open up your editor and should be good to go. 

 

i dont use discord much anymore sorry! you can always do a gdrive link here as well

Share this post


Link to post
  • 0
On 4/5/2024 at 1:59 PM, Ghost_Ellis said:

If I shouldnt use doom2.wad copies then should I make my own slade wad from scratch?

 

Yes. In Slade, New > Archive > Doom .WAD Archive. That will create a new WAD without a map (yet) which is handy if you want to make a resource pack with graphics and such for people to use, or gameplay changes.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×