Duke4.net Forums: [Tutorials] Simple CON Editing - Duke4.net Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

[Tutorials] Simple CON Editing

User is offline   gerolf 

  • Honored Donor

#1

Given the situation the world is currently in, I've had some free time on my hands lately and I thought maybe it might be helpful to post some simple CON tutorials for beginners. I'm not an expert myself, and nothing I'll cover is really anything "new", and there's more than likely documentation elsewhere covering the exact same stuff, but I figured why not try to see if I can help anyone out.

My plan is to write CON tutorials, mostly USER CON stuff, but we'll see. I intend on adding to this post each time I have a new tutorial, instead of writing new posts/threads.

Like I said, I am not an expert and if my methods aren't right to someone then please make sure to tell me. Most of the tutorials should work in DOS and will work in EDuke32, and I'm sure they will work with just about any other port but these will be tested through EDuke32 and the tutorials assume that's what you're also going to be using. If enough people find this to be redundant or not useful then I will not continue with it, but if this helps someone at all then that's good enough for me. Please check out the EDuke32 wiki section about scripting. There's a lot of good stuff on there. There's tons of websites related to Duke that have some good tutorials, and there's even some books from the 90s if you want to feel nostalgic.

So the first two tutorials I have for now are fairly straight forward and easy to do. You don't have to be a programmer to understand either of these tutorials:

-How to edit USER.CON in 2020:

Spoiler


-Altering DNBETA and DNALLEN cheat codes:

Spoiler


That's all I've got for right now but like I said, if this doesn't seem like it would be helpful then I won't go on with this but if anyone likes this idea let me know, and I'll try to make more tutorials aimed towards beginners. Maybe others could pitch in too if they have ideas of their own.

This post has been edited by gerolf: 29 August 2020 - 03:15 AM

10

User is offline   gerolf 

  • Honored Donor

#2

Here's some changes that I feel people should be doing far more often to their level sets...

-Changing Level Names and Par Times:
Spoiler

-Altering Episode Names:
Spoiler

One more for today that follows the same theme as these two....

-Changing Difficulty Names:
Spoiler

That's it for now, but I will add a few more USER.CON tutorials tonight or tomorrow before moving on to something else like GAME.CON and DEFS.CON, as well as EDuke32 specific controls that you can add to your CON files for EDuke32 features!

So stay tuned for some extra text string tips before we move on to altering Duke, his guns, his adversaries, and more!

This post has been edited by gerolf: 29 August 2020 - 11:18 AM

7

User is offline   gerolf 

  • Honored Donor

#3

Before we move on to some more advanced (don't get scared off, you can do it) features and DEFS and GAME CON, I want to cover a little more on editing text strings first..

Remember, so far all these edits are only using USER.CON. We are still ignoring GAME.CON and DEFS.CON for the moment.


-Extra Tips for Changing Game Messages:
Spoiler

Now, we are pretty much finished with the most basic changes you can make to USER.CON. Nothing too interesting so far is probably what some are thinking, but these are very useful edits to make your sets have a feel of their own. Let's get a little more involved with USER.CON by altering Duke Nukem himself!

-Altering Duke:

Spoiler


Now you know how to change Duke's health, armor, and speed. Next tutorial listing will be altering Duke's enemies and weapons. I'll try to write it up later tonight and have it posted by sometime tomorrow at the latest!

This post has been edited by gerolf: 29 August 2020 - 02:03 PM

7

User is offline   gerolf 

  • Honored Donor

#4

These tutorials in this post will cover altering the weapons and enemies in DN3D through the USER.CON. Next time, I'll give a brief introduction to DEFS.CON and GAME.CON, then we will go over a couple EDuke32 specific "gamevar" commands that can be utilized to make changes that won't work in DOS (at least not through this tutorial), but will add to the tutorials in this post for extra features.. After that I will probably cool down from posting more tutorials for a few days, but even if I don't post everyday I do intend on adding more tutorials as I go on, but the ones above and the ones in this post should be enough to get a novice familiar with editing DN3D's USER.CON file.

Remember, if you want to use these online with other players, all players must use the same USER.CON. Also, I suggest testing your changes through the map "ZOO.MAP". You will be able to test out your weapon and enemy changes fairly easily in this level.

-Altering Duke's Adversaries:
Spoiler

-Altering Weapons:
Spoiler

-Altering Inventory:
Spoiler

So now if you have followed along from the first tutorial to the last, you should have a basic understanding of how to edit USER.CON. Like I said, my next post here will introduce you to DEFS.CON and GAME.CON, as well as some special CON scripts you can pull off thanks to EDuke32! I hope the tutorials here so far will be useful for someone! I will try to get the next tutorials that I mentioned posted here by tomorrow night. Those will be a little more advanced and will introduce DEFS and GAME CON files to your test folder, in fact, if you are following along, go ahead and make copies of those now and paste them into your test folder. That way, they'll be there when you get to the next steps that'll be posted soon.

This post has been edited by gerolf: 29 August 2020 - 07:21 PM

6

User is offline   gerolf 

  • Honored Donor

#5

If you have been following along so far, you should now understand the basics of customizing a USER.CON file. If you are satisfied with all that you can do through USER.CON, then you don't really need to worry about DEFS.CON and GAME.CON. I am in the process of writing details about DEFS.CON and GAME.CON, some tutorials for getting familiar with them, and then using gamevars. So if you are interested in going beyond what USER.CON allows you to do, I will have that out sometime tomorrow for you to learn how to make changes with GAME.CON and understand the purpose of DEFS.CON and the abilities of some gamevars, but remember, my target audience here is beginners, so I will attempt to give you the groundwork in the easiest way I can think of, and then you can take what you've learned here to explore the CON files on your own, and like I said, these will be up by tomorrow at the latest. I will be sure to use examples that should go well with the examples given so far in this guide. For now there are two more things I want to discuss about USER.CON. Then I'll tie up any loose ends and conclude my USER.CON tutorial (for now), and with that you should be all set with USER.CON and can decide to continue on from there, or stick with USER.CON editing until you are ready for more advanced editing.

Anyways, here's a few things:
-Modifying Music:
Spoiler

-Editing Sounds:
Spoiler

That's about all I have for USER.CON for now. Like I said, I'm working on the next lot of tutorials for those that want to go further from here. The next post will be about DEFS.CON and GAME.CON. There will be several tutorials as well as some gamevar tutorials in the next post. It will be the longest post of this thread, and like I said it will still be aimed at beginners, but it is more complicated than what we've been doing here so far. At the very least, you can now say you know how to modify DN3D. I hope that this has sparked interest in someone to make a USER.CON mod of their own and I hope people found these steps to be easy to follow and understand. Please PM me with any suggestions/questions, and stay tuned for the next steps which will be posted later today.

This post has been edited by gerolf: 30 August 2020 - 10:50 PM

7

User is offline   gerolf 

  • Honored Donor

#6

This post will explain DEFS.CON, GAME.CON, and gamevar. First, I have a few more notes about the above posts, then we'll move on!

-User CON Notes:
Spoiler

Now you should understand the purpose and use of USER.CON, but there are two other CON files for DN3D. If you haven't done so already, copy and paste DEFS.CON and GAME.CON into your test folder like you initially did to access USER.CON. I will now explain their purpose, as well as give one last explanation about USER.CON . Then, we will get into some tutorials with these CON files and using gamevars in the next post.

Please note: The following tutorials and info below are more challenging than what has been presented above this line. If you have trouble understanding it, it takes more patience than editing USER.CON. If you are happy with USER.CON editing and feel the guides below are too tough or hard to follow, maybe you're better off just sticking with USER.CON editing for now. If you are ready for more, then here's a synopsis of each CON file:

USER.CON (User Configuration File)
Spoiler

DEFS.CON (Definitions Configuration File)
Spoiler

GAME.CON (Game Configuration File) -
Spoiler

Gamevars (These do not work with DOS)
Spoiler

As you can see, I have color coded the different areas we will be working with. All the yellow headers relate to USER.CON, red to GAME.CON, and blue for when we do some stuff with gamevars. In the next post, I will give some tutorials specific to GAME.CON editing, and tutorials using gamevar. From there, I will probably conclude this tutorial session once those are posted (for now, anyways). I'll have these tutorials posted later tonight or sometime tomorrow, I want to double check my writing and whatnot because these tutorials are more involved than the previous ones. I hope that you're interested in learning how to edit the other CON files, so stay tuned!
6

User is offline   gerolf 

  • Honored Donor

#7

GAME.CON : As stated in the post above this one, GAME.CON is a much more complicated file than USER.CON. What I intend to do is show you how to do a few things with GAME.CON. Here's a couple routines to try.

-Adjust the ammo the Pistol weapon pick-up gives Duke:
Spoiler

-Enabling WACKPLAYER:
Spoiler

-Making the Enforcers and Pig Cops Eject Brass:
Spoiler

-Altering Enemies With GAME.CON:
Spoiler

-Adjusting "JIBS":
Spoiler
Obviously, there's much more to GAME.CON than just these 5 tutorials, but I think these are some easy changes you can make that can help you make further changes elsewhere in GAME.CON with the knowledge you now have. Just be aware that you need to be very careful messing with GAME.CON. There's less room for user error here, so make sure to save often and be able to backtrack if you make a mistake.

If you were able to follow along with these GAME.CON tutorials and would like to move on to gamevars, let's begin shall we? This is just a little bit of stuff you could do to get a few features you might want, but if you want a more in-depth explanation on how to use gamevars, resort to the EDuke32 Wiki.

-GAMEVAR: Using gamevars with EDuke32 can allow you to make changes to DN3D that were initially hard coded in the game. They're still hard coded, but now you can control them with gamevar instead of having to edit the DN3D source code. I don't want to get too technical, because gamevars are still something I'm learning about myself, but I do have one tutorial for beginners to get them to see the purpose and advantages of using the gamevar options. Anyways, let's go! I've decided to go with one gamevar tutorial because the GAME.CON stuff was already more involved than I intended for this tutorial session (it's aimed at novices), but if you were able to get through it then the next tutorial shouldn't be hard for you to do. Be sure to read the author's comments to understand what's going on in the code.
-Making the NVG's Like DN64:
Spoiler
That's it for now. I feel that I have written quite a bit of info that should help someone who knew nothing... know a lot more than nothing about modding DN3D now that you've read from the start to the finish of this tutorial. You've learned all about USER.CON. You've learned what's inside of DEFS.CON (though currently we've had no reason to change anything in there). You've learned what GAME.CON is all about and have even learned a few things you can do inside of GAME.CON. Plus, you learned how to implement a gamevar. With this knowledge, you should have the ability to look around these CON files and make changes to them, testing them out along the way and seeing what works and what doesn't. You'll also be able to understand the tutorials found on EDuke32 wiki better now too.

Bottom line: You can say you know how to modify DN3D. There's still more to modding Duke than just CON files. Level design, art design, etc. have not really been covered here because they aren't really specific to CON editing.

I have plans to make a tutorial specifically about art editing in the future if anyone is interested in that, but that would be a separate topic because it would be a lot of things outside of CON. I also might add a few more gamevar tutorials to this thread later, but we'll see for now.

So even if this does become the final post for this thread, I hope you've found it all to be informative and I hope you learned a thing or two!

This post has been edited by gerolf: 31 August 2020 - 07:52 PM

6

#8

When editing .con files having a program that tells you the line number the code is on is helpful.

Notepad++ is a good program for that. https://notepad-plus....org/downloads/

It also support custom language syntax. This will help highlight parts of the code for you.

Get a custom Con Language syntax file here http://www.mediafire...o8m4msbku0/file

To use open notepad++ go to the language pulldown menu, go to user defined language - define your language.
In the next window hit import and import the file.


Also if your edits crash eduke32 look for the eduke32.log where your exe is at.

Warnings and errors will look something like this: Code\game.CON:197: warning: empty `else' branch

That number after game.con is the line in game.con making the warning.
The game will run with warnings, but your code might not work right.

If it was an error the game would crash. You would need to go to the line in the .con file it tells you and fix something.

Hope this help anyone running into problems.



Thanks for providing all this info for people not in the know.

This post has been edited by -=SomeThingEviL=-: 01 September 2020 - 12:36 PM

2

User is online   ck3D 

#9

I'm not sure if conversation in this thread is welcome or if you'd rather keep it a succession of tutorials but I want to show some appreciation for such an initiative, it is very welcome and in many ways the structure reminds me of Brett Gmoser & co.'s old mapping tutorials/FAQ's. Once you feel like it is complete, I could see it constitute a reference that would be complementary to the Infosuite, somehow. Thanks and please keep it up!

This post has been edited by ck3D: 04 September 2020 - 09:49 AM

2

User is offline   Jimmy 

  • 1776 World Wide

#10

That's a good point. Something like this is worthy of it's own separate domain from the forum, ala the InfoSuite or EDuke Wiki.

I'd suggest studying and expanding upon Reaper_Man/MSleeper's old website, which I still think is the best way to get started with CON, even though it doesn't cover anything EDuke. Their emphasis on teaching programming as a language really makes it easier to understand the code in your mind, than if you think of it as something else. I don't think they'd care if you just straight up jacked portions of their guide, but you should be able to contact them rather easily if you'd prefer getting permission.

ConFAQ4.2 could be somewhat useful as well, but I've always found it clunky and some of it is just wrong.

This post has been edited by Jimmy: 04 September 2020 - 11:50 AM

5

User is offline   gerolf 

  • Honored Donor

#11

Good idea, guys. I think I might just do that in some way. I might reformat the guide a bit to fit better as a single document instead of separate posts. I'm not entirely sure what steps to take to get it on a separate domain, but I'll certainly look into it.

I'm glad to see that this is appreciated by the way, so thank you for the comments.

I absolutely agree with you Jimmy about teaching programming as a language instead of trying to interpret it as something else. I personally think that's the only true way to understand exactly what's going on with a file like GAME.CON. I think many people get into programming because they grow up around computer programming and they use this knowledge to mod games, and others get into programming through modding the games they play, but I feel there are also many people that want to mod games but are not computer-savvy, and a lot of the tutorials I see are aimed at people who have at least some sort of programming experience. My attempt was to try to get them to understand the key concepts (though I have not covered art or map related topics) of modding DN3D, with the hopes that they will want to explore the files and learn on their own how to achieve even more changes to the game.

With that said, thanks for linking to Reaper_Man's old site. I remember that site from years ago, and couldn't remember what it was called.

I think I have the basics down for the most part in this guide, so I think I'd consider it finished, but if it is hosted elsewhere I would probably expand upon it since I wouldn't be limited to the forum layout. I have considered writing a few more gamevar tutorials and at least one tutorial that requires an edit of DEFS.CON (so the reader can see a demonstration of how to edit each CON file), but other than that I'm not sure what else I'd add other than SomeThingEvil's troubleshooting info (I knew I was forgetting something, so that was very much appreciated).
3

User is offline   Mark 

#12

For years I have been gathering up snippets of con code "tricks" ( examples ). I have been meaning to clean up the text and combine them into a wiki addon but just can't whip up the ambition to do it. If you or someone else wants to give it a try I can send you my collection. Actual examples of usage has been a shortcoming for a long time in the wiki for many entries.
2

User is offline   gerolf 

  • Honored Donor

#13

View PostMark, on 05 September 2020 - 11:43 AM, said:

For years I have been gathering up snippets of con code "tricks" ( examples ). I have been meaning to clean up the text and combine them into a wiki addon but just can't whip up the ambition to do it. If you or someone else wants to give it a try I can send you my collection. Actual examples of usage has been a shortcoming for a long time in the wiki for many entries.


I'd certainly be interested in taking a look at your collection. I can't guarantee I'd be able to clean it all up (nor how long it would take), but I could certainly try. I'll see about getting this thread formatted on the wiki one way or another, or wherever people prefer, and I could expand the guide much further and with extra examples I should be able to make it even easier for novices to understand. Also, I would credit you for the examples used.
0

User is offline   Mark 

#14

I zipped them up as-is. Might as well post them here for everyone in case they want to browse thru them for ideas. About 120 files.
Some are old using deprecated commands.
Some are missing context from the thread they were taken from but still able to figure out how to use.
Some are untested but should work, according to the poster.
Many are complete and include comments or instructions.
I started cleaning up the formatting of some because they were real jumbled.

If you do eventually get them all together in a clear understandable format, you don't need to give me any credit.
All I did was copy/paste code from others in the forum over the years. I don't think any of my own code is in there.

Attached File(s)



This post has been edited by Mark: 05 September 2020 - 02:19 PM

5

#15

I made a Youtube video on Setting up a Workstation for Making a Total Conversion. Dissecting Duke Nukem, and Con File info.

https://youtu.be/GZ4gDTBN13A
7

User is offline   F!re-Fly 

#16

Hi guys. You have good initiatives to do this and that could help me as well. I am stuck in my progress.
1

Share this topic:


Page 1 of 1
  • 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