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   DNSKILL5 

  • 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   DNSKILL5 

  • 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   DNSKILL5 

  • 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   DNSKILL5 

  • 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   DNSKILL5 

  • 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   DNSKILL5 

  • 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   DNSKILL5 

  • 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 offline   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 

  • Let's go Brandon!

#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   DNSKILL5 

  • 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   DNSKILL5 

  • Honored Donor

#13

 Mark, 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

User is offline   eniojr 

#17

Does anyone know if there's a code to be used directly in .CON file to add more colors to access cards (green, gray and brown) and how to make access card icons to appear with those colors in the same place as blue, red and yellow cards in the status bar? I'd love to include new colors to be used in the map I'm doing right now. Or better, if the icons of new colors for access cards in status bar to appear that they don't overlap?
0

User is offline   Reaper_Man 

  • Once and Future King

#18

No. That kind of functionality would require extensive work.
0

User is offline   eniojr 

#19

I'm a newbie to .CON language. I imported new textures to my custom Tilesxxx.art using BAFed and even made animations in it and also new definitions in names.h file. I used texture slot values from 10000 to higher values to avoid overwrite any existing textures from the original game or mods.

What I need now are some code examples on how to transform a texture into some things like: usable buttons, destructible objects (explosives like TNT and non explosives like furniture and trash cans), simple actors with sounds (like those babes from Shadow Warrior), climbing ladder effect (as in Naferia or Shadow Warrior), new access cards and access switches or even like those analogic keys of Shadow Warrior, a bit more complex actors (scared nunning man and woman or animals with their own sounds). I also need to know on how to add new sounds and ambient sounds without overwrite existing ones. My goal is to make an addon, not an entire new mod, much less a total conversion (too complex for me). What I just need are some simple code effects for each of these things mentioned. With those I will try to understand what each code mean.

Remember that I don't know programming language, such as C++. Long ago I changed game.con sometimes, but with minimal changes, without knowing much what I was doing...

It seems to me that the most difficult codes for Duke Nukem are to make complex enemies, new characters, new sector effects and new weapons. They seem to be the most difficult to me.

This post has been edited by eniojr: 10 May 2024 - 08:02 PM

0

User is online   Danukem 

  • Duke Plus Developer

#20

View Posteniojr, on 10 May 2024 - 08:02 PM, said:

usable buttons


Could be done with a useractor detecting hits with ifhitweapon and reseting its strength when hit, then have it display the new picnum using cactor or an action (have two different actors running same code if the former method), and have it use operactoractivators, operaterespawns and operatemasterswitches on its lotag saved to a var from the sprite in EVENT_LOADACTOR.

That would be of medium difficulty of the ones you listed and what I wrote would unpack into about 20 lines of code I think. The loading event and the activation use features of Eduke32 scripting, the rest is part of the old scripting system from 1996. A super easy one would be making new actors that explode into debris when shot.

What is hard or easy in a system is relative to how the system is constructed. Build engine itself sets some constraints on what is easy/hard, then the design of the scripting language makes some of the possible things easier than others. The easiest things to do in the language tend to be things for which specific scripting commands were created to do them. If you come at this with a wish list of things you want to do and no idea of how it works, you might be making it very hard on yourself. I suggest becoming passingly familiar with the basics in the old scripting system from the 1996 game before moving on.
0

User is offline   eniojr 

#21

Ok, I am creating a map right now to be played using Legacy mod. I don't want to overwrite anything from the original game or mod, I just want to add things, because I'm making an addon, a custom episode to be played with Legacy. Legacy mod lets you make custom episodes and add extra music. But I also created new Tilesxxx.art and names.h that should be placed in the main mod folder. The new tilesxxx.art won't interfere with the mod, because the extra art will only appear in my custom episode. As for the names.h, it has extra lines for new textures, without changing anything from the mod. For now I learned how to add textures and make animations using BAFed and to create definitions in names.h. The next step will be to add the new definitions from names.h in DEFS.CON, which I already did. I created a custom .CON file and for that to work I made EDUKE.CON to load GAME.CON, USER.CON, DEFS.CON and the new .CON file I did. The new file will have new codes in a way to not interfere with the existing ones from the original game and mod.

What I want to learn about coding in sequence right now with at least one example now is:

1-) How to make destructible objects (furniture and explosive).

2-) How to make new buttons, access cards and access switches. In this case the new access card will have to interact with the new access switch for that card.

3-) How to add new sounds and ambient sounds to the game.

4-) How to make simple actors that can be killed or rescued for new babes (Duke Nukem) and girls that shoot you when you interact (Shadow Warrior).

5-) How to make non enemy actors that only run away and shout and can be killed.

6-) How to make simple animals (similar to those of Redneck Rampage).

7-) How to make a new sector effector for climbing (like in Naferia or Shadow Warrior).

8-) If possible, a code for vacuum and closing door when shooting glass inside door sector (from Lameduke).

That's what I need to know to make my custom episode for Legacy to be original and good enough in terms of gameplay.

We have a mod that mixture elements of the final game and beta versions. Now I want to make a custom episode in a way that add new elements to gameplay, but without changing the mod as a whole.
0

User is offline   ck3D 

#22

It sounds like your starting point should be learning how to make basic actors/useractors and so your coded objects and NPC's. The EDuke Wiki already has all the info one needs for that (should be your number one source), or this very forum has tutorial threads that are exactly about that, e.g.. https://forums.duke4...oding-tutorial/

The reason is you're not getting direct answers and blocks of code to copy paste is this isn't DooM where everything is relatively conveniently accessible/modifiable and the way Duke works with hardcoded stuff, in order to achieve at least half of the 'simple' things you listed you want you're going to have to rewrite part of the game, make do with in-map practical effects (clever combinations of the existing dynamics), and/or reconsider your approach in that sense. The other half (e.g.. sounds) actually is simple, and also super well documented on the EDuke Wiki and on the Infosuite.

This post has been edited by ck3D: 11 May 2024 - 12:59 PM

0

User is online   Danukem 

  • Duke Plus Developer

#23

View Posteniojr, on 11 May 2024 - 09:12 AM, said:

Ok, I am creating a map right now to be played using Legacy mod. I don't want to overwrite anything from the original game or mod, I just want to add things, because I'm making an addon, a custom episode to be played with Legacy. Legacy mod lets you make custom episodes and add extra music. But I also created new Tilesxxx.art and names.h that should be placed in the main mod folder. The new tilesxxx.art won't interfere with the mod, because the extra art will only appear in my custom episode. As for the names.h, it has extra lines for new textures, without changing anything from the mod. For now I learned how to add textures and make animations using BAFed and to create definitions in names.h. The next step will be to add the new definitions from names.h in DEFS.CON, which I already did. I created a custom .CON file and for that to work I made EDUKE.CON to load GAME.CON, USER.CON, DEFS.CON and the new .CON file I did. The new file will have new codes in a way to not interfere with the existing ones from the original game and mod.

What I want to learn about coding in sequence right now with at least one example now is:

1-) How to make destructible objects (furniture and explosive).

2-) How to make new buttons, access cards and access switches. In this case the new access card will have to interact with the new access switch for that card.

3-) How to add new sounds and ambient sounds to the game.

4-) How to make simple actors that can be killed or rescued for new babes (Duke Nukem) and girls that shoot you when you interact (Shadow Warrior).

5-) How to make non enemy actors that only run away and shout and can be killed.

6-) How to make simple animals (similar to those of Redneck Rampage).

7-) How to make a new sector effector for climbing (like in Naferia or Shadow Warrior).

8-) If possible, a code for vacuum and closing door when shooting glass inside door sector (from Lameduke).

That's what I need to know to make my custom episode for Legacy to be original and good enough in terms of gameplay.

We have a mod that mixture elements of the final game and beta versions. Now I want to make a custom episode in a way that add new elements to gameplay, but without changing the mod as a whole.


For 1, 3, 4, 5 and 6 there are already examples in GAME.CON (also DEFS.CON and USER.CON for sounds) you can look at, or ones that are pretty close. For example look at state breakobject and the actors that call that state for breakables. For actors running away, look at how they behave when shrunk using fleeenemy on their move command. Use a guide such as this one https://wiki.eduke32.com/wiki/Confaq42 combined with the examples in GAME.CON and you will get through those numbers I listed. If you are trying, you have code and it's not working even after looking carefully at examples and the guide, and there is a specific problem like a compiler error or unexpected behavior, that is when you post for help on the forum with the specific question about what is going wrong. Otherwise, there's not much we can do except tell you to learn some basic as I just have.
1

User is offline   eniojr 

#24

I'm having serious problems into adding things to the game, using Eduke32. Everytime I try to add actors, there's an error. I added a line in GAME.CON, to include BREAK.CON, a new file with codes related to breakable objects. But even with simple codes I still get error messages.

Here's the BREAK.CON file for now with 2 new breakable objects, a glass furniture and an explosive barrel:

useractor GLASSPLATE
{
    states
    {
    Spawn:
        GLASSPLATE     1      noflicker    A_Look
        loop
    }

    action A_Break
    {
        GLASSPLATE     1      noflicker    A_PlaySound(10)
        A_SpawnItemEx("GlassShard1", 128, 0, 0, 0, 0, 0, 0, 0)
        A_SpawnItemEx("GlassShard2", 128, 0, 0, 0, 0, 0, 0, 0)
        A_SpawnItemEx("GlassShard3", 128, 0, 0, 0, 0, 0, 0, 0)
        A_SpawnItemEx("GlassShard4", 128, 0, 0, 0, 0, 0, 0, 0)
        vanish
        stop
    }
}

useractor SWEXPLOSIVE1
{
    states
    {
    Spawn:
        SWEXPLOSIVE1     1      noflicker    A_Look
        loop
    }

    action A_Explode
    {
        SWEXPLOSIVE1     1      noflicker    A_PlaySound(20)
        A_Explode(20, 128, 0, 0, 0)
        vanish
        stop
    }
}
}


Is there anything wrong or missing here? The new objects were included in DEFS.CON and they are also in names.h, with their own textures in a new Tiles023.ART file.
0

User is online   Danukem 

  • Duke Plus Developer

#25

There's a lot wrong there; in general it doesn't follow the syntax of the language. Start by copy pasting an existing actor in the game that already works and then experiment with adding or changing single lines of code.
0

User is offline   eniojr 

#26

Ok, I'll try, but aside from the actor code, is there anything more to be added in the new .CON file, in order to avoid compilation error? It's because I'm avoiding to put the code in GAME.CON. What I know so far is that I'll have to use useractor instead of actor to add new things.
0

User is offline   Reaper_Man 

  • Once and Future King

#27

That code looks like it was written by ChatGPT. ChatGPT really, really doesn't understand how to write or use CON.

The compilation errors are because everything about that code is wrong. I don't know what language this is, but it isn't CON.
0

User is offline   quakis 

#28

View PostReaper_Man, on 12 May 2024 - 05:46 AM, said:

I don't know what language this is, but it isn't CON.

Honestly looks like DECORATE to me.

@eniojr, I highly recommend you work from the basics and go from there to understand CON scripting. Start from the CONFAQ42 that Danukem already linked to and then grasp the basics of Eduke features. Refer to the tutorials here and understand code from other projects to help reinforce how things operate. It's how I managed to get a good grasp of things starting from nothing.

Edit: There's even a tutorial on breakable actors right here: https://wiki.eduke32...Breakable_Actor

This post has been edited by quakis: 12 May 2024 - 01:00 PM

0

User is offline   eniojr 

#29

I found the breakable tutorial and finally I managed to make some breakable objects. Now I'm trying to make an object to alter the texture when fired. For example, I have a static doll texture. When I fire the doll, it should show an animated texture. The static texture for the doll is 12261, and the first texture of the animated doll texture is 12268. I could make an object break. Now I want to make an object texture to transform into another texture, without breaking. If I get that to work, the next step will be on how to make a wall texture to change to another texture. After that, on how to add a new dipswitch or button texture in the game, without change the textures from the original game. I already managed to create 2 new custom health items too.
0

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